Data transmission method and apparatus, device, and storage medium
By employing a dual-processor architecture and middleware to process communication data in wearable devices, the high power consumption and communication instability issues caused by a single processor are resolved, achieving low-power and efficient data transmission and service response.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
- Filing Date
- 2021-04-14
- Publication Date
- 2026-04-10
AI Technical Summary
Existing wearable devices suffer from high power consumption and short battery life when maintaining operation for extended periods to achieve interaction with terminals, due to their single-processor design. Furthermore, system switching affects the stability of data communication.
It adopts a dual-processor architecture. The low-power first processor is responsible for basic functions and data communication, while the high-performance second processor is woken up to handle complex tasks when needed. The middleware processes communication data to ensure timely response and transmission of business data.
It reduces device power consumption, improves the stability of data communication and the speed of service response, and extends the device's battery life.
Smart Images

Figure CN115202440B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] Embodiments of the present application relate to the field of wearable devices, and in particular, to a data transmission method and device, a wearable device, and a storage medium. BACKGROUND
[0002] A wearable device is a portable electronic device that can be directly worn or integrated into clothes or accessories. Common wearable devices include smart watches, smart bands, smart glasses, and the like.
[0003] In related technologies, a wearable device establishes a communication connection (such as a Bluetooth connection) with a terminal, transmits data to the terminal through the Bluetooth connection, and realizes linkage between the wearable device and the terminal. For example, the terminal can send a notification message to the wearable device through the Bluetooth connection, and the wearable device can provide a notification reminder. SUMMARY
[0004] Embodiments of the present application provide a data transmission method, device, wearable device, and storage medium. The technical solutions are as follows:
[0005] In one aspect, a data transmission method is provided. The method is used in a wearable device, and the wearable device includes a first system and a second system. The first system is a system running by a first processor, and the second system is a system running by a second processor.
[0006] The method includes the following steps:
[0007] receiving first communication data sent by a terminal, the first communication data being transmitted through a data communication connection established between the first system and the terminal;
[0008] processing the first communication data through a target middleware to obtain service data contained in the first communication data, the target middleware being a first middleware in the first system or a second middleware in the second system;
[0009] sending the service data to a target application through the target middleware, so that the target application processes the service data, the target application being an application in the first system or the second system.
[0010] In another aspect, a data transmission device is provided. The device is used in a wearable device, and the wearable device includes a first system and a second system. The first system is a system running by a first processor, and the second system is a system running by a second processor.
[0011] The device includes the following steps:
[0012] The communication data receiving module is configured to receive first communication data sent by a terminal, wherein the first communication data is transmitted through a data communication connection established between the first system and the terminal.
[0013] The communication data processing module is configured to process the first communication data through a target middleware to obtain service data contained in the first communication data, wherein the target middleware is a first middleware in the first system or a second middleware in the second system.
[0014] The service data sending module is configured to send the service data to a target application through the target middleware, so that the target application processes the service data, wherein the target application is an application in the first system or the second system.
[0015] In another aspect, an embodiment of the present application provides a wearable device, which comprises a processor and a memory; the processor comprises at least a first processor and a second processor, and the memory stores at least one instruction, which is used to be executed by the processor to implement the data transmission method in the above aspect.
[0016] In another aspect, an embodiment of the present application provides a computer readable storage medium, which stores at least one instruction, which is used to be executed by a processor to implement the data transmission method in the above aspect.
[0017] In another aspect, an embodiment of the present application provides a computer program product or a computer program, which comprises computer instructions stored in a computer readable storage medium. A processor of a computer device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions, so that the computer device executes the data transmission method in the above aspect.
[0018] In the embodiment of the present application, the wearable device is provided with double processors, the first system is run by the first processor, and the second system is run by the second processor. When the first system receives communication data sent by a terminal through a data communication connection established between the first system and the terminal, the communication data is processed by the middleware arranged in the first system or the second system to obtain service data contained therein, so that the service data is sent to an application in the first system or the second system through the middleware for service processing. Since the wearable device maintains data communication with the terminal through the first system, the influence of system switching on data communication can be avoided, the stability of data communication between the wearable device and the terminal is ensured, and the data is processed and dispatched by the middleware arranged in the system, so that the service data can be processed in time, and the service response speed of the wearable device side is improved. BRIEF DESCRIPTION OF DRAWINGS
[0019] Figure 1 This is a schematic diagram illustrating a dual-core communication software framework corresponding to a second processor, as shown in an exemplary embodiment of this application;
[0020] Figure 2 This is a schematic diagram illustrating a dual-core communication software framework corresponding to a first processor, as shown in an exemplary embodiment of this application;
[0021] Figure 3 A flowchart illustrating a data transmission method provided in an exemplary embodiment of this application is shown;
[0022] Figure 4 This is a schematic diagram of the interface illustrating the implementation process of the data transmission method in an exemplary embodiment of this application;
[0023] Figure 5 A flowchart illustrating a data transmission method provided by another exemplary embodiment of this application is shown;
[0024] Figure 6 yes Figure 5 A timing diagram illustrating the implementation process of the data transmission method shown.
[0025] Figure 7 A flowchart illustrating a data transmission method provided by another exemplary embodiment of this application is shown;
[0026] Figure 8 yes Figure 7 A timing diagram illustrating the implementation process of the data transmission method shown.
[0027] Figure 9 A flowchart illustrating a data transmission method provided by another exemplary embodiment of this application is shown;
[0028] Figure 10 yes Figure 9 A timing diagram illustrating the implementation process of the data transmission method shown.
[0029] Figure 11 This is a diagram of a soft armor frame provided in an exemplary embodiment of this application;
[0030] Figure 12 A structural block diagram of a data transmission apparatus provided in another embodiment of this application is shown;
[0031] Figure 13 A structural block diagram of a wearable device provided in an exemplary embodiment of this application is shown. Detailed Implementation
[0032] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.
[0033] The "multiple" mentioned in the present document refers to two or more than two. The "and / or" describes the association relationship of the associated objects, which means that there can be three relationships, for example, A and / or B can represent the three cases of A existing alone, A and B existing simultaneously, and B existing alone. The character " / " generally represents that the associated objects before and after it are in an "or" relationship.
[0034] In the related art, a single processor is arranged in the wearable device, and all system events generated in the running process of the device are processed by an operating system running on the processor. In addition, in order to realize data linkage with the terminal, the communication module (such as a Bluetooth module) of the wearable device needs to be mounted on the processor, so that the data received by the communication module is sent to the operating system in real time, and the operating system processes and responds. Further, the wearable device can feed back the data processing result to the terminal through the communication module, so as to realize the bidirectional linkage between the terminal and the wearable device. Therefore, in order to ensure the normal transmission and timely response of business data, the processor needs to have strong data processing capability, and needs to remain in working state during the running process of the device.
[0035] However, in the daily use process, the wearable device only needs to realize some functions with low processing performance requirements in most cases, or realize some simple linkage with the terminal, for example, for a smart watch or a smart bracelet, in most cases, the smart watch or the smart bracelet only needs to display time or display the notification message sent by the terminal. Therefore, keeping the processor in working state for a long time does not improve the performance of the wearable device, but increases the power consumption of the device, resulting in short battery life of the wearable device.
[0036] In the embodiment of the present application, the wearable device is provided with at least a first processor and a second processor with different processing performance and power consumption, which are respectively used to run a first system and a second system (i.e. dual-core dual system), and the communication module of the wearable device is mounted on the first processor.
[0037] In the running process of the wearable device, the first system running on the low-power processor processes the events with low performance processing requirements, and the high-power processor is kept in sleep state (correspondingly, the second system running on the high-power processor is in sleep state). In this way, the basic functions of the wearable device are realized, and the power consumption of the wearable device is reduced.
[0038] Meanwhile, since the first system is in a running state, the wearable device can receive the communication data sent by the terminal in real time through the data communication connection established between the first system and the terminal, and obtain the service data from the communication data through the middleware arranged in the first system or the second system, and then process the service data through the application in the system, so as to ensure that the service data can be processed in time and realize the linkage between the terminal and the wearable device.
[0039] When there is an event with high-performance processing requirements (such as starting an application), the high-power processor is woken up, and the second system is switched to process the event, so as to ensure that the triggered event can be responded and processed in time, and meet the performance requirements of the wearable device.
[0040] In the embodiment of the application, the first processor and the second processor work asynchronously, and the first system and the second system need to realize system communication (or dual-core communication). In a possible application scenario, the first system is a real-time operating system (RTOS) running on a micro control unit (MCU), and the second system is an Android operating system running on a central processing unit (CPU).
[0041] As shown in Figure 1 , which shows a dual-core communication software framework of the Android operating system according to an example embodiment of the application. The dual-core communication software framework includes modules of Kernel (kernel), HIDL (hardware abstraction layer interface description language), Native Service (native service), Framework Service (framework service), Framework API (framework interface), and APP (application) parts.
[0042] The APP module includes functional modules such as Launcher, Settings, and SystemUI; the Framework API module includes management modules such as MCUManager, SensorManager, and LocationManager; the Framework Service module includes service modules such as MCUManagerService, SystemSensorManager, and LocationManagerService; the Native Service module includes service modules such as dccservice and Sensorservice; the HIDL module includes modules such as SensorHAL and GPS HAL; and the Kernel module includes DCC Transfer Drivers such as dcc_datah, dcc_data, MCU_sensor, MCU_gps, and MCU_factory.
[0043] As the interface layer connecting the upper and lower layers in the dual-core communication software framework, the transport layer shields the application layer from the transmission details of the lower layer (data link layer) of the system, providing a service channel for application scenarios. The application layer, as the main provider of services, responds to human-computer interaction and transmits the data generated during the human-computer interaction process through the transport layer, as well as responding to external data requests.
[0044] Taking wearable devices, such as smartwatches, as an example, Figure 2 As shown, it illustrates a dual-core communication software framework for an RTOS according to an exemplary embodiment of this application.
[0045] The dual-core communication software framework of RTOS is divided into the Application Layer, Service Layer, Framework Layer, Hardware Abstraction Layer, and Platform Layer.
[0046] Among them, the application layer includes watch face, Daily Tracker, Message center, Voice around Apps, Health Apps, Settings and other application modules; the service layer includes Sport & health task, System manager task, AMS (Activity Management Service), AudioService (Audio Service), Log Service (Log Service), OFTP Service (Odette File Transfer Protocol Service), BT Service (Bluetooth Service), DelegateService (DelegateService), RPC Service (Remote Procedure Call Service), sensor Service (sensor Service), storage Service (storage Service) and other service modules; the framework layer includes Message Pub, UIFramework (User Interface Framework), G2D Engine (G2D Engine), Audio Middleware (Audio Middleware), Preference (Preference), File system (File system), Algorithms (Algorithms), Aios, AsycEvent (AsycEvent) and other framework modules; the hardware abstraction layer includes Screen / TP (Screen / TP), Audio (Audio), GPS (Global Positioning System), sensors (sensors), Keypad (Keypad), Motor (Motor) and other hardware abstraction modules; the platform layer includes Board Support Package (BSP) and LOW level Driver, wherein the BSP includes Screen / TP, Keys (Keys), GPS, Codec (Codec), sensors, Flash (Flash), Motor, PSRAM (Pseudo Static Random Access Memory) and the like, and the LOW level Driver includes Uart (Uart), ADC (Analog-to-Digital Converter), GPIO (General Purpose Input Output), SPI (Serial Peripheral Interface), I2C (Inter-Integrated Circuit), IOS (Input Output System), PCM (Pulse Code Modulation), I2S (Inter-Integrated Sound), HWTimer (Hardware Timer).
[0047] It should be noted that the above dual-core communication software framework is only used for illustrative description, and those skilled in the art can also add, delete or modify the above framework according to actual needs, and the embodiments of the present application do not limit the specific structure of the dual-core communication software framework.
[0048] Reference is made to Figure 3 FIG. 1 shows a flowchart of a data transmission method according to an example embodiment of the present application, which is applied to a wearable device in this example. The method can include the following steps.
[0049] In step 301, the wearable device receives first communication data transmitted by a terminal through a data communication connection established between the terminal and a first system.
[0050] In the example embodiment, the wearable device is provided with a first processor and a second processor, which respectively run a first system and a second system. Optionally, the processing performance of the first processor is lower than that of the second processor (both the processing capability and the processing speed of the first processor are lower than those of the second processor), and the power consumption of the first processor is lower than that of the second processor. Correspondingly, the second system (run by the second processor) can handle events handled by the first system (run by the first processor), while the first system does not necessarily handle events handled by the second system.
[0051] For example, taking a smart watch as the wearable device, the first processor is an MCU, the second processor is a CPU, the first system is an RTOS, and the second system is an Android system. Correspondingly, the events that can be handled by the first system include watch face display, watch face interface switching, notification message display, and other scenarios with low requirements on processing performance or weak interaction scenarios; the events that can be handled by the second system include call answering, starting an application, watch face editing, function setting, and other scenarios with high requirements on processing performance or strong interaction scenarios.
[0052] Unlike a smart phone or other electronic devices with strong interaction attributes, the wearable device is an auxiliary electronic device, and in most use scenarios, there is only weak interaction between the wearable device and the user. For example, in most scenarios, the user only looks at the smart watch by raising the wrist. Therefore, during the running of the wearable device, the first system remains in a running state, while the second system only runs in scenarios with high requirements on processing performance or strong interaction scenarios, and remains in a sleep state in other scenarios.
[0053] Moreover, in order to ensure that the data transmitted by the terminal can be received and processed in time, in a possible implementation, the communication component of the wearable device is mounted on the first processor, so that the terminal and the first system can maintain a data communication connection during the running of the wearable device, while maintaining low power consumption. It should be noted that when the second system is woken up and in a foreground running state (at this time, the first system is switched to a background running state), the data communication connection between the first system and the terminal is still maintained, i.e., during the running of the wearable device, the wearable device communicates and transmits communication data through the data communication connection between the first system and the terminal.
[0054] Optionally, the data communication connection is a Bluetooth connection, and the first processor communicates with the Bluetooth communication component through a physical serial port. The physical serial port can be a universal asynchronous receiver / transmitter (UART).
[0055] Optionally, when the terminal needs to send service data to the wearable device for processing, the service data is encapsulated into first communication data, and the first communication data is sent to the first system of the wearable device through the data communication connection. The first communication data can be encapsulated by an application program in the terminal (through a middleware SDK) calling a middleware set in the system.
[0056] The middleware is a kind of software between the system and the application, used to connect the operating system layer and the application layer, standardize the interface provided by the operating system, and unify the protocol, thereby providing standard and unified public services for the upper layer application, and helping to reduce the development workload of the upper layer application. The middleware in the embodiment of the application is used to provide communication support for the first system and the application installed in the first system, or to provide communication support for the second system and the application installed in the second system.
[0057] In step 302, the first communication data is processed through the target middleware to obtain the service data contained in the first communication data. The target middleware is the first middleware in the first system or the second middleware in the second system.
[0058] In the embodiment of the application, the middleware is set in the first system and the second system, and is used to process the communication data to obtain the service data contained therein, and distribute the application data to the upper layer application for processing; and process the data fed back by the upper layer application into communication data, so that the communication component transmits the communication data.
[0059] In a possible implementation, the middleware set in different systems has different data processing capabilities, i.e., the middleware in the system is used to process communication data containing specific service data, wherein the service data processed by the middleware in different systems is pre-set.
[0060] Optionally, after receiving the first communication data through the first system, the wearable device determines the target middleware for processing the first communication data. If the target middleware is the first middleware in the first system, the first communication data is processed by the first middleware. If the target middleware is the second middleware in the second system, the first communication data is forwarded to the second system for processing by the second middleware. The specific method for determining the target middleware will be described in detail in the following embodiments.
[0061] Step 303: Send business data to the target application through the target middleware so that the target application can process the business data. The target application is an application in the first system or the second system.
[0062] In one possible implementation, the target middleware sends business data to the target application in the system where the target middleware resides, or the target middleware forwards business data to the target application in another system outside the system where the target middleware resides. That is, the target application can be located in the same system as the target middleware, or it can be located in a different system.
[0063] Optionally, the target application has a middleware SDK, and the middleware is called through the middleware SDK to achieve data interaction with the middleware.
[0064] Optionally, after the target application processes the business data, it can display the processing results through its own system.
[0065] In an illustrative example, such as Figure 4 As shown, when terminal 41 sends communication data containing SMS notifications to wearable device 42, if RTOS is running in the foreground, wearable device 42 displays SMS notifications 43 on the upper layer of the RTOS's dial interface; when terminal 41 sends communication data containing incoming call notifications to wearable device 42, if Android system is running in the foreground, wearable device 42 displays incoming call reminders 44 through the Android system's calling application.
[0066] In summary, in the embodiment of the present application, the wearable device is provided with dual processors, and the first processor runs the first system and the second processor runs the second system. When the first system receives the communication data sent by the terminal through the data communication connection established between the terminal, the middleware provided in the first system or the second system processes the communication data to obtain the service data contained therein, so that the service data is sent to the application in the first system or the second system through the middleware for service processing. Since the wearable device maintains data communication with the terminal through the first system, the influence of system switching on data communication can be avoided, the stability of data communication between the wearable device and the terminal is ensured, and the middleware provided in the system processes and dispatches data, so that the service data can be processed in time and the service response speed of the wearable device side is improved.
[0067] In addition, in the case where the power consumption of the first processor is lower than that of the second processor, since the data communication connection is established between the low-power first system and the terminal, the running power consumption of the wearable device can be reduced under the premise of ensuring normal data transmission.
[0068] In a possible implementation, according to different data processing requirements, the communication data sent by the terminal to the wearable device can be divided into the following three types:
[0069] 1. First system exclusive data, which can only be processed by the first system;
[0070] The service data contained in such communication data is data in a weak interaction scenario with low processing performance requirements, and only the processing result needs to be displayed on the first system side.
[0071] 2. Second system exclusive data, which can only be processed by the second system;
[0072] The service data contained in such communication data is data in a strong interaction scenario with high processing performance requirements, which needs to be responded by a specific application in the second system and the processing result needs to be displayed. For example, the communication data containing incoming call notification needs to be reminded by the call application in the second system.
[0073] 3. Data shared by the first system and the second system, which can be processed by the first system and the second system.
[0074] The service data contained in such communication data is data in a weak interaction scenario with low processing performance requirements, and can be processed by the first system or the second system according to the foreground running state of the system, and the processing result needs to be displayed. For example, the communication data containing short message notification needs to be prompted by the system in the foreground running state.
[0075] Of course, since the function required to be implemented by the first system is usually a subset of the function required to be implemented by the second system, in other possible implementation manners, the communication data can also be divided into two (i.e., the above-mentioned two types of 2 and 3), and the present embodiment is not limited in this regard.
[0076] In order to enable the wearable device to identify the communication data with different data processing requirements, so as to process the communication data by the middleware in the corresponding system, and then process the service by the target application in the system, in a possible implementation manner, the data communication connection established between the first system and the terminal comprises at least two data channels, wherein different data channels are used to transmit data with different processing requirements.
[0077] Optionally, the number of data channels corresponds to the number of types of communication data, when the communication data is divided into two types based on data processing requirements, the data communication connection comprises two data channels; when the communication data is divided into three types based on data processing requirements, the data communication connection comprises three data channels, and the present embodiment does not limit the specific number of data channels and the number of types of communication data.
[0078] Regarding the implementation manner of creating multiple data channels, in a possible implementation manner, when a Bluetooth connection is established between the wearable device and the terminal, a Bluetooth serial port (Serial Port Profile, SPP) protocol can be used to create multiple data channels in the Bluetooth connection, and the present embodiment does not limit the specific manner of creating multiple data channels.
[0079] Correspondingly, after the wearable device receives the first communication data, the target middleware is determined from the first middleware and the second middleware based on the data channel used to transmit the first communication data, so as to process the first communication data by the target middleware to obtain service data. The correspondence between the data channel and the middleware is pre-configured.
[0080] The processing process of the communication data under the above-mentioned three processing requirements will be described below by way of example.
[0081] Please refer to Figure 5 which shows a flowchart of a data transmission method provided by another example embodiment of the present application, and the present embodiment will be described by taking the application of a wearable device to the method.
[0082] Step 501, receiving first communication data sent by a terminal, the first communication data being transmitted through a data communication connection established between the first system and the terminal.
[0083] The implementation manner of the present step can refer to the above-mentioned step 301, and the present embodiment will not be described herein again.
[0084] In response to the data channel used for transmitting the first communication data being the first data channel, the first middleware is determined as the target middleware in step 502, and the first data channel is used for transmitting data processed by the application in the first system.
[0085] In one possible implementation, before the terminal transmits the communication data to the wearable device, the terminal first determines the data type of the communication data. If the communication data is the unique data of the first system, the terminal transmits the first communication data to the first system through the first data channel.
[0086] Correspondingly, when the first communication data is received through the first data channel, the first system determines that the service processing needs to be performed by the application in the first system, and thus determines the first middleware in the first system as the target middleware.
[0087] As shown in FIG. 5, the terminal transmits the first communication data to the wearable device through the first data channel. Figure 6 As shown in FIG. 5, the terminal transmits the first communication data to the wearable device through the first data channel.
[0088] The first communication data is processed through the target middleware to obtain the service data in step 503.
[0089] Since the first middleware has the processing capability for the unique service data of the first system, the first middleware can process the first communication data to obtain the service data contained therein. Optionally, the first middleware processes the first communication data to obtain the service data that can be recognized and processed by the upper-layer application.
[0090] As shown in FIG. 5, the first communication data received by the Bluetooth is transmitted to the middleware of the first system, and the middleware processes the communication data to obtain the service data. Figure 6
[0091] The service data is transmitted to the target application through the target middleware in step 504, so that the target application processes the service data.
[0092] Since the data transmitted through the first data channel is the unique data of the first system, after the target middleware processes the first communication data to obtain the service data, the target middleware further transmits the service data to the target application in the first system, and the target application processes the service data.
[0093] Optionally, the target application can display the processing result during the data processing process, so as to remind the user on the wearable device.
[0094] As shown in Figure 6 The middleware of the first system distributes the processed service data to the application in the first system, and the application responds to the service.
[0095] In step 505, the target middleware processes the service response data of the target application, and obtains second communication data.
[0096] In one possible implementation, the target application generates service response data after processing the service data. The service response data can be generated by user interaction or automatically generated by the application during the data processing process. When it is necessary to feed back the service response data to the terminal, the target application processes the service response data through the target middleware, and obtains second communication data that meets the transmission requirements of the communication connection. In this embodiment, the target application processes the service response data through the first middleware, and obtains the second communication data. The process of processing the service response data to obtain the second communication data can be understood as the reverse process of processing the first communication data to obtain the service data.
[0097] Optionally, the target application is provided with a middleware SDK. When it is necessary to transmit the service response data to the terminal, the target application calls the first middleware through the middleware SDK, and processes the service response data through the first middleware.
[0098] In step 506, the second communication data is sent to the terminal, so that the terminal processes the service response data, and the second communication data is transmitted through the data communication connection.
[0099] The second channel data is sent through any data channel in the data communication connection, or the second channel data is sent through the first data channel (i.e., the same data channel is used for transmission as the first communication data).
[0100] Optionally, after the terminal receives the second communication data through the data communication connection, the terminal processes the second communication data through the middleware, obtains the service response data, and distributes the service response data to the corresponding application in the terminal.
[0101] In this embodiment, the unique data of the first system is transmitted through the first data channel, so that after the first system receives the communication data, the first system can process the data through the first middleware set by itself in a timely manner, and distribute the processed service data to the application, thereby improving the timeliness and accuracy of the first system in processing the service data.
[0102] Please refer to Figure 7Fig. 7 is a flowchart illustrating a data transmission method according to another example embodiment of the present application, which is applied to a wearable device, and the method can include the following steps.
[0103] In step 701, the first communication data transmitted by the terminal is received, and the first communication data is transmitted through a data communication connection established between the first system and the terminal.
[0104] The implementation of the present step can refer to the above-mentioned step 301, and the present embodiment will not be described here again.
[0105] In step 702, in response to the data channel used for transmitting the first communication data being the second data channel, the first middleware is determined as the target middleware, and the second data channel is used for transmitting data processed by the application in the first system or the second system.
[0106] In a possible implementation, before the terminal transmits the communication data to the wearable device, the data type of the communication data is first determined, and if the communication data is common data of the first system and the second system, the first communication data is transmitted to the first system through the second data channel. Correspondingly, when the first communication data is received through the second data channel, the first system determines that the service processing needs to be performed through the application in the first system or the second system.
[0107] Optionally, in addition to being able to process the unique data of the first system, the first middleware can also process the common data of the first system and the second system, and therefore, after the first communication data is received through the second data channel, the wearable device determines the first middleware as the target middleware.
[0108] The reason why the first middleware is determined as the target middleware instead of the second middleware is that the wearable device runs the first system in most time, and the second system is in a sleep state in most time, and therefore, determining the first middleware as the target middleware can improve the timeliness of data processing, and avoid the increase of power consumption caused by frequently waking up the second system (if the second middleware is determined as the target middleware, the second system needs to be frequently woken up to perform data processing through the second middleware).
[0109] For example, Figure 8As shown, taking Bluetooth communication between a terminal and a wearable device as an example, after the application in the terminal generates business data, it first sends the business data to the middleware. The middleware processes the business data into communication data and then sends the communication data to Bluetooth. This communication data is then transmitted to the Bluetooth of the first system via the second data channel in the Bluetooth connection (instructed by the middleware). After receiving the communication data through the second data channel of the Bluetooth connection, the first system determines that the communication data is shared by both the first and second systems. It then requires either the first or second system to respond to the business data in the communication data, thus identifying the middleware in the first system as the target middleware.
[0110] Step 703: Process the first communication data through the first middleware to obtain the service data.
[0111] Since the first middleware has the ability to process data shared by the first and second systems, it can process the first communication data to obtain the service data contained therein. Optionally, the first middleware processes the first communication data to obtain service data that can be recognized and processed by the upper-layer application.
[0112] Indicative, such as Figure 8 As shown, the communication data received by Bluetooth is sent to the middleware of the first system, where the middleware processes the communication data to obtain the service data.
[0113] Step 704: Determine the target application based on the system operating status of the first system and the second system.
[0114] Since only a single system has graphical user interface control permissions for the wearable device at any given time (meaning the wearable device's display can only be used by one system at a time), for the shared data of the first and second systems, the wearable device determines the target application for processing business data based on the system operating status of the two systems, so that subsequent business data processing responses can be performed through that target application.
[0115] Optionally, the system operating states include foreground operating state, background operating state, and sleep state. The first system's operating states include foreground operating state and background operating state (a sleep state is not set because a communication data connection with the terminal needs to be maintained), while the second system's operating states include foreground operating state, background operating state, and sleep state (a sleep state is set to reduce terminal power consumption).
[0116] In one possible implementation, in response to the first system being in the foreground running state, the wearable device determines the target application as the first application in the first system; in response to the second system being in the foreground running state, the wearable device determines the target application as the second application in the second system.
[0117] In an illustrative example, when a text message notification is received from a terminal, if the first system is running in the foreground and the second system is in a dormant state, the wearable device will identify the notification application in the first system as the target application; if the second system is running in the foreground and the first system is running in the background, the wearable device will identify the notification application in the second system as the target application.
[0118] Step 705: Send business data to the target application through the first middleware so that the target application can process the business data.
[0119] In one possible implementation, the wearable device sends business data to a target application running in the foreground of the system via a first middleware, where the target application processes the data. The method by which the first middleware sends business data varies depending on the target application in the different systems.
[0120] Optionally, when the target application is the first application in the first system, since both the first application and the first middleware are located in the first system, the first middleware can directly send business data to the first application, and the first application can process the business data.
[0121] When the target application is the second application in the second system, since the second application and the first middleware are located in different systems, the first middleware cannot directly send business data to the second application. In one possible implementation, the first middleware can indirectly send business data to the second application through the first application.
[0122] Optionally, the wearable device sends business data to a first application through a first middleware (the first application does not need to process the business data), and then sends business data to a second application through the first application so that the second application can process the business data. The first application can send the business data to the second application through a physical serial port between the first and second systems. For example, this physical serial port can be a Serial Peripheral Interface (SPI).
[0123] Indicative, such as Figure 8 As shown, when the first system is in the foreground running state, the middleware in the first system distributes business data to the applications in the first system, and the applications in the first system respond to the business. When the second system is in the foreground running state, the middleware in the first system first distributes business data to the applications in the first system, and the applications in the first system pass the business data to the applications in the second system, and the applications in the second system respond to the business.
[0124] In a possible implementation, if the first system is in the foreground running state, the application in the first system will save the service data sent by the first middleware within a preset time length (such as 1 s), and when the second system switches to the foreground running state within the preset time length, in order to avoid service omission caused by rapid system switching, the application in the first system sends the service data to the application in the second system, so that the application in the second system processes and displays the service data.
[0125] In step 706, the first middleware processes the service response data of the target application to obtain second communication data.
[0126] The service response data is data generated by the target application after processing the service data.
[0127] In a possible implementation, the target application generates service response data after processing the service data. The service response data can be generated by user interaction or automatically generated by the application in the data process. When it is necessary to feed back the service response data to the terminal, the target application processes the service response data through the target middleware to obtain second communication data that meets the transmission requirement of the data communication connection. In this embodiment, the target application processes the service response data through the first middleware to obtain the second communication data.
[0128] Optionally, when the target application and the first middleware are located in the same system, the target application directly sends the service data to the first middleware; when the target application and the first middleware are located in different systems, the target application indirectly sends the service data to the first middleware through the application in the first system.
[0129] In some embodiments, when the target application is a first application in the first system, the first application sends the service response data to the first middleware for processing; when the target application is a second application in the second system, the second application sends the service response data to the first application in the first system, and the first application sends the service response data to the first middleware for processing.
[0130] In step 707, the second communication data is sent to the terminal, so that the terminal processes the service response data, and the second communication data is transmitted through the data communication connection.
[0131] The second channel data is sent through any data channel in the data communication connection, or the second channel data is sent through the second data channel (that is, the same data channel is used for transmission as the first communication data).
[0132] Optionally, after receiving the second communication data through the data communication connection, the terminal processes the second communication data through the middleware to obtain service response data, and distributes the service response data to the corresponding application in the terminal.
[0133] In this embodiment, the common data of the first system and the second system is transmitted through the second data channel, so that after the first system receives the communication data, the service data processed by the middleware in the first system can be distributed to the application in the foreground system according to the foreground running state of the first system and the second system, so that the application in the foreground system processes and responds to the service data, and the timeliness and accuracy of processing the common data of the system are improved.
[0134] Please refer to Figure 9 which shows a flowchart of a data transmission method provided by another exemplary embodiment of the application. This embodiment takes the application of a wearable device as an example to illustrate the method, which can include the following steps.
[0135] Step 901, receiving first communication data sent by a terminal, the first communication data being transmitted through a data communication connection established between a first system and the terminal.
[0136] The implementation of this step can refer to the above-mentioned step 301, and this embodiment will not be repeated here.
[0137] Step 902, in response to the data channel used to transmit the first communication data being a third data channel, determining a second middleware as a target middleware, the third data channel being used to transmit data processed by an application in a second system.
[0138] In a possible implementation, before the terminal sends communication data to the wearable device, the terminal first determines the data type of the communication data. If the communication data is unique data of the second system (such as incoming call notification), the terminal sends the first communication data to the first system through the third data channel. Correspondingly, when the first system receives the first communication data through the third data channel, the first system determines that the service needs to be processed through the application in the second system.
[0139] In this embodiment, in order to ensure that the service data in the first communication data can be correctly processed as service data recognizable by the application in the second system, the wearable device determines the second middleware as the target middleware, which is specially used to process the unique data of the second system.
[0140] Illustratively, as Figure 10As shown, taking the terminal and the wearable device for example, the terminal generates service data after the application, and first sends the service data to the middleware. The middleware processes the service data into communication data, and sends the communication data to the Bluetooth, so as to transmit the communication data to the Bluetooth of the first system through the third data channel (indicated by the middleware) in the Bluetooth connection. After the first system receives the communication data through the third data channel in the Bluetooth connection, it is determined that the communication data is unique data of the second system, and the service data in the communication data needs to be responded by the second system, so that the middleware in the second system is determined as the target middleware.
[0141] Since the wearable device receives the first communication data, the first system is in the foreground running state, and the second system is in the sleep state. The second system in the sleep state cannot process the communication data through the second middleware. Therefore, the wearable device needs to detect whether the second system (i.e. the second processor) is in the foreground running state. If it is in the foreground running state, step 904 is executed, and if it is in the sleep state, step 903 is executed.
[0142] Step 903, in response to the first system being in the foreground running state, the second processor is switched from the sleep state to the wake-up state, wherein when the second processor is in the wake-up state, the second system is in the foreground running state.
[0143] In a possible implementation, if the second processor is in the sleep state, the first processor wakes up the second processor by generating an interrupt. After receiving the interrupt, the second processor is switched from the sleep state to the wake-up state. Correspondingly, after the second system is woken up, it is in the foreground running state, and the first system is switched to the background running state.
[0144] Step 904, the first system sends the first communication data to the second middleware in the second system.
[0145] In a possible implementation, when the first system and the second system are both in the running state, the first system sends the first communication data through the physical serial port between the first system and the second system. The physical serial port can be UART.
[0146] Optionally, since the communication protocol stack can not be set in the second system (because the communication component is mounted on the first processor), before the first system sends the first communication data to the middleware of the second system, the first communication data needs to be processed by the communication protocol stack of the first system to obtain the first communication data that can be recognized and processed by the middleware in the second system. For example, the first system first processes the first communication data through the Bluetooth protocol stack, and then sends the processed first communication data to the second middleware in the second system.
[0147] Illustratively, asFigure 10 As shown, when the received communication data is unique data of the second system, the first system sends the received communication data to the middleware of the second system.
[0148] Step 905, processing the first communication data through the second middleware to obtain service data.
[0149] As shown, the middleware of the second system receives the first communication data and processes the first communication data into service data that can be recognized and processed by the application in the second system. Figure 10
[0150] Step 906, sending the service data to the target application through the second middleware so that the target application processes the service data.
[0151] The target application is a second application in the second system, and the second middleware distributes the processed service data to the second application for service processing response.
[0152] As shown, the middleware in the second system distributes the service data to the application in the second system for service response. Figure 10
[0153] Step 907, processing the service response data of the target application through the second middleware to obtain second communication data.
[0154] The target application processes the service data to generate service response data, which can be generated by user interaction or automatically generated by the application in the data process. For example, when the service data is a call notification, the user can perform a listening or hang-up operation on the interface after the call application displays a call reminder interface, and the listening or hang-up operation will generate corresponding service response data.
[0155] When it is necessary to feed back the service response data to the terminal (such as it is necessary to feed back the listening or hang-up instruction to the terminal), the target application processes the service response data through the target middleware to obtain second communication data that meets the communication connection transmission requirements. In this embodiment, the target application processes the service response data through the second middleware to obtain the second communication data.
[0156] In this embodiment, since the second middleware and the target application are both located in the second system, the target application can directly send the service response data to the second middleware.
[0157] Step 908, sending the second communication data to the first system through the second middleware.
[0158] Since the wearable device only establishes a data communication connection with the terminal through the first system, and the second system does not establish a data communication connection with the terminal, the second system needs to feed back service response data to the terminal through the first system. In this embodiment, the second middleware sends the processed second communication data to the first system, and the first system feeds back the second communication data to the terminal through the data communication connection.
[0159] In a possible implementation, the second system sends the second communication data through a physical serial port between the first system. The physical serial port can be a UART.
[0160] In step 909, the first system sends the second communication data to the terminal.
[0161] Further, the terminal sends the second communication data to the terminal through the first system. The second channel data is sent through any data channel in the data communication connection, or the second channel data is sent through the third data channel (i.e., the same data channel as the first communication data).
[0162] It should be noted that since the second communication data received by the first system does not conform to the communication protocol, the first system needs to process (protocol encapsulation) the second communication data through the communication protocol stack before sending the second communication data to the terminal, so as to send the processed second communication data to the terminal. For example, the first system first processes the second communication data through the Bluetooth protocol stack, and then sends the processed second communication data to the terminal.
[0163] In this embodiment, the unique data of the second system is transmitted through the third data channel, so that after the first system receives the communication data, the communication data can be forwarded to the second system in time, and the middleware in the second system processes the communication data, and then the application in the second system processes the service data obtained by processing to respond, thereby improving the timeliness and accuracy of the second system processing its own unique data.
[0164] In combination with the above embodiments, in an exemplary example, when the terminal and the wearable device communicate through a Bluetooth (BT) connection, the software framework of the terminal and the wearable device is as shown in FIG. 11. Figure 11
[0165] In the terminal 1110, an application is installed, and a middleware SDK is set in the application. Through the middleware SDK, the application can send data to the BT API, so that the terminal sends the data to other devices through the BT, or obtains the data received by the terminal through the BT.
[0166] The first system 1121 and the second system 1122 are arranged in the wearable device 1120. The first system 1121 communicates with the terminal 1110 through a Bluetooth connection (BT Stack is arranged in the terminal 1110 and the first system 1121, and the second system does not arrange BT Stack), and the first system 1121 and the second system 1122 communicate through a physical serial port (SPI and UART).
[0167] When the terminal 1110 sends the first system unique data to the first system 1121 through the Bluetooth connection, the first system processes the data through the first middleware, and distributes the service data obtained by processing to the application in the first system, and the application responds to the service.
[0168] When the terminal 1110 sends the first system and the second system shared data to the first system 1121 through the Bluetooth connection, the first system processes the data through the first middleware, and distributes the service data obtained by processing to the application in the first system or the second system based on the foreground running state of the first system 1121 and the second system 1122. When the first system 1121 is in the foreground running state, the first system 1121 distributes the service data to the application in the first system; when the second system 1122 is in the foreground running state, the application in the first system forwards the service data to the application in the second system through SPI.
[0169] When the terminal 1110 sends the second system unique data to the first system 1121 through the Bluetooth connection, the first system 1121 forwards the data to the second system 1122 through UART, the second system 1122 processes the data through the second middleware, and distributes the service data obtained by processing to the application in the second system, and the application responds to the service.
[0170] Please refer to Figure 12 which shows the structure block diagram of the data transmission device provided by an embodiment of the application. The device can be realized by software, hardware or combination of the two to become all or part of the wearable device. The device includes:
[0171] The communication data receiving module 1201 is configured to receive the first communication data sent by the terminal, and the first communication data is transmitted through the data communication connection established between the first system and the terminal;
[0172] The communication data processing module 1202 is configured to process the first communication data through the target middleware to obtain the service data contained in the first communication data, and the target middleware is the first middleware in the first system or the second middleware in the second system;
[0173] The service data sending module 1203 is configured to send the service data to a target application through the target middleware, so that the target application processes the service data, and the target application is an application in the first system or the second system.
[0174] Optionally, the communication data processing module 1202 comprises:
[0175] The middleware determining unit is configured to determine the target middleware from the first middleware and the second middleware based on a data channel used for transmitting the first communication data, wherein the data communication connection comprises at least two data channels, and different data channels are used for transmitting data with different processing requirements.
[0176] The communication data processing unit is configured to process the first communication data through the target middleware to obtain the service data.
[0177] Optionally, the middleware determining unit is specifically configured to:
[0178] In response to the data channel used for transmitting the first communication data being a first data channel, the first middleware is determined as the target middleware, and the first data channel is used for transmitting data processed by an application in the first system.
[0179] In response to the data channel used for transmitting the first communication data being a second data channel, the first middleware is determined as the target middleware, and the second data channel is used for transmitting data processed by an application in the first system or the second system.
[0180] In response to the data channel used for transmitting the first communication data being a third data channel, the second middleware is determined as the target middleware, and the third data channel is used for transmitting data processed by an application in the second system.
[0181] Optionally, the data channel used for transmitting the first communication data is the second data channel.
[0182] The service data sending module 1203 comprises:
[0183] The application determining unit is configured to determine the target application based on system running states of the first system and the second system.
[0184] The service data sending unit is configured to send the service data to the target application through the first middleware.
[0185] Optionally, the application determining unit is specifically configured to:
[0186] determining the target application as a first application in the first system in response to the first system being in a foreground running state;
[0187] determining the target application as a second application in the second system in response to the second system being in a foreground running state.
[0188] Optionally, the second system is in a foreground running state.
[0189] The service data sending unit is specifically configured to:
[0190] send the service data to the first application through the first middleware;
[0191] send the service data to the second application through the first application, so that the second application processes the service data.
[0192] Optionally, a data channel used for transmitting the first communication data is the third data channel.
[0193] The communication data processing module 1202 comprises:
[0194] The forwarding unit is configured to send the first communication data to the second middleware in the second system through the first system.
[0195] The communication data processing unit is configured to process the first communication data through the second middleware to obtain the service data.
[0196] Optionally, the apparatus further comprises:
[0197] The wake-up module is configured to switch the second processor from a sleep state to a wake-up state in response to the first system being in a foreground running state, wherein the second system is in a foreground running state when the second processor is in a wake-up state.
[0198] Optionally, the apparatus further comprises:
[0199] The response data processing module is configured to process service response data of the target application through the target middleware to obtain second communication data, the service response data being data generated after the target application processes the service data in a service manner;
[0200] The communication data sending module is configured to send the second communication data to the terminal, so that the terminal processes the service response data, the second communication data being transmitted through the data communication connection.
[0201] Optionally, the communication data sending module is configured to:
[0202] In response to the target middleware being the second middleware, sending the second communication data to the first system through the second middleware;
[0203] sending the second communication data to the terminal through the first system.
[0204] Optionally, the data communication connection is a Bluetooth connection, and the first processor communicates with the Bluetooth communication component through a physical serial port.
[0205] Optionally, the power consumption of the second processor is higher than that of the first processor.
[0206] In summary, in the embodiments of the present application, the wearable device is provided with double processors, the first system is run by the first processor, and the second system is run by the second processor. When the first system receives the communication data sent by the terminal through the data communication connection established between the wearable device and the terminal, the middleware provided in the first system or the second system processes the communication data to obtain the service data contained therein, so as to send the service data to the application in the first system or the second system through the middleware for service processing. Since the wearable device maintains data communication with the terminal through the first system, the influence of system switching on data communication can be avoided, the stability of data communication between the wearable device and the terminal is ensured, and the data processing and data distribution are performed by the middleware provided in the system, so that the service data can be processed in time, and the service response speed of the wearable device side is improved.
[0207] Please refer to Figure 13 which shows a structure block diagram of the wearable device provided by an exemplary embodiment of the present application. The wearable device in the present application can include one or more of the following components: a processor 1310 and a memory 1320.
[0208] The processor 1310 includes at least a first processor 1311 and a second processor 1312, wherein the first processor 1311 is configured to run a first system, the second processor 1312 is configured to run a second system, the power consumption of the first processor 1311 is lower than that of the second processor 1312, and the performance of the first processor 1311 is lower than that of the second processor 1312. The processor 1310 connects various parts in the entire electronic device by using various interfaces and lines, and performs various functions of the electronic device and processes data by running or executing instructions, programs, code sets or instruction sets stored in the memory 1320, and calling data stored in the memory 1320. Alternatively, the processor 1310 can be implemented in at least one of a hardware form of a digital signal processing (DSP), a field-programmable gate array (FPGA), a programmable logic array (PLA). The processor 1310 can be integrated in a combination of one or several of a central processing unit (CPU), a graphics processing unit (GPU), a neural-network processing unit (NPU), and a modem. Among them, the CPU is mainly used to process operating systems, user interfaces, and application programs; the GPU is used to render and draw the content to be displayed on the touch display screen; the NPU is used to implement artificial intelligence (AI) functions; and the modem is used to process wireless communication. It can be understood that the above-mentioned modem can also not be integrated into the processor 1310, but be implemented by a separate chip.
[0209] The memory 1320 can include a random access memory (RAM) and can also include a read-only memory (ROM). Optionally, the memory 1320 includes a non-transitory computer-readable storage medium. The memory 1320 can be used to store instructions, programs, codes, code sets, or instruction sets. The memory 1320 can include a program storage area and a data storage area, where the program storage area can store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing each of the following method embodiments, etc., and the data storage area can store data created according to the use of the wearable device (such as audio data, a phone book, etc.).
[0210] The wearable device in the embodiments of the present application further includes a communication component 1330 and a display component 1340. The communication component 1330 can be a Bluetooth component, an Ultra Wide Band (UWB) component, etc., and is used to communicate with external devices through wired or wireless networks; the display component 1340 is used to display a graphical user interface and / or receive user interaction operations.
[0211] In the embodiments of the present application, the first processor 1311 and the communication component 1330 are connected through a physical serial port, that is, when the first system is in a running state, the first system and other devices can maintain a Bluetooth connection, so as to communicate data through the Bluetooth connection.
[0212] In addition, those skilled in the art can understand that the structure of the wearable device shown in the above-described figures does not constitute a limitation on the wearable device, and the wearable device can include more or fewer components than those shown in the figures, or combine certain components, or different component arrangements. For example, the wearable device further includes radio frequency circuitry, an input unit, a sensor, audio circuitry, a speaker, a microphone, a power supply, etc., which are not described here.
[0213] The embodiments of the present application also provide a computer-readable storage medium, which stores at least one instruction, and the at least one instruction is used to be executed by a processor to implement the data transmission method as described in the above embodiments.
[0214] The embodiment of the present application provides a computer program product or computer program, the computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer equipment reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions, so that the computer equipment executes the data transmission method provided by the above-mentioned embodiment.
[0215] Those skilled in the art should be aware that, in one or more examples described above, the functions described in the embodiments of the present application can be implemented in hardware, software, firmware or any combination thereof. When implemented in software, the functions can be stored in a computer readable medium or transmitted as one or more instructions or codes on a computer readable medium. The computer readable medium includes computer storage medium and communication medium, wherein the communication medium includes any medium that facilitates the transfer of computer program from one place to another. The storage medium can be any available medium accessible by a general or special purpose computer.
[0216] The above description is only optional embodiments of the present application, and is not used to limit the present application, and any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the protection scope of the present application.
Claims
1. A data transmission method, characterized by, The method is used for a wearable device, the wearable device comprising a first system and a second system, the first system being a system run by a first processor, the second system being a system run by a second processor, and a first middleware being arranged in the first system and a second middleware being arranged in the second system; The method comprises: receiving first communication data sent by a terminal, the first communication data being transmitted through a data communication connection established between the first system and the terminal; processing the first communication data through a target middleware to obtain service data contained in the first communication data, the target middleware being the first middleware in the first system or the second middleware in the second system; sending the service data to a target application through the target middleware, so that the target application processes the service data, the target application being an application in the first system or the second system.
2. The method of claim 1, wherein, The processing of the first communication data through the target middleware to obtain the service data contained in the first communication data comprises: determining the target middleware from the first middleware and the second middleware based on a data channel used for transmitting the first communication data, the data communication connection comprising at least two data channels, and different data channels being used for transmitting data with different processing requirements; processing the first communication data through the target middleware to obtain the service data.
3. The method of claim 2, wherein, The determination of the target middleware from the first middleware and the second middleware based on the data channel used for transmitting the first communication data comprises: in response to the data channel used for transmitting the first communication data being a first data channel, determining the first middleware as the target middleware, the first data channel being used for transmitting data processed by an application in the first system; in response to the data channel used for transmitting the first communication data being a second data channel, determining the first middleware as the target middleware, the second data channel being used for transmitting data processed by an application in the first system or the second system; and in response to the data channel used for transmitting the first communication data being a third data channel, determining the second middleware as the target middleware, the third data channel being used for transmitting data processed by an application in the second system.
4. The method of claim 3, wherein, The data channel used for transmitting the first communication data is the second data channel. The sending of the service data to the target application through the target middleware comprises: determining the target application based on system running states of the first system and the second system; sending the service data to the target application through the first middleware.
5. The method of claim 4, wherein, The determination of the target application based on the system running states of the first system and the second system comprises: in response to the first system being in a foreground running state, determining the target application as a first application in the first system; in response to the second system being in a foreground running state, determining the target application as a second application in the second system.
6. The method of claim 5, wherein, The second system is in a foreground running state. The sending of the service data to the target application by the first middleware comprises: The sending of the service data to the first application by the first middleware; The sending of the service data to the second application by the first application, so that the second application processes the service data.
7. The method of claim 3, wherein, The data channel used for the transmission of the first communication data is the third data channel; The processing of the first communication data by the target middleware to obtain the service data comprises: The sending of the first communication data to the second middleware in the second system by the first system; The processing of the first communication data by the second middleware to obtain the service data.
8. The method of claim 7, wherein, Before the sending of the first communication data to the second middleware in the second system by the first system, the method further comprises: In response to the first system being in a foreground running state, switching the second processor from a sleep state to a wake-up state, wherein the second system is in the foreground running state when the second processor is in the wake-up state.
9. The method according to any one of claims 1 to 8, characterized in that, After the sending of the service data to the target application by the target middleware, the method further comprises: The processing of service response data of the target application by the target middleware to obtain second communication data, the service response data being data generated after the target application processes the service data in a service manner; The sending of the second communication data to the terminal, so that the terminal processes the service response data, the second communication data being transmitted through the data communication connection.
10. The method of claim 9, wherein, The sending of the second communication data to the terminal comprises: In response to the target middleware being the second middleware, the sending of the second communication data to the first system by the second middleware; The sending of the second communication data to the terminal by the first system.
11. The method according to any one of claims 1 to 8, characterized in that, The data communication connection is a Bluetooth connection, and the first processor communicates with a Bluetooth communication component through a physical serial port.
12. The method according to any one of claims 1 to 8, characterized in that, The power consumption of the second processor is higher than that of the first processor.
13. A data transmission apparatus, characterized by comprising: The device is used in a wearable device, the wearable device comprising a first system and a second system, the first system being a system run by a first processor, the second system being a system run by a second processor, and the first system being provided with a first middleware and the second system being provided with a second middleware; The device comprises: A communication data receiving module configured to receive first communication data sent by a terminal, the first communication data being transmitted through a data communication connection established between the first system and the terminal; A communication data processing module configured to process the first communication data by a target middleware to obtain service data contained in the first communication data, the target middleware being a first middleware in the first system or a second middleware in the second system; A service data sending module configured to send the service data to a target application by the target middleware, so that the target application processes the service data, the target application being an application in the first system or the second system.
14. A wearable device, comprising: The wearable device comprises a processor and a memory; the processor comprises at least a first processor and a second processor, and the memory stores at least one instruction for being executed by the processor to implement the data transmission method according to any one of claims 1 to 12.
15. A computer-readable storage medium, characterized in that, The storage medium stores at least one instruction for being executed by a processor to implement the data transmission method according to any one of claims 1 to 12.
Citation Information
Patent Citations
System switching method and device, electronic equipment and readable storage medium
CN112492564A
Data transmission method and device, equipment and storage medium
CN115226048A