CN110532050A - Exercise data method for refreshing, wearable device and computer readable storage medium - Google Patents

Exercise data method for refreshing, wearable device and computer readable storage medium Download PDF

Info

Publication number
CN110532050A
CN110532050A CN201910702371.7A CN201910702371A CN110532050A CN 110532050 A CN110532050 A CN 110532050A CN 201910702371 A CN201910702371 A CN 201910702371A CN 110532050 A CN110532050 A CN 110532050A
Authority
CN
China
Prior art keywords
exercise data
refreshing
broadcast
wearable device
moving interface
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
CN201910702371.7A
Other languages
Chinese (zh)
Other versions
CN110532050B (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.)
Nubia Technology Co Ltd
Original Assignee
Nubia Technology 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 Nubia Technology Co Ltd filed Critical Nubia Technology Co Ltd
Priority to CN201910702371.7A priority Critical patent/CN110532050B/en
Publication of CN110532050A publication Critical patent/CN110532050A/en
Application granted granted Critical
Publication of CN110532050B publication Critical patent/CN110532050B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/16Constructional details or arrangements
    • G06F1/1613Constructional details or arrangements for portable computers
    • G06F1/163Wearable computers, e.g. on a belt
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • 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
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The invention discloses a kind of exercise data method for refreshing, wearable device and computer readable storage medium, this method includes when detecting moving interface process operation, starting the receiving sensor process;The receiving sensor process obtains exercise data, carries the exercise data by broadcast, and be sent to the moving interface process;The moving interface process carries out interface refreshing according to the exercise data, when solving existing sports applications by the progress exercise data refreshing of bind mechanism, there are problems that larger coupling, the invention also discloses a kind of wearable device and computer readable storage mediums, by implementing above scheme, being directly coupled property of code is reduced, realizes the scheme optimization of multiple application process data acquisitions.

Description

