Method and apparatus for processing device data, electronic device, and storage medium

By establishing inter-process communication across applications when device data changes, the problem of delayed device data updates under non-keep-alive processes in the device center is solved, achieving real-time synchronization of device data and improving the stability of system performance.

CN113849321BActive Publication Date: 2026-05-01GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
Filing Date
2021-09-15
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

When the device center is not a keep-alive process, it cannot monitor changes in device data of other devices in real time, resulting in delayed device data updates and a poor user experience.

Method used

When device data changes, inter-process communication is established across applications. The device application sends a data change notification to the device center, which then queries the content provider for the changed device data.

Benefits of technology

It enables real-time synchronization and reliable transmission of device data, improving system performance and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113849321B_ABST
    Figure CN113849321B_ABST
Patent Text Reader

Abstract

The application discloses a device data processing method and device, an electronic device and a storage medium, and relates to the technical field of data processing. The method comprises the following steps: when the device application of a first electronic device is associated with the device data of a second electronic device, the device application establishes inter-process communication between the integrated software development kit and the device center of the first electronic device, the device application sends a data change notification to the device center through the inter-process communication, and the device center queries the changed device data of the second electronic device from a content provider encapsulated by the software development kit. According to the application, when the device data changes, inter-process communication between applications is established, so that the reliability of data intercommunication is higher, data transmission is more timely, and the system performance is more stable.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing technology, and more specifically, to a method, apparatus, electronic device, and storage medium for processing device data. Background Technology

[0002] With the development of science and technology, electronic devices are becoming increasingly widespread and feature-rich, making them an essential part of people's daily lives. Electronic devices can obtain and display device data from other devices through their device center. However, when the device center is not a keep-alive process, it cannot monitor changes in device data from other devices in real time, nor can it synchronize the updated data, resulting in delays in data updates and a poor user experience. Summary of the Invention

[0003] In view of the above problems, this application proposes a method, apparatus, electronic device, and storage medium for processing device data to solve the above problems.

[0004] In a first aspect, embodiments of this application provide a method for processing device data, applied to a device application of a first electronic device. The device application integrates a software development kit (SDK), and the SSD encapsulates a content provider. The method includes: when device data of a second electronic device associated with the device application changes, establishing inter-process communication between the SSD and the device center of the first electronic device; and sending a data change notification to the device center through the inter-process communication to instruct the device center to query the changed device data of the second electronic device from the content provider.

[0005] Secondly, embodiments of this application provide a method for processing device data, applied to a device center of a first electronic device. The first electronic device further includes a device application, the device application integrating a software development kit (SDK), and the SSD encapsulating a content provider. The method includes: receiving a data change notification sent by the device application via inter-process communication (IPC), wherein the IPC is established by the device application for the SSD and the device center when device data of an associated second electronic device changes; and, in response to the data change notification, querying the changed device data of the second electronic device from the content provider.

[0006] Thirdly, embodiments of this application provide a device data processing apparatus applied to a device application of a first electronic device. The device application integrates a software development kit (SDK), and the SSD encapsulates a content provider. The apparatus includes: an inter-process communication (IPC) establishment module, configured to establish IPC between the SSD and the device center of the first electronic device when the device data of a second electronic device associated with the device application changes; and a notification sending module, configured to send a data change notification to the device center via the IPC to instruct the device center to query the changed device data of the second electronic device from the content provider.

[0007] Fourthly, embodiments of this application provide a device data processing apparatus applied to a device center of a first electronic device. The first electronic device further includes a device application, which integrates a software development kit (SDK) and encapsulates a content provider. The apparatus includes: a notification receiving module for receiving a data change notification sent by the device application via inter-process communication (IPC), wherein the IPC is established by the device application for the IDC and the device center when the device data of an associated second electronic device changes; and a device data query module for querying the changed device data of the second electronic device from the content provider in response to the data change notification.

[0008] Fifthly, embodiments of this application provide an electronic device, including a memory and a processor, wherein the memory is coupled to the processor, the memory stores instructions, and when the instructions are executed by the processor, the processor performs the above-described method.

[0009] Sixthly, embodiments of this application provide a computer-readable storage medium storing program code, which can be invoked by a processor to execute the above-described method.

[0010] The device data processing method, apparatus, electronic device, and storage medium provided in this application embodiment enable the device application to establish inter-process communication between the integrated software development kit (SDK) and the device center of the first electronic device when the device data of the second electronic device associated with the device application of the first electronic device changes. The device application sends a data change notification to the device center through this inter-process communication. The device center queries the changed device data of the second electronic device from the content provider encapsulated in the SSD. By establishing inter-process communication across applications when the device data changes, the reliability of data interoperability is higher, the data transmission is more timely, and the system performance is more stable. Attached Figure Description

[0011] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0012] Figure 1 A block diagram of an electronic device for performing a device data processing method according to an embodiment of the present application is shown;

[0013] Figure 2 A block diagram of the operating system of the electronic device provided in an embodiment of this application is shown;

[0014] Figure 3 A timing diagram of a device data processing method provided in an embodiment of this application is shown;

[0015] Figure 4 A schematic diagram of an electronic device provided in an embodiment of this application is shown;

[0016] Figure 5 A schematic diagram illustrating communication between a first electronic device and a second electronic device provided in an embodiment of this application is shown;

[0017] Figure 6 A flowchart illustrating a device data processing method according to an embodiment of this application is shown;

[0018] Figure 7 A flowchart illustrating a device data processing method according to an embodiment of this application is shown;

[0019] Figure 8 A flowchart illustrating a device data processing method according to an embodiment of this application is shown;

