CN117112251A - Communication method and related equipment - Google Patents

Communication method and related equipment Download PDF

Info

Publication number
CN117112251A
CN117112251A CN202310444222.1A CN202310444222A CN117112251A CN 117112251 A CN117112251 A CN 117112251A CN 202310444222 A CN202310444222 A CN 202310444222A CN 117112251 A CN117112251 A CN 117112251A
Authority
CN
China
Prior art keywords
application
wearable device
message
ams
party application
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.)
Pending
Application number
CN202310444222.1A
Other languages
Chinese (zh)
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.)
Honor Device Co Ltd
Original Assignee
Honor Device 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 Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202310444222.1A priority Critical patent/CN117112251A/en
Publication of CN117112251A publication Critical patent/CN117112251A/en
Pending legal-status Critical Current

Links

Classifications

    • 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/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/546Message passing systems or structures, e.g. queues
    • 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/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • 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 application provides a communication method and related equipment. According to the communication method, the JS application framework in the wearable device can register a communication interface, and the AMS can bind the communication interface. The local application in the wearable device may communicate with the third party application through the communication interface. By the method, the local application and the third party application in the wearable device can realize data sharing, more application scenes can be expanded, and user experience is improved.

Description

Communication method and related equipment
Technical Field
The present application relates to the field of terminal technologies, and in particular, to a communication method and related devices.
Background
Currently, a third party application in a part of wearable devices is developed in JavaScript (abbreviated as JS) language, and a local application is developed based on an Operating System (OS). The third party application in the wearable device cannot communicate with the local application, so that the data of the third party application and the local application cannot be shared, and the third party application and the local application cannot be used together.
Thus, how to enable communication between a third party application and a local application in a wearable device is a current challenge.
Disclosure of Invention
The application provides a communication method and related equipment. According to the communication method, the JS application framework in the wearable device can register a communication interface, and the AMS can bind the communication interface. The local application in the wearable device may communicate with the third party application through the communication interface. By the method, the local application and the third party application in the wearable device can realize data sharing, more application scenes can be expanded, and user experience is improved.
In a first aspect, the present application provides a method of communication. The method can be applied to an electronic device. The method may include: a local application in the electronic device sends a first message to a capacity management service AMS in the electronic device; the AMS sends a first message to a third party application in the electronic equipment through a first communication interface; or the AMS receives a second message sent by the third party application through the first communication interface; the AMS sends a second message to the local application. The first communication interface is a communication interface between the AMS and a JS application framework in the electronic device. The first message includes a package name of the local application, a package name of the third party application, and first target transmission data. The second message includes a package name of the third party application, a package name of the local application, and second target transmission data.
In the scheme provided by the application, the local application in the electronic equipment can send the first message to the AMS, and the AMS sends the first message to the third party application through the first communication interface. That is, a local application in the electronic device may send data to a third party application in the electronic device through the first communication interface. The AMS in the electronic device may also receive a second message sent by the third-party application over the first communication interface and send the second message to the local application. That is, a third party application in the electronic device may send data to a local application in the electronic device through the first communication interface. Through the mode, the electronic equipment can realize interaction between the local application and the third-party application through the first communication interface, so that data sharing is realized, more application scenes are realized, and user experience is improved.
In some embodiments of the present application, the first communication interface may be an interface M in the embodiments described below.
It should be noted that any local application and any third party application in the electronic device may communicate based on the first communication interface. In some embodiments of the application, the native application may include associated instructions that invoke the first communication interface. Similarly, the third party application may include associated instructions for invoking the first communication interface.
In some embodiments of the present application, the first message may be message X11 in the embodiments described below.
In some embodiments of the present application, the second message may be message X12 in the embodiments described below.
It is understood that, for the specific meaning of the first target transmission data and the second target transmission data, reference may be made to the description about the target transmission data in the embodiments described later, and the description is not given here.
It should be noted that the local application mentioned in the claims may be any local application in the electronic device. In some embodiments of the application, the local application mentioned in the claims may be the local application N in the embodiments described later.
Similarly, it should also be noted that the third party application referred to in the claims may be any third party application in an electronic device. In some embodiments of the application, the third party application mentioned in the claims may be the third party application T in the embodiments described below.
It is also to be noted that the electronic device mentioned in the claims may be a wearable device mentioned in the embodiments described below.
With reference to the first aspect, in one possible implementation manner, before the local application in the electronic device sends the first message to the capability management service AMS in the electronic device, or before the AMS receives the second message sent by the third party application through the first communication interface, the method may further include: the electronic equipment starts a third party application; the JS application framework registers a first communication interface; the AMS binds the first communication interface.
In the scheme provided by the application, the electronic equipment can register the first communication interface between the local application and the third-party application based on the first communication interface. Specifically, after the electronic device starts the third party application, the JS application framework in the electronic device may register the first communication interface, and correspondingly, the AMS may bind the first communication interface.
In some embodiments of the application, the user operation triggers the electronic device to launch a third party application, and the electronic device may launch a registration procedure to register the first communication interface. In this way, the electronic device can register the first communication interface before the local application and the third party application communicate, and does not need to wait until the local application sends a message to the third party application or until the third party application sends a message to the local application, thereby saving communication time between the local application and the third party application.
Illustratively, the user clicks an application icon of the third party application, and in response to the clicking, the electronic device launches the third party application and initiates the registration process. The registration procedure may include: the JS application framework registers the first communication interface, and notifies the AMS to bind the first communication interface.
The user may trigger the initiation of a third party application in browsing another application, and the electronic device may initiate the registration process.
It should be noted that, in some embodiments of the present application, after the electronic device is started, the third party application may trigger the start-up registration procedure to register the first communication interface after the first start-up.
In still other embodiments of the present application, the local application sends a message to the third party application via the AMS, during which the third party application may launch, after which the electronic device may launch the registration procedure. Further, the JS application framework registers the first communication interface, and notifies the AMS to bind the first communication interface.
With reference to the first aspect, in one possible implementation manner, before the electronic device starts the third party application, the method may further include: the local application sends a third message to the AMS; the AMS determines whether there is an running application in the electronic device and compares the priority of the running application with that of the third party application in case there is an running application in the electronic device. The electronic device starts a third party application, which may specifically include: in the case that there is no running application in the electronic device or the priority of the running application is not higher than the priority of the third party application, the electronic device starts the third party application. After the AMS binds the first communication interface, the method may further include: the AMS transmits third target transmission data to the third party application through the first communication interface. The third message includes a packet name of the local application, a packet name of the third party application, and third target transmission data.
In the scheme provided by the application, the local application sends a message to the third party application through the AMS, the third party application can be started in the process, and the electronic equipment can start a registration process after the third party application is started. Notably, the electronic device will launch the third party application only if there is no running application or if the priority of the running application is not higher than the priority of the third party application. This means that the electronic device starts the third party application only under the condition that the running condition of the application with higher priority is not affected, and further starts the registration process, so that the requirements and experience of the user are fully considered.
In some embodiments of the present application, the third message may be message X1 in the later-described embodiments.
It is understood that the specific meaning of the third target transmission data may be referred to the description of the target transmission data in the following embodiments, and will not be explained here.
With reference to the first aspect, in one possible implementation manner, before the JS application framework registers the first communication interface, the method may further include: the JS application framework sends a fourth message to the third-party application. After the JS application framework registers the first communication interface, the method may further include: the JS application framework sends a fifth message to the AMS. The fourth message is used for notifying the third party application to start the registration process. The fifth message is used to inform the AMS that the first communication interface is registered.
In some embodiments of the present application, the fourth message may be message X8 in the later-described embodiments.
In some embodiments of the present application, the fifth message may be message X9 in the later-described embodiments.
With reference to the first aspect, in one possible implementation manner, the electronic device starts a third party application may specifically include: AMS sends a sixth message to JS application framework; the JS application framework loads related components of the third-party application and sends a seventh message to the AMS. The sixth message is used for notifying the JS application framework to start the third-party application; the seventh message is used to inform the AMS that the third party application has been launched.
In some embodiments of the present application, the sixth message may be message X6 in the later-described embodiments.
In some embodiments of the present application, the seventh message may be message X7 in the later-described embodiments.
It can be appreciated that the specific manner in which the JS application framework loads relevant components of the third-party application can be found in the embodiments described below, and will not be described here.
With reference to the first aspect, in one possible implementation manner, before the electronic device starts the third party application, the method may further include: the AMS establishes communication connection with a UI component in the electronic device; the AMS requests the UI component to place the original display interface in the background.
In the scheme provided by the application, before the electronic equipment starts the third-party application, the UI component can be firstly requested to improve the interface resource so as to display the related interface of the third-party application.
It is understood that the specific manner in which the AMS establishes a communication connection with a UI component in the electronic device may be found in the embodiments described below, and will not be described herein.
With reference to the first aspect, in one possible implementation manner, after the AMS sends the first message to the third party application in the electronic device through the first communication interface, the method may further include: the AMS receives an eighth message sent by the third party application through the first communication interface; the AMS transmits an eighth message to the third party application. The eighth message includes the packet name of the third party application, the packet name of the local application, and the fourth target transmission data.
In the scheme provided by the application, the local application in the electronic equipment can be used as a sender of the message to communicate with the third party application, and can also be used as a receiver of the message to communicate with the third party application. That is, after the communication interface is registered, the electronic device does not limit the message sender and the message receiver in the communication between the local application and the third party application, so that data sharing can be maximally realized, more application scenes are expanded, and user experience is improved.
In some embodiments of the present application, the eighth message may be message X12 in the later-described embodiments.
It is to be understood that the specific meaning of the fourth target transmission data may be referred to the description of the target transmission data in the following embodiments, and will not be explained here.
With reference to the first aspect, in one possible implementation manner, after the AMS receives the second message sent by the third party application through the first communication interface, the method may further include: the local application sends a ninth message to the AMS; the AMS transmits a ninth message to the third party application through the first communication interface. The ninth message includes a packet name of the local application, a packet name of the third party application, and fifth target transmission data.
In some embodiments of the present application, the ninth message may be message X11 in the later-described embodiments.
It is to be understood that the specific meaning of the fifth target transmission data may be referred to the description of the target transmission data in the following embodiments, and will not be explained here.
In a second aspect, the present application provides an electronic device. The electronic device may include a display screen, a memory, and one or more processors. Wherein the memory may be coupled to the one or more processors. The memory is used for storing a computer program. The processor is configured to invoke the computer program to cause the method of any of the first aspects. In particular, the processor may be configured to: the local application sends a first message to a capacity management service AMS in the electronic device; the AMS sends a first message to a third party application through a first communication interface; or the AMS receives a second message sent by the third party application through the first communication interface; the AMS sends a second message to the local application. The first communication interface is a communication interface between the AMS and a JS application framework in the electronic device. The first message includes a package name of the local application, a package name of the third party application, and first target transmission data. The second message includes a package name of the third party application, a package name of the local application, and second target transmission data.
With reference to the second aspect, in one possible implementation manner, the processor is configured to: the local application may be further configured to, before the AMS sends the first message to the capability management service AMS in the electronic device, or before the AMS receives the second message sent by the third-party application through the first communication interface: starting a third party application; the JS application framework registers a first communication interface; the AMS binds the first communication interface.
With reference to the second aspect, in one possible implementation manner, before the processor is used to launch the third party application, the processor may be further configured to: the local application sends a third message to the AMS; the AMS determines whether there is an running application in the electronic device and compares the priority of the running application with that of the third party application in case there is an running application in the electronic device. The processor is configured to launch a third party application, and may be configured to: and starting the third party application under the condition that the running application does not exist in the electronic equipment or the priority of the running application is not higher than that of the third party application. After the AMS binds the first communication interface, the processor may be further configured to: the AMS transmits third target transmission data to the third party application through the first communication interface. The third message includes a packet name of the local application, a packet name of the third party application, and third target transmission data.
With reference to the second aspect, in one possible implementation manner, the processor is configured to: the JS application framework can also be configured to, prior to registering the first communication interface: the JS application framework sends a fourth message to the third-party application. The processor is used for: after the JS application framework registers the first communication interface, the processor can also be configured to: the JS application framework sends a fifth message to the AMS. The fourth message is used for notifying the third party application to start the registration process. The fifth message is used to inform the AMS that the first communication interface is registered.
With reference to the second aspect, in one possible implementation manner, the processor may be specifically configured to, when used to launch a third party application: AMS sends a sixth message to JS application framework; the JS application framework loads related components of the third-party application and sends a seventh message to the AMS. The sixth message is used for notifying the JS application framework to start the third-party application; the seventh message is used to inform the AMS that the third party application has been launched.
With reference to the second aspect, in one possible implementation manner, before the processor is used to launch the third party application, the processor may be further configured to: the AMS establishes communication connection with a UI component in the electronic device; the AMS requests the UI component to place the original display interface in the background.
With reference to the second aspect, in one possible implementation manner, the processor is configured to: after the AMS sends the first message to the third party application in the electronic device over the first communication interface, it may also be used to: the AMS receives an eighth message sent by the third party application through the first communication interface; the AMS transmits an eighth message to the third party application. The eighth message includes the packet name of the third party application, the packet name of the local application, and the fourth target transmission data.
With reference to the second aspect, in one possible implementation manner, the processor is configured to: after the AMS receives the second message sent by the third-party application through the first communication interface, it may be further configured to: the local application sends a ninth message to the AMS; the AMS transmits a ninth message to the third party application through the first communication interface. The ninth message includes a packet name of the local application, a packet name of the third party application, and fifth target transmission data.
In a third aspect, the application provides a computer storage medium comprising computer instructions which, when run on an electronic device, cause the electronic device to perform any one of the possible implementations of the first aspect.
In a fourth aspect, embodiments of the present application provide a chip applicable to an electronic device, the chip comprising one or more processors configured to invoke computer instructions to cause the electronic device to perform any of the possible implementations of the first aspect.
In a fifth aspect, embodiments of the present application provide a computer program product comprising instructions which, when run on an electronic device, cause the electronic device to perform any one of the possible implementations of the first aspect described above.
It will be appreciated that the electronic device provided in the second aspect, the computer storage medium provided in the third aspect, the chip provided in the fourth aspect, and the computer program product provided in the fifth aspect are all configured to perform any one of the possible implementations of the first aspect. Thus, reference may be made to the advantages of any one of the possible implementation manners of the first aspect, and the description is omitted here.
Drawings
Fig. 1 is a schematic diagram of a communication scenario provided in an embodiment of the present application;
fig. 2 is a schematic structural diagram of a wearable device 100 according to an embodiment of the present application;
fig. 3 is a schematic hardware structure of a wearable device 100 according to an embodiment of the present application;
fig. 4 is a schematic software structure diagram of a wearable device 100 according to an embodiment of the present application;
fig. 5 is a schematic diagram of a communication process between applications of a wearable device according to an embodiment of the present application;
FIG. 6 is a flow chart of a communication method according to an embodiment of the present application;
FIG. 7 is a flow chart of yet another communication method according to an embodiment of the present application;
fig. 8 is a schematic diagram of still another communication scenario provided in an embodiment of the present application;
FIGS. 9 a-9 c are a set of user interface diagrams provided in accordance with an embodiment of the present application;
FIG. 10 is a flow chart of yet another communication method according to an embodiment of the present application;
FIG. 11 is a schematic diagram of another communication scenario provided by an embodiment of the present application;
fig. 12 is a schematic diagram of still another communication scenario provided in an embodiment of the present application;
FIG. 13 is a schematic diagram of a user interface according to an embodiment of the present application;
fig. 14 is a flowchart of yet another communication method according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Wherein, in the description of the embodiments of the present application, unless otherwise indicated, "/" means or, for example, a/B may represent a or B; the text "and/or" is merely an association relation describing the associated object, and indicates that three relations may exist, for example, a and/or B may indicate: the three cases where a exists alone, a and B exist together, and B exists alone, and furthermore, in the description of the embodiments of the present application, "plural" means two or more than two.
It should be understood that the terms first, second, and the like in the description and in the claims and drawings are used for distinguishing between different objects and not necessarily for describing a particular sequential or chronological order. Furthermore, the terms "comprise" and "have," as well as any variations thereof, are intended to cover a non-exclusive inclusion. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those listed steps or elements but may include other steps or elements not listed or inherent to such process, method, article, or apparatus.
Reference in the specification to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the application. The appearances of such phrases in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Those of skill in the art will explicitly and implicitly appreciate that the described embodiments of the application may be combined with other embodiments.
At present, a third party application in wearable equipment is developed by adopting JS language, and the bottom layer calls a C++ interface through Jerryscript. It is appreciated that the JS language is a lightweight, interpreted or just-in-time compiled programming language with functional prioritization. C++ is a static-type, compiled, generic, case-sensitive, irregular programming language that supports procedural, object-oriented, and generic programming. It is appreciated that Jerryscript is a lightweight JS engine.
As shown in fig. 1, the wearable device 100 may establish a communication connection with the terminal device 200, thereby enabling information interaction with the terminal device 200. It is understood that the communication connection may be a bluetooth connection. In some embodiments of the present application, the third party application in the wearable device may implement information interaction with the terminal device such as a mobile phone through the wearable device service. It will be appreciated that the weakit service is a communication protocol between a handset and a watch, and for specific description reference is made to the relevant technical documents.
However, native applications in the wearable device 100 are developed based on the underlying framework of the OS. This means that the third party application in the wearable device 100 cannot communicate with the local application, and the third party application cannot share data with the local application.
It is understood that an operating system (i.e., OS) is a computer program that manages computer hardware and software resources. The operating system needs to handle basic transactions such as managing and configuring memory, prioritizing the supply and demand of system resources, controlling input devices and output devices, operating networks, and managing file systems. The operating system also provides an interface for the user to interact with the system.
It is understood that the wearable device 100 may be a smart watch, a smart bracelet, or the like, and the application is not limited to a particular type of wearable device 100.
The application provides a communication method and related equipment. According to the communication method, the JS application framework in the wearable device 100 can register a communication interface to which the AMS can bind. The local application in the wearable device 100 may communicate with the third party application through the communication interface. In this way, the local application and the third party application in the wearable device 100 can realize data sharing, so that more application scenes can be expanded, and the user experience is improved.
The device according to the application is first described below.
Referring to fig. 2, fig. 2 is a schematic structural diagram of a wearable device 100 according to an embodiment of the application.
As shown in fig. 2, the wearable device 100 may include a body component 110 and a wearable component 120.
Wherein the body part 110 may be provided with a sensor, a display screen, etc. The wearable device 100 may determine the movement state of the user through the sensor and collect movement data (e.g., running track, number of ropes jumped, movement time, etc.) and health data (e.g., heart rate, blood oxygen, pressure, etc.) of the user. The wearable device 100 may also display the collected health data and exercise data through a display screen. Of course, the display screen of the wearable device 100 may also display time, power, bluetooth connection status, etc. The body part 110 may further include keys 111 and 112. The body member 110 may also include magnetically attractable contacts. The wearable device 100 may be charged through the magnetically attractive contact.
The wearing part 120 may be used to mount the body part 110. As shown in fig. 2, the wearing member 120 may be a member such as a wristband or a band, and the body member 110 may be attached to a user's body (e.g., wrist).
The following specifically describes a hardware structure of the wearable device 100 according to an embodiment of the present application with reference to fig. 3.
Wearable device 100 may include a processor 101, a wireless communication module 102, a sensor module 103, a charge management module 104, a power management module 1041, a battery 1042, a magnet contact 105, an audio module 106, a speaker 106A, a receiver 106B, a microphone 106C, a display screen 107, keys 108, and a memory 109.
It is to be understood that the illustrated structure of the embodiments of the present application does not constitute a specific limitation on the wearable device 100. In other embodiments of the application, the wearable device 100 may include more or less components than illustrated, or certain components may be combined, or certain components may be split, or different arrangements of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
The processor 101 may include one or more processing units, such as: the processor 101 may include an application processor (Application Processor, AP), a modem processor, a graphics processor (Graphics Processing unit, GPU), an image signal processor (Image Signal Processor, ISP), a controller, a memory, a video codec, a digital signal processor (Digital Signal Processor, DSP), a baseband processor, and/or a Neural network processor (Neural-network Processing Unit, NPU), etc. Wherein the different processing units may be separate devices or may be integrated in one or more processors.
The controller may be, among other things, a neural hub and a command center of the wearable device 100. The controller can generate operation control signals according to the instruction operation codes and the time sequence signals to finish the control of instruction fetching and instruction execution.
In an embodiment provided by the present application, the wearable device 100 may perform the communication method by the processor 101.
A memory may also be provided in the processor 101 for storing instructions and data. In some embodiments, the memory in the processor 101 is a cache memory. The memory may hold instructions or data that has just been used or recycled by the processor 101. If the processor 101 needs to reuse the instruction or data, it may be called directly from the memory. Repeated accesses are avoided and the latency of the processor 101 is reduced, thus improving the efficiency of the system.
In some embodiments of the application, processor 101 may include one or more interfaces. The interface may be used to connect the wearable device 100 and the peripheral device. The interface may also be used to connect other electronic devices. For example, AR devices, etc.
The wireless communication module 102 may provide solutions for wireless communication including wireless local area network (Wireless Local Area Networks, WLAN) (e.g., wireless fidelity (Wireless Fidelity, wi-Fi) network), bluetooth (BT), global navigation satellite system (Global Navigation Satellite System, GNSS), frequency modulation (Frequency Modulation, FM), near field wireless communication technology (Near Field Communication, NFC), infrared technology (IR), etc., for use on the wearable device 100. The wireless communication module 102 may be one or more devices that integrate at least one communication processing module. The wireless communication module 102 may receive electromagnetic waves via an antenna, frequency modulate and filter the electromagnetic wave signals, and transmit the processed signals to the processor 101. The wireless communication module 102 may also receive a signal to be transmitted from the processor 101, frequency modulate it, amplify it, and convert it to electromagnetic waves for radiation via an antenna.
In some embodiments of the present application, the wireless communication module 102 may include at least a bluetooth module. The wearable device 100 may establish a communication connection with the terminal device 200 through a bluetooth module in the wireless communication module 102 (as shown in fig. 1).
The sensor module 103 may include one or more sensors, which may be of the same type or of different types. As shown in fig. 3, the sensor module 103 may include a pressure sensor 103A, a gyro sensor 103B, an acceleration sensor 103C, a touch sensor 103D, a bone conduction sensor 103E, a light sensor 103F, and the like.
The pressure sensor 103A is used for sensing a pressure signal, and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 103A may be disposed on the display screen 107. When a touch operation is applied to the display screen 107, the wearable device 100 detects the touch operation intensity from the pressure sensor 103A. The wearable device 100 may also calculate the position of the touch from the detection signal of the pressure sensor 103A. In some embodiments, touch operations that act on the same touch location, but at different touch operation strengths, may correspond to different operation instructions.
The gyro sensor 103B may be used to determine a motion gesture of the wearable device 100. In some embodiments, the angular velocity of the wearable device 100 about three axes (i.e., x, y, and z axes) may be determined by the gyro sensor 103B.
The acceleration sensor 103C may detect the magnitude of acceleration of the wearable device 100 in various directions (typically three axes). The magnitude and direction of gravity can be detected when the wearable device 100 is stationary. The acceleration sensor 103C may also be used to identify the pose of the wearable device 100, for applications such as landscape switching, pedometers, etc.
The touch sensor 103D is also referred to as a "touch panel". The touch sensor 103D may be disposed on the display screen 107, and the touch sensor 103D and the display screen 107 form a touch screen, which is also referred to as a "touch screen". The touch sensor 103D is for detecting a touch operation acting thereon or thereabout. The touch sensor may communicate the detected touch operation to the application processor to determine the touch event type. Visual output related to the touch operation may be provided through the display screen 107. In other embodiments, the touch sensor 103D may also be disposed on the surface of the wearable device 100 at a different location than the display 107.
The bone conduction sensor 103E may acquire a vibration signal. In some embodiments of the present application, bone conduction sensor 103E may also contact the human pulse and receive a blood pressure pulsation signal. In some embodiments, the application processor may parse the heart rate information based on the blood pressure beat signals acquired by the bone conduction sensor 103E to implement a heart rate detection function.
The light sensor 103F may include a light emitting diode and a photo receiver. The wearable device 100 may irradiate a beam of light into skin tissue of a human body through a light emitting diode in the light sensor 103F, and then convert the received light signal into an electrical signal through a photo receiver. Because the blood flow of the human body periodically changes along with the pulse, and the proportion of the oxyhemoglobin cells in the blood also changes along with the pulse, the absorption degree of the oxyhemoglobin cells on the incident light also shows periodic changes along with the pulse, and the electric signal received at the receiving end also changes along with the pulse. The light sensor 103F can obtain the heart rate in the above manner. The wearable device 100 may also irradiate the finger with infrared light and red light simultaneously by the light emitting diode, and then measure the absorption spectrum of the reflected light by the light sensor 103F. Because oxygenated hemoglobin in the blood absorbs more red light, less infrared light, and hemoglobin absorbs more infrared light, less red light, the wearable device 100 can measure blood oxygen content in the above manner.
It will be appreciated that the sensor module 103 shown in fig. 3 is merely an exemplary division, and that other divisions are possible and the application is not limited in this regard.
The charge management module 104 is configured to receive a charge input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charge management module 104 may receive a charging input of the wired charger through the magnetically attractable contacts 105. In some wireless charging embodiments, the charge management module 104 may receive wireless charging input through a wireless charging coil of the wearable device 100. The charging management module 104 may also supply power to the wearable device 100 through the power management module 1041 while charging the battery 1042. The magnetically attractive contact 105 can also be understood as a magnetic sensor.
The audio module 106 is used to convert digital audio information into an analog audio signal output and also to convert an analog audio input into a digital audio signal. A speaker 106A for converting an audio electric signal into a sound signal. And a receiver 106B for converting the audio electric signal into a sound signal. Microphone 106C for converting the sound signal into an electrical signal.
The display screen 107 is used for displaying a screen or the like. The display 107 may include a display panel. The display panel may employ a liquid crystal display (Liquid Crystal Display, LCD), an Organic Light-Emitting Diode (OLED), an Active-Matrix Organic Light Emitting Diode (AMOLED), a flexible Light-Emitting Diode (Flex Light-Emitting Diode), a Mini LED, a Micro-OLED, a quantum dot Light-Emitting Diode (Quantum Dot Light Emitting Diodes, QLED), or the like.
The keys 108 may be mechanical keys or touch keys. The wearable device 100 may receive key inputs, generating key signal inputs related to user settings and function control of the wearable device 100. In some embodiments of the application, wearable device 100 may include keys 111 and 112 as shown in fig. 2.
Memory 109 may be used to store computer executable program code. The executable program code includes instructions. The processor 101 executes various functional applications of the wearable device 100 and data processing by executing instructions stored in the memory 109. The memory 109 may include a stored program area and a stored data area. The storage program area may store an application program (such as a sound playing function, an image video playing function, etc.) required for at least one function of the operating system, etc. The storage data area may store data created during use of the wearable device 100 (e.g., audio data, phonebook, etc.), and so on.
In some embodiments of the application, the wearable device 100 may store collected health data, movement data, etc. of the user in the memory 109.
It is understood that in some embodiments of the present application, wearable device 100 may include a motor. The motor may generate a vibration alert. For example, the motor may be used for incoming call vibration prompting, or for touch vibration feedback. For example, touch operations acting on different applications (e.g., photographing, audio playing, etc.) may correspond to different vibration feedback effects. The motor may also correspond to different vibration feedback effects by touch operations applied to different areas of the display screen 107. Different application scenarios (such as time reminding, receiving information, alarm clock, game, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect may also support customization. The wearable device 100 may also include an indicator. The indicator may be an indicator light, which may be used to indicate a state of charge, a change in power, or may be used to indicate a message, missed call, notification, etc.
The following describes in detail the software structure of the wearable device 100 according to the embodiment of the present application with reference to fig. 4.
The wearable device 100 may include a local application, a third party application (i.e., a JS application), a JS application framework, an OS framework layer, and an OS kernel layer.
A local application may be understood as an application installed in the wearable device 100 when the operating system is installed before the wearable device 100 leaves the factory. The local application may include a health application. The user may record health data and athletic data through the health application. Of course, the local applications may also include gallery, bluetooth, music, etc. applications. In accordance with the above, the native application in wearable device 100 captures the c++ language development.
A third party application may be understood as an application downloaded through an application store. For example, the third party applications may include navigation applications downloaded from an application store, search engines, and the like. It can be appreciated that the third party application in the wearable device 100 is developed in JS language, and belongs to the JS application.
The JS application framework is used to support the development of third-party applications. The JS application framework can include JS data binding (data binding), JS runtime (runtime), and JS framework (frame work).
The JS databinding can include a binding relationship, among other things. View model instance (view model), publisher (subject), and observer (object). In the wearable device 100, the compiler compiles html and CSS into JS code and JSON object, and makes the JS interface call to c++ implementation by using the engine, and the calling process needs participation of JS data binding.
JS runtimes include a core library and virtual machines. runtimes are responsible for scheduling and management of the system. The core library consists of two parts: one part is the function that the programming language (e.g., JS language) needs to call, and the other part is the core library of the system. The JS application and JS framework run in virtual machines. The virtual machine executes the JS applications and programming files of the JS framework (e.g., JS files) as binary files. The virtual machine is used for executing the functions of object life cycle management, stack management, thread management, security and exception management, garbage collection and the like.
The JS framework may include a UI component adapter layer (UI componentadapterlayer) and an application programming interface adapter layer (application programming interface adapterlayer). It is understood that the application programming interface may be simply referred to as an API. UI componentadapterlayer may include a base component, an animation component, a page switch component, a style manager, a text editor, and the like. The API adaptation layer may include a base component, a rendering model, a style manager, and the like. It is understood that the meaning of the above components may refer to related art documents. The JS frame work may include some predefined functions.
Of course, JS frames may also include other components, as the application is not limited in this regard.
The OS framework layer (framework) may include UI components (kit), OS APIs, capability management services (Ability Management Service, AMS), package management services (Bundle Management Service, BMS). Wherein the UI component is for launching a local application. In addition, the UI component is also responsible for drawing and screening, and drawing different applications by managing the context of different scenes. For example, buttons displayed by a watch, ticker display frames, font colors and lines, etc. all require support by the UI components. The OS API provides an application programming interface for the OS framework to provide for native applications. AMS is used to manage lifecycles of third party applications. For example, start-up, switching, closing, etc., of third party applications.
The OS kernel layer (kernel) is the basis of the operating system. The final functions of the operating system are all completed through the kernel layer. The kernel layer may include audio drivers, bluetooth drivers, sensor drivers, display drivers, touch screen drivers, key drivers, and the like. It is understood that OS kernel may include task management, memory management, interrupt management, exception management, system clock, semaphores, mutex locks, queue management, event management, software timers, etc. Further, OS kernel may also include C++ support, tuning components, and the like.
It should be noted that, the software structure of the wearable device 100 shown in fig. 4 provided by the embodiment of the present application is only an example, and should not be construed as limiting the present application. It is appreciated that the software architecture of the wearable device 100 may also include more hierarchies (e.g., hardware abstraction layers), and that the present application is not limited to specific module divisions in different hierarchies of the operating system, and reference may be made specifically to the description of the operating system software architecture in conventional techniques.
Referring to fig. 5, fig. 5 is a schematic diagram illustrating a communication process between applications of a wearable device according to an embodiment of the present application.
As shown in fig. 5, the native application N of the wearable device may send a message to the AMS. The message may include the package name of the local application N, the package name of the third party application T, and data that the local application N needs to send to the third party application T. After receiving the message sent by the local application N, the AMS may determine the priority of the third party application T. In the event that there is no running application or the running application is of lower priority than the third party application T, the AMS may establish a communication connection with the UI component and request the UI component to place the original display interface in the background to launch the third party application T. The AMS may then request the JS application framework to launch the third-party application T. The JS frame can load related components of the third-party application T. Further, the JS application framework can send a message to the AMS to inform the AMS that the third-party application T has been launched. After the message is sent successfully, the JS application framework can register the interface M. The interface M is a communication interface between the JS application framework and the AMS. After the successful registration of the interface M, the AMS may send data to the third party application T.
It should be noted that, in some embodiments of the present application, the transmission of the message between the local application and the JS application needs to pass through the kernel layer.
Based on the communication process between wearable device applications shown in fig. 5, a communication method provided by the embodiment of the application is combined with fig. 6.
S601: the local application N sends a message X1 to the AMS. The message X1 includes the packet name of the local application N and the packet name of the third party application T, and the target transmission data.
The local application N in the wearable device 100 may send a message X1 to the AMS in the wearable device 100. It will be appreciated that the message X1 may include the packet name of the local application N, the packet name of the third party application T, and the targeted transmission data. The target transmission data refers to data that the local application N needs to transmit to the third party application T. It is understood that package names are used to uniquely identify applications.
In some embodiments of the present application, the target transmission data may be movement data of the user, and may also be health data of the user. Of course, the target transmission data may be other types of data, which the present application is not limited to.
In some embodiments of the present application, message X1 may include Bundlename/APP_ index, message, messageLength and Type. It can be appreciated that Bundlename/APP_ index, message, messageLength and Type are fields of message X1. Wherein, bundlename/app_index indicates the packet name. message is the target transmission data. I.e. the data that the local application N needs to transmit to the third party application T. The messageLength represents the message length. The unit may be bytes. Type indicates the message Type.
Illustratively, when the Type is music, the message Type of the message X1 is music information. When the Type is healthdata, the message Type of the message X1 is health data. When the Type is navigation, the message Type of the message X1 is navigation information. When the Type is touchinfo, the message Type of the message X1 is touch information.
It is understood that the native application N may be any of the native applications. Likewise, the third party application T may be any one of the third party applications.
S602: the AMS determines whether there is an running application in the wearable device 100 and compares the priorities of the running application and the third party application T in case there is an running application in the wearable device 100.
After the AMS receives the message X1, it may check whether there is an application running in the wearable device 100. If there is no running application in the wearable device 100, the wearable device 100 may continue to perform subsequent steps. If there is an running application in the wearable device 100, the AMS may compare the priorities of the running application and the third party application T. In the case where the priority of the running application is not higher than the priority of the third party application T, the wearable device 100 continues to perform the subsequent steps. In the case where the priority of the running application is higher than the priority of the third party application T, the wearable device 100 does not perform the subsequent steps until the subsequent steps are performed when there is no more application in the wearable device 100 that is higher than the priority of the third party application T and that is running.
It is understood that the wearable device 100 may have a priority list stored therein. The priority list includes priorities corresponding to respective applications in the wearable device 100.
It is understood that the application running in the wearable device 100 may be a local application or a third party application.
S603: in the event that there is no running application in the wearable device 100, or the priority of the running application is not higher than the priority of the third party application T, the AMS sends a message X2 to the UI component. The message X2 is used to establish a communication connection between the UI component and the AMS.
It can be appreciated that if the AMS determines that there are no running applications in the wearable device 100 or that the priority of the running applications is not higher than the priority of the third party application T, the AMS may send the message X2 to the UI component, thereby establishing a communication connection with the UI component.
In some embodiments of the application, message X2 may be: ams_start_check_request.
Accordingly, the UI component may receive the message X2 transmitted by the AMS. The UI component may determine whether to establish a communication connection with the AMS according to the current task processing situation. If the UI component is performing other procedures, the UI component may temporarily not establish a communication connection with the AMS until the UI component no longer performs other procedures. If the UI component has no executing flow, i.e., the UI component has the ability to process other tasks, wearable device 100 may continue to perform subsequent steps.
S604: the UI component sends a message X3 to the AMS. Message X3 is used to indicate that the UI component agrees to establish a communication connection with the AMS.
It is understood that after receiving the message X2 transmitted by the AMS, the UI component may transmit the message X3 to the AMS. The message X3 may indicate that the UI component agrees to establish a communication connection with the AMS.
In some embodiments of the application, message X3 may be: ams_start_check_response.
Accordingly, the AMS may receive the message X3 transmitted by the UI component. This means that the AMS establishes a communication connection with the UI component.
S605: the AMS sends a message X4 to the UI component. Message X4 is used to request the UI component to place the original display interface in the background.
It is appreciated that after the AMS and the UI group price establish a communication connection, the AMS may send a message X4 to the UI component requesting the UI component to place the interface originally displayed on the display in the background.
In some embodiments of the application, message X4 may be: launcher_background.
Accordingly, the UI component may receive the message X4 transmitted by the AMS.
S606: the UI component sends a message X5 to the AMS. The message X5 is used to inform the AMS that the original display interface has been placed in the background.
It can be appreciated that after the UI component receives the message X4 sent by the AMS, it determines that the AMS is about to start the third party application T, and may place the original display interface in the background and send a message X5 to the AMS, so that the AMS starts the third party application T in time.
In some embodiments of the application, message X5 may be: ams_on kground.
Accordingly, the AMS may receive the message X5 transmitted by the UI component.
S607: the AMS sends a message X6 to the JS application framework. Message X6 is used to launch a third party application T.
It can be appreciated that after the AMS receives the message X5 sent by the UI component, the AMS may send a message X6 to the JS application framework to notify the JS application framework to launch the third-party application T.
In some embodiments of the application, message X6 is used to inform the JS application framework to launch a third-party application.
In some embodiments of the application, message X6 may be: ACTIVE.
Accordingly, the JS application framework may receive the message X6 sent by the AMS.
S608: the JS application framework loads the relevant components of the third-party application T.
It is appreciated that after the JS application framework receives the message X6 sent by the AMS, the relevant components of the third-party application T can be loaded. It is to be appreciated that related components of the T of the third party application can include an interface display component, an animation component, and the like. The interface display component can comprise a control position, a control shape, characters corresponding to the control and the like. The animation component may be used to generate a launch animation of the third party application T, as well as animation effects during the interface display process. It is to be appreciated that the relevant components of the third party application T may include, but are not limited to: a general component, a container component, a base component, a media component, a canvas component, a grid component, and a svg component, and the like. The English language svg is called Scalable Vector Graphics, which means a scalable vector graphic. svg is an open standard vector graphics language, a scalable vector graphics format.
In some embodiments of the application, the JS application framework can load: jsensitivity_launch, jsensitivity_show.
Correspondingly, after the JS application framework loads the related components of the third-party application T, the third-party application T starts to start.
S609: the JS application framework sends a message X7 to the AMS. The message X7 is used to inform the AMS that the third party application T has been started.
In some embodiments of the application, message X7 may be: ams_active.
Accordingly, the AMS may receive the message X7 sent by the JS application framework.
S610: the JS application framework sends a message X8 to the third-party application T. The message X8 is used to inform the third party application T to initiate the registration procedure.
It is appreciated that after the JS application framework sends message X7 to the AMS, message X8 can be sent to the third-party application T to inform the third-party application T to initiate the registration procedure. The registration flow refers to a flow of registering a communication interface.
In some embodiments of the application, message X8 may be: sunscribemerssage.
Accordingly, the third party application T may receive the message X8 sent by the JS application framework.
S611: the JS application framework registers the interface M. The interface M is a communication interface between the JS application framework and the AMS.
It can be appreciated that the JS application framework can register the interface M after sending the message X8 to the third-party application T. The interface M is a communication interface between the JS application framework and the AMS. Interface M may also be understood as a communication interface between the JS application and the local application.
In some embodiments of the application, the interface M may be: triggersecesscallback.
S612: the JS application framework sends a message X9 to the AMS. The message X9 is used to inform the AMS interface X that it is registered.
It is appreciated that after the JS application framework registers with the interface M, a message X9 can be sent to the AMS to inform the AMS that the interface M is registered.
In some embodiments of the application, message X9 may be: ams_register.
S613: AMS binds interface M.
It can be appreciated that after the JS application framework registers with the interface M, the AMS can bind the interface M for subsequent communication through the interface M.
In some embodiments of the application, the AMS may bind TriggerSuccessCallback.
S614: the AMS sends a message X10 to the third party application T. Message X10 includes the target transmission data.
It is understood that after the AMS binds the interface M, the message X10 may be sent to the third party application T through the interface M. Wherein the message X10 may comprise the target transmission data. The description of the target transmission data may refer to step S601, which is not described herein.
It should be noted that the communication method shown in fig. 6 may include more or fewer steps, which is not limited by the present application.
Based on the inter-application communication process of the wearable device shown in fig. 5, a further communication method is provided in conjunction with fig. 7 according to an embodiment of the present application.
S701: the local application N sends a message X11 to the AMS. The message X11 includes the packet name of the local application N and the packet name of the third party application T, and the target transmission data.
It is understood that the description of step S701 may refer to step S601, and will not be repeated herein.
Note that, the specific content of the target transmission data included in the message X11 may be different from the specific content of the target transmission data included in the message X1.
In some embodiments of the application, message X11 may be: ams_ SENDMESSAGE.
It can be appreciated that after the local application N sends the message X11 to the AMS, the AMS may interact with the UI component to request the UI resource, and specifically, refer to step S602 to step S606, which is not described herein.
Accordingly, the AMS may receive the message X11 transmitted by the local application N.
S702: the AMS sends a message X11 to the third party application T through the interface M.
It is understood that after the AMS receives the message X11 sent by the local application N, the message X11 may be sent to the third party application T through the interface M. For the description of the interface M, reference is made to the above, and no further description is given here.
S703: the third party application T sends a message X12 to the AMS via the interface M. The message X12 includes the packet name of the third party application T and the packet name of the local application N, and the target transmission data.
It is understood that the specific content of the target transmission data included in the message X12 may be different from the specific content of the target transmission data included in the messages X1 and X11. The description of the destination transmission data may be referred to above, and will not be repeated here.
Accordingly, the AMS may receive the message X12 transmitted by the third party application T.
It can be appreciated that after the third party application T sends the message X12 to the AMS, the AMS may interact with the UI component to request the UI resource, and specifically, refer to step S602 to step S606, which will not be described herein.
S704: the AMS sends a message X12 to the local application N.
It is understood that after the AMS receives the message X12 sent by the third party application T through the interface M, the message X12 may be sent to the local application N.
In some embodiments of the present application, the wearable device 100 may perform only step S701 and step S702.
In some embodiments of the present application, the wearable device 100 may perform only step S703 and step S704.
In some embodiments of the present application, the wearable device 100 may perform step S703 and step S704 earlier than the step S701 and step S702.
It should be noted that the communication method shown in fig. 7 may include more or fewer steps, which is not limited by the present application.
Some communication scenarios provided by the present application are described below.
Scene one: during running, once the heart rate exceeds the heart rate threshold, the local application in wearable device 100 sends heart rate data to a third party application, which initiates a corresponding workout.
As shown in fig. 8, the user runs while wearing the wearable device 100. The wearable device 100 may display a user interface 300 as shown in fig. 9 a. The user interface 300 may include a heart rate profile of the user. As shown in fig. 9a, the user's highest heart rate is 165 beats/minute, the lowest heart rate is 49 beats/minute, and the user's current heart rate is 165 beats/minute. The wearable device 100 may determine that the user's current heart rate exceeds the heart rate threshold-160 beats/minute. The health application in the wearable device 100 may send the user's heart rate data to an athletic application, which may initiate a heart rate workout. As shown in fig. 9b, the wearable device 100 may display a user interface 400. The user interface 400 is a launch interface for a sports application. The wearable device 100 may then also display a user interface 500 as shown in fig. 9 c. User interface 500 is a start interface for a heart rate workout.
It is understood that the health application is a local application of the wearable device 100, and the sports application is a third party application of the wearable device 100.
The application of a communication method in a first scenario provided by the embodiment of the present application is specifically described below with reference to fig. 10.
S1001: the wearable device 100 detects whether the user is in a motion state.
The wearable device 100 may detect whether the user is in a motion state through a gyro sensor and an acceleration sensor. The gyro sensor may be the gyro sensor 103B shown in fig. 3, and the acceleration sensor may be the acceleration sensor 103C shown in fig. 3.
It should be noted that the wearable device 100 may detect a type of movement of a user (e.g., running, bicycle riding, etc.). In some embodiments of the application, the user may select the type of motion by himself.
S1002: the wearable device 100 detects whether the user heart rate exceeds a heart rate threshold.
The wearable device 100 may detect the user heart rate in real-time and determine whether the user heart rate exceeds a heart rate threshold.
It will be appreciated that the heart rate threshold may be set according to actual requirements, as the application is not limited in this regard. For example, wearable device 100 may set a heart rate threshold based on historical heart rate data of the user. As another example, wearable device 100 may set a heart rate threshold according to the type of motion. In some embodiments of the application, the heart rate threshold may be 160 beats/minute.
In some embodiments of the application, wearable device 100 may store a correspondence of heart rate threshold to a type of motion. For example, running corresponds to a heart rate threshold of 160 beats/min. For another example, yoga corresponds to a heart rate threshold of 130 beats/min. For another example, the heart rate threshold for cycling is 165 beats/min.
S1003: the health application in the wearable device 100 sends a message to the AMS in the wearable device 100. The message includes a package name for the health application, a package name for the sports application, and heart rate data.
The health application may send a message to the AMS. The message may include a package name for the health application, a package name for the sports application, and heart rate data for the user. It is understood that the heart rate data of the user may comprise the current heart rate of the user. The heart rate data is the target transmission data in the above embodiment.
S1004: the AMS may detect whether a sports application is started.
It is understood that the AMS may detect whether a sports application is started. I.e., the AMS may detect whether the application is running or is in the background.
In some embodiments of the application, the AMS may also detect whether a motion application has been previously initiated.
If the sports application has been started or previously started, the wearable device 100 continues to perform step S1009 and step S1010. If the sports application is not started and has not been started before, the wearable device 100 continues to perform subsequent steps.
S1005: the AMS determines whether the priority of the sports application is not lower than the priority of the application currently running.
It can be appreciated that the related description of step S1005 may refer to step S602, and will not be described herein.
S1006: the AMS notifies the JS application framework to launch the sports application.
It is understood that the relevant description of step S1006 may refer to step S607-step S610.
It can be appreciated that before the AMS notifies the JS application framework to start the sports application, a communication connection with the UI component may be established, and the UI component is requested to place the original display interface in the background, and specifically, reference may be made to step S603-step S606, which is not described herein.
S1007: the JS application framework registers the interface M.
It is understood that the relevant description of step S1006 may refer to step S611.
It is appreciated that after the JS application framework registers with the interface M, a message may also be sent to the AMS to inform the AMS that the interface M is registered.
S1008: AMS binds interface M.
It is understood that the relevant description of step S1006 may refer to step S613.
S1009: the AMS transmits heart rate data to the sports application through the interface M.
It is appreciated that after the AMS binds the interface M, heart rate data may be sent to the athletic application through the interface M.
S1010: the athletic application determines a target workout based on the heart rate data and initiates the target workout.
After the athletic application receives the heart rate data, a target workout may be determined in conjunction with the user's athletic status and athletic style and initiated. Accordingly, wearable device 100 may display a relevant interface for the target workout.
For example, while the user is running, the target workout may be a running heart rate workout. For another example, the target workout may be a bicycle riding heart rate workout while the user is riding a bicycle. For another example, the target workout may be a yoga heart rate workout while the user is doing yoga.
S1011: in the event that the heart rate is below the heart rate threshold or the user stops exercising, the exercise application ends the target workout.
It is appreciated that the health application of the wearable device 100 may acquire the heart rate data of the user in real-time and send the heart rate data to the athletic application, which may end the target workout once the user's heart rate is below a heart rate threshold or the user stops exercising. The wearable device 100 may close the sports application.
In some embodiments of the application, the athletic application may end the target workout, regardless of whether the user is ending the athletic, if the user's heart rate is below the heart rate threshold.
In some embodiments of the application, the athletic application may end the target workout in the event that the user stops the athletic activity.
In some embodiments of the application, the athletic application may end the target workout in the event that the user's heart rate is below the heart rate threshold and the user stops exercising.
In some embodiments of the application, the JS frame in the wearable device 100 has registered with interface M. Accordingly, the wearable device 100 may not perform step S1007 and step S1008.
It should be noted that, the wearable device 100 may also trigger a corresponding training course according to other types of health data (for example, pressure, blood oxygen, etc.) of the user, and reference may be made to the above embodiments specifically.
Scene II: there are running applications in the wearable device 100. The wearable device 100 may detect a user operation acting on the key. In response to the user operation, the local application in the wearable device 100 may send a message to the third party application to launch the third party application. Meanwhile, the wearable device 100 may also place the running application in the background.
As shown in fig. 11, the user performs exercise while wearing the wearable device 100. A sports application is running in the wearable device 100. As shown in fig. 12, the wearable device 100 may display a user interface 600. User interface 600 may be an interface for a workout in a sports application. The user interface 600 may include the actions the user is training in, the heart rate of the user, and calories consumed. The wearable device 100 can alert the user at this time that a new message has been received by vibration or voice. As shown in fig. 12, a user may press a key 112 on wearable device 100 for a long time. A local application in the wearable device 100 may identify a long-press key operation by the user. Specifically, the local application can recognize a long key press operation by the user as a high level signal of 2 seconds or more. The local application in the wearable device 100 may then send a message to the communication application to launch the communication application and display a communication interface in the communication application that includes the new message. As shown in fig. 13, the wearable application 100 may display a user interface 700. The user interface 700 includes new messages sent by friends in the messaging application. At the same time, the wearable application 100 may also place the sports application in the background. The sports application in the wearable device 100 may prompt the user for the next training action by way of voice broadcast or the like.
It will be appreciated that the local application in the above embodiments is an application provided for identifying the operation of the user on the key. The sports application may be a local application or a third party application. The communication application is a third party application.
The application of the communication method in the second scenario provided by the embodiment of the application is specifically described below with reference to fig. 14.
S1401: the wearable device 100 detects a user operation acting on the key.
The user can press the key for a long time, and the wearable device 100 can detect a long press operation acting on the key. It will be appreciated that the user operation may also include pressing a button twice, sliding to the right on the display, sliding up on the display, etc., and the application is not limited to the particular form of user operation.
S1402: the local application in the wearable device 100 recognizes the user operation acting on the key and sends a signal to the AMS in the wearable device 100. This signal is used to inform the communication application launch interface J.
In some embodiments of the present application, the signal transmitted to the AMS by the local application may be a continuous high level signal. The signal transmitted to the AMS by the local application may also be a plurality of high level signals within a preset time. For example, a high signal twice within 3 seconds. Of course, the signal sent by the local application to the AMS may also be other types of signals, which the present application is not limited to.
In some embodiments of the present application, a signal transmitted by a local application to an AMS may also be understood as a message.
It is understood that interface J may be a communication interface (as shown in fig. 13) that includes new messages in a communication application.
S1403: the AMS notifies the JS application framework to launch the communication application.
S1404: the JS application framework registers the interface M.
S1405: AMS binds interface M.
S1406: the AMS transmits signals to the communication applications through the interface M.
It is understood that the description of the steps S1403-S1406 may refer to the steps S1006-S1009, which will not be described herein.
S1407: the communication application displays interface J.
It will be appreciated that interface J may be displayed after the communication application receives the signal sent by the AMS.
It should be noted that the third party application in the second scenario may be other applications besides the communication application, which is not limited by the present application.
Scene III: the wearable device 100 may detect user operations acting on the respective interfaces of the local application. The local application may send a message to a third party application, which has been started to implement music playing, generate a two-dimensional code, and the like.
Illustratively, the user may click on a corresponding control on the local music application. The control is used to trigger playing of the favorite song of the user. The wearable device 100 may detect the click operation. Accordingly, the local music application may send a message to the third party music application via the interface M. The message is used to inform the third party application to play the favorite song of the user. After the third party music application receives the message, a corresponding interface may be launched to effect music playback.
Illustratively, the user may click on a flight information card in the local application. The wearable device 100 may detect the click operation. Accordingly, the local application may send a message to the third party application via the interface M. The message is used to inform the third party application to display specific information of the flight. After the third party application receives the message, the corresponding interface may be launched. The wearable device 100 may display specific information of the flight on the display screen.
It can be appreciated that, in the above example, before the local application sends the message to the third party application through the interface M, the JS application framework in the wearable device 100 needs to register the interface M, and the AMS needs to bind the interface M, which is referred to above for a detailed description and will not be repeated here.
It should be noted that, the local application and the third party application in the third scenario may be other applications, which is not limited by the present application.
Similarly, a third party application in the wearable device 100 may also send a message to the local application that has been launched to implement calendar reminders, flight reminders, and the like.
It will be appreciated that the terms "interface" and "user interface" in the description and claims of the application and in the drawings are media interfaces for interaction and exchange of information between an application or operating system and a user, which enable conversion between an internal form of information and a form acceptable to the user. A commonly used presentation form of the user interface is a graphical user interface (graphic user interface, GUI), which refers to a user interface related to computer operations that is displayed in a graphical manner. It may be an interface element such as an icon, a window, a control, etc. displayed in a display screen of the electronic device, where the control may include a visual interface element such as an icon, a button, a menu, a tab, a text box, a dialog box, a status bar, a navigation bar, a Widget, etc.
The above embodiments are only for illustrating the technical solution of the present application, and are not limiting; although the application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the application.

Claims (18)

1. A method of communication, applied to a wearable device, the method comprising:
the wearable device detects an operation acting on a first interface; the first interface is an interface of a local application in the wearable device;
in response to the operation acting on the first interface, the wearable device sends a first message to a third party application in the wearable device based on a first communication interface through the local application; the first message comprises the packet name of the local application, the packet name of the third party application and first target transmission data;
the wearable device displays a second interface based on the first message through the third party application; the second interface is an interface of the third party application.
2. The method of claim 1, wherein the first interface comprises a flight information card; the first message is used for notifying the third party application to display specific information of the flight; the second interface comprises specific information of the flight; the wearable device detects an operation acting on a first interface, and specifically includes: the wearable device detects an operation acting on the flight information card.
3. The method of claim 1, wherein the local application is a local music application; the third party application is a third party music application; the method further comprises the steps of: after the third party music application receives the first message, the wearable device plays music based on the first message through the third party music application.
4. A method according to claim 3, wherein the wearable device detects an operation acting on the first interface, comprising in particular: the wearable device detects an operation of a corresponding control acting on the first interface; the corresponding control is used for triggering the wearable device to play the favorite song of the user.
5. The method of claim 1, wherein the wearable device displays, via the third party application, a second interface based on the first message, comprising: the wearable device generates a two-dimensional code based on the first message through the third party application and displays a second interface; the second interface comprises the two-dimensional code.
6. The method of any of claims 1-5, wherein the wearable device sends, through the local application, a first message to a third party application in the wearable device based on a first communication interface, comprising in particular: the wearable device sends the first message to a capability management service AMS in the wearable device through the local application; the wearable device sending the first message to the third party application via the AMS based on the first communication interface; the first communication interface is a communication interface between the AMS and a JS application framework in the wearable device.
7. The method of claim 6, wherein the method further comprises: the wearable device receives a second message sent by the third party application through the first communication interface through the AMS; the second message comprises the packet name of the third party application, the packet name of the local application and second target transmission data;
the wearable device sends the second message to the local application through the AMS.
8. The method of claim 6 or 7, wherein before the wearable device sends the first message to a capability management service AMS in the wearable device through the local application, the method further comprises:
The wearable device starts the third party application;
the wearable device registers the first communication interface through the JS application framework;
the wearable device binds the first communication interface through the AMS.
9. The method of claim 8, wherein prior to the wearable device launching the third party application, the method further comprises:
the wearable device sending a third message to the AMS through the local application; the third message comprises the packet name of the local application, the packet name of the third party application and third target transmission data;
the wearable device determines whether a running application exists in the wearable device through the AMS, and compares the priority of the running application with the priority of the third-party application under the condition that the running application exists in the wearable device;
the wearable device starts the third party application, which specifically includes:
in the case that there is no running application in the wearable device or the priority of the running application is not higher than the priority of the third party application, the wearable device starts the third party application;
After the wearable device binds the first communication interface through the AMS, the method further includes:
the wearable device sends the third target transmission data to the third party application via the AMS based on the first communication interface.
10. The method of claim 8, wherein prior to the wearable device registering the first communication interface with the JS application framework, the method further comprises:
the wearable device sends a fourth message to the third party application through the JS application framework; the fourth message is used for notifying the third party application to start a registration process;
after the wearable device registers the first communication interface through the JS application framework, the method further includes:
the wearable device sends a fifth message to the AMS through the JS application framework; the fifth message is used to inform the AMS that the first communication interface is registered.
11. The method according to any of claims 8-10, wherein the wearable device launches the third party application, in particular comprising:
the wearable device sends a sixth message to the JS application framework through the AMS; the sixth message is used for notifying the JS application framework to start the third-party application;
The wearable device loads related components of the third party application through the JS application framework and sends a seventh message to the AMS; the seventh message is used to inform the AMS that the third party application has been launched.
12. The method of claim 11, wherein prior to the wearable device launching the third party application, the method further comprises:
the wearable device establishes communication connection with a UI component in the wearable device through the AMS;
the wearable device requests the UI component to place an original display interface in the background through the AMS.
13. The method of any of claims 6-10, 12, wherein after the wearable device sends the first message to the third party application via the AMS based on the first communication interface, the method further comprises:
the wearable device receives an eighth message sent by the third party application through the first communication interface through the AMS; the eighth message comprises the packet name of the third party application, the packet name of the local application and fourth target transmission data;
the wearable device sends the eighth message to the third party application through the AMS.
14. The method of claim 11, wherein after the wearable device sends the first message to the third party application via the AMS based on the first communication interface, the method further comprises:
the wearable device receives an eighth message sent by the third party application through the first communication interface through the AMS; the eighth message comprises the packet name of the third party application, the packet name of the local application and fourth target transmission data;
the wearable device sends the eighth message to the third party application through the AMS.
15. The method of claim 7, wherein after the wearable device receives, via the AMS, a second message sent by the third party application via the first communication interface, the method further comprises:
the wearable device sending a ninth message to the AMS through the local application; the ninth message comprises the packet name of the local application, the packet name of the third party application and fifth target transmission data;
the wearable device sends the ninth message to the third party application via the AMS based on the first communication interface.
16. The method of claim 11, wherein after the wearable device receives, via the AMS, a second message sent by the third party application via the first communication interface, the method further comprises:
the wearable device sending a ninth message to the AMS through the local application; the ninth message comprises the packet name of the local application, the packet name of the third party application and fifth target transmission data;
the wearable device sends the ninth message to the third party application via the AMS based on the first communication interface.
17. A wearable device comprising a display screen, a memory, and one or more processors, wherein the memory is for storing a computer program; the processor is configured to invoke the computer program to cause the wearable device to perform the method of any of claims 1-16.
18. A computer storage medium, comprising: computer instructions; the computer instructions, when executed on a wearable device, cause the wearable device to perform the method of any of claims 1-16.
CN202310444222.1A 2022-05-27 2022-05-27 Communication method and related equipment Pending CN117112251A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310444222.1A CN117112251A (en) 2022-05-27 2022-05-27 Communication method and related equipment

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210588160.7A CN115033396B (en) 2022-05-27 2022-05-27 Communication method and related equipment
CN202310444222.1A CN117112251A (en) 2022-05-27 2022-05-27 Communication method and related equipment

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
CN202210588160.7A Division CN115033396B (en) 2022-05-27 2022-05-27 Communication method and related equipment

Publications (1)

Publication Number Publication Date
CN117112251A true CN117112251A (en) 2023-11-24

Family

ID=83121621

Family Applications (2)

Application Number Title Priority Date Filing Date
CN202310444222.1A Pending CN117112251A (en) 2022-05-27 2022-05-27 Communication method and related equipment
CN202210588160.7A Active CN115033396B (en) 2022-05-27 2022-05-27 Communication method and related equipment

Family Applications After (1)

Application Number Title Priority Date Filing Date
CN202210588160.7A Active CN115033396B (en) 2022-05-27 2022-05-27 Communication method and related equipment

Country Status (2)

Country Link
CN (2) CN117112251A (en)
WO (1) WO2023226744A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117112251A (en) * 2022-05-27 2023-11-24 荣耀终端有限公司 Communication method and related equipment

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107169904A (en) * 2017-03-31 2017-09-15 西藏喜年通讯科技有限公司 Method, mobile device and the device of the information interaction of different application platforms
US20170300129A1 (en) * 2016-04-19 2017-10-19 Hisense Electric Co., Ltd. Keypress processing method and apparatus for terminal
CN110086930A (en) * 2019-04-22 2019-08-02 努比亚技术有限公司 A kind of voice interactive method, wearable device and computer readable storage medium
CN112114913A (en) * 2020-07-27 2020-12-22 广东太平洋互联网信息服务有限公司 Application program interface updating method and device, computer equipment and storage medium
CN112399264A (en) * 2019-08-18 2021-02-23 聚好看科技股份有限公司 Projection hall service management method and application
CN112579191A (en) * 2019-09-29 2021-03-30 华为终端有限公司 Component loading method, device and system
CN113703641A (en) * 2021-06-28 2021-11-26 深圳市爱都科技有限公司 Message preview method and device, wearable device and computer readable storage medium
CN114237464A (en) * 2021-11-11 2022-03-25 荣耀终端有限公司 Data sharing method and electronic equipment
CN115033396A (en) * 2022-05-27 2022-09-09 荣耀终端有限公司 Communication method and related equipment

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10033702B2 (en) * 2015-08-05 2018-07-24 Intralinks, Inc. Systems and methods of secure data exchange
CN109213539B (en) * 2016-09-27 2021-10-26 华为技术有限公司 Memory recovery method and device
CN108111676B (en) * 2017-12-14 2021-06-08 维沃移动通信有限公司 Application program control method, mobile terminal and computer readable storage medium
CN111669621B (en) * 2020-04-30 2022-04-12 聚好看科技股份有限公司 Media asset data issuing method, server and display device
US11615392B2 (en) * 2020-05-01 2023-03-28 Capital One Services, Llc Systems and methods for using information from wearable devices
CN114124980B (en) * 2020-08-29 2022-11-25 荣耀终端有限公司 Method, device, system, terminal and storage medium for starting application
CN114428618A (en) * 2020-10-28 2022-05-03 华为技术有限公司 Cross-device application interaction method, electronic device and server
CN114443277A (en) * 2020-10-31 2022-05-06 华为终端有限公司 Memory management method and device, electronic equipment and computer readable storage medium
CN113301546B (en) * 2021-04-25 2022-07-01 荣耀终端有限公司 Method and device for searching wearable device
CN113887264B (en) * 2021-06-07 2022-06-21 荣耀终端有限公司 Code scanning method, system and related device

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170300129A1 (en) * 2016-04-19 2017-10-19 Hisense Electric Co., Ltd. Keypress processing method and apparatus for terminal
CN107169904A (en) * 2017-03-31 2017-09-15 西藏喜年通讯科技有限公司 Method, mobile device and the device of the information interaction of different application platforms
CN110086930A (en) * 2019-04-22 2019-08-02 努比亚技术有限公司 A kind of voice interactive method, wearable device and computer readable storage medium
CN112399264A (en) * 2019-08-18 2021-02-23 聚好看科技股份有限公司 Projection hall service management method and application
CN112579191A (en) * 2019-09-29 2021-03-30 华为终端有限公司 Component loading method, device and system
CN112114913A (en) * 2020-07-27 2020-12-22 广东太平洋互联网信息服务有限公司 Application program interface updating method and device, computer equipment and storage medium
CN113703641A (en) * 2021-06-28 2021-11-26 深圳市爱都科技有限公司 Message preview method and device, wearable device and computer readable storage medium
CN114237464A (en) * 2021-11-11 2022-03-25 荣耀终端有限公司 Data sharing method and electronic equipment
CN115033396A (en) * 2022-05-27 2022-09-09 荣耀终端有限公司 Communication method and related equipment

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
BASHKIM BERZATI等: "An Android Wear OS Framework for Sensor Data and Network Interfaces", 《2018 IEEE 43RD CONFERENCE ON LOCAL COMPUTER NETWORKS WORKSHOPS》, 31 January 2019 (2019-01-31), pages 98 - 104 *
刘强等: "面向可穿戴设备的数据安全隐私保护技术综述", 《计算机研究与发展》, vol. 55, no. 01, 15 January 2018 (2018-01-15), pages 14 - 29 *
戴风雷: "基于Android的健康监测App的设计与实现", 《中国优秀硕士论文全文数据库 信息科技辑》, no. 05, 15 May 2019 (2019-05-15), pages 138 - 840 *

Also Published As

Publication number Publication date
CN115033396B (en) 2023-05-02
CN115033396A (en) 2022-09-09
WO2023226744A1 (en) 2023-11-30
WO2023226744A9 (en) 2024-01-04

Similar Documents

Publication Publication Date Title
WO2021063343A1 (en) Voice interaction method and device
CN109766036A (en) Message treatment method and electronic equipment
KR20210092795A (en) Voice control method and electronic device
CN110381197A (en) Many-one throws the processing method of screen sound intermediate frequency data, apparatus and system
CN110362373A (en) A kind of method and relevant device controlling screen wicket
CN110489215A (en) The treating method and apparatus of scene is waited in a kind of application program
CN113254120B (en) Data processing method and related device
CN110471725A (en) A kind of split screen method and electronic equipment
CN115866122A (en) Application interface interaction method, electronic device and computer-readable storage medium
CN109814767A (en) Message treatment method and relevant apparatus
CN115079886B (en) Two-dimensional code recognition method, electronic device, and storage medium
WO2023226744A1 (en) Communication method and related device
CN114363462A (en) Interface display method and related device
CN110471604A (en) A kind of more application switching methods and relevant apparatus
CN115525372B (en) Method and device for displaying interface
CN115016866A (en) Data processing method during application starting, electronic equipment and storage medium
WO2022127130A1 (en) Method for adding operation sequence, electronic device, and system
CN113190362B (en) Service calling method and device, computer equipment and storage medium
WO2021254113A1 (en) Control method for three-dimensional interface and terminal
WO2023130931A1 (en) Service anomaly warning method, electronic device and storage medium
KR20180058419A (en) Mobile device for providing exercise contents and wearable device connected therewith
WO2022068887A1 (en) Method for displaying motion track, and electronic device
CN112966798B (en) Information display method and device, electronic equipment and storage medium
CN116861066A (en) Application recommendation method and electronic equipment
CN114583852A (en) Wireless charging method between electronic devices, storage medium and electronic device thereof

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