Exercise data method for refreshing, wearable device and computer readable storage medium
Technical field
The present invention relates to fields of communication technology, more specifically to a kind of exercise data method for refreshing, wearable device And computer readable storage medium.
Background technique
The all preset sports applications (Application, app) of existing wearable device majority, can be to the finger of user movement Mark feature, which is recorded and carries out refreshing, to be shown, wherein refreshing display process includes: to open two process sport healths using upper layer ProcessA and receiving sensor process processB, processB be continuous receiving sensor data per second and stored into Journey (long-range service);When user's open movement health processA process, tied up by binding service BindService Surely start processB process, and take the binder of processB, processA Open Timer device was obtained for the period 1 second by bind Access evidence, and interface is flushed to, realize the real-time refreshing display of exercise data;But above-mentioned refreshing display during, exist with Lower problem: 1, two processes carry out pressure association, are not easy to extend, such as have another application to need the exercise data, and need The binder service is wanted, coupling is too big.
Summary of the invention
The technical problem to be solved in the present invention is that when existing sports applications carry out exercise data refreshing by bind mechanism, There are problems that larger coupling, for the technical problem, provides a kind of exercise data method for refreshing, wearable device and calculating Machine readable storage medium storing program for executing.
In order to solve the above technical problems, the present invention provides a kind of exercise data method for refreshing, the exercise data refreshing side Method includes:
Sports applications include moving interface process and receiving sensor process;
When detecting moving interface process operation, start the receiving sensor process;
The receiving sensor process obtains exercise data, carries the exercise data by broadcast, and is sent to described Moving interface process;
The moving interface process carries out interface refreshing according to the exercise data.
Optionally, before the receiving sensor process acquisition exercise data, comprising:
When the moving interface process runs or resumes operation, the radio receiver of the moving interface process is registered.
Optionally, after the radio receiver of the registration moving interface process, comprising:
When the moving interface process is stopping, the radio receiver is nullified.
Optionally, the exercise data method for refreshing, further includes:
When the cancellation number of the radio receiver is greater than preset times, detects the moving interface process and restore again When operation, whether judgement is current only has the sports applications request exercise data;
If so, the moving interface process obtains the exercise data by interprocess communication IPC mechanism.
Optionally, before the exercise data by broadcast carrying, comprising:
The receiving sensor process judges whether the exercise data changes;
If so, carrying the exercise data by broadcast.
Optionally, before the exercise data by broadcast carrying, further includes:
Judge whether the last time interval for sending exercise data of distance meets preset time threshold;
If so, carrying the exercise data by broadcast.
Optionally, described that the exercise data is carried by broadcast, and it is sent to the moving interface process, comprising:
The receiving sensor process sends broadcast, and carries the exercise data by medium.
Optionally, the moving interface process carries out interface refreshing according to the exercise data, comprising:
The moving interface process radio receiver receives the broadcast, the exercise data is obtained from medium, and adjust Interface refreshing is carried out with interface refresh function.
Further, the present invention also provides a kind of wearable device, the wearable device includes processor, memory And communication bus;
The communication bus is for realizing the connection communication between the processor and the memory;
The processor is as described above to realize for executing one or more program stored in the memory Step in exercise data method for refreshing.
Further, the present invention also provides a kind of computer readable storage medium, the computer readable storage mediums It is stored with one or more program, one or more of programs can be executed by one or more processor, to realize Step in exercise data method for refreshing as described above.
Beneficial effect
The present invention provides a kind of exercise data method for refreshing, wearable device and computer readable storage medium, for existing When there are sports applications to carry out exercise data refreshing by bind mechanism, there are problems that larger coupling and resource consumption, Caton, When by detecting moving interface process operation, start the receiving sensor process;The receiving sensor process obtains Exercise data is taken, the exercise data is carried by broadcast, and be sent to the moving interface process;The moving interface process Interface refreshing is carried out according to the exercise data, i.e., by the information exchange between broadcast mechanism realization process, it is direct to reduce code Coupling, realize the scheme optimization of multiple application process data acquisitions.
Detailed description of the invention
The drawings herein are incorporated into the specification and forms part of this specification, and shows and meets implementation of the invention Example, and be used to explain the principle of the present invention together with specification.
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, for those of ordinary skill in the art Speech, without any creative labor, is also possible to obtain other drawings based on these drawings.
Present invention will be further explained below with reference to the attached drawings and examples, in attached drawing:
Fig. 1 is a kind of hardware structural diagram of embodiment of wearable device provided in an embodiment of the present invention;
Fig. 2 is a kind of hardware schematic of embodiment of wearable device provided in an embodiment of the present invention;
Fig. 3 is a kind of hardware schematic of embodiment of wearable device provided in an embodiment of the present invention;
Fig. 4 is a kind of hardware schematic of embodiment of wearable device provided in an embodiment of the present invention;
Fig. 5 is a kind of hardware schematic of embodiment of wearable device provided in an embodiment of the present invention;
Fig. 6 is the exercise data method for refreshing basic flow chart that first embodiment of the invention provides;
Fig. 7 is the exercise data method for refreshing flow chart that second embodiment of the invention provides;
Fig. 8 is the exercise data method for refreshing flow chart that third embodiment of the invention provides;
Fig. 9 is the structural schematic diagram for the wearable device that fourth embodiment of the invention provides.
Specific embodiment
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.
In subsequent description, it is only using the suffix for indicating such as " module ", " component " or " unit " of element Be conducive to explanation of the invention, itself there is no a specific meaning.Therefore, " module ", " component " or " unit " can mix Ground uses.
The wearable device provided in the embodiment of the present invention includes that Intelligent bracelet, smartwatch and smart phone etc. move Dynamic terminal.With the continuous development of Screen Technology, the appearance of the screens form such as flexible screen, Folding screen, smart phone etc. is mobile eventually End can also be used as wearable device.The wearable device provided in the embodiment of the present invention may include: RF (Radio Frequency, radio frequency) unit, WiFi module, audio output unit, A/V (audio/video) input unit, sensor, display The components such as unit, user input unit, interface unit, memory, processor and power supply.
It will be illustrated by taking wearable device as an example in subsequent descriptions, referring to Fig. 1, its each implementation to realize the present invention A kind of hardware structural diagram of wearable device of example, which may include: RF (Radio Frequency, radio frequency) unit 101, WiFi module 102, audio output unit 103, A/V (audio/video) input unit 104, Sensor 105, display unit 106, user input unit 107, interface unit 108, memory 109, processor 110, Yi Ji electricity The components such as source 111.It will be understood by those skilled in the art that wearable device structure shown in Fig. 1 is not constituted to wearable The restriction of equipment, wearable device may include perhaps combining certain components or difference than illustrating more or fewer components Component layout.
It is specifically introduced below with reference to all parts of the Fig. 1 to wearable device:
Radio frequency unit 101 can be used for receiving and sending messages or communication process in, signal sends and receivees, specifically, radio frequency list Uplink information can be sent to base station by member 101, and after the downlink information that in addition can also be sent base station receives, being sent to can be worn The processor 110 for wearing equipment is handled, and base station can be to the downlink information that radio frequency unit 101 is sent and be sent out according to radio frequency unit 101 What the uplink information sent generated, it is also possible to actively push away to radio frequency unit 101 after the information update for detecting wearable device It send, for example, base station can penetrating to wearable device after detecting that geographical location locating for wearable device changes Frequency unit 101 sends the message informing of geographical location variation, and radio frequency unit 101, can should after receiving the message informing The processor 110 that message informing is sent to wearable device is handled, and it is logical that the processor 110 of wearable device can control the message Know on the display panel 1061 for being shown in wearable device;In general, radio frequency unit 101 include but is not limited to antenna, at least one Amplifier, transceiver, coupler, low-noise amplifier, duplexer etc..In addition, radio frequency unit 101 can also pass through channel radio Letter communicated with network and other equipment, specifically may include: by wireless communication with the server communication in network system, example Such as, wearable device can download file resource from server by wireless communication, for example can download and answer from server With program, after wearable device completes the downloading of a certain application program, if the corresponding file of the application program in server Resource updates, then the server can be by wireless communication to the message informing of wearable device push resource updates, to remind User is updated the application program.Any communication standard or agreement can be used in above-mentioned wireless communication, including but not limited to GSM (Global System of Mobile communication, global system for mobile communications), GPRS (General Packet Radio Service, general packet radio service), CDMA2000 (Code Division Multiple Access 2000, CDMA 2000), (Wideband Code Division Multiple Access, wideband code division are more by WCDMA Location), TD-SCDMA (Time Division-Synchronous Code Division Multiple Access, time division synchronous CDMA), (Frequency Division Duplexing-Long Term Evolution, frequency division duplex are long by FDD-LTE Phase evolution) and TDD-LTE (Time Division Duplexing-Long Term Evolution, time division duplex are drilled for a long time Into) etc..
In one embodiment, wearable device 100 can access existing communication network by insertion SIM card.
In another embodiment, wearable device 100 can be come real by the way that esim card (Embedded-SIM) is arranged Existing communication network is now accessed, by the way of esim card, the inner space of wearable device can be saved, reduce thickness.
It is understood that although Fig. 1 shows radio frequency unit 101, but it is understood that, radio frequency unit 101 its And it is not belonging to must be configured into for wearable device, it can according to need within the scope of not changing the essence of the invention and save completely Slightly., wearable device 100 can realize the communication connection with other equipment or communication network separately through wifi module 102, The embodiment of the present invention is not limited thereto.
WiFi belongs to short range wireless transmission technology, and wearable device can help user to receive and dispatch by WiFi module 102 Email, browsing webpage and access streaming video etc., it provides wireless broadband internet access for user.Although Fig. 1 WiFi module 102 is shown, but it is understood that, and it is not belonging to must be configured into for wearable device, it completely can root It is omitted within the scope of not changing the essence of the invention according to needs.
Audio output unit 103 can be in call signal reception pattern, call mode, record in wearable device 100 When under the isotypes such as mode, speech recognition mode, broadcast reception mode, by radio frequency unit 101 or WiFi module 102 it is received or The audio data that person stores in memory 109 is converted into audio signal and exports to be sound.Moreover, audio output unit 103 can also provide audio output relevant to the specific function that wearable device 100 executes (for example, call signal reception sound Sound, message sink sound etc.).Audio output unit 103 may include loudspeaker, buzzer etc..
A/V input unit 104 is for receiving audio or video signal.A/V input unit 104 may include graphics processor (Graphics Processing Unit, GPU) 1041 and microphone 1042, graphics processor 1041 is in video acquisition mode Or the image data of the static images or video obtained in image capture mode by image capture apparatus (such as camera) carries out Reason.Treated, and picture frame may be displayed on display unit 106.Through graphics processor 1041, treated that picture frame can be deposited Storage is sent in memory 109 (or other storage mediums) or via radio frequency unit 101 or WiFi module 102.Mike Wind 1042 can connect in telephone calling model, logging mode, speech recognition mode etc. operational mode via microphone 1042 Quiet down sound (audio data), and can be audio data by such acoustic processing.Audio that treated (voice) data can To be converted to the format output that can be sent to mobile communication base station via radio frequency unit 101 in the case where telephone calling model. Microphone 1042 can be implemented various types of noises elimination (or inhibition) algorithms and send and receive sound to eliminate (or inhibition) The noise generated during frequency signal or interference.
In one embodiment, wearable device 100 includes one or more cameras, by opening camera, It can be realized the capture to image, realize the functions such as take pictures, record a video, the position of camera, which can according to need, to be configured.
Wearable device 100 further includes at least one sensor 105, for example, optical sensor, motion sensor and other Sensor.Specifically, optical sensor includes ambient light sensor and proximity sensor, wherein ambient light sensor can be according to ring The light and shade of border light adjusts the brightness of display panel 1061, proximity sensor can when wearable device 100 is moved in one's ear, Close display panel 1061 and/or backlight.As a kind of motion sensor, accelerometer sensor can detect in all directions The size of (generally three axis) acceleration, can detect that size and the direction of gravity, can be used to identify mobile phone posture when static It (for example pedometer, is struck using (such as horizontal/vertical screen switching, dependent game, magnetometer pose calibrating), Vibration identification correlation function Hit) etc..
In one embodiment, wearable device 100 further includes proximity sensor, can by using proximity sensor Wearable device can be realized non-contact manipulation, provide more modes of operation.
In one embodiment, wearable device 100 further includes heart rate sensor, when wearing, by close to using Person can be realized the detecting of heart rate.
In one embodiment, wearable device 100 can also include that fingerprint sensor can by reading fingerprint Realize the functions such as safety verification.
Display unit 106 is for showing information input by user or being supplied to the information of user.Display unit 106 can wrap Display panel 1061 is included, liquid crystal display (Liquid Crystal Display, LCD), Organic Light Emitting Diode can be used Forms such as (Organic Light-Emitting Diode, OLED) configure display panel 1061.
In one embodiment, display panel 1061 uses flexible display screen, and wearable using flexible display screen sets For when wearing, screen is able to carry out bending, to more be bonded.Optionally, flexible display screen can use OLED screen body with And graphene screen body, in other embodiments, flexible display screen is also possible to other display materials, and the present embodiment is not with this It is limited.
In one embodiment, the display panel 1061 of wearable device can take rectangle, ring when convenient for wearing Around.In other embodiments, other modes can also be taken.
User input unit 107 can be used for receiving the number or character information of input, and generate and wearable device User setting and the related key signals input of function control.Specifically, user input unit 107 may include touch panel 1071 And other input equipments 1072.Touch panel 1071, also referred to as touch screen collect the touch behaviour of user on it or nearby Make (for example user uses any suitable objects or attachment such as finger, stylus on touch panel 1071 or in touch panel Operation near 1071), and corresponding attachment device is driven according to preset formula.Touch panel 1071 may include touching Two parts of detection device and touch controller.Wherein, the touch orientation of touch detecting apparatus detection user, and detect touch behaviour Make bring signal, transmits a signal to touch controller;Touch controller receives touch information from touch detecting apparatus, and It is converted into contact coordinate, then gives processor 110, and order that processor 110 is sent can be received and executed.This Outside, touch panel 1071 can be realized using multiple types such as resistance-type, condenser type, infrared ray and surface acoustic waves.In addition to touching Panel 1071 is controlled, user input unit 107 can also include other input equipments 1072.Specifically, other input equipments 1072 It can include but is not limited to physical keyboard, function key (such as volume control button, switch key etc.), trace ball, mouse, operation One of bar etc. is a variety of, specifically herein without limitation.
In one embodiment, one or more buttons have can be set in the side of wearable device 100.Button can be with The various ways such as short-press, long-pressing, rotation are realized, to realize a variety of operating effects.The quantity of button can be different to be multiple It can be applied in combination between button, realize a variety of operating functions.
Further, touch panel 1071 can cover display panel 1061, when touch panel 1071 detect on it or After neighbouring touch operation, processor 110 is sent to determine the type of touch event, is followed by subsequent processing device 110 according to touch thing The type of part provides corresponding visual output on display panel 1061.Although in Fig. 1, touch panel 1071 and display panel 1061 be the function that outputs and inputs of realizing wearable device as two independent components, but in certain embodiments, Touch panel 1071 and display panel 1061 can be integrated and be realized the function that outputs and inputs of wearable device, specifically herein Without limitation.For example, processor 110 can be controlled when receiving the message informing of a certain application program by radio frequency unit 101 The message informing show in a certain predeterminable area of display panel 1061 by system, the predeterminable area and touch panel 1071 certain One region is corresponding, can be to corresponding to area on display panel 1061 by carrying out touch control operation to a certain region of touch panel 1071 The message informing shown in domain is controlled.
Interface unit 108 be used as at least one external device (ED) connect with wearable device 100 can by interface.Example Such as, external device (ED) may include wired or wireless headphone port, external power supply (or battery charger) port, You Xianhuo Wireless data communications port, memory card port, the port for connecting the device with identification module, audio input/output (I/O) end Mouth, video i/o port, ear port etc..Interface unit 108 can be used for receiving the input from external device (ED) (for example, number It is believed that breath, electric power etc.) and the input received is transferred to one or more elements in wearable device 100 or can For transmitting data between wearable device 100 and external device (ED).
In one embodiment, wearable device 100 interface unit 108 using contact structure, by contact with Corresponding other equipment connection, realizes the functions such as charging, connection.Use contact can be with waterproof.
Memory 109 can be used for storing software program and various data.Memory 109 can mainly include storing program area The storage data area and, wherein storing program area can (such as the sound of application program needed for storage program area, at least one function Sound playing function, image player function etc.) etc.;Storage data area can store according to mobile phone use created data (such as Audio data, phone directory etc.) etc..In addition, memory 109 may include high-speed random access memory, it can also include non-easy The property lost memory, a for example, at least disk memory, flush memory device or other volatile solid-state parts.
Processor 110 is the control centre of wearable device, utilizes various interfaces and the entire wearable device of connection Various pieces, by running or execute the software program and/or module that are stored in memory 109, and call and be stored in Data in memory 109 execute the various functions and processing data of wearable device, to carry out to wearable device whole Monitoring.Processor 110 may include one or more processing units;Preferably, processor 110 can integrate application processor and modulation Demodulation processor, wherein the main processing operation system of application processor, user interface and application program etc., modulation /demodulation processing Device mainly handles wireless communication.It is understood that above-mentioned modem processor can not also be integrated into processor 110.
Wearable device 100 can also include the power supply 111 (such as battery) powered to all parts, it is preferred that power supply 111 can be logically contiguous by power-supply management system and processor 110, thus charged by power-supply management system realization management, The functions such as electric discharge and power managed.
Although Fig. 1 is not shown, wearable device 100 can also be including bluetooth module etc., and details are not described herein.It is wearable to set Standby 100, by bluetooth, can connect with other terminal devices, realize communication and the interaction of information.
Fig. 2-Fig. 4 is please referred to, is the structure under a kind of a kind of embodiment of wearable device provided in an embodiment of the present invention Schematic diagram.Wearable device in the embodiment of the present invention, including flexible screen.In wearable device expansion, flexible screen is in Strip;When wearable device is in wearing state, flexible screen bending is annular in shape.Fig. 2 and Fig. 3 show wearable device Structural schematic diagram when screen is unfolded, Fig. 4 show structural schematic diagram when wearable device screen-bending.
Based on above-mentioned each embodiment, it can be seen that if the equipment is wrist-watch, bracelet or wearable device When, the screen of the equipment can not overlay device watchband region, can also be with the watchband region of overlay device.Here, this hair Bright to propose a kind of optional embodiment, in the present embodiment, the equipment for wrist-watch, bracelet or wearable can be set Standby, the equipment includes screen and interconnecting piece.The screen can be flexible screen, and the interconnecting piece can be watchband.It can Choosing, the screen of the equipment or the viewing area of screen can be partly or completely covered on the watchband of equipment.Such as Fig. 5 Shown, Fig. 5 is a kind of a kind of hardware schematic of embodiment of wearable device provided in an embodiment of the present invention, the equipment Screen extends to two sides, and part is covered on the watchband of equipment.In other embodiments, the screen of the equipment can also be with It is all covered on the watchband of the equipment, the embodiment of the present invention is not limited thereto.
First embodiment
Exercise data in the prior art refreshes display mode and has the following problems: 1, two processes carry out pressure association, It is not easy to extend, than needing the data if any another application, and needs the binder service, coupling is too big.2, because answering Obtaining data by bind mechanism with layer is android IPC mechanism, is time-consuming operation, and the interface needs to refresh in real time (often Second refresh primary), occur anr, with regard to relatively common the problems such as Caton, which is to cause interface Caton serious, and seriously disappear The main reason for consuming system resource.3, interface processA is that period binder obtains data, when data do not change, It is constantly to obtain, seriously consumes system resource.4, because user movement is long-time operation, service is needed to connect for a long time Hold;When system resource is inadequate, receiving sensor process processB is easy to be killed, and leads to user movement, But interface could not be shown.
To solve the above-mentioned problems, the present embodiment provides a kind of exercise data method for refreshing, as shown in figure 3, Fig. 6 is this reality The exercise data method for refreshing basic flow chart of example offer is applied, which includes:
S601, detect moving interface process operation when, start receiving sensor process.
It is understood that sports applications include moving interface process and receiving sensor process, moving interface process is used In the exercise data of display user, receiving sensor process is for receiving the fortune that (acceleration, gyroscope etc.) sensor detects Dynamic data;When the operation of moving interface process, such as user's open movement application, when into display interface, start receiving sensor Process can be and bind starting receiving sensor process by BindService.
S602, receiving sensor process obtain exercise data, carry exercise data by broadcast, and be sent to moving interface Process.
In the present embodiment, receiving sensor process obtains the exercise data that sensor detects in real time, passes through android It is decoupled between Broadcast carry out process, carries exercise data by and by broadcast, be sent to moving interface process.Tool Body, before receiving sensor process obtains exercise data, when moving interface process runs or resumes operation, register the movement The radio receiver of interface process.It is understood that when the operation of moving interface process refers to that the normal open movement of user is answered When with software, terminal can execute an onresume (), resume operation and refer to that user switches back to sports applications interface again When, such as from other application switchback, or from screen lock state switchback etc., terminal can also execute onresume ();It therefore, can be The registration of addition registerReceiver () radio receiver in onresume (), and then after the registration of completion broadcast, two It can be by broadcast receiving and transmitting data, wherein then illustrating that Activity (is equivalent to one when onResume method readjustment between process A interface) on foreground as it can be seen that can be interacted with user.
It should be understood that needing service, connection is held for a long time since user movement is long-time operation, in order to The resource of terminal is reduced, after the radio receiver for registering moving interface process, when moving interface process is stopping, being nullified Radio receiver;In the present embodiment, moving interface process is stopping referring to that moving interface Activity is switched to another A other application interface A ctivity or terminal enter dormant state etc., can execute onpause (), therefore, can be in onpause The cancellation of addition unRegisterReceiver () radio receiver, then indicates when wherein onPause method is called back in () Activity is stopping (Paused form), and under normal circumstances and then onStop method can be called back.Moving interface at this time The exercise data that process cannot be sent by broadcast reception receiving sensor process.
In some embodiments, after having nullified radio receiver, moving interface process is run multiple times or resumes operation When, it needs repeatedly to register radio receiver, frequent registration, cancellation radio receiver will cause the resource of terminal and centainly disappear Consumption, therefore in the present embodiment, exercise data method for refreshing further includes when the cancellation number of radio receiver is greater than preset times When, such as nullify number in certain time and be greater than preset times 5 times, illustrate the frequent registration of radio receiver, nullify, so When detection moving interface process is resumed operation again afterwards, the current whether only sports applications request exercise data of judgement, such as It is that moving interface process obtains the exercise data by interprocess communication IPC mechanism;Such as when only one application needs to move When data, movement process interface obtains exercise data by bind mechanism.Certainly in other embodiments, when determining broadcast reception After device is frequently registered, nullified, when detecting that moving interface process is resumed operation again, moving interface process passes through bind mechanism Obtain exercise data.
In the present embodiment, when the exercise data that sensor detects may be it is not changed, at this time receive sensing Device still sends duplicate exercise data, will cause the waste of terminal resource, therefore, when the broadcast of moving interface process registers connects Device is received, before receiving sensor carries exercise data by broadcast, receiving sensor process judges whether exercise data becomes Change, if so, used broadcast carries the exercise data.I.e. after receiving sensor gets exercise data, to exercise data into Row judgement, sends broadcast when a change;It can be exercise data when exercise data changes and all become all the time Change, be also possible to exercise data and send variation whithin a period of time, when sending variation all the time, if receiving sensor is per Per quarter all sends broadcast, certain consumption can be also caused to the resource of terminal, therefore in the present embodiment, and data are sent beyond the clouds After variation, it is default can also to judge whether the last time interval for sending exercise data of distance meets with receiving sensor Time threshold, if so, carrying exercise data by broadcast;Wherein preset time threshold can be arranged by terminal, can also by with Family setting, can also be adjusted flexibly according to actual needs, such as the habit of sports applications is used according to user, when movement circle Face process whithin a period of time continuous service when, lesser preset time threshold, such as 8s are set;When continuing for moving interface process Runing time is shorter, and longer preset time threshold, such as 15s is arranged.
It in some embodiments, can also be into when exercise data changes and/or transmission time interval meets condition One step judges whether the exercise data needs to refresh, and then broadcast is sent when needing to refresh, it is to be understood that movement Data include but is not limited to movement velocity, movement position etc.;The exercise data for needing to refresh can be specified by user, such as when connecing Sensor is received when determining that movement velocity changes, but when user needs not look at movement velocity, then does not need to refresh movement speed Degree, then when sending broadcast, the exercise data of carrying does not include movement velocity.
In the present embodiment, receiving sensor carries exercise data by broadcast, and is sent to runnable interface process, specifically Including receiving sensor process sends broadcast, and carries exercise data by medium, such as (manage Intent by Intent Solve " medium " communicated between different components, the special relevant information that component is provided and is called mutually) carry the movement number reported According to.
S603, moving interface process carry out interface refreshing according to exercise data.
After moving interface process radio receiver receives broadcast, exercise data is obtained from medium, such as pass through Intent gets exercise data, calls interface refresh function to carry out interface refreshing later, such as utilize Handler or utilization PostInvalidate (), Lai Shixian refreshed interface in thread.
A kind of exercise data method for refreshing is present embodiments provided, when moving interface process is run, starts receiving sensor Process, and interface process runs or when resuming operation beyond the clouds, registers radio receiver, is stopping in moving interface process When, nullify radio receiver;After receiving sensor receives exercise data, when determining that exercise data is eligible, send Broadcast, and by medium carrying exercise data, and then after moving interface process radio receiver receives data broadcasting, from media Cloud data are obtained, interface refresh function is called directly and carries out refreshing and show;By the above method, the communication between process is reduced Coupling between code avoids the serious consumption of terminal resource.
Second embodiment
In order to make it easy to understand, the present embodiment provides a kind of exercise data method for refreshing, as shown in fig. 7, Fig. 7 is the present invention the The exercise data method for refreshing refined flow chart that two embodiments provide, the exercise data method for refreshing include:
S701, detect moving interface process operation when, start receiving sensor process.
In the present embodiment, when sports applications start, moving interface process operation, user can be used by moving interface Family interaction, starts receiving sensor at this time, and wherein other application (such as wechat application) can also start receiving sensor process.
S702, when moving interface process is run or when resuming operation, registers the radio receiver of moving interface process.
When the normal open movement application software of user, radio receiver is registered in the operation of moving interface process.
S703, receiving sensor process obtain exercise data, judge whether exercise data changes, if so, turn S704, If not, turning S703.
It is compared by the exercise data for sending current operating data with the last time, determines whether exercise data occurs Variation, wherein exercise data includes movement velocity.The kinematic parameters such as movement position can be and judge whether all kinematic parameters are sent out Changing.
S704, judge whether the last time interval for sending exercise data of distance meets preset time threshold, if not, turning S705, if so, turning S706.
When exercise data changes, moving interface process, which just needs to refresh, to be shown, but the movement process refreshes in real time, There are problems that interface Caton, therefore whether further judges the last time interval for sending exercise data of current time distance Meet preset time threshold, such as 5s.
S705, when time interval meets preset time threshold, send broadcast, and exercise data carried by medium.
Such as the last time interval for sending exercise data of current time distance is 3s, then when time interval is 5s, Broadcast is sent, exercise data is carried.
S706, broadcast is sent, and exercise data is carried by medium.
S707, moving interface process radio receiver receive broadcast, and exercise data is obtained from medium and interface is called to brush New function carries out interface refreshing.
After radio receiver receives broadcast, the information carried in broadcast is obtained, when the information needs of carrying refresh When exercise data, interface refresh function is called to carry out interface refreshing.
S708, when moving interface process is stopping, nullify radio receiver.
When user is switched to another application interface from moving interface, radio receiver is nullified.
In other embodiments, it frequently registers, nullify in certain time when radio receiver, detect moving interface When process is resumed operation again, and determine that currently only sports applications request exercise data, i.e. other application not will start When receiving sensor process, moving interface process is serviced by the binder that binding service obtains receiving sensor, moving interface Process initiation timer, period 5s obtain exercise data by binder, and refresh display, movement circle next time later in real time When face process obtains exercise data, the mode obtained using broadcast can be restored to.
A kind of exercise data method for refreshing is present embodiments provided, carry out process is broadcasted by android Broadcast Between decouple, by and by broadcast carry data, be sent to interface process, interface process gets data and refreshes in real time The scheme optimization of multiple application process data acquisitions is realized, by right wherein solving the decoupling between code by broadcast in interface Exercise data is further judged, after exercise data itself meets condition with sending time, carries out broadcast carrying, is solved existing There is interface process binder each second in technology to obtain bracelet resource consumption and Caton problem caused by this time-consuming operation of data.
3rd embodiment
In order to make it easy to understand, the present embodiment is illustrated exercise data method for refreshing with a more specific example, As shown in figure 8, the exercise data method for refreshing includes:
When S801, moving interface processA get up, start proximity sensor process processB.
S802, the registration that registerReceiver () radio receiver is added in onresume (), in onpause The cancellation of addition unRegisterReceiver () radio receiver in ().
S803, when receive exercise data process processB get exercise data after, exercise data is sentenced It is disconnected, when exercise data changes, and need to refresh and exercise data transmission time interval is all satisfied and sends broadcast when requiring, and The new exercise data reported is carried by Intent.
After S804, sport health processA radio receiver receive exercise data broadcast, obtained by Intent To exercise data, calls directly interface refresh function and carry out interface refreshing.
Fourth embodiment
The present embodiment provides a kind of wearable devices, as shown in figure 9, the wearable device includes processor 901, memory 902 and communication bus 903.
Wherein, the communication bus 903 in the present embodiment is logical for realizing the connection between processor 901 and memory 902 Letter, processor 901 is then for executing one or more program stored in memory 902, to perform the steps of
Sports applications include moving interface process and receiving sensor process;
When detecting the operation of moving interface process, start receiving sensor process;
Receiving sensor process obtains exercise data, carries exercise data by broadcast, and be sent to moving interface process;
Moving interface process carries out interface refreshing according to exercise data.
In the present embodiment, processor 901, can be with before realizing that step receiving sensor process obtains exercise data When moving interface process runs or resumes operation, the radio receiver of moving interface process is registered.Further, registration broadcast After receiver, when moving interface process is stopping, radio receiver is nullified.
In some embodiments, processor 901 can also be realized when the cancellation number of radio receiver is greater than preset times When, when detection moving interface process is resumed operation again, whether judgement is current only has sports applications request exercise data;Such as It is that moving interface process obtains exercise data by interprocess communication IPC mechanism.
It should be noted that whether receiving sensor process judges exercise data before carrying exercise data by broadcast It changes;Further after exercise data changes, judge apart from upper one if so, carrying exercise data by broadcast Whether the secondary time interval for sending exercise data meets preset time threshold;If so, carrying exercise data by broadcast.
In the present embodiment, proximity sensor process carries exercise data by broadcast, and is sent to moving interface process, It specifically includes, receiving sensor process sends broadcast, and carries exercise data by medium;And then the broadcast of moving interface process connects It receives device and receives broadcast, exercise data is obtained from medium, and interface refresh function is called to carry out interface refreshing.
It is worth noting that, not fully expounding first embodiment, second in the present embodiment in fact in order not to burden explanation Apply example, all examples in 3rd embodiment, it is understood that, first embodiment, second embodiment, in 3rd embodiment All examples are suitable for the present embodiment.
The present embodiment also provides a kind of computer readable storage medium, the computer-readable recording medium storage have one or The multiple programs of person, one or more program can be executed by one or more processor, to realize as in the various embodiments described above Exercise data method for refreshing in step.
The present invention provides a kind of wearable device and computer readable storage medium, for realizing the refreshing of above-mentioned exercise data Method starts receiving sensor process when by detecting the operation of moving interface process;Receiving sensor process obtains movement number According to carrying exercise data by broadcast, and be sent to moving interface process;Moving interface process carries out interface according to exercise data Refresh, i.e., by the information exchange between broadcast mechanism realization process, reduces being directly coupled property of code, realize multiple application processes The scheme optimization of data acquisition.
It should be noted that, in this document, the terms "include", "comprise" or its any other variant are intended to non-row His property includes, so that the process, method, article or the device that include a series of elements not only include those elements, and And further include other elements that are not explicitly listed, or further include for this process, method, article or device institute it is intrinsic Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including being somebody's turn to do There is also other identical elements in the process, method of element, article or device.
The serial number of the above embodiments of the invention is only for description, does not represent the advantages or disadvantages of the embodiments.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side Method can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but in many cases The former is more preferably embodiment.Based on this understanding, technical solution of the present invention substantially in other words does the prior art The part contributed out can be embodied in the form of software products, which is stored in a storage medium In (such as ROM/RAM, magnetic disk, CD), including some instructions are used so that a terminal (can be mobile phone, computer, service Device, air conditioner or network equipment etc.) execute method described in each embodiment of the present invention.
The embodiment of the present invention is described with above attached drawing, but the invention is not limited to above-mentioned specific Embodiment, the above mentioned embodiment is only schematical, rather than restrictive, those skilled in the art Under the inspiration of the present invention, without breaking away from the scope protected by the purposes and claims of the present invention, it can also make very much Form, all of these belong to the protection of the present invention.