[0020] Figure 9 A flowchart illustrating a device data processing method according to an embodiment of this application is shown;

[0021] Figure 10 A flowchart illustrating a device data processing method according to an embodiment of this application is shown;

[0022] Figure 11 A flowchart illustrating a device data processing method according to an embodiment of this application is shown;

[0023] Figure 12 A block diagram of a device data processing apparatus provided in one embodiment of this application is shown;

[0024] Figure 13 A block diagram of a device data processing apparatus provided in one embodiment of this application is shown;

[0025] Figure 14 A storage unit for storing or carrying program code implementing a device data processing method according to an embodiment of the present application is shown. Detailed Implementation

[0026] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings.

[0027] Electronic devices can query device data from other devices provided by content providers through their device center, and monitor data changes from content providers to synchronize the updated device data on other devices. However, when the device center is not a keep-alive process (i.e., it may be killed by the system at any time) or is not running in the background, it can only actively query device data from other devices provided by content providers after it starts up. This results in the inability to monitor device data changes from other devices in real time and to synchronize the updated device data accordingly. Consequently, this causes delays in device data updates, makes it impossible to handle some device-linked related services, and leads to a poor user experience.

[0028] To address the aforementioned problems, the inventors, through long-term research, discovered and proposed the device data processing method, apparatus, electronic device, and storage medium provided in the embodiments of this application. By establishing inter-process communication across applications when device data changes, the reliability of data interoperability is improved, data transmission is more timely, and system performance is more stable. The specific device data processing method will be described in detail in subsequent embodiments.

[0029] Please see Figure 1 This diagram illustrates a structural block diagram of an electronic device (first electronic device) 100 provided in an embodiment of this application. The electronic device 100 can be a smartphone, tablet computer, e-reader, or other electronic device capable of running applications. The electronic device 100 in this application may include one or more of the following components: a processor 110, a memory 120, a touch display screen 130, and one or more applications. The one or more applications may be stored in the memory 120 and configured to be executed by one or more processors 110. The one or more applications are configured to perform the methods described in the foregoing method embodiments.

[0030] The processor 110 may include one or more processing cores. The processor 110 connects to various parts within the electronic device 100 using various interfaces and lines, and performs various functions and processes data by running or executing instructions, programs, code sets, or instruction sets stored in the memory 120, and by calling data stored in the memory 120. Optionally, the processor 110 may be implemented using at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). The processor 110 may integrate one or a combination of several of the following: Central Processing Unit (CPU), Graphics Processing Unit (GPU), and modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the content to be displayed; and the modem handles wireless communication. It is understood that the modem may also not be integrated into the processor 110 and may be implemented separately using a communication chip.

[0031] The memory 120 may include random access memory (RAM) or read-only memory (ROM). The memory 120 can be used to store instructions, programs, code, code sets, or instruction sets. The memory 120 may include a program storage area and a data storage area. The program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as touch functionality, sound playback functionality, image playback functionality, etc.), and instructions for implementing the various method embodiments described below. The data storage area may also store data created by the electronic device 100 during use (such as phonebook data, audio and video data, chat log data, etc.).

[0032] The touch screen 130 is used to display information input by the user, information provided to the user, and various graphical user interfaces of the electronic device 100. These graphical user interfaces can be composed of graphics, text, icons, numbers, video, and any combination thereof. In one example, the touch screen 130 can be a liquid crystal display (LCD) or an organic light-emitting diode (OLED), without limitation.

[0033] Taking the operating system of electronic device 100 as Android as an example, the programs and data stored in memory 120 are as follows: Figure 2 As shown, memory 120 stores the Linux kernel layer 220, system runtime library layer 240, application framework layer 260, and application layer 280. The Linux kernel layer 220 provides low-level drivers for various hardware components of the electronic device 100, such as display drivers, audio drivers, camera drivers, Bluetooth drivers, Wi-Fi drivers, and power management. The system runtime library layer 240 provides support for key features of the Android system through several C / C++ libraries. For example, the SQLite library provides database support, the OpenGL / ES library provides 3D graphics support, and the Webkit library provides browser kernel support. The system runtime library layer 240 also provides the Android Runtime, which mainly provides core libraries that allow developers to write Android applications using the Java language. The application framework layer 260 provides various APIs that may be used when building applications. Developers can also use these APIs to build their own applications, such as activity management, window management, view management, notification management, content providers, package management, call management, resource management, and location management. At least one application runs in the application layer 280. These applications can be built-in contact programs, SMS programs, clock programs, camera applications, etc., which come with the operating system; they can be applications developed by third-party developers, such as instant messaging programs, photo enhancement programs, etc.; or they can be applications associated with other devices, such as health applications.

[0034] Please see Figure 3 , Figure 3 A timing diagram of a device data processing method according to an embodiment of this application is shown. This method establishes inter-process communication across applications when device data changes, resulting in higher reliability of data exchange, more timely data transmission, and more stable system performance. In one embodiment of this application, the device data processing method is applied to, for example... Figure 1 The first electronic device 100 shown includes a device application and a device center. The device application integrates a software development kit (SDK), and the SSD encapsulates a content provider. The specific process of this embodiment will be described below using an electronic device (the first electronic device) as an example. Of course, it is understood that the electronic device used in this embodiment may include smartphones, tablets, wearable electronic devices, etc., and is not limited thereto. The following will focus on... Figure 3 The process shown is described in detail. The method for processing the device data may include the following steps:

[0035] Step S110: When the device data of the second electronic device associated with the device application changes, the device application establishes inter-process communication between the software development kit and the device center of the first electronic device.

[0036] Please see Figure 4 , Figure 4 A schematic diagram of an electronic device provided in an embodiment of this application is shown. For example... Figure 4 As shown, the electronic device (first electronic device) may include a device application and a device center. The device application integrates a software development kit (SDK), and the software development kit encapsulates a content provider.

[0037] Content providers, as a fundamental component of Android, are standardized data pipelines. Device applications are the direct business partners of the second electronic devices, responsible for the most direct interaction with these devices. For example, the device application provides device data, integrates a software development kit (SDK), and communicates with the device center. The SSD is a development toolkit provided to the device application for access. For instance, the SSD is integrated into the device application, providing content providers that offer device data and inter-process communication interfaces (such as Binder connections) to establish inter-process communication with the device center. The device center is the platform hub managing all second electronic devices, interfacing with multiple device applications. For example, the device center acts as a unified device management center, collecting device data from all currently connected second electronic devices and providing device data to each device externally through its device management module.

[0038] In this embodiment, since the software development kit (SDK) encapsulates a content provider, and the device application integrates the SSD, the device application only needs to access the SSD's API call interface. As one feasible approach, the device application provides the SSD with device data for the second electronic device, which is then stored by the SSD in the content provider and provided to the device center.

[0039] In one embodiment of this application, the device application may be installed on the first electronic device and associated with one or more second electronic devices; alternatively, the device application may exist in the form of a quick app on the first electronic device and be associated with one or more second electronic devices, such as... Figure 5As shown, the second electronic device can be a headset 200, and the device application is associated with the headset 200. The association between the device application and the second electronic device can include: the account logged into the device application being the same as the account logged into the second electronic device, or the account logged into the device application being associated with the account logged into the second electronic device. For example, when the second electronic device is a wireless headset, the device application can be a wireless headset application associated with the wireless headset; when the second electronic device is a smartwatch or smart bracelet, the device application can be a health application associated with the smartwatch or smart bracelet.

[0040] In this embodiment, the device application can monitor the device data of the associated second electronic device. When a change is detected in the device data of the second electronic device, inter-process communication can be established between the software development kit (SDK) and the device center. The device application communicates directly with the associated second electronic device; that is, the device application can obtain information about changes in the device data of the second electronic device. Therefore, when the device application detects a change in the device data of the second electronic device, inter-process communication can be established between the SSD and the device center.

[0041] As one possible approach, the device data may include device display data, device performance data, device configuration data, device status data, etc., without limitation.

[0042] In some implementations, when the device data associated with the device application changes, a binder connection between the software development kit (SDK) and the device center can be established using the Android Interface Definition Language (AIDL) to build inter-process communication between the SSD and the device center.

[0043] Step S120: The device application sends a data change notification to the device center through the inter-process communication.

[0044] In some implementations, after establishing inter-process communication between the software development kit and the device center, the device application can send data change notifications to the device center through this inter-process communication (such as a binder connection), enabling the device center to be aware of real-time changes in the device data of the second electronic device. Based on the above steps, it can be seen that this embodiment, by establishing a cross-application device data transmission channel and placing the device center's business at a higher layer, with the device application or connection management framework driving the device data, can provide stable and reliable device data to the device center's business layer even if the device center's business processes are not constantly running.

[0045] In one approach, the data change notification sent by the device application to the device center can have only a notification function. For example, the data change notification could be used to notify the device center that the device data of the second electronic device has changed, but it would not notify the device center of the changed device data or the changed device data. Based on this, the device center can only be aware that the device data of the second electronic device has changed based on the data change notification.

[0046] As another approach, the data change notification sent by the device application to the device center can have the function of notifying specific change information. For example, the data change notification can be used to notify the device center that the device data of the second electronic device has changed, and to notify the device center of the changed device data, and even to notify the device center of the changed device data. Based on this, the device center can know that the device data of the second electronic device has changed, and know the changed device data of the second electronic device, such as changes in the battery level of the second electronic device, changes in the connection information of the second electronic device, changes in the control switch information of the second electronic device, etc., without limitation.

[0047] Step S130: The device center queries the content provider for the changed device data of the second electronic device.

[0048] In this embodiment, after receiving a data change notification sent by the device application, the device center can respond to the device change notification by querying the changed device data of the second electronic device from the content provider encapsulated in the software development kit, thereby ensuring real-time acquisition of the changed device data and improving the effect of device linkage (e.g., audio linkage).

[0049] In some implementations, the core process of the device center includes a device management module. Upon receiving a data change notification from a device application, the device center can, in response to the notification, query the changed device data of the second electronic device from the content provider encapsulated in the software development kit via the device management module.

[0050] In one embodiment of this application, it is assumed that the first electronic device is a smartphone and the second electronic device is a smartwatch. The smartphone is connected to both the smartwatch and a smart headset. The smartphone includes a device application associated with the smartwatch. When the smartwatch receives an incoming call, it can determine that the smartwatch's device data has changed. The device application can establish inter-process communication between a software development kit (SDK) and the smartphone's device center, and send a device data change notification to the device center. In response to the data change notification, the device center obtains the incoming call data from the smartwatch from the content provider encapsulated in the SSD. Based on this incoming call data, the smartphone can control the smart headset to connect to the smartwatch so that the user can answer incoming calls from the smartwatch through the smart headset.

[0051] In another embodiment of this application, it is assumed that the first electronic device is a smartwatch and the second electronic device is a smartphone, with the smartwatch connected to both the smartphone and a smart headset. The smartwatch includes a device application associated with the smartphone, which can determine if the smartphone's device data has changed when the smartphone receives an incoming call. The device application can establish inter-process communication between a software development kit (SDK) and the smartwatch's device center, and send a device data change notification to the device center. In response to this data change notification, the device center obtains the incoming call data from the content provider encapsulated in the SSD. Based on this incoming call data, the smartwatch can control the smart headset to connect to the smartphone, allowing the user to answer incoming calls through the smart headset.