Claims (10)

1. a kind of exercise data method for refreshing, which is characterized in that the exercise data method for refreshing includes:
Sports applications include moving interface process and receiving sensor process;
When detecting moving interface process operation, start the receiving sensor process;
The receiving sensor process obtains exercise data, carries the exercise data by broadcast, and be sent to the movement Interface process;
The moving interface process carries out interface refreshing according to the exercise data.
2. exercise data method for refreshing as described in claim 1, which is characterized in that the receiving sensor process obtains movement Before data, comprising:
When the moving interface process runs or resumes operation, the radio receiver of the moving interface process is registered.
3. exercise data method for refreshing as claimed in claim 2, which is characterized in that the registration moving interface process After radio receiver, comprising:
When the moving interface process is stopping, the radio receiver is nullified.
4. exercise data method for refreshing as claimed in claim 3, which is characterized in that the exercise data method for refreshing also wraps It includes:
When the cancellation number of shown radio receiver is greater than preset times, detects the moving interface process and resume operation again When, whether judgement is current only has the sports applications request exercise data;
If so, the moving interface process obtains the exercise data by interprocess communication IPC mechanism.
5. exercise data method for refreshing according to any one of claims 1-4, which is characterized in that described to carry institute by broadcast Before stating exercise data, comprising:
The receiving sensor process judges whether the exercise data changes;
If so, carrying the exercise data by broadcast.
6. exercise data method for refreshing as claimed in claim 5, which is characterized in that described to carry the movement number by broadcast According to before, comprising:
Judge whether the last time interval for sending exercise data of distance meets preset time threshold;
If so, carrying the exercise data by broadcast.
7. exercise data method for refreshing according to any one of claims 1-4, which is characterized in that described to carry institute by broadcast Exercise data is stated, and is sent to the moving interface process, comprising:
The receiving sensor process sends broadcast, and carries the exercise data by medium.
8. exercise data method for refreshing as claimed in claim 7, which is characterized in that the moving interface process is according to the fortune Dynamic data carry out interface refreshing, comprising:
The moving interface process radio receiver receives the broadcast, the exercise data is obtained from the medium, and adjust Interface refreshing is carried out with interface refresh function.
9. a kind of wearable device, which is characterized in that the wearable device includes processor, memory and communication bus;
The communication bus is for realizing the connection communication between the processor and the memory;
The processor is for executing one or more program stored in the memory, to realize such as claim 1 to 8 Any one of described in exercise data method for refreshing in step.
10. a kind of computer readable storage medium, which is characterized in that the computer-readable recording medium storage have one or Multiple programs, one or more of programs can be executed by one or more processor, to realize such as claim 1 to 8 Any one of described in exercise data method for refreshing in step.
CN201910702371.7A 2019-07-31 2019-07-31 Motion data refreshing method, wearable device and computer readable storage medium Active CN110532050B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910702371.7A CN110532050B (en) 2019-07-31 2019-07-31 Motion data refreshing method, wearable device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910702371.7A CN110532050B (en) 2019-07-31 2019-07-31 Motion data refreshing method, wearable device and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN110532050A true CN110532050A (en) 2019-12-03
CN110532050B CN110532050B (en) 2023-08-25