[0052] One embodiment of this application provides a device data processing method in which, when the device data of a second electronic device associated with a device application of a first electronic device changes, the device application establishes inter-process communication between the integrated software development kit (SDK) and the device center of the first electronic device. The device application sends a data change notification to the device center through this inter-process communication. The device center queries the changed device data of the second electronic device from the content provider encapsulated in the SSD. Thus, by establishing inter-process communication across applications when device data changes, the reliability of data interoperability is higher, data transmission is more timely, and system performance is more stable.

[0053] Please see Figure 6 , Figure 6 A flowchart illustrating a device data processing method according to an embodiment of this application is shown. This method establishes inter-process communication across applications when device data changes, resulting in higher reliability of data exchange, more timely data transmission, and more stable system performance. In one embodiment of this application, the device data processing method is applied to applications such as... Figure 12 The device data processing device 200 and the electronic device (first electronic device) 100 equipped with the device data processing device 300 are shown. Figure 1The device application integrates a software development kit (SDK), which encapsulates a content provider. The following will focus on... Figure 6 The process shown is described in detail. The method for processing the device data may include the following steps:

[0054] Step S210: When the device data of the second electronic device associated with the device application changes, inter-process communication is established between the software development kit and the device center of the first electronic device.

[0055] Step S220: Send a data change notification to the device center via the inter-process communication to instruct the device center to query the changed device data of the second electronic device from the content provider.

[0056] For a detailed description of steps S210-S220, please refer to steps S110-S130, which will not be repeated here.

[0057] One embodiment of this application provides a device data processing method. When the device data of a second electronic device associated with a device application of a first electronic device changes, inter-process communication is established between the integrated software development kit (SDK) and the device center of the first electronic device. Data change notifications are sent to the device center through this inter-process communication to instruct the device center to query the changed device data of the second electronic device from the content provider encapsulated in the SSD. By establishing inter-process communication across applications when device data changes, the reliability of data interoperability is improved, data transmission is more timely, and system performance is more stable.

[0058] Please see Figure 7 , Figure 7 A flowchart illustrating a device data processing method according to an embodiment of this application is shown. This method is applied to the device application of the aforementioned first electronic device, which integrates a software development kit (SDK) and encapsulates a content provider. The following will focus on... Figure 7 The process shown is described in detail. The method for processing the device data may include the following steps:

[0059] Step S310: When the device data of the second electronic device associated with the device application changes, the changed device data is obtained.

[0060] In this embodiment, the device application can monitor the device data of the associated second electronic device. When a change is detected in the device data of the second electronic device, the application can obtain the changed device data. Since the device application and the second electronic device communicate directly, the device application can directly obtain the changed device data of the second electronic device.

[0061] Step S320: When the changed device data includes preset key data, establish inter-process communication between the software development kit and the device center.

[0062] In some implementations, the device application of the first electronic device may be pre-set with key data as preset key data, which serves as the basis for determining the changes in device data of the second electronic device. Therefore, in this embodiment, when the changes in device data of the second electronic device are obtained, the changed device data can be compared with the preset key data to determine whether the changed device data includes the preset key data.

[0063] When it is determined that the changed device data includes preset key data, it can be determined that the change in the device data of the second electronic device is important and needs to be promptly notified to the device center for synchronization. In this case, inter-process communication between the software development kit and the device center can be established.

[0064] If it is determined that the changed device data does not include preset key data, then the change in the device data of the second electronic device is not important and does not need to be notified to the device center for synchronization in a timely manner. Therefore, it is not necessary to establish inter-process communication between the software development kit and the device center. Instead, the device center can automatically query and synchronize the changed device data from the content provider encapsulated in the software development kit after starting.

[0065] For example, when the device center starts, it can actively query the content provider encapsulated in the software development kit integrated into the device application through its core process's device management module to obtain the changed device data of the second electronic device. Alternatively, when the first electronic device detects a device data display event, it can start the device center and actively query the content provider encapsulated in the software development kit integrated into the device application through its core process's device management module to obtain the changed device data of the second electronic device. The device data display event can include the target card display event corresponding to the device application on the negative one screen of the first electronic device, or the target card display event corresponding to the device application in the device center of the first electronic device. That is, when the target card corresponding to the device application on the negative one screen of the first electronic device enters the display state (the target card switches from invisible to visible), or when the target card corresponding to the device application in the device center of the first electronic device enters the display state (the target card switches from invisible to visible), it will actively obtain the changed device data of the second electronic device. Therefore, the UI layer of the device center can send the request to read the changed device data of the second electronic device to the device management module of the core layer of the device center through inter-process communication. The device management module queries the content provider encapsulated by the software development kit integrated in the device application based on the request to obtain the changed device data of the second electronic device.

[0066] In one embodiment of this application, the example of preset key data including device connection data is used for explanation. When the changed device data of the second electronic device is device connection data (such as the second electronic device establishing a connection with the third device, or the second electronic device disconnecting from the third electronic device), it can be determined that the changed device data of the second electronic device includes preset key data, and inter-process communication between the software development kit and the device center can be established. When the changed device data of the second electronic device is not connection data (such as changes in the display data of the second electronic device, such as changes in the desktop display color or desktop background image), it can be determined that the changed device data of the second electronic device does not include preset key data, and inter-process communication between the software development kit and the device center does not need to be established.

[0067] Step S330: Send a data change notification to the device center via the inter-process communication to instruct the device center to query the changed device data of the second electronic device from the content provider.

[0068] For a detailed description of step S330, please refer to steps S120-S130, which will not be repeated here.

[0069] One embodiment of this application provides a device data processing method. When the device data of a second electronic device associated with a device application changes, the changed device data is obtained. When the changed device data includes preset key data, inter-process communication is established between a software development kit and a device center. A data change notification is sent to the device center via inter-process communication to instruct the device center to query the changed device data of the second electronic device from the content provider. Compared to... Figure 2 The device data processing method shown in this embodiment also establishes inter-process communication between applications when critical device data changes, making the interoperability of critical data more reliable, the transmission more timely, and the system performance more stable.

[0070] Please see Figure 8 , Figure 8 A flowchart illustrating a device data processing method according to an embodiment of this application is shown. This method is applied to a device application of the aforementioned first electronic device, the device application integrating a software development kit (SDK), which encapsulates a content provider. In this embodiment, device data includes device status. The following will focus on... Figure 8 The process shown is described in detail. The method for processing the device data may include the following steps:

[0071] Step S410: When the device state of the second electronic device associated with the device application changes, inter-process communication is established between the software development kit and the device center.

[0072] In this embodiment, device data includes device status. Device status can include battery status information, connection status information, configuration status information, device addition status, device removal status, device update status, etc. Specifically, the battery status information can be used to characterize the remaining battery power of the second electronic device. The connection status information can be used to characterize the connection status of the second electronic device with other electronic devices, such as establishing a connection with a third electronic device or disconnecting from a third electronic device. The configuration status information can be used to characterize the on / off status of the second electronic device's functions, such as noise reduction switching being on or off. The device addition status can be used to characterize the second electronic device being added to, for example, a smart system. The device removal status can be used to characterize the second electronic device being removed from, for example, a smart system. The device update status can be used to characterize the second electronic device being updated within, for example, a smart system.

[0073] Changes in the device status of the second electronic device directly affect the device interaction between the second electronic device and other electronic devices. It can be assumed that when the device status of the second electronic device changes, it needs to be promptly notified to the device center for synchronization. Therefore, when the device status of the second electronic device associated with a device application changes, inter-process communication between the software development kit and the device center can be established.

[0074] Step S420: Send a data change notification to the device center via the inter-process communication to instruct the device center to query the changed device data of the second electronic device from the content provider.

[0075] For a detailed description of step S420, please refer to steps S120-S130, which will not be repeated here.

[0076] One embodiment of this application provides a device data processing method. When the device status of a second electronic device associated with a device application changes, inter-process communication is established between a software development kit (SDK) and a device center. A data change notification is sent to the device center via this inter-process communication, instructing the device center to query the changed device data of the second electronic device from the content provider. Compared to... Figure 2 The device data processing method shown in this embodiment also establishes inter-process communication between applications when the device status changes, making the device status communication more reliable, the transmission more timely, and the system performance more stable.

[0077] Please see Figure 9 , Figure 9 A flowchart illustrating a device data processing method according to an embodiment of this application is shown. This method establishes inter-process communication across applications when device data changes, resulting in higher reliability of data exchange, more timely data transmission, and more stable system performance. In one embodiment of this application, the device data processing method is applied to applications such as... Figure 13 The device data processing device 400 and the electronic device (first electronic device) 100 equipped with the device data processing device 400 are shown. Figure 1 The device center of the first electronic device also includes a device application that integrates a software development kit (SDK) and encapsulates a content provider. The following will focus on... Figure 9 The process shown is described in detail. The method for processing the device data may include the following steps:

[0078] Step S510: Receive a data change notification sent by the device application through inter-process communication, wherein the inter-process communication is established by the device application for the software development kit and the device center when the device data of the associated second electronic device changes.

[0079] Step S520: In response to the data change notification, query the changed device data of the second electronic device from the content provider.

[0080] For a detailed description of steps S510-S520, please refer to steps S110-S130, which will not be repeated here.

[0081] One embodiment of this application provides a device data processing method that receives a data change notification sent by a device application through inter-process communication. The inter-process communication is established by the device application for a software development kit and a device center when the device data of the associated second electronic device changes. In response to the device data change notification, the application queries the changed device data of the second electronic device from the content provider. By establishing inter-process communication across applications when the device data changes, the reliability of data interoperability is improved, data transmission is more timely, and system performance is more stable.

[0082] Please see Figure 10 , Figure 10 A flowchart illustrating a device data processing method according to an embodiment of this application is shown. This method is applied to the device center of the aforementioned first electronic device, which also includes a device application. This device application integrates a software development kit (SDK), and the SSD encapsulates a content provider. The following will focus on... Figure 10 The process shown is described in detail. The method for processing the device data may include the following steps:

[0083] Step S610: Receive a data change notification sent by the device application through inter-process communication, wherein the inter-process communication is established by the device application for the software development kit and the device center when the device data of the associated second electronic device changes.

[0084] Step S620: In response to the data change notification, query the changed device data of the second electronic device from the content provider.

[0085] For a detailed description of steps S610-S620, please refer to steps S110-S130, which will not be repeated here.

[0086] Step S630: When the changed device data of the second electronic device is queried, the changed device data is cached locally in the first electronic device.

[0087] In some implementations, the device center of the first electronic device can query the modified device data of the second electronic device from the content provider. When the modified device data of the second electronic device is found, it can be cached locally on the first electronic device. Alternatively, when the modified device data of the second electronic device is found, the originally cached device data on the first electronic device can be deleted, and the modified device data can be cached locally on the first electronic device. Yet another way is to overwrite the originally cached device data on the first electronic device with the modified device data.

[0088] Step S640: In response to the first device data display event, obtain the changed device data from the local storage of the first electronic device and display it.