Family

ID=68661059

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910702371.7A Active CN110532050B (en) 2019-07-31 2019-07-31 Motion data refreshing method, wearable device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN110532050B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111198702A (en) * 2019-12-23 2020-05-26 宁波港信息通信有限公司 Interface refreshing method and device, computer equipment and storage medium
CN115525372A (en) * 2022-01-06 2022-12-27 荣耀终端有限公司 Method and device for displaying interface

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102063309A (en) * 2009-11-17 2011-05-18 英业达股份有限公司 System for monitoring and synchronously refreshing downloading of motion program data and method thereof
WO2016159903A1 (en) * 2015-03-27 2016-10-06 Vakif Emekli̇li̇k Anoni̇m Şi̇rketi̇ A kind of life monitoring system used in the field of insurance
CN107153583A (en) * 2017-05-24 2017-09-12 努比亚技术有限公司 A kind of striding course interaction processing method, mobile terminal and computer-readable recording medium
CN107179950A (en) * 2017-06-29 2017-09-19 努比亚技术有限公司 A kind of application process processing method, mobile terminal and computer-readable recording medium
CN109471603A (en) * 2017-09-07 2019-03-15 华为终端(东莞)有限公司 A kind of interface display method and device
CN109885415A (en) * 2019-02-25 2019-06-14 努比亚技术有限公司 Information notice method, wearable device and computer readable storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102063309A (en) * 2009-11-17 2011-05-18 英业达股份有限公司 System for monitoring and synchronously refreshing downloading of motion program data and method thereof
WO2016159903A1 (en) * 2015-03-27 2016-10-06 Vakif Emekli̇li̇k Anoni̇m Şi̇rketi̇ A kind of life monitoring system used in the field of insurance
CN107153583A (en) * 2017-05-24 2017-09-12 努比亚技术有限公司 A kind of striding course interaction processing method, mobile terminal and computer-readable recording medium
CN107179950A (en) * 2017-06-29 2017-09-19 努比亚技术有限公司 A kind of application process processing method, mobile terminal and computer-readable recording medium
CN109471603A (en) * 2017-09-07 2019-03-15 华为终端(东莞)有限公司 A kind of interface display method and device
CN109885415A (en) * 2019-02-25 2019-06-14 努比亚技术有限公司 Information notice method, wearable device and computer readable storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
杜春赛: "基于Android平台的智能模拟手环系统", 《工业控制计算机》 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111198702A (en) * 2019-12-23 2020-05-26 宁波港信息通信有限公司 Interface refreshing method and device, computer equipment and storage medium
CN115525372A (en) * 2022-01-06 2022-12-27 荣耀终端有限公司 Method and device for displaying interface
CN115525372B (en) * 2022-01-06 2023-08-18 荣耀终端有限公司 Method and device for displaying interface