[0089] In this embodiment, after caching the changed device data of the second electronic device locally on the first electronic device, the device center can listen for device data display events. When a first device data display event is detected, the device center can respond by retrieving the changed device data from the local storage of the first electronic device and displaying it. Therefore, when the first electronic device detects a first device data display event, it can quickly retrieve and display the changed device data, thereby improving the efficiency of retrieving and displaying the changed device data.

[0090] In some implementations, the device center can listen for device data display events. When a second device data display event is detected, it can respond by retrieving device data from the content provider and displaying it. Specifically, if the device data of the second electronic device remains unchanged from the previous query, the device data retrieved from the content provider will be consistent with the previously retrieved data; if the device data of the second electronic device has changed, the device data retrieved from the content provider will be the changed data. As one approach, the second device data display event can include the target card display event corresponding to the device application in the device center of the first electronic device. When the target card corresponding to the device application in the device center of the first electronic device enters a display state (the target card switches from invisible to visible), it actively retrieves the device data of the second electronic device. For example, the device center can actively query the content provider within the software development toolkit through its core service's device management module to obtain and display the device data of the second electronic device.

[0091] In some implementations, after the device data flows from the content provider encapsulated in the software development kit to the device center, the device data can be model-mapped as needed and transformed into model data usable by the application layer of the device center. This data can then be used to drive higher-level business processes, such as driving the display of target cards or driving the linkage between devices. No further limitations are specified here.

[0092] In one embodiment of this application, in order to perform model mapping on device data, the first electronic device can pre-model the domain of the second electronic device's device services. During domain modeling, the device data and included business logic of the second electronic device can be considered. As one approach, the established model can be shown in the following table:

[0093]

[0094]

[0095] Among them, deviceld represents the unique identifier of the device; macAddress represents the MAC address of the device, mainly for Bluetooth devices; name represents the device name or alias; feature represents the device characteristics, which may vary between different devices; protocol represents the device connection protocol; status represents the device status data, such as battery data and connection status data; and type represents the device type, used to distinguish different device types.

[0096] In some implementations, the device model can be stored after it is built. In this embodiment, the device data in the device model needs to be persisted and made available externally. Therefore, content providers need to be registered in the software development kit of the device application, and the device center will uniformly scan for device-related content providers.

[0097] In one approach, the first device data display event and the second device data display event can be the same device data display event. For example, the first device data display event and the second device data display event can include the target card display event corresponding to the device application on the negative one screen of the first electronic device. When the target card corresponding to the device application on the negative one screen of the first electronic device enters the display state (the target card switches from invisible to visible), it will actively obtain the device data of the second electronic device (including the changed device data). Therefore, the device center can directly obtain the changed device data of the second electronic device from the local device of the first electronic device, or obtain the device data of the second electronic device from the content provider, and then notify the target card to refresh the display device (including the changed device data).

[0098] An embodiment of this application provides a device data processing method that receives a data change notification sent by a device application via inter-process communication. The inter-process communication is established by the device application for a software development kit and a device center when the device data of an associated second electronic device changes. In response to the data change notification, the application queries the content provider for the changed device data of the second electronic device. When the changed device data of the second electronic device is found, it is cached locally on the first electronic device. In response to a device data display event, the changed device data is retrieved from the local storage of the first electronic device and displayed. Compared to... Figure 9 The device data processing method shown in this embodiment also includes, when the device data changes, acquiring the changed device data locally, and when the device data needs to be displayed, directly acquiring the changed device data from the local storage for display, thereby improving the efficiency of device data acquisition and display.

[0099] Please see Figure 11 , Figure 11 A flowchart illustrating a device data processing method according to an embodiment of this application is shown. This method is applied to the device center of the aforementioned first electronic device, which also includes a device application. This device application integrates a software development kit (SDK), and the SSD encapsulates a content provider. The following will focus on... Figure 11 The process shown is described in detail. The method for processing the device data may include the following steps:

[0100] Step S710: When the configuration information of the content provider is found, the configuration information is parsed to obtain the parsing result, wherein the configuration information includes the device data of the second electronic device configured by the device application.

[0101] In this embodiment, the basic device data of the second electronic device is configured by the device application for querying the content provider used by the device center to establish communication. The content provider can be described through its configuration file, which may include device data of the second electronic device configured by the device application. This data may include basic device information such as the default preview image, version number, supported types, and supported card styles.

[0102] In some implementations, the device center can search for the configuration information of the content provider based on a unified action. When the configuration information of the content provider is found, the configuration file can be parsed to obtain the parsing result.

[0103] Step S720: Based on the parsing results, establish a query channel for querying device data from the content provider.

[0104] In some implementations, after obtaining the parsing result, the device center can establish a device query channel based on the parsing result, that is, establish a query channel to query device data from the content provider.

[0105] Step S730: Receive a data change notification sent by the device application through inter-process communication, wherein the inter-process communication is established by the device application for the software development kit and the device center when the device data of the associated second electronic device changes.

[0106] Step S740: In response to the data change notification, query the changed device data of the second electronic device from the content provider.

[0107] For a detailed description of steps S730-S740, please refer to steps S110-S130, which will not be repeated here.

[0108] One embodiment of this application provides a device data processing method whereby, when the device center finds the configuration information of the content provider, it parses the configuration information to obtain a parsing result. Based on this parsing result, a query channel for retrieving device data from the content provider is established. The device center also receives data change notifications sent by the device application via inter-process communication. This inter-process communication is established by the device application for the software development kit and the device center when the device data of the associated second electronic device changes. In response to the device data change notification, the device center queries the content provider for the changed device data of the second electronic device. Compared to... Figure 9 The device data processing method shown in this embodiment also establishes a query channel based on the content provider's configuration information to ensure the success rate of device data query.

[0109] Please see Figure 12 , Figure 12 A block diagram of a device data processing apparatus 300 according to an embodiment of this application is shown. This device data processing apparatus 300 is applied to a device application of the aforementioned first electronic device. This device application integrates a software development kit (SDK), and the SSD encapsulates a content provider. The following will focus on... Figure 12 The block diagram shown illustrates that the device data processing apparatus 300 includes: an inter-process communication establishment module 310 and a notification sending module 320, wherein:

[0110] Inter-process communication establishment module 310 is used to establish inter-process communication between the software development kit and the device center of the first electronic device when the device data of the second electronic device associated with the device application changes.

[0111] Furthermore, the inter-process communication establishment module 310 includes: a binder connection establishment submodule, wherein:

[0112] The Binder connection establishment submodule is used to establish a binder connection between the software development kit and the device center through the Android Interface Definition Language, so as to build inter-process communication between the software development kit and the device center.

[0113] Furthermore, the inter-process communication establishment module 310 includes: a device data acquisition submodule and a first inter-process communication establishment submodule, wherein:

[0114] The device data acquisition submodule is used to acquire the changed device data when the device data of the second electronic device associated with the device application changes.

[0115] The first inter-process communication establishment submodule is used to establish inter-process communication between the software development kit and the device center when the changed device data includes preset key data.

[0116] Furthermore, the device data includes device status, and the inter-process communication establishment module 310 includes: a second inter-process communication establishment submodule, wherein:

[0117] The second inter-process communication establishment submodule is used to establish inter-process communication between the software development kit and the device center when the device state of the second electronic device associated with the device application changes.

[0118] The notification sending module 320 is used to send a data change notification to the device center through the inter-process communication, so as to instruct the device center to query the changed device data of the second electronic device from the content provider.

[0119] Please see Figure 13 , Figure 13 A block diagram of a device data processing apparatus according to an embodiment of this application is shown. The device data processing apparatus 400 is applied to the device center of the aforementioned first electronic device, which also includes a device application. This device application integrates a software development kit (SDK), and the SSD encapsulates a content provider. The following will focus on... Figure 13 The block diagram shown illustrates that the device data processing device 400 includes: a notification receiving module 410 and a device data query module 420, wherein:

[0120] The notification receiving module 410 is used to receive data change notifications sent by the device application through inter-process communication, wherein the inter-process communication is established by the device application for the software development kit and the device center when the device data of the associated second electronic device changes.

[0121] The device data query module 420 is used to query the changed device data of the second electronic device from the content provider in response to the data change notification.

[0122] Furthermore, the device data processing apparatus 400 further includes: a device data caching module and a device data display module, wherein:

[0123] The device data caching module is used to cache the changed device data of the second electronic device locally when the changed device data of the second electronic device is queried.

[0124] The device data display module is used to respond to a first device data display event by acquiring the changed device data from the local storage of the first electronic device and displaying it.

[0125] Furthermore, the device data processing apparatus 400 further includes:

[0126] The parsing result acquisition module is used to parse the configuration information of the content provider when the configuration information of the content provider is found, and obtain the parsing result, wherein the configuration information includes the device data of the second electronic device configured by the device application.

[0127] The query channel establishment module is used to establish a query channel for querying device data from the content provider based on the parsing results.

[0128] Furthermore, the device data processing apparatus 400 further includes: a device data query module, wherein:

[0129] The device data query module is used to query the device data of the second electronic device from the content provider and display it in response to the second device data display event.

[0130] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the above-described device and module can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0131] In the several embodiments provided in this application, the coupling between modules can be electrical, mechanical, or other forms of coupling.

[0132] Furthermore, the functional modules in the various embodiments of this application can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The integrated modules described above can be implemented in hardware or as software functional modules.

[0133] Please see Figure 14This diagram illustrates a structural block diagram of a computer-readable storage medium provided in an embodiment of this application. The computer-readable medium 500 stores program code that can be called by a processor to execute the methods described in the above method embodiments.

[0134] The computer-readable storage medium 500 may be an electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read-Only Memory), EPROM, hard disk, or ROM. Optionally, the computer-readable storage medium 500 includes a non-transitory computer-readable storage medium. The computer-readable storage medium 500 has storage space for program code 510 that performs any of the method steps described above. This program code can be read from or written to one or more computer program products. The program code 510 may be compressed, for example, in a suitable form.

[0135] In summary, the device data processing method, apparatus, electronic device, and storage medium provided in this application embodiment enable the device application to establish inter-process communication between the integrated software development kit (SDK) and the device center of the first electronic device when the device data of the second electronic device associated with the device application of the first electronic device changes. The device application sends a data change notification to the device center through this inter-process communication, and the device center queries the changed device data of the second electronic device from the content provider encapsulated in the SSD. Thus, by establishing inter-process communication across applications when device data changes, the reliability of data interoperability is higher, data transmission is more timely, and system performance is more stable.

[0136] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.

Claims

1. A method for processing device data, characterized in that, A device application applied to a first electronic device, the device application integrating a software development kit (SDK), the SSD encapsulating a content provider, the device application being installed on the first electronic device or existing on the first electronic device in the form of a quick app, the method comprising: The device application monitors the device data of the associated second electronic device. When a change in the device data of the associated second electronic device is detected, a binder connection is established between the software development kit (SDK) and the device center of the first electronic device using the Android Interface Definition Language (API) to construct inter-process communication between the SSD and the device center. The account logged into the device application is the same as the account logged into the second electronic device, or the account logged into the device application is associated with the account logged into the second electronic device. The device center is not a keep-alive process and does not run in the background of the first electronic device. The device application provides the monitored device data of the second electronic device to the SSD. The SSD stores the device data in the content provider, and the content provider provides the device data to the device center. The device center sends a data change notification via inter-process communication to instruct it to query the content provider for the changed device data of the second electronic device.