Also Published As

Publication number Publication date
CN110532050B (en) 2023-08-25

Similar Documents

Publication Publication Date Title
CN109982179A (en) Audio frequency signal output, device, wearable device and storage medium
CN110109725A (en) A kind of interface color method of adjustment and wearable device
CN110515448A (en) Lift wrist detection service automatic closing method, equipment and computer readable storage medium
CN110213810A (en) Wearable device control method, wearable device and computer readable storage medium
CN110175066A (en) Wearable device, interaction control method and computer readable storage medium
CN110532050A (en) Exercise data method for refreshing, wearable device and computer readable storage medium
CN110086940A (en) Message prompt method, wearable device and readable storage medium storing program for executing
CN110134312A (en) Control method, wearable device and computer readable storage medium
CN110083289A (en) A kind of button display methods, wearable device and computer readable storage medium
CN109933294A (en) Data processing method, device, wearable device and storage medium
CN110069132A (en) Application control method, intelligent wearable device and computer readable storage medium
CN110167113A (en) A kind of apparatus control method, wearable device and computer readable storage medium
CN110086929A (en) Breath screen display methods, mobile phone, wearable device and computer readable storage medium
CN110162161A (en) Control method, wearable device and the computer readable storage medium of target application
CN109947501A (en) Starting processing method, wearable device and the storage medium of application program
CN110147158A (en) A kind of power consumption control method, wearable device and computer readable storage medium
CN110430560A (en) Method, wearable device and the storage medium of wearable device upload data
CN110059203A (en) Date storage method, wearable device and computer readable storage medium
CN109976608A (en) A kind of application clocking method, equipment and computer readable storage medium
CN110120208A (en) A kind of method, wearable device and storage medium that automatic adjustment screen is shown
CN110083205A (en) Page switching method, wearable device and computer readable storage medium
CN109976613A (en) Text input implementation method, wearable device and computer readable storage medium
CN110162247A (en) A kind of screen control method, wearable device and computer readable storage medium
CN110187801A (en) Detection method, wearable device and computer readable storage medium
CN109901812A (en) Wearable device volume adjusting method, wearable device and readable storage medium storing program for executing

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