2. The method according to claim 1, characterized in that, When the device data of the second electronic device associated with the device application changes, establishing inter-process communication between the software development kit and the device center of the first electronic device includes: When the device data of the second electronic device associated with the device application changes, the changed device data is obtained; When the changed device data includes preset key data, inter-process communication is established between the software development kit and the device center.

3. The method according to claim 1, characterized in that, The device data includes device status. When the device data of the second electronic device associated with the device application changes, establishing inter-process communication between the software development kit and the device center of the first electronic device includes: When the device state of the second electronic device associated with the device application changes, inter-process communication is established between the software development kit and the device center.

4. A method for processing equipment data, characterized in that, A device center is applied to a first electronic device, the first electronic device further including a device application, the device application integrating a software development kit, the software development kit encapsulating a content provider, the device application being installed on the first electronic device or existing on the first electronic device in the form of a quick app, the method comprising: The system receives data change notifications sent by the device application via inter-process communication (IPC). The IPC is established by the device application when it detects changes in the device data of an associated second electronic device, targeting the software development kit (SDK) and the device center. The IPC establishes a binder connection between the SSD and the device center using the Android Interface Definition Language (API). The device application's login account is the same as the account logged into the second electronic device, or the device application's login account is associated with the account logged into the second electronic device. The device center is not a keep-alive process and does not run in the background of the first electronic device. The device application provides the SSD to the software development kit with the detected device data of the second electronic device. The software development kit stores the device data in the content provider's database, and the content provider provides the device data to the device center. In response to the data change notification, query the content provider for the changed device data of the second electronic device.

5. The method according to claim 4, characterized in that, After querying the content provider for the changed device data of the second electronic device in response to the data change notification, the method further includes: When the changed device data of the second electronic device is retrieved, the changed device data is cached locally in the first electronic device; In response to a first device data display event, the changed device data is retrieved from the local storage of the first electronic device and displayed.

6. The method according to claim 5, characterized in that, The method further includes: In response to a second device data display event, device data of the second electronic device is queried from the content provider and displayed.

7. The method according to claim 6, characterized in that, The first device data display event and the second device data display event include: The target card display event on the negative one screen of the first electronic device; or The target card display event on the homepage of the device center, wherein the target card corresponds to the device application.

8. The method according to any one of claims 4-7, characterized in that, Before receiving the data change notification sent by the device application via inter-process communication, the method further includes: When the configuration information of the content provider is found, the configuration information is parsed to obtain the parsing result, wherein the configuration information includes the device data of the second electronic device configured by the device application; Based on the analysis results, a query channel is established to query device data from the content provider.

9. A device for processing equipment data, characterized in that, A device application applied to a first electronic device, the device application integrating a software development kit (SDK), the SSD encapsulating a content provider, the device application being installed on the first electronic device or existing on the first electronic device in the form of a quick app, the device comprising: An inter-process communication (IPC) module is used to monitor device data of an associated second electronic device through the device application. When a change in the device data of the associated second electronic device is detected, a binder connection is established between the software development kit (SDK) and the device center of the first electronic device through the Android Interface Definition Language (API) to construct inter-process communication between the SSD and the device center. The user account logged into the device application is the same as the user account logged into the second electronic device, or the user account logged into the device application is associated with the user account logged into the second electronic device. The device center is not a keep-alive process and does not run in the background of the first electronic device. The device application provides the monitored device data of the second electronic device to the SSD. The SSD stores the device data in the content provider, and the content provider provides the device data to the device center. The notification sending module is used to send a data change notification to the device center through the inter-process communication, so as to instruct the device center to query the changed device data of the second electronic device from the content provider.

10. A device for processing equipment data, characterized in that, A device center for use in a first electronic device, the first electronic device further including a device application, the device application integrating a software development kit, the software development kit encapsulating a content provider, the device application being installed on the first electronic device or existing in the first electronic device in the form of a quick app, the device comprising: A notification receiving module is used to receive data change notifications sent by the device application through inter-process communication. The inter-process communication is established by the device application when it detects a change in the device data of an associated second electronic device, targeting the software development kit (SDK) and the device center. The inter-process communication establishes a binder connection between the SSD and the device center using the Android Interface Definition Language (API). The account logged into the device application is the same as the account logged into the second electronic device, or the account logged into the device application is associated with the account logged into the second electronic device. The device center is not a keep-alive process and does not run in the background of the first electronic device. The device application provides the detected device data of the second electronic device to the SSD. The SSD stores the device data in the content provider, and the content provider provides the device data to the device center. The device data query module is used to query the changed device data of the second electronic device from the content provider in response to the data change notification.

11. An electronic device, characterized in that, The method includes a memory and a processor, the memory being coupled to the processor, the memory storing instructions, and when the instructions are executed by the processor, the processor performing the method as described in any one of claims 1-3 or any one of claims 4-8.

12. A computer-readable storage medium, characterized in that, The computer-readable storage medium contains program code that can be called by a processor to execute the method as described in any one of claims 1-3 or any one of claims 4-8.

Citation Information

Patent Citations

  • Method, device and system for controlling mobile terminals to play music

    CN107463305A

  • Distributed cross-process communication bus system

    CN111090530A

  • Monitoring interaction method and device of smart watch, computer equipment and storage medium

    CN113037920A