Data processing methods, apparatus, equipment, storage media and program products

By detecting the application status through server equipment and selecting an appropriate path to push real-time status data, the problem of interruption in the display of real-time status data of charging devices was solved, achieving stable display and efficient user interaction.

CN123114232APending Publication Date: 2026-11-17ANKER INNOVATIONS TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611230297.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-13
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

The real-time status data of existing charging devices cannot be displayed in a timely manner when the application is offline, which makes it impossible for users to check the charging status in real time and results in serious waste of resources.

Method used

The server device detects the application status and pushes real-time status data to the application or operating system through different paths based on the detection results, ensuring that the data is continuously displayed on the terminal device.

Benefits of technology

It enables stable and continuous display of real-time status data of charging devices, improves user interaction efficiency, reduces power consumption of terminal devices, and avoids resource waste.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123114232A_ABST
    Figure CN123114232A_ABST
Patent Text Reader

Abstract

This application provides a data processing method, apparatus, server equipment, terminal equipment, charging equipment, computer-readable storage medium, and computer program product. The method is applied to a server equipment and includes: receiving first real-time status data sent by a first charging device; performing status detection on a first application of a first terminal device to obtain a detection result, wherein the first application is an application used to manage the first charging device; when the detection result indicates that the first application is online, pushing the first real-time status data to the first application for display on the first terminal device; when the detection result indicates that the first application is offline, pushing the first real-time status data to the operating system of the first terminal device for display on the first terminal device. This application improves the continuity of the display of real-time status data of the first charging device on the first terminal device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of charging technology, and in particular to a data processing method, apparatus, server equipment, terminal equipment, charging equipment, computer-readable storage medium, and computer program product. Background Technology

[0002] With the widespread adoption of fast charging technology and smart charging devices, users' demand for real-time monitoring of charging status is increasing. Existing charging device information display solutions typically rely on applications on terminal devices used to manage and display the real-time status data of the charging devices.

[0003] The main problems with this solution are as follows: The existing solution uses a single path to send real-time status data, failing to differentiate between application running states. When an application is offline due to being switched to the background, suspended by the operating system, or closed, it cannot continue receiving real-time status data; users must actively reopen the application to check the charging status. Furthermore, when a user uses the terminal device while the application is offline, the charging device's real-time status data is completely invisible, preventing the user from understanding the latest status of the charging device outside of the application. Summary of the Invention

[0004] This application provides a data processing method, apparatus, server equipment, terminal equipment, charging equipment, computer-readable storage medium, and computer program product, which can improve the continuity of real-time status data of the first charging equipment displayed on the first terminal equipment.

[0005] The technical solution of this application embodiment is implemented as follows: This application provides a data processing method, the method comprising: Receive the first real-time status data sent by the first charging device; A status detection is performed on the first application of the first terminal device to obtain a detection result, wherein the first application is an application used to manage the first charging device; When the detection result indicates that the first application is online, the first real-time status data is pushed to the first application so that the first real-time status data can be displayed on the first terminal device. When the detection result indicates that the first application is offline, the first real-time status data is pushed to the operating system of the first terminal device to display the first real-time status data on the first terminal device.

[0006] This application provides a data processing method applied to a first terminal device, the method comprising: When the first application on the first terminal device is online, the first real-time status data of the charging device sent by the server device is received through the first application and displayed on the first terminal device. The first application is an application used to manage the charging device, and the first real-time status data is uploaded by the first charging device to the server device. When the first application is offline, the first real-time status data sent by the server device is received through the operating system of the first terminal device, and the first real-time status data is displayed on the first terminal device.

[0007] This application provides a data processing method applied to a first charging device, the method comprising: Upload the first real-time status data of the first charging device to the server device; The server device performs status detection on the first application of the first terminal device and obtains the detection result, wherein the first application is an application used to manage the first charging device. Specifically, when the detection result indicates that the first application is online, the first real-time status data is pushed to the first application by the server device to be displayed on the first terminal device; when the detection result indicates that the first application is offline, the first real-time status data is pushed to the operating system of the first terminal device by the server device to be displayed on the first terminal device.

[0008] This application provides a data processing apparatus, the apparatus comprising: The data receiving module is used to receive the first real-time status data sent by the first charging device; The status detection module is used to perform status detection on the first application of the first terminal device and obtain the detection result, wherein the first application is an application used to manage the first charging device. The first push module is used to push the first real-time status data to the first application when the detection result indicates that the first application is online, so as to display the first real-time status data on the first terminal device. The second push module is used to push the first real-time status data to the operating system of the first terminal device when the detection result indicates that the first application is offline, so as to display the first real-time status data on the first terminal device.

[0009] This application provides a data processing apparatus applied to a first terminal device, the apparatus comprising: The first display module is configured to receive first real-time status data of the first charging device sent by the server device through the first application of the first terminal device when the first application of the first terminal device is online, and display the first real-time status data on the first terminal device. The first application is an application for managing the first charging device, and the first real-time status data is uploaded by the first charging device to the server device. The second display module is used to receive the first real-time status data sent by the server device through the operating system of the first terminal device when the first application is offline, and to display the first real-time status data on the first terminal device.

[0010] This application provides a data processing device applied to a first charging device, the device comprising: The data upload module is used to upload the first real-time status data of the first charging device itself to the server device; The server device performs status detection on the first application of the first terminal device and obtains the detection result, wherein the first application is an application used to manage the first charging device. Specifically, when the detection result indicates that the first application is online, the first real-time status data is pushed to the first application by the server device to be displayed on the first terminal device; when the detection result indicates that the first application is offline, the first real-time status data is pushed to the operating system of the first terminal device by the server device to be displayed on the first terminal device.

[0011] This application embodiment provides a server device, the server device comprising: Memory is used to store executable instructions or computer programs. The processor, when executing computer-executable instructions or computer programs stored in the memory, implements the data processing method provided in the embodiments of this application.

[0012] This application provides a terminal device, the terminal device comprising: Memory is used to store executable instructions or computer programs. The processor, when executing computer-executable instructions or computer programs stored in the memory, implements the data processing method provided in the embodiments of this application.

[0013] This application provides a charging device, the charging device comprising: Memory is used to store executable instructions or computer programs. The processor, when executing computer-executable instructions or computer programs stored in the memory, implements the data processing method provided in the embodiments of this application.

[0014] This application provides a computer-readable storage medium storing a computer program or computer-executable instructions for implementing the data processing method provided in this application when executed by a processor.

[0015] This application provides a computer program product, including a computer program or computer executable instructions. When the computer program or computer executable instructions are executed by a processor, they implement the data processing method provided in this application.

[0016] The embodiments of this application have the following beneficial effects: After receiving the first real-time status data sent by the first charging device, the server device first performs a status check on the first application of the first terminal device. Based on the check result, it selects between two paths: pushing the data to the first application or pushing it to the operating system of the first terminal device. This allows the first real-time status data to be displayed on the first terminal device. From the perspective of the data delivery chain, the server device no longer relies solely on the first application as a single receiver for delivering the first real-time status data. Instead, it uses the running status of the first application as the basis for path selection. Regardless of whether the first application is online or offline, the server device can find a path that matches the current running status to deliver the first real-time status data to the first terminal device. This avoids the problem of the first real-time status data not being delivered when the first application is offline, ensuring that the first real-time status data generated by the first charging device can be stably and continuously displayed on the first terminal device. From the perspective of the user interaction flow, since the server device changes the first real-time status data to be pushed to the operating system of the first terminal device when the first application is offline, the first real-time status data can be directly displayed on the first terminal device through the operating system, a layer that is not constrained by the running status of the first application itself. The user does not need to go through the process of re-opening the application. The operational chain of opening the first application, waiting for the first application to re-establish the connection with the server device, and checking the real-time status data in the first application ensures that the first real-time status data of the first charging device can be presented to the user in a timely manner, regardless of whether the first terminal device is locked, the user is using other applications, or the first application has been switched to the background, suspended by the operating system, or closed (i.e., offline). This improves data viewing efficiency and human-computer interaction efficiency. From the perspective of the server device's distribution behavior, since the server device has already determined the actual running status of the first application through status detection before distributing the first real-time status data, the server device will not send invalid data to the first application when it is offline, nor will it bypass the first application and distribute data through the operating system when the first application is online. The distribution behavior is more targeted and effectively avoids the waste of server device resources caused by invalid distribution. From the perspective of the first terminal device's receiving behavior, since the first real-time status data is received and triggered for display by the operating system when the first application is offline, the first terminal device does not need to keep the first application running in the background for a long time in order to receive the first real-time status data, which can effectively reduce the power consumption of the first terminal device. Attached Figure Description

[0017] Figure 1 This is a schematic diagram of the architecture of the data processing system 100 provided in an embodiment of this application; Figure 2AThis is a schematic diagram of the structure of the server device 200 provided in the embodiments of this application; Figure 2B This is a schematic diagram of the structure of the terminal device 400 provided in the embodiments of this application; Figure 2C This is a schematic diagram of the structure of the charging device 500 provided in the embodiments of this application; Figure 3A This is a first flowchart illustrating the data processing method provided in an embodiment of this application; Figure 3B This is a second flowchart illustrating the data processing method provided in the embodiments of this application; Figure 4 This is a schematic diagram of the execution logic for displaying real-time status data of a charging device provided in an embodiment of this application; Figure 5 This is a timing logic diagram of the display of real-time status data of the charging device provided in the embodiments of this application; Figure 6A This is a schematic diagram of the first interface for displaying real-time status data of a charging device provided in an embodiment of this application; Figure 6B This is a schematic diagram of the second interface for displaying real-time status data of a charging device provided in an embodiment of this application; Figure 6C This is a schematic diagram of a third interface for displaying real-time status data of a charging device, provided in an embodiment of this application. Figure 6D This is a schematic diagram of the fourth interface for displaying real-time status data of a charging device provided in an embodiment of this application; Figure 6E This is a schematic diagram of the fifth interface for displaying real-time status data of a charging device, provided in an embodiment of this application.

[0018] It should be noted that the terms "first" and "second" mentioned above are only used to distinguish between different options and do not represent the degree of superiority or inferiority of the options or their priority in the implementation process. Detailed Implementation

[0019] To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. The described embodiments should not be regarded as limitations on this application. All other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0020] In the following description, references are made to “some embodiments,” which describe a subset of all possible embodiments. However, it is understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0021] In the following description, the terms "first / second / third" are used merely to distinguish similar objects and do not represent a specific ordering of objects. It is understood that "first / second / third" may be interchanged in a specific order or sequence where permitted, so that the embodiments of this application described herein can be implemented in an order other than that illustrated or described herein.

[0022] In the embodiments of this application, the terms "module" or "unit" refer to a computer program or part of a computer program that has a predetermined function and works with other related parts to achieve a predetermined goal, and can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of an overall module or unit that includes the functionality of that module or unit.

[0023] Unless otherwise specified, "at least one" as used below refers to one or more cases, and "multiple" can refer to two or more cases.

[0024] Unless otherwise defined, all technical and scientific terms used in the embodiments of this application have the same meaning as commonly understood by one of ordinary skill in the art. The terminology used in the embodiments of this application is for the purpose of describing the embodiments of this application only and is not intended to limit this application.

[0025] In the implementation of this application, the collection and processing of relevant data should strictly comply with the requirements of relevant laws and regulations, obtain the informed consent or separate consent of the personal information subject, and carry out subsequent data use and processing within the scope of laws and regulations and the authorization of the personal information subject.

[0026] Before providing a further detailed description of the embodiments of this application, the nouns and terms involved in the embodiments of this application will be explained, and the nouns and terms involved in the embodiments of this application shall be interpreted as follows.

[0027] 1) Responding to: used to indicate the conditions or states on which the operation is performed depends. When the conditions or states on which it depends are met, one or more operations can be performed in real time or with a set delay. Unless otherwise specified, there is no restriction on the order in which the multiple operations are performed.

[0028] 2) WiFi (Wireless Fidelity): Wireless Fidelity is a wireless local area network communication technology.

[0029] 3) MQTT (Message Queuing Telemetry Transport): A lightweight publish / subscribe message transport protocol.

[0030] 4) APNS (Apple Push Notification Service): Remote push notification service.

[0031] 5) Live Activity: A dynamic display feature introduced by Apple's operating system that allows applications to update content in real time within the Live Activity area.

[0032] 6) Dynamic Island: The dynamic display area of ​​the terminal device, located at the top of the screen.

[0033] 7) Broker: The message broker in the MQTT protocol, responsible for receiving, filtering, and distributing messages.

[0034] 8) Publish / Subscribe: MQTT messaging pattern where publishers send messages to specific topics, and subscribers receive messages from the topics they subscribe to.

[0035] 9) APP (Application): Mobile application, software installed on mobile terminals (phones / tablets) for managing and monitoring smart charging devices.

[0036] 10) Foreground: The state in which the user is currently interacting with the app. The app is in an active display state where the user is currently interacting with the app.

[0037] 11) Background: The state in which the APP is not displayed in the foreground but is still running. This includes scenarios such as when the device is locked, when switching to other APPs, and when returning to the system desktop.

[0038] With the widespread adoption of fast charging technology and smart charging devices, users' demand for real-time charging status monitoring is increasing. Existing charging device information display solutions mainly suffer from the following problems: 1. Limited application runtime: The terminal device's operating system manages the runtime status of applications for resource scheduling and power consumption control. When the application used to manage the charging device is switched to the background, suspended by the operating system, or closed, the application cannot continue to receive real-time status data from the charging device, leading to delays or even interruptions in status data updates; 2. Single data delivery path: In existing solutions, the server only delivers real-time status data to the application used to manage the charging device, without distinguishing between different application runtime states. Once the application is offline, the real-time status data of the charging device is lost. 1. Information cannot be displayed on the terminal device in a timely manner, causing information display interruption; 2. Lack of awareness of the application's running status: The server device cannot perceive in real time whether the application is in a state where it can receive data normally, and therefore cannot take corresponding data delivery strategies for different running states of the application; 3. Cumbersome user operation: The existing solution requires users to actively open the application to view the charging status. When the application is in the background, suspended, or closed, the user must reopen the application and wait for the application to re-establish a connection with the server device before they can view the latest status of the charging device. The operation chain is lengthy, and users cannot understand the latest status of the charging device without interrupting the current operation.

[0039] The "real-time" mentioned in this application embodiment does not refer to absolute zero-delay synchronization, but rather to dynamic updates within a reasonable time error range allowed by the technical scenario. The acquisition and display of the first real-time status data may include at least one of the following mechanisms: (1) High-frequency synchronization: Data transmission is performed according to a preset high-frequency cycle (e.g., 1-10 times per second); (2) Event triggering: Data transmission is triggered immediately when the charging parameters (such as power and current) change by a set magnitude; (3) Periodic polling: Data that is periodically pulled by the terminal device in a low-power, background or offline sleep state based on the wake-up period allowed by the system (such as every 1 minute or every 5 minutes) is also regarded as the real-time status data described in this application.

[0040] When implementing the embodiments of this application, the applicant found that the reasons for the above problems are: the lack of a detection mechanism in which the server device actively senses the running status of the application; the failure to design differentiated data delivery paths for different scenarios where the application is online or offline; the failure to fully utilize the operating system of the terminal device, which is not constrained by the running status of the application itself, to receive real-time status data; and the lack of a delivery strategy that intelligently switches between the two receivers, the application and the operating system.

[0041] The underlying logic for addressing the aforementioned technical issues of limited application runtime and a single data delivery path is a significant deficiency in the continuity of real-time status data display on the terminal device. Specifically: 1. When the application is offline, the server device still sends real-time status data to the application via the original path. Since the application cannot receive data at this time, the real-time status data delivery fails, interrupting the display of the charging device's real-time status data on the terminal device; 2. The application's runtime state is managed by the terminal device's operating system. When the application is switched to the background, suspended, or closed is unpredictable for the server device. Without a status detection mechanism, the server device cannot function effectively. 1. Accurately determine which recipient should receive the real-time status data; 2. The terminal device's operating system has the ability to receive and display data even when the application is offline, but the existing solution does not include the operating system in the real-time status data delivery path, so this capability of the operating system is not utilized when the application is offline, and the real-time status data of the charging device cannot continue to be presented to the user with the help of the operating system; 3. The user's ability to view the real-time status data of the charging device is highly dependent on the running status of the application itself. The running status of the application actually constitutes a prerequisite for the user to view the real-time status data. Once the application is offline, the user needs to reopen the application to resume viewing the real-time status data.

[0042] When implementing the embodiments of this application, the applicant discovered that the cause of the above problems is that: there is a lack of a mechanism for the server device to intelligently select the data delivery path between the application and the terminal device's operating system based on the application's running status; and there is a lack of a connection scheme to continue to receive real-time status data delivery by means of the operating system when the application is offline.

[0043] To address the aforementioned problems, this application provides a data processing method that improves the efficiency of viewing real-time status data of charging devices. The following describes exemplary applications of the electronic devices provided in this application. These electronic devices can be implemented as various types of terminal devices such as laptops, tablets, desktop computers, smartwatches, smart TVs, in-vehicle terminals, and smartphones, as well as charging devices. Exemplary applications when the electronic devices are implemented as server devices, terminal devices, and charging devices will be described below.

[0044] See Figure 1 , Figure 1 This is a schematic diagram of the architecture of the data processing system 100 provided in the embodiments of this application. The server device 200 establishes communication connections with the first terminal device 400 and the first charging device 500 respectively. The server device 200 is used to receive the first real-time status data sent by the first charging device 500 and send the first real-time status data to the first terminal device 400 so that the first terminal device 400 displays the first real-time status data of the first charging device 500 on the human-computer interaction interface. The first terminal device 400 has a first application 410 installed. The first application 410 is used to manage the first charging device 500. The server device 200 performs status detection on the first application 410 and obtains the detection result. When the detection result indicates that the first application 410 is online, the server device 200 pushes the first real-time status data to the first application 410 so that the first real-time status data of the first charging device 500 can be displayed in the first application 410. When the detection result indicates that the first application 410 is offline, the server device 200 pushes the first real-time status data to the operating system of the first terminal device 400 so that the first real-time status data of the first charging device 500 can be displayed on the external display interface of the first terminal device 400. The first real-time status data is transmitted from the first charging device 500 to the server device 200 through the communication connection between the first charging device 500 and the server device 200.

[0045] In some embodiments, the server device 200 may be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms. Terminal devices and server devices, as well as charging devices and server devices, can be directly or indirectly connected via wired or wireless communication; this embodiment does not impose any limitations.

[0046] See Figure 2A , Figure 2A This is a schematic diagram of the structure of the server device 200 provided in the embodiments of this application. Figure 2A The server device 200 shown includes at least one processor 210, memory 230, and at least one network interface 220. The various components in the server device 200 are coupled together via a bus system 240. It is understood that the bus system 240 is used to implement communication between these components. In addition to a data bus, the bus system 240 also includes a power bus, a control bus, and a status signal bus. However, for clarity, ... Figure 2A The general labeled all buses as Bus System 240.

[0047] Processor 210 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor can be a microprocessor or any conventional processor, etc.

[0048] The memory 230 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state storage, hard disk drives, optical disk drives, etc. The memory 230 may optionally include one or more storage devices physically located away from the processor 210.

[0049] The memory 230 may include volatile memory or non-volatile memory, or both. The non-volatile memory may be read-only memory (ROM), and the volatile memory may be random access memory (RAM). The memory 230 described in this application embodiment is intended to include any suitable type of memory.

[0050] In some embodiments, memory 230 is capable of storing data to support various operations, examples of which include programs, modules, and data structures or subsets or supersets thereof, as illustrated below.

[0051] Operating system 231 includes system programs for handling various basic system services and performing hardware-related tasks, such as the framework layer, core library layer, driver layer, etc., for implementing various basic business functions and handling hardware-based tasks; The network communication module 232 is used to reach other electronic devices via one or more (wired or wireless) network interfaces 220, exemplary network interfaces 220 including: Bluetooth, WiFi, and Universal Serial Bus (USB), etc. In some embodiments, the apparatus provided in this application can be implemented in software. Figure 2A A data processing device 233 stored in memory 230 is shown. This device can be software in the form of programs and plug-ins, and includes the following software modules: a data receiving module 2331, a status detection module 2332, a first push module 2333, and a second push module 2334. These modules are logically connected and can therefore be arbitrarily combined or further separated according to their implemented functions. The functions of each module will be described below.

[0052] See Figure 2B , Figure 2B This is a schematic diagram of the structure of the terminal device 400 provided in the embodiments of this application. Figure 2B The terminal device 400 shown includes at least one processor 410, a memory 450, at least one network interface 420, and a user interface 430. The various components in the terminal device 400 are coupled together via a bus system 440. It is understood that the bus system 440 is used to implement communication between these components. In addition to a data bus, the bus system 440 also includes a power bus, a control bus, and a status signal bus. However, for clarity, ... Figure 2B The general labeled all buses as Bus System 440.

[0053] Processor 410 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor can be a microprocessor or any conventional processor, etc.

[0054] User interface 430 includes one or more output devices 431 that enable the presentation of media content, including one or more speakers and / or one or more visual displays. User interface 430 also includes one or more input devices 432, including user interface components that facilitate user input, such as a keyboard, mouse, microphone, touch screen display, camera, other input buttons and controls.

[0055] The memory 450 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state storage, hard disk drives, optical disk drives, etc. The memory 450 may optionally include one or more storage devices physically located away from the processor 410.

[0056] The memory 450 may include volatile memory or non-volatile memory, or both. The non-volatile memory may be read-only memory (ROM), and the volatile memory may be random access memory (RAM). The memory 450 described in this application embodiment is intended to include any suitable type of memory.

[0057] In some embodiments, memory 450 is capable of storing data to support various operations, examples of which include programs, modules, and data structures or subsets or supersets thereof, as illustrated below.

[0058] Operating system 451 includes system programs for handling various basic system services and performing hardware-related tasks, such as the framework layer, core library layer, driver layer, etc., for implementing various basic business functions and handling hardware-based tasks; The network communication module 452 is used to reach other electronic devices via one or more (wired or wireless) network interfaces 420, exemplary network interfaces 420 including: Bluetooth, WiFi, and Universal Serial Bus (USB), etc. Presentation module 453 is configured to enable the presentation of information (e.g., a user interface for operating peripheral devices and displaying content and information) via one or more output devices 431 associated with user interface 430 (e.g., a display screen, a speaker, etc.). The input processing module 454 is used to detect and translate one or more user inputs or interactions from one or more input devices 432.

[0059] In some embodiments, the apparatus provided in this application can be implemented in software. Figure 2B A data processing device 455 stored in memory 450 is shown. This device can be software in the form of programs and plug-ins, and includes the following software modules: a first display module 4551 and a second display module 4552. These modules are logically linked and can therefore be arbitrarily combined or further separated according to the functions they implement. The functions of each module will be described below.

[0060] See Figure 2C , Figure 2CThis is a schematic diagram of the structure of a charging device 500 provided in an embodiment of this application. The charging device 500 (e.g., an embedded IoT device such as a smart charging pile or smart adapter) includes: at least one processor 510, a memory 530, and at least one network interface 520. The components are coupled together and communicate through a bus system 540.

[0061] The processor 510 may be a microcontroller (MCU), a general-purpose processor, a digital signal processor (DSP), or an application-specific integrated circuit (ASIC), etc., used to perform charging logic control and communication processing.

[0062] The memory 530 is typically a non-volatile flash memory (such as Flash or EEPROM) or a volatile memory (such as RAM). The memory 530 stores instructions or code to support the operation of the charging device. Specifically, it includes: a real-time operating system (RTOS) or low-level driver 531 for handling basic hardware tasks and charging timing control; and a network communication module 532 for establishing a communication connection with a first terminal device (such as a smartphone) or a cloud server via a network interface 520 (such as Bluetooth, WiFi, a cellular network module, or a bus interface) and transmitting real-time status data.

[0063] In some embodiments, the data processing apparatus provided in this application can be implemented in software. Figure 2C A data processing device 533 stored in memory 530 is shown. It may be software in the form of programs and plug-ins, including the following software modules: a data upload module 5331, which is logical, and the functions of each module will be described below.

[0064] In some embodiments, the terminal device or server device can implement the data processing method provided in this application by running various computer-executable instructions or computer programs. For example, computer-executable instructions can be microprogram-level commands, machine instructions, or software instructions. Computer programs can be native programs or software modules in an operating system; they can be native applications (APPs), i.e., programs that need to be installed in the operating system to run, such as applications for managing charging devices; or they can be applets that can be embedded in any APP, i.e., programs that only need to be downloaded to a browser environment to run. In summary, the aforementioned computer-executable instructions can be any form of instruction, and the aforementioned computer programs can be any form of application, module, or plugin.

[0065] The data processing method provided in this application will be described in conjunction with exemplary applications and implementations of the server devices provided in the embodiments of this application.

[0066] The data processing method provided in the embodiments of this application will be described below. As mentioned above, the electronic device implementing the data processing method of the embodiments of this application can be a server device, a terminal device, or a combination of both. Therefore, the executing entity of each step will not be described again below.

[0067] See Figure 3A , Figure 3A This is a first flowchart illustrating the data processing method provided in this application embodiment, with a server device as the main component, and combining... Figure 3A The steps shown are explained.

[0068] In step 101, the first real-time status data sent by the first charging device is received.

[0069] In step 102, the status of the first application of the first terminal device is detected to obtain the detection result. The first application is an application used to manage the first charging device.

[0070] In step 103, when the detection result indicates that the first application is online, the first real-time status data is pushed to the first application to display the first real-time status data on the first terminal device.

[0071] In step 104, when the detection result indicates that the first application is offline, the first real-time status data is pushed to the operating system of the first terminal device so as to display the first real-time status data on the first terminal device.

[0072] As an example, online and offline states are two operating states represented by the detection results obtained by the server device after performing state detection on the first application. The determination criterion can be whether the first application can still maintain normal data interaction capabilities with the server device. The first application being in an online state can include, but is not limited to, the following situations: the first application is displayed in the foreground and the network communication between the first application and the server device is normal; or, some types of the first application are in the background but are still running, and the network communication between the first application and the server device is normal, in which case the first application is also considered to be in an online state; the first terminal device is in a locked state, but some types of the first application can still maintain a communication link with the server device by means of the background running capabilities allowed by the operating system; the network between the first application and the server device experiences a brief jitter, but the duration of the jitter has not reached the preset offline duration threshold, and the first application still sends heartbeat messages to the server device at preset time intervals, in which case the first application is also considered to be in an online state. The first application being offline may include, but is not limited to, the following situations: the first application is not opened; the first application is closed or terminated by the user clearing it from the multitasking list; although the first application is displayed in the foreground, the network communication between the first application and the server device is abnormal (e.g., the first terminal device is in airplane mode, both WiFi and cellular networks are disconnected, or the network packet loss rate continuously exceeds a preset threshold); or, some types of the first application are in the background and their operation is suspended or halted by the operating system, unable to continue sending heartbeat messages to the server device; the first application crashes abnormally during operation; the first terminal device enters a deep sleep state or is shut down, causing the first application to be unable to maintain the communication link with the server device. It is understood that the above situations are merely illustrative, and the embodiments of this application do not limit the specific circumstances for determining online and offline states.

[0073] It should be noted that the "certain types of first applications" mentioned above refer to applications whose background operation is restricted to varying degrees by the operating system of the first terminal device, resulting in differences in their performance after being switched to the background. Specifically, first applications that can continue to run in the background are usually those that have obtained the corresponding background running permissions from the operating system or have specific background running capabilities. For example, applications that declare background modes in their configuration manifest, applications that have requested background fetch permissions, applications that have requested background network access permissions, applications that rely on system-level long-connection services (such as VoIP, background audio playback, location services, etc.) to maintain their operation, and applications that maintain their process from being reclaimed through keep-alive threads or foreground services. On the other hand, first applications whose background operation is suspended or halted by the operating system usually refer to ordinary applications that have not declared the aforementioned background modes or requested the relevant permissions. After such applications are switched to the background for a period of time, the network activity and CPU usage of their main process will be frozen by the operating system, and they will be unable to continue sending heartbeat messages to the server device, thus being judged as offline by the server device. This application does not limit the specific type of the first application. Any first application that can be clearly classified as online or offline through status detection is applicable to the data processing method provided in this application.

[0074] It should be noted that in this embodiment, the first application is divided into two running states: online and offline. This division, used as the basis for selecting the delivery path, abstracts the crucial capability of "whether the first application can currently receive the first real-time status data sent by the server device" in a binary manner. This allows the server device to make a clear choice between the delivery path for the first application and the delivery path for the operating system through a single status check, avoiding overly complex delivery logic. It is understood that the above is merely illustrative, and this embodiment does not limit the specific determination of online and offline states.

[0075] As an example, receiving the first real-time status data sent by the first charging device can be understood as the server device receiving the first real-time status data actively reported by the first charging device through the first communication connection with the first charging device. In terms of data transmission path, the first charging device may first upload the first real-time status data to the server device, and then the server device may distribute the first real-time status data to the first terminal device based on the detection results. In this case, the server device acts as a data relay node to complete the forwarding of the first real-time status data from the first charging device to the first terminal device. Alternatively, the first charging device may directly send the first real-time status data to the first terminal device through a local communication link (such as Bluetooth, USB, or WiFi point-to-point connection), and simultaneously upload the first real-time status data to the server device. This allows the server device to trigger the distribution process to the operating system based on the reported data even when the first application is offline.

[0076] As an example, pushing the first real-time status data to the operating system of the first terminal device to display the first real-time status data on the first terminal device can be achieved through any of the following processes: the server device pushes the first real-time status data to the operating system of the first terminal device, and the operating system takes over the rendering and display task of the first real-time status data, displaying the first real-time status data only on the external display interface of the first terminal device (such as the lock screen interface, the dynamic island area, status bar notifications, or desktop widgets); or, the server device pushes the first real-time status data to the operating system of the first terminal device, and the operating system further forwards the first real-time status data to the background process of the first application, so that the first terminal device displays the first real-time status data both on the external display interface and within the first application, so that when the user switches from viewing outside the application to opening the first application, the latest first real-time status data can continue to be viewed within the first application without having to fetch the data again.

[0077] Here, from the perspective of the data delivery chain, the server device no longer relies solely on the first application as a single receiver for delivering the first real-time status data. Instead, it uses the running status of the first application as the basis for path selection. Regardless of whether the first application is online or offline, the server device can find a path that matches the current running status to deliver the first real-time status data to the first terminal device. This avoids the problem that the first real-time status data cannot be delivered when the first application is offline, and ensures that the first real-time status data generated by the first charging device can be stably and continuously presented on the first terminal device.

[0078] In some embodiments, before step 101 "receiving the first real-time status data sent by the first charging device", the following process may be performed: establishing a second communication connection with the first charging device. At this time, "receiving the first real-time status data sent by the first charging device" can be achieved by performing the following process: when the first charging device detects a change in the first real-time status data in real time, it receives the first real-time status data sent by the first charging device through the second communication connection.

[0079] As an example, the second communication connection is a communication link between the server device and the first charging device used to transmit the first real-time status data. The establishment of the second communication connection can be based on various network protocols, including, for example, a long connection based on Message Queuing Telemetry Transport Protocol (MQTT), a long polling connection based on Hypertext Transfer Protocol (HTTP / HTTPS), and a bidirectional communication connection based on WebSocket. After the first charging device connects to the Internet through its built-in WiFi module, cellular module, or other network access module, it initiates a registration request to the server device and completes identity authentication with the server device (such as authentication based on device certificate, token, or username and password). After successful authentication, the second communication connection is established. The second communication connection is usually maintained in the form of a long connection to carry the subsequent real-time reporting of the first real-time status data.

[0080] As an example, this application embodiment further provides a mechanism for generating and triggering the reporting of first real-time status data on the first charging device side: the server device receives the first real-time status data sent by the first charging device through a second communication connection pre-established with the first charging device. The first real-time status data is generated by the first charging device based on a status comparison result. The status comparison result is obtained by comparing the current status record of the first charging device with historical status records. The current status record includes the charging power, voltage value, and current value of the first charging device at the current moment. Specifically, the first charging device internally operates a status acquisition unit. The status acquisition unit periodically collects the current status record during the operation of the first charging device and compares the current status record with the historical status record corresponding to the last report. When the comparison result indicates that at least one of the charging power, voltage value, or current value has changed (e.g., the change magnitude exceeds a preset absolute threshold, the relative change rate exceeds a preset proportional threshold, etc.), it is determined that the first real-time status data has changed, thereby triggering the first charging device to encapsulate the changed first real-time status data into a message of the corresponding communication protocol (such as a PUBLISH message for MQTT) and send it to the server device via the second communication connection.

[0081] The present application adopts an event-driven reporting mechanism instead of the traditional polling and retrieval mechanism. The first charging device only reports through the second communication connection when the first real-time status data changes, avoiding the waste of network bandwidth and server processing resources caused by continuously transmitting redundant data when the status has not changed. At the same time, since the reporting timing closely follows the status change event itself, it can ensure that the first real-time status data received by the server device is highly synchronized with the actual working status of the first charging device, thereby providing a real-time guarantee for the subsequent distribution and display of the first real-time status data on the first terminal device.

[0082] In some embodiments, a binding association is established between the first login account of the first application and multiple first charging devices. In this case, step 101, "receiving the first real-time status data sent by the first charging devices", can be achieved by performing the following process: receiving the first real-time status data reported by each of the first charging devices that have a binding association with the first login account.

[0083] As an example, the server maintains a user account database and a device database. The user account database stores login account information for each first application, while the device database stores device identifiers (such as device serial numbers, MAC addresses, or unique device IDs) for each first charging device. When a user performs a device binding operation through their first application login account (e.g., via QR code scanning, near-field network configuration, or manual input of the device identifier), the server receives the binding request corresponding to the device binding operation, associates the corresponding device identifier with the login account, and writes this association into the server's binding relationship table, thereby establishing a binding association between the first application login account and multiple first charging devices. Multiple first charging devices can be bound to the same login account; for example, a desktop fast charger at home, a multi-port charger at the office, and a portable power bank can all be bound to the same login account.

[0084] As an example, when the server device receives the first real-time status data reported by the first charging device, the message of the first real-time status data carries the device identifier of the reporting party. After parsing the message to obtain the device identifier, the server device queries the binding relationship table to determine the login account corresponding to the device identifier, and then includes the first real-time status data in the data set under the login account name. When the server device needs to send the first real-time status data of any first charging device under the login account, it can determine the target first terminal device (i.e., the terminal device where the first application logged in by the login account is located) based on the binding relationship.

[0085] This application's embodiments establish a binding relationship between a login account and multiple first charging devices, enabling a single login account to simultaneously carry out the reporting and distribution of status data from multiple first charging devices. The server device can uniformly collect and route first real-time status data from different first charging devices based on the binding relationship, thereby supporting application scenarios of concurrent detection of multiple devices and improving the adaptability of the solution to actual usage scenarios.

[0086] In some embodiments, since multiple first charging devices can be bound under the same login account, multiple first charging devices may concurrently report status data within the same time window. To avoid contention for display resources caused by multiple status data being concurrently sent to the same first terminal device, the following processing may be performed before pushing the first real-time status data to the first application or before pushing the first real-time status data to the operating system of the first terminal device: obtaining second real-time status data sent by at least one second charging device bound to the first application within the target time window; determining the first priority corresponding to the first real-time status data and the second priority corresponding to the second real-time status data; if the first priority is higher than the second priority, then the first real-time status data is determined as the target status data to be pushed, and the push of the second real-time status data is paused; if the first priority is lower than the second priority, then the second real-time status data with the highest priority is determined as the target status data, and the push of the first real-time status data is paused.

[0087] As an example, the target time window is a time interval set by the server device for the concurrent data aggregation of multiple devices (e.g., set to 100 milliseconds to 500 milliseconds). Within this time window, the server device uniformly aggregates the status data from different charging devices under the same login account, avoiding the problem of excessively high transmission frequency caused by transmitting data one by one as it arrives. The second real-time status data that is paused from being pushed can be cached in the server device's pending queue. After the target status data with higher priority is transmitted, the server device will then transmit the data one by one according to the priority order of each status data in the queue, or re-participate in the priority comparison within a new target time window.

[0088] As an example, determining the first priority corresponding to the first real-time state data and the second priority corresponding to the second real-time state data can be achieved through the following technical solution: parsing the first charging event type carried in the first real-time state data and the second charging event type carried in the second real-time state data; determining the first weight corresponding to the first charging event type and the second weight corresponding to the second charging event type based on a preset mapping strategy; if the first weight and the second weight are not equal, taking the first weight as the first priority and the second weight as the second priority; if the first weight and the second weight are equal, extracting the first charging power in the first real-time state data and the second charging power in the second real-time state data; determining the sum of the first charging power and the first weight as the first priority, and determining the sum of the second charging power and the second weight as the second priority, wherein if the first charging power is greater than the second charging power, the first priority is higher than the second priority; if the first charging power is less than or equal to the second charging power, the second priority is higher than the first priority.

[0089] As an example, charging event types can include abnormal alarm events (such as overheating, overcurrent, overvoltage, etc.), charging completion events, charging start events, and regular fluctuation events. The preset mapping strategy maps different charging event types to different weight values. The higher the urgency of the charging event type, the greater its weight value. For example, the weight value of an abnormal alarm event is higher than that of a charging completion event, and the weight value of a charging completion event is higher than that of a regular fluctuation event. When two status data points belong to different charging event types, the weight value is directly used as the priority determination criterion. When two status data points belong to the same charging event type (i.e., equal weight values), charging power is further introduced as a secondary criterion to break the tie. The resulting priority, in the case of equal weights, can distinguish the more critical one in terms of the actual energy information carried by the two status data points.

[0090] This application's embodiments introduce a flow interception and scheduling mechanism for multi-device concurrent scenarios. Before sending data, the server device first evaluates the priority of the status data reported by each charging device bound to the same login account, and only allows the target status data with the highest priority to be sent. This avoids the problem of display resource contention and excessive rendering burden on the first terminal device caused by multiple status data flooding to the first terminal device at the same time. At the same time, through a two-level priority quantification strategy based on charging event type and charging power, key events such as abnormal alarms can be prioritized for sending and display in multi-device concurrent scenarios, improving the rationality of data sending in multi-device management scenarios.

[0091] In some embodiments, step 102, "performing state detection on the first application of the first terminal device and obtaining a detection result," can be implemented by performing the following processing: receiving heartbeat messages continuously sent by the first application according to a preset time period, and recording the receiving timestamp of each heartbeat message; determining the time difference between the current timestamp for detecting the first application and the most recent receiving timestamp; if the time difference is greater than or equal to a preset offline duration threshold, generating a detection result indicating that the first application is in an offline state; if the time difference is less than the offline duration threshold, generating a detection result indicating that the first application is in an online state.

[0092] As an example, during operation, the first application continuously sends heartbeat messages to the server device at preset time intervals (e.g., once every 30 seconds). These heartbeat messages inform the server device that the first application is still in a normally communicable operational state. The server device has a heartbeat detection service that receives heartbeat messages from the first application and records the system time of each heartbeat message arriving at the server device as a receiving timestamp in a heartbeat record table. The heartbeat record table is indexed by the first application's login account or session identifier, and each new heartbeat message received overwrites and updates the most recent receiving timestamp.

[0093] As an example, when the server device needs to perform status detection on the first application, such as after receiving the first real-time status data from the first charging device and before executing the sending action, it reads the most recent received timestamp of the corresponding first application from the heartbeat record table, obtains the current timestamp of the server device, and calculates the time difference between the current timestamp and the most recent received timestamp. The offline duration threshold is a judgment threshold pre-configured on the server device, for example, set to 60 seconds. This value is usually set to an integer multiple greater than the heartbeat period to tolerate a certain degree of network jitter. If the time difference is greater than or equal to the offline duration threshold, it indicates that the first application has not sent any heartbeat messages to the server device within the time window exceeding the offline duration threshold. It can be determined that the first application no longer maintains normal communication with the server device, and thus a detection result indicating that the first application is in an offline state is generated. Conversely, if the time difference is less than the offline duration threshold, it indicates that the first application is still continuously sending heartbeat messages in the recent period. It can be determined that the first application is currently in a normal communication running state, and thus a detection result indicating that the first application is in an online state is generated.

[0094] The embodiments of this application use a heartbeat message plus time difference comparison method to perform status detection on the first application. The server device does not need to actively initiate a probe request to the first application to passively perceive the running status of the first application, which reduces the detection overhead of the server device. At the same time, by setting an offline duration threshold greater than the heartbeat cycle, the system can effectively avoid misjudgment of status caused by the loss of a single heartbeat message or instantaneous network jitter, thus improving the accuracy of the status detection results.

[0095] In some embodiments, before step 103 "pushing the first real-time status data to the first application", the following process may be performed: establishing a first communication connection between the server device and the first application. Step 103 "pushing the first real-time status data to the first application" may be implemented by performing the following process: encapsulating the first real-time status data into a target push message and publishing the target push message to a preset message topic; obtaining a first application that has subscribed to the preset message topic; the server device sending the target push message to the first application through the first communication connection with the first application, so that the first application can parse the first real-time status data from the target push message.

[0096] As an example, the server device is deployed with a message broker service (such as MQTTBroker) that supports publish / subscribe mode. The preset message topic is a predefined logical channel for the server device to send the first real-time status data of the first charging device. The preset message topic can be named according to the device identifier of the first charging device, the login account of the first application, or a combination of both. For example, the topic path is " / account / {login account} / device / {device identifier} / status", thereby realizing the isolation of data transmission between different accounts and different devices.

[0097] As an example, after receiving the first real-time status data sent by the first charging device, the server device encapsulates the first real-time status data into a target push message according to a predetermined message format (such as JSON format, including timestamps, device identifiers, and various status fields), and publishes the target push message to the aforementioned preset message topic. Simultaneously, after the first application reaches an online state, it initiates a subscription request to the server device through the established first communication connection, requesting to subscribe to the preset message topic corresponding to its login account and bound device. Upon receiving the subscription request, the server device binds and registers the first communication connection with the preset message topic, thereby recording the first application that has subscribed to the topic in the subscriber list of the preset message topic.

[0098] As an example, when a target push message is published to a preset message topic, the message broker service of the server device traverses the subscriber list of that topic, obtains all first applications subscribed to the preset message topic, and pushes the target push message to the corresponding first application through the first communication connection for each first application. After receiving the target push message through the first communication connection, the first application unpacks and deserializes the target push message according to a predetermined message format, parses out the first real-time status data, and drives the parsed first real-time status data to the UI rendering layer within the first application for display.

[0099] The first real-time status data is distributed using a publish / subscribe mode based on a preset message topic in this embodiment. The server device does not need to pay attention to the specific identity of the recipient when distributing the data. It only needs to publish the target push message to the corresponding preset message topic, and the message broker service will automatically complete the routing and distribution. This makes the distribution link highly scalable and can easily support the addition of new subscribers (such as the scenario where the same login account logs in on multiple first terminal devices) and the scenario where multiple subscribers receive data concurrently.

[0100] In some embodiments, after the above-mentioned "server device sends a target push message to the first application through a first communication connection with the first application", the following process may be performed: if no delivery confirmation information for the target push message is received from the first application within a preset period, the first real-time status data is pushed to the operating system of the first terminal device so as to display the first real-time status data on the first terminal device.

[0101] As an example, the delivery confirmation message is a receipt message sent by the first application to the server device after successfully receiving the target push message, according to a predetermined application layer confirmation protocol. This could be a PUBACK message at QoS level 1 in the MQTT protocol, or an ACK message in a custom application layer protocol. The delivery confirmation message carries the message identifier of the target push message, used to confirm to the server device that the target push message with the corresponding message identifier has been successfully received by the first application. The preset period is a timeout window set by the server device for waiting for the delivery confirmation message (e.g., set to 3 seconds or 5 seconds). The specific value of this window can be adjusted according to the stability of the network environment.

[0102] As an example, after sending a target push message to a first application via a first communication connection, the server device starts a timeout timer for that target push message. If the server device receives a delivery confirmation message from the first application within a preset period, the timer is closed and the target push message is considered successfully delivered. If the server device does not receive the corresponding delivery confirmation message by the end of the preset period, the target push message is considered to have failed to be delivered to the first application. Reasons for this could include a momentary disconnection of the first communication connection, the first application suddenly changing from an online to an offline state after status detection, or network packet loss. In this case, the server device triggers a downgrade delivery process, changing the first real-time status data to be pushed to the operating system of the first terminal device. The first real-time status data is then delivered using the operating system, a receiver not constrained by the first application's own running state, so that the first real-time status data can continue to be displayed on the first terminal device.

[0103] This application's embodiments superimpose a reliability verification mechanism based on delivery confirmation information onto the delivery path for the first application, and automatically downgrade to the delivery path for the operating system when verification fails, thereby constructing a dual-path redundant delivery system for the application path and the operating system path. In cases where the status detection result may have a temporary deviation from the actual running state of the first application at the time of delivery execution, this mechanism can promptly compensate for message loss issues that may occur under a single delivery path, further improving the reliability of the first real-time status data delivery.

[0104] In some embodiments, step 104, "pushing the first real-time status data to the operating system of the first terminal device," can be implemented by performing the following processes: creating a push task for the first terminal device by calling the remote push notification service of the operating system; writing the first real-time status data into the push task; and sending the push task to the operating system through the remote push notification service so that the operating system can read the first real-time status data from the push task.

[0105] As an example, a system-level remote push notification service is an official service provided by the operating system vendor to send push notifications to terminal devices running that operating system. This service can bypass the first application when it is offline, allowing the operating system to directly receive and trigger the display of the push content. The specific form of the remote push notification service matches the operating system type of the first terminal device. For example, when the first terminal device's operating system is iOS, the remote push notification service is Apple Push Notification Service (APNS); when the first terminal device's operating system is Android, the remote push notification service can be a push service provided by the corresponding Android operating system vendor.

[0106] As an example, when the server device pushes the first real-time status data to the operating system of the first terminal device, it first identifies the operating system type of the first terminal device and, based on this, calls the service interface of the remote push notification service that matches the operating system (e.g., calling the HTTP / 2 service interface of APNS). The server device then sends a request to the remote push notification service to create a push task. This request carries a device token corresponding to the first terminal device. The device token is a unique identifier issued by the remote push notification service when the first terminal device first registers with the push service, used to enable the remote push notification service to locate the specific target first terminal device. Upon receiving the request, the remote push notification service creates a push task for the first terminal device.

[0107] As an example, the server device writes the first real-time status data into the payload field of the push task according to the payload format specified by the remote push notification service (such as the JSON payload format specified by APNS). (For example, it writes it into a custom field containing the timestamp, device identifier, and various status parameters). Subsequently, the server device sends the push task carrying the first real-time status data to the operating system through the remote push notification service. The operating system receives the push task through its built-in push notification daemon, reads the first real-time status data from the push task according to the payload format, and further drives the read first real-time status data to the UI rendering layer of the first terminal device for display.

[0108] This application embodiment utilizes a system-level remote push notification service that matches the operating system of the first terminal device as the carrier channel for the first real-time status data. This allows the receiver of the first real-time status data to be located at the operating system level of the first terminal device. Thus, even if the first application is offline, the operating system can still independently receive and display the first real-time status data, avoiding the problem of not being able to receive data because the first application is not running.

[0109] In some embodiments, before step 104 "sending the push task to the operating system via the remote push notification service", the following processing can be performed: setting the push type of the push task to background update type. At this time, displaying the first real-time status data on the first terminal device can be achieved by performing the following processing: displaying the first real-time status data on the application-outside display interface of the first terminal device.

[0110] As an example, remote push notification services typically allow specifying the push type of a push task through its meta fields (such as the `apns-push-type` field in APNS). Different push types correspond to different processing strategies employed by the operating system for that push task. Background update type refers to a push type that allows the operating system to silently receive push tasks in the background and trigger corresponding processing logic without displaying a visible banner notification or interrupting the user's current operation.

[0111] As an example, after the server device calls the remote push notification service to create a push task, it sets the push type field of the push task to background update type before sending the push task to the operating system. When the remote push notification service sends the push task with the background update type set to the operating system, the operating system recognizes the push type and will not pop up a regular notification banner in the notification center or at the top of the lock screen. Instead, it will directly deliver the first real-time status data to the rendering process corresponding to the application's external display interface (such as the dynamic island area, lock screen widget, desktop widget, or status bar capsule area of ​​the first terminal device), and the rendering process will then present the first real-time status data in real time.

[0112] By setting the push task type to background update type in this application embodiment, the operating system receives the first real-time status data in a silent and non-intrusive manner. The first real-time status data is continuously presented to the user through the external display interface of the application. This avoids the interruption of the user's current operation by the frequent pop-up notification banners under the traditional notification mechanism, and ensures that the first real-time status data can be viewed by the user in a more immersive form in real time, thereby improving the user experience.

[0113] In some embodiments, before step 104 "sending the push task to the operating system via the remote push notification service", the following processing can be performed: setting the priority of the push task to a first priority corresponding to a first preset duration. At this time, displaying the first real-time status data on the first terminal device can be achieved by performing the following processing: displaying the first real-time status data on the first terminal device within the first preset duration after the operating system receives the push task.

[0114] As an example, remote push notification services typically allow the priority of push tasks to be specified via a priority field (such as the `apns-priority` field in APNS). Different priorities correspond to different timeliness processing strategies of the operating system for that push task. A high priority means that the push task should be sent to the operating system as soon as possible, while a low priority allows the operating system to send push tasks in batches at appropriate times to save power consumption of the terminal device. The first priority corresponds to a first preset duration, which constrains the maximum processing time allowed by the operating system from receiving the push task to completing the first real-time status data display.

[0115] As an example, after the server device calls the remote push notification service to create a push task, it sets the priority field of the push task to the first priority corresponding to the first preset duration before sending the push task to the operating system. When the remote push notification service sends the push task to the operating system, it includes priority information. After receiving the push task, the operating system schedules the push task to a high-priority processing queue for processing according to the first priority represented by the priority field, thereby completing the parsing of the push task and the rendering and display of the first real-time status data within the first preset duration.

[0116] By setting the priority of the push task to the first priority corresponding to the first preset duration through the embodiments of this application, the processing time of the push task by the operating system is constrained. Compared with the situation where the operating system may delay processing to save power when using the default priority or low priority, it can ensure that the first real-time status data is presented in a timely manner within the first preset duration, shorten the time interval between the status change of the first charging device and the display update of the first terminal device, and improve the timeliness of the display of the first real-time status data.

[0117] In some embodiments, the target push message or push task may further include a mode control instruction, so that the server device can actively control the display mode adopted by the application-outside display interface of the first terminal device based on the event type. Specifically, the method may further include: parsing an event emergency identifier from the first real-time status data; if the event emergency identifier represents an abnormal alarm event or a charging completion event, generating a first mode control instruction corresponding to the details display mode, and sending the first mode control instruction to the first terminal device, so that after receiving the first mode control instruction, the first terminal device controls the application-outside display interface to be in the details display mode, and displays at least two of the following in the application-outside display interface: charging power, voltage value, and current information; if the event emergency identifier represents a normal fluctuation event, generating a second mode control instruction corresponding to the thumbnail display mode, and sending the second mode control instruction to the first terminal device, so that after receiving the second mode control instruction, the first terminal device controls the application-outside display interface to be in the thumbnail display mode, and displays the charging power in the application-outside display interface.

[0118] As an example, the event emergency identifier is a field written by the first charging device when generating the first real-time status data. It is used to identify whether the event type corresponding to this status data is an abnormal alarm event, a charging completion event, or a normal fluctuation event. Among them, an abnormal alarm event can refer to events that require the user's attention, such as the first charging device experiencing excessive temperature, overcurrent, overvoltage, or interface abnormalities; a charging completion event can refer to a node event such as the charged device reaching the charging threshold or the first charging device itself being fully charged; a normal fluctuation event can refer to the normal changes in the output power, voltage, or current value of the first charging device during operation. The mode control instruction can be encapsulated as an independent field in the target push message along with the first real-time status data, or it can be written as a control field in the push task payload. After receiving the target push message or push task, the first terminal device first parses out the mode control instruction, switches the display mode of the external display interface according to the detail display mode or thumbnail display mode indicated by the instruction, and then renders the first real-time status data according to the field range allowed by the corresponding display mode.

[0119] This application's embodiments shift control of the display mode to the server device, allowing the switching of display modes to be proactively scheduled by the server device based on the urgency of events generated by the first charging device, rather than solely relying on local user operations on the first terminal device. When events requiring user attention, such as abnormal alarms or charging completion events, occur, the server device proactively instructs the first terminal device to display detailed data including multi-dimensional parameters such as charging power, voltage, and current information in a detailed display mode, facilitating quick user perception of key information. Conversely, for routine fluctuation events, the server device instructs the first terminal device to display only the core charging power in a minimized display mode, avoiding excessive display space usage. This mechanism matches the display mode to the urgency of the event, further improving the information presentation efficiency of the external display interface.

[0120] In some embodiments, when the first application is offline, the first real-time status data is displayed in the application-outside display interface of the first terminal device; when the first application is online, the first real-time status data is displayed within the first application of the first terminal device.

[0121] As an example, the external display interface refers to a display interface that is independent of the UI context of the first application and is directly managed and rendered by the operating system, including but not limited to: the lock screen interface, desktop widgets, status bar notification area, dynamic island area, or similar capsule-shaped display area of ​​the first terminal device. The internal display interface of the first application refers to the display interface corresponding to the UI context of the first application itself, which can only be presented when the first application is running.

[0122] As an example, when the server device detects that the first application is online, the first real-time status data is delivered to the first application via a distribution path (such as through the aforementioned preset message topic and the first communication connection). The first application's own UI rendering layer then displays the first real-time status data on the corresponding interface within the first application (such as the device details page, homepage card, etc.). At this time, the user can view the first real-time status data within the first application. When the server device detects that the first application is offline, the first real-time status data is delivered to the operating system via a distribution path (such as through the aforementioned system-level remote push notification service). The operating system then delivers the first real-time status data to the rendering process corresponding to the application's external display interface, thus presenting the first real-time status data on the application's external display interface of the first terminal device. Even if the first application is not running, the user can still view the first real-time status data of the first charging device through the application's external display interface.

[0123] This application embodiment addresses two different operating states of the first application: online and offline. The first real-time status data is presented on both the in-application and external display interfaces, ensuring the display location matches the current availability of the first application. When the first application is available, its UI capabilities are fully utilized for a complete and rich display. When the first application is unavailable, the external display interface continues to fulfill its presentation function, thus guaranteeing the continuity of the display of the first charging device's real-time status data on the first terminal device and preventing interruptions in the user's perception of the charging device's status due to changes in the first application's operating state.

[0124] The data processing method provided in this application will be described in conjunction with exemplary applications and implementations of the terminal devices provided in the embodiments of this application.

[0125] The data processing method provided in the embodiments of this application will be described below. As mentioned above, the electronic device implementing the data processing method of the embodiments of this application is a terminal device. Therefore, the executing entity of each step will not be described again below.

[0126] See Figure 3B , Figure 3B This is a second flowchart illustrating the data processing method provided in this application embodiment, with a terminal device as the execution entity, combining... Figure 3B The steps shown are explained.

[0127] In step 201, when the first application of the first terminal device is online, the first real-time status data of the first charging device sent by the server device is received through the first application and displayed on the first terminal device. The first application is an application used to manage the first charging device, and the first real-time status data is uploaded by the first charging device to the server device.

[0128] In step 202, when the first application is offline, the first real-time status data sent by the server device is received through the operating system of the first terminal device, and the first real-time status data is displayed on the first terminal device.

[0129] As an example, the first real-time status data refers to the dynamic parameters generated by the first charging device during operation. Exemplarily, the first real-time status data includes, but is not limited to: current output power (watts), output voltage, output current, charging protocol type (such as PD, QC), the temperature of the first charging device itself, the temperature of the device being charged, the power data corresponding to the first charging device, and the estimated remaining time to fully charge. Here, output power differs from the charging power of the device being charged. The output power of the first charging device is not equal to the charging power of the device being charged, as there will be losses between output and charging. The output power can be the total output power of the first charging device (the sum of outputs from multiple ports) or the output power of a single port.

[0130] As an example, the link from the first charging device to the first terminal device for the first real-time status data can include either of the following two implementations: In the first implementation, the first charging device first uploads the first real-time status data to a server device, and then the server device, based on the detection result obtained from the status detection of the first application, sends the first real-time status data to the first application or the operating system of the first terminal device. At this time, the first terminal device receives the first real-time status data from the server device through the first application or the operating system. In the second implementation, a local communication connection (such as a Bluetooth, USB, or WiFi point-to-point communication connection) can also be established between the first terminal device and the first charging device. The first charging device directly sends the first real-time status data to the first terminal device through the local communication connection, and at this time, the first terminal device receives the first real-time status data from the first charging device through the local communication connection. It should be noted that the above two implementations can coexist. For example, the link via the server device can be used as the main link, and the local communication connection as a supplementary link, so that the reception of the first real-time status data can still be maintained when the main link fails.

[0131] As an example, when a user switches the first application to the foreground display state, or when some types of the first application are switched to the background but can still maintain normal communication with the server device, the first application is in an online state. At this time, the first terminal device receives the first real-time status data sent by the server device through the network receiving unit inside the first application, and drives the first real-time status data to the UI rendering layer inside the first application for display.

[0132] As an example, when the first application is not opened, is closed, or terminated by being cleared from the multitasking list by the user, or when the first application is in the background and its operation is suspended or halted by the operating system, thus unable to maintain normal communication with the server device, the first application is in an offline state. At this time, the operating system of the first terminal device receives the first real-time status data sent by the server device through the system-level remote push notification service through its built-in push notification daemon, and the operating system delivers the first real-time status data to the UI rendering layer of the first terminal device for display.

[0133] From the perspective of user interaction flow, if a user needs to view the first real-time status data of the first charging device, the user does not need to go through the operation chain of finding the first application, launching the first application and waiting for it to load, and entering the secondary interface to view the data. Regardless of whether the first terminal device is in a locked state, the user is using other applications, or the first application has been switched to the background, suspended by the operating system, or closed (i.e., in an offline state), the first real-time status data of the first charging device can be presented to the user in a timely manner, improving data viewing efficiency and human-computer interaction efficiency.

[0134] In some embodiments, when the first application is online, the above-mentioned display of the first real-time status data on the first terminal device can be achieved by performing the following process: displaying the first real-time status data within the first application. When the first application is offline, the above-mentioned display of the first real-time status data on the first terminal device can be achieved by performing the following process: displaying the first real-time status data of the first charging device on an external display interface of the first terminal device.

[0135] As an example, the external display interface refers to a display interface that is independent of the UI context of the first application and is directly managed and rendered by the operating system of the first terminal device. This includes, but is not limited to, the lock screen interface, desktop widgets, status bar notification area, dynamic island area, or similar capsule-shaped display area (such as the smart island under other operating systems) of the first terminal device. The display interface within the first application refers to the display interface corresponding to the UI context of the first application itself, which can only be presented when the first application is running.

[0136] As an example, when the first application is online, it has full UI capabilities, and the first real-time status data is displayed on the corresponding interface within the first application (such as the device details page, homepage card, etc.). At this time, the user can view the first real-time status data within the first application. When the first application is offline, since its own UI rendering capabilities are unavailable, the operating system of the first terminal device takes over the rendering and display of the first real-time status data, presenting it on an external display interface. Even if the first application is not running, the user can still view the first real-time status data of the first charging device through this external display interface.

[0137] In this embodiment of the application, the first real-time status data is presented on the display interface within the first application and the display interface outside the application, respectively, for two different operating states of the first application: online and offline. This ensures that the display position of the first real-time status data matches the current availability of the first application, thus guaranteeing the continuity of the display of the first real-time status data of the first charging device on the first terminal device.

[0138] In some embodiments, the above-mentioned display of the first real-time status data of the first charging device on the external display interface of the first terminal device can be achieved by performing the following process: On the external display interface of the first terminal device, the first real-time status data of the first charging device is displayed in a thumbnail display mode. At this time, in response to a display mode switching operation for the external display interface, the second real-time status data of the first charging device is displayed in a detail display mode; wherein the data volume of the first real-time status data in the thumbnail display mode is less than the data volume of the second real-time status data in the detail display mode.

[0139] As an example, the external display interface can be a lock screen widget, pull-down notification bar, or status bar (such as the Dynamic Island) of the first terminal device. The amount of data displayed in thumbnail display mode is less than that displayed in detail display mode. For example, in thumbnail display mode, the first real-time status data only includes the current battery percentage (e.g., 80%); in detail display mode, the second real-time status data not only includes the battery level but also adds multiple dimensions of information such as the current charging power (e.g., 65W), estimated remaining charging time, and charging protocol type. When the user performs a display mode switching operation on the external display interface (specifically, interactive gestures such as clicking, long-pressing, or pulling down), the external display interface responds and seamlessly switches to detail display mode; conversely, the user can also switch back to thumbnail display mode from the detail display mode, which has a larger amount of data, by swiping up or collapsing. The area occupied by detail display mode is larger than that occupied by thumbnail display mode. Thumbnail display mode can be a collapsed / simplified view that occupies a smaller screen display area, while detail display mode can be an expanded / detailed view that occupies a larger screen display area.

[0140] As an example, the display mode of the external application display interface can also be actively controlled by the server device based on the event emergency flag of the first real-time status data. Specifically, when the first terminal device receives the first real-time status data from the server device through the operating system, it can also receive the mode control command issued by the server device, and control the external application display interface to switch between a thumbnail display mode and a detailed display mode according to the display mode indicated by the mode control command. For example, when the display mode indicated by the mode control command is the detailed display mode, the first terminal device controls the external application display interface to be in the detailed display mode and displays at least two of the charging power, voltage value, and current information in the external application display interface; when the display mode indicated by the mode control command is the thumbnail display mode, the first terminal device controls the external application display interface to be in the thumbnail display mode and displays the charging power in the external application display interface.

[0141] This application effectively resolves the contradiction between the limited display space of external display interfaces (such as lock screen components) and the multi-layered information needs of users. By designing display modes with differentiated data volumes, hierarchical and on-demand display of the first real-time status data is achieved. When there is no need for in-depth attention, only core parameters are presented in a smaller data volume mode, which maintains the cleanliness of the interface and reduces the UI rendering overhead and data parsing power consumption of the first terminal device in the non-foreground state. When users have in-depth needs, detailed data can be expanded through lightweight interaction (switching operation), avoiding the cumbersome path of unlocking the phone, opening the first application, and entering the details page.

[0142] In some embodiments, the first real-time status data displayed in thumbnail mode includes at least one of the following: power data of the first charging device, operating mode of the first charging device, and output power of the first charging device; the second real-time status data displayed in detail mode includes at least one of the following: power data of the first charging device, operating mode of the first charging device, output power of the first charging device, temperature of the first charging device, temperature of the device being charged corresponding to the first charging device, product name of the first charging device, estimated self-charging time of the first charging device, charging progress corresponding to the first charging device, estimated charging time corresponding to the first charging device, charging threshold corresponding to the first charging device, output power corresponding to each working interface, and interface status corresponding to each working interface.

[0143] As an example, the first charging device can include two categories: energy storage type and non-energy storage type. The specific data items presented in the thumbnail display mode and the detailed display mode can be adapted to the category of the first charging device. When the first charging device is an energy storage type (such as a portable power bank with a built-in battery, outdoor power supply, etc.), the first real-time status data corresponding to the energy storage type, including at least one of the following, can be displayed in the thumbnail display mode on the external display interface: the power data of the first charging device and the working mode of the first charging device; the first real-time status data corresponding to the energy storage type, including at least one of the following, can be displayed in the detailed display mode on the external display interface: the power data of the first charging device, the working mode of the first charging device, the output power of the first charging device, the temperature of the first charging device, the temperature of the device being charged corresponding to the first charging device, the product name of the first charging device, and the estimated self-charging time of the first charging device. When the first charging device is a non-energy storage type (such as a desktop charger or power adapter without a built-in battery), the corresponding non-energy storage type first real-time status data, including at least one of the following, can be displayed in the external display interface based on the thumbnail display mode: the output power of the first charging device and the working mode of the first charging device; the corresponding non-energy storage type first real-time status data can also be displayed in the external display interface based on the details display mode.

[0144] As an example, for a non-energy storage type first charging device, the first real-time status data presented in the details display mode can be further adapted according to the number of working interfaces. When the non-energy storage type first charging device is in single-interface working state, the first real-time status data including at least one of the following can be displayed on the external display interface: the product name of the first charging device, the charging progress of the first charging device, the estimated charging time of the first charging device, the charging threshold of the first charging device, the output power of the first charging device, and the working mode of the first charging device. When the non-energy storage type first charging device is in multi-interface working state, the first real-time status data including at least one of the following can be displayed on the external display interface: the product name of the first charging device, the output power of the first charging device, the output power of each working interface, the interface status of each working interface, and the working mode of the first charging device.

[0145] This application defines differentiated information architectures for first charging devices with different hardware attributes, namely energy storage type and non-energy storage type. In related technologies, different hardware forms often require the development of different UI panels. However, this application avoids interference from invalid information such as remaining power displayed on non-energy storage charging heads by distinguishing categories. Display resources are allocated to key parameters that truly match the category, improving the effective density of information transmission. When multiple interfaces are working, due to the limited space of the external display interface, the display area is given to the interface data and global power data of each port, addressing the issue of whether the power is degraded or redistributed when multiple interfaces are working.

[0146] In some embodiments, the above-mentioned display of the first real-time status data of the first charging device on the application-outside display interface of the first terminal device can be achieved by performing the following processes: performing any one of the following processes: displaying the first real-time status data of the first charging device on the application-outside display interface located in a first area of ​​the screen of the first terminal device, wherein the first area is any area in the screen; displaying the first real-time status data of the first charging device on the application-outside display interface located in a second area of ​​the screen of the first terminal device, wherein the second area is an unoccupied blank area in the screen.

[0147] As an example, the two display position handling methods for the application's external display interface correspond to different UI rendering strategies. In the first handling method, the first terminal device displays the first real-time status data at the top of the screen or any position that the user drags, in the form of a status bar (such as a dynamic island) or a global floating window. This method is not restricted by the layout of the currently running application (such as a video playing in full screen) or the layout of various application icons on the homepage. In the second handling method, the second area (i.e., the unoccupied blank area on the screen) refers to the area without icons, text, or pop-ups identified through coordinate detection and layer calculation. For example, on the lock screen or system desktop of the first terminal device, the clock area and the matrix positions of existing application icons are automatically avoided, and a smart widget containing the status data of the first charging device is generated and inserted in the blank grid at the bottom or side of the screen.

[0148] As an example, regarding the application-external display interface located in the second area, when the area of ​​the second area changes, the first terminal device can also dynamically adjust the display distribution of the first real-time status data of the first charging device according to the change in the area of ​​the second area. The change in the area of ​​the second area (blank area) is usually triggered by scenarios such as the first terminal device switching between portrait and landscape modes, split-screen operation, or a new notification card popping up and occupying the original blank space. For example, when the first terminal device is in portrait mode and there is a large blank area on the desktop (the second area is large), the application-external display interface is presented in the form of a large card, and the internal data is vertically distributed: the product name is displayed at the top, the real-time power fluctuation curve that occupies a large space is displayed in the middle, and the specific wattage of each interface is displayed at the bottom; when a system notification pops up and the blank area is severely compressed (the second area becomes smaller), the display distribution seamlessly switches to a long capsule shape, the internal data becomes a compact horizontal distribution, and an information degradation strategy is triggered, automatically hiding the large curve and only displaying the most core total power and current charging progress horizontally side by side.

[0149] As an example, when the area of ​​the second region shrinks below the first area threshold, the first terminal device hides and displays a portion of the first real-time status data; when the area of ​​the second region expands above the second area threshold, and there are hidden portions of the first real-time status data, the first terminal device displays the hidden portions of the first real-time status data, where the second area threshold is greater than the first area threshold. By setting the second area threshold to be greater than the first area threshold, a buffer is introduced in the underlying UI interaction. When the area of ​​the second region fluctuates slightly near the critical value, this buffer design effectively avoids the waste of rendering resources caused by frequent collapsing and expanding of hidden content.

[0150] This application provides two available display mechanisms. The first processing method (arbitrary area) ensures the high priority presentation of the first real-time status data through a global top-level floating form. The second processing method (blank area) cleverly utilizes the screen's redundant space to complete the information display without disrupting the user's original interface layout or obscuring other core content (such as reading text or game screens) through an anti-occlusion mechanism.

[0151] In some embodiments, the above-mentioned display of the first real-time status data of the first charging device on the external display interface of the first terminal device can perform the following processing for each first real-time status data: when the first real-time status data is in a preset abnormal range, the first real-time status data is displayed on the external display interface of the first terminal device based on a first visual style to indicate that the first real-time status data is in the preset abnormal range; when the first real-time status data is in a preset normal range, the first real-time status data is displayed on the external display interface of the first terminal device based on a second visual style different from the first visual style to indicate that the first real-time status data is in the preset normal range.

[0152] As an example, by defining a safety threshold for the data, the external display interface is given dynamic visual feedback capabilities. Taking the temperature of the first charging device as an example of the first real-time status data: the preset normal range is 0℃ to 45℃, and the abnormal range is above 45℃. When the collected temperature of the first charging device is 35℃ (falling into the normal range), the external display interface (such as Lingdong Island) adopts a second visual style: the temperature value is displayed in soft green font, accompanied by a smooth breathing light animation or a static safety shield icon. When the first charging device operates at high power for a long time, causing the temperature to soar to 52℃ (falling into the abnormal range), a response is immediately triggered, switching the temperature value display to the first visual style: the temperature value instantly turns into a highly saturated warning red, accompanied by a high-frequency flashing animation effect, and even adding a warning icon next to the value. Similarly, this mechanism can also be used for power data (such as the font turning red when the power is below 10%) or output power (such as the power value changing color when overload protection is triggered).

[0153] This application utilizes visual style differentiation to achieve information transmission. Users do not need to memorize the safety thresholds of various hardware parameters; they can perceive the current abnormal state of the first charging device simply by seeing different visual styles (such as color changes). This design provides a powerful early safety warning when the first charging device experiences potential risks such as overheating or overvoltage, helping users to unplug the first charging device in time and avoid hardware damage or more serious safety accidents.

[0154] In some embodiments, when the first application is running in the foreground, the first real-time status data of the first charging device is displayed within the first application; in response to a data selection operation within the first application, the first real-time status data in the selected state is displayed. The above-mentioned display of the first real-time status data of the first charging device on the application-outside display interface of the first terminal device can be achieved by performing the following process: displaying the first real-time status data of the first charging device in the selected state on the application-outside display interface of the first terminal device.

[0155] As an example, when the first application is running in the foreground, it displays all dimensions of the first charging device's real-time status data (such as total power, independent voltage of each interface, current, device temperature, etc.). Users can select data by clicking the icon next to a specific data item, checking the checkbox, or using a long-press and drag gesture. This marks the corresponding real-time status data as "selected" and writes it into the configuration. For example, the user may only check "total power" and "device temperature". Subsequently, when the first application switches from the foreground to offline mode and triggers an external display interface such as a desktop widget or floating window, the external UI rendering engine will actively read the above configuration, filter out redundant data streams such as unselected interface voltages, and only capture and render the "total power" and "device temperature" that are in the selected state for display.

[0156] This application's embodiments achieve customized display of first real-time status data. Since screen space on external application displays is typically limited, forcibly mapping all first real-time status data from the first application would inevitably lead to cluttered layout, tiny fonts, and even overlapping information. By allowing active selection within the foreground first application, the power to filter information is returned to the user, enabling them to customize the core indicators they care about most. This results in efficient utilization of display resources on external application displays and enhances the personalization of data display.

[0157] In some embodiments, the first application can also be used to manage the second charging device, and the login account of the first application is bound to the first charging device and the second charging device. When the first real-time status data of the first charging device is displayed on the application-outside display interface of the first terminal device, any one of the following processes is performed: the first real-time status data of the second charging device is also displayed on the application-outside display interface of the first terminal device; in response to the charging device switching operation, the first real-time status data of the first charging device is hidden on the application-outside display interface of the first terminal device, and the first real-time status data of the second charging device is displayed.

[0158] As an example, suppose a user binds both a desktop multi-port charger and a portable magnetic power bank to the first application. Two rendering strategies are provided: The first is parallel display, which divides the widget UI into top-bottom or left-right lists, and renders the real-time power and other data of the two charging devices in their respective blocks. The second is carousel display, which first displays the status data of the desktop charger (i.e., the first charging device) that is currently active in the widget full screen. When the widget recognizes the user's swipe gesture or click on the page-turning arrow to switch charging devices, a smooth transition animation is triggered on the UI page, replacing the interface content with the real-time status data of the portable power bank (i.e., the second charging device).

[0159] As an example, the first charging device can meet at least one of the following conditions: the first charging device is the most frequently used charging device among both the first and second charging devices; the first real-time status data corresponding to the first charging device indicates that the first charging device is in an abnormal state. Specifically, the cumulative connection time of each charging device bound to the logged-in account can be recorded in the local database of the first terminal device, and the charging device with the largest cumulative connection time value is marked as the default first charging device. For abnormal states, safety threshold rules (such as device temperature greater than 65℃, output voltage overload, etc.) can be preset. When the first real-time status data of a charging device touches any of the above safety threshold rules, the charging device is prioritized as the default first charging device and pushed to the external display interface for warning display.

[0160] The embodiments of this application enable the automatic capture and priority display of the most frequently used charging devices in normal usage scenarios, which meets the core concerns of users. In addition, the external display interface is upgraded from data display to proactive risk warning, ensuring that emergency situations related to power safety, such as device overheating and short circuits, can be perceived by users in the first instance, thereby improving the security capabilities in the process of managing multiple devices.

[0161] In some embodiments, the above-mentioned display of the first real-time status data of the first charging device on the application-outside display interface of the first terminal device can be achieved by performing the following process: activating the real-time activity function of the operating system of the first terminal device; when the real-time activity function is successfully activated, displaying the first real-time status data of the first charging device on the application-outside display interface of the first terminal device.

[0162] As an example, real-time activities (such as the Live Activities mechanism in iOS or the lock screen real-time service cards in Android) refer to a system-level function provided by the underlying operating system that allows applications to persistently display and frequently update dynamic information on the lock screen, status bar, or specific floating areas (such as the Activity Island). In practice, when triggering conditions are met (such as the first application moving from the foreground to the background, or the user connecting a charging device), the first application will call the operating system's open interface (API, such as the ActivityKit framework) to request the system to start a real-time activity, simultaneously submitting the UI layout template and initial state data. After verifying user permissions and current system memory resources, if the operating system allows the activity, it returns a successful startup instruction. Upon receiving the successful instruction, the system's underlying UI rendering engine takes over the display task, dynamically and continuously displaying the received first real-time state data using an external display interface without waking up the first application's main process.

[0163] As an example, when the external display interface is located in the Dynamic Island area of ​​the first terminal device, the aforementioned real-time activity function of the operating system of the first terminal device can be implemented through the following technical solution: The first application calls the application programming interface (API) provided by the operating system for the corresponding real-time activity function to register the corresponding target event in the Dynamic Island area. The target event refers to displaying the first real-time status data of the first charging device in the Dynamic Island area. During the registration process, the first application transmits several key technical parameters to the underlying system through the API, including: the application's package name identifier (App ID), the UI description file for external display (such as defining the layout and layer node information of the Dynamic Island in "compact state" and "expanded state"), and the authorization token for data updates. After the operating system verifies the above parameters and permissions, it allocates a dedicated rendering canvas and system-level thread for the target event in its own memory stack and enters the ready detection state. At this point, it indicates that the real-time activity function has been successfully started and registered, and the system is ready to take over and render the subsequently received first real-time status data.

[0164] By introducing the real-time activity function of the operating system through the embodiments of this application, it is ensured that even if the first application is offline, the operating system of the first terminal device can still legally take over the display task and continuously render the first real-time state data. Relying on the technical feature of the global top placement of the dynamic island area, a zero-operation and unobstructed display effect is created for the user. Whether the user is playing games or watching videos in the foreground, the first terminal device can smoothly display the dynamics of the first charging device in a non-intrusive form on the highest level interface.

[0165] In some embodiments, as a further explanation of the aforementioned second implementation method (i.e., the implementation method in which the first terminal device and the first charging device directly transmit data through a local communication connection), the following processing may also be performed: establishing a communication connection between the first application of the first terminal device and the first charging device; performing status detection on the first application to obtain a detection result; when the detection result indicates that the first application is in a background running state or an offline state, adopting a strategy corresponding to the communication connection to maintain the communication connection; and then receiving the first real-time status data of the first charging device through the communication connection.

[0166] It should be noted that this embodiment and the aforementioned implementation via server equipment are two coexisting implementation methods: the server equipment relay implementation is suitable for scenarios where the first charging device and the first terminal device are not in the same near-field range and data transmission needs to be carried out through a wide area network; this embodiment is suitable for scenarios where the first charging device and the first terminal device are in the near-field range and data can be transmitted directly through a local communication connection. In practical applications, the choice can be made flexibly according to the hardware configuration of the first charging device and the specific usage scenario, or the two implementation methods can be combined, for example, using the local communication connection as the main link and the link relayed via server equipment as the backup link.

[0167] As examples, methods for establishing a communication connection include, but are not limited to: point-to-point connection based on Bluetooth Low Energy (BLE), touch pairing connection based on NFC (Near Field Communication), USB connection, and WiFi connection based on the same local area network. During the connection establishment process, authentication (such as token handshake or encryption key exchange) is usually involved to ensure the security of data transmission.

[0168] As an example, maintaining a communication connection using a strategy corresponding to the communication connection can be achieved through the following technical solutions: When the communication connection is a Bluetooth connection, enable the background Bluetooth mode of the Bluetooth development framework to maintain the Bluetooth connection; when the communication connection is a Universal Serial Bus (USB) connection, utilize the continuous power supply feature of the authentication protocol of the corresponding first terminal device's operating system to maintain the USB connection; when the communication connection is a wireless LAN (WLAN) communication connection, request background network access permissions to maintain the WLAN-based communication connection. Specifically: When the communication connection is a Bluetooth connection, the first application calls the operating system's Bluetooth development framework (such as CoreBluetooth in iOS or BluetoothManager in Android) to declare and enable background Bluetooth mode in the application's configuration manifest. This hands over the underlying handle for maintaining the Bluetooth connection to the operating system's system-level Bluetooth daemon, so that even if the first application goes to the background, the underlying Bluetooth controller hardware will still maintain a low-power heartbeat handshake with the first charging device. When the communication connection is a Universal Serial Bus (USB) connection, the first application utilizes a hardware-level authentication protocol proprietary to the first terminal device (such as Apple's MFi iAP2 protocol or Android's AOA peripheral protocol). This authentication protocol inherently possesses continuous power supply and data keep-alive features, preventing the operating system from cutting off the USB port's power and data pins when entering sleep mode, thus maintaining the USB endpoint's continuous activity at the physical level. When the communication connection is based on Wireless Local Area Network (WiFi) communication technology, the first application requests background network access permissions from the operating system's power and network management module, forcing the baseband RF chip to maintain power supply and activation of the WiFi network interface when the first terminal device is off or the first application is running in the background.

[0169] As an example, when the communication connection between the first application and the first charging device is interrupted, the first terminal device performs the following processing: requests to re-establish the communication connection, stops displaying the first real-time status data of the first charging device, and displays a first prompt message on the first terminal device, wherein the first prompt message is used to indicate that the communication connection between the first application and the first charging device is interrupted; when the communication connection between the first application and the first charging device is restored, the first prompt message is stopped, and the display of the first real-time status data of the first charging device is resumed. In related technologies, expired data from before the network outage is often displayed on the interface due to network latency, seriously misleading users. This application embodiment stops the display of expired data and displays an error prompt at the moment of disconnection, ensuring the accuracy and timeliness of information obtained by the user. At the same time, it introduces an intelligent reconnection strategy and a data synchronization mechanism after restoration, ensuring that the first real-time status data can continue to be displayed after the link is restored.

[0170] In some embodiments, the first charging device and the first terminal device are connected via a Universal Serial Bus (USB), the first charging device charges the first terminal device via the USB, and the first real-time status data is transmitted to the first terminal device via the USB.

[0171] As an example, the first terminal device is a smartphone, and the first charging device is a smart gallium nitride (GaN) charger. The two are connected via a charging cable conforming to the Universal Serial Bus (USB, such as USB Type-C) standard. The charging cable has power lines and data lines. The power lines charge or supply power to the first terminal device, while the data lines transmit data. When the user plugs in the cable, the power pins (such as VBUS) within the USB interface establish a power supply circuit, providing high-power charging for the phone. Simultaneously, within the same cable, the data pins of the USB interface (such as D+ / D- pins, or the CC configuration channel pin in the USB PD protocol) are activated. The microcontroller (MCU) inside the first charging device packages the real-time output power, voltage and current curves, and other real-time status data it collects into data packets using the USB communication protocol. This data is continuously pushed to the underlying system of the first terminal device, and then rendered on the application's external display interface of the first terminal device.

[0172] The present application's embodiments construct an interactive architecture and physical link that integrates charging and data transmission, enabling both charging and data transfer via USB. This eliminates the cumbersome steps of searching, pairing, and connecting for first-time users, shortening the user's operation path.

[0173] The data processing method provided in this application will be described in conjunction with exemplary applications and implementations of the charging devices provided in the embodiments of this application.

[0174] The data processing method provided in the embodiments of this application will be described below. As mentioned above, the electronic device implementing the data processing method of the embodiments of this application is a charging device. Therefore, the executing entity of each step will not be described again below.

[0175] In step 301, the first real-time status data of the first charging device itself is uploaded to the server device; so that the server device can perform status detection on the first application of the first terminal device and obtain the detection result, wherein the first application is an application used to manage the first charging device; wherein, when the detection result indicates that the first application is online, the first real-time status data is pushed to the first application by the server device to be displayed on the first terminal device; when the detection result indicates that the first application is offline, the first real-time status data is pushed to the operating system of the first terminal device by the server device to be displayed on the first terminal device.

[0176] As an example, the specific process of the first charging device uploading the first real-time status data to the server device, the specific process of the server device performing status detection on the first application, and the distribution processing process taken by the server device when the detection results respectively indicate that the first application is in an online state and an offline state, can be found in the relevant descriptions in the aforementioned embodiments with the server device as the execution subject, and will not be repeated here.

[0177] In some embodiments, the first charging device can remotely control the display mode adopted by the application-outside display interface of the first terminal device using its own physical interaction capabilities. Specifically, in response to a display mode switching operation for the first charging device, the first charging device sends operation data corresponding to the display mode switching operation to a server device, which then forwards the operation data to the first terminal device, thereby switching the application-outside display interface of the first terminal device between a thumbnail display mode and a detailed display mode; wherein, the amount of data of the first real-time status data displayed in the thumbnail display mode is less than the amount of data of the second real-time status data displayed in the detailed display mode.

[0178] As an example, when a user performs a physical interaction on the first charging device (e.g., pressing a physical function button on the casing of the first charging device, double-clicking the power indicator panel, etc.), the first charging device internally captures the hardware interrupt signal and encodes it into a specific operation data instruction frame. Subsequently, the first charging device uploads the instruction frame to the server device through the established communication connection with the server device. The server device then forwards the instruction frame to the first terminal device via the aforementioned distribution path for the first application or the distribution path for the operating system of the first terminal device. After parsing the operation data, the first terminal device switches the display mode of the external display interface.

[0179] This application breaks through the traditional limitation of using the screen of the first terminal device as the only interaction entry point. In actual use scenarios, the first terminal device may be in a state of screen-off sleep, screen lock, or placed on the desktop and inconvenient to operate, while the user is holding the first charging device (such as a power bank). This allows the user to directly operate the physical buttons on the first charging device to remotely control the application external display interface of the first terminal device to switch between thumbnail display mode and detail display mode, thereby improving the efficiency of human-computer interaction.

[0180] In some embodiments, when the first charging device has multiple interfaces, for a target interface among the multiple interfaces, a first indicator light is turned on at the corresponding position of the target interface of the first charging device to indicate that the target interface is the interface corresponding to the first real-time status data.

[0181] As an example, within the first charging device, its microcontroller (MCU) assigns a fixed low-level interface identifier to each physical interface (e.g., USB-A, USB-C1, USB-C2). When the first terminal device is displaying first real-time status data, the message of the first real-time status data already carries the interface identifier of the corresponding target interface. The printed circuit board of the first charging device is designed with an LED indicator array that corresponds one-to-one with the spatial location of each physical interface. The MCU internally has a hardware mapping table that maps interface identifiers to general-purpose input / output pins. When the first charging device continuously outputs the first real-time status data corresponding to the target interface, the MCU queries the hardware mapping table to determine the pin corresponding to the LED adjacent to the physical location of the target interface, and outputs a high-level or pulse-width modulation signal to that pin, thereby physically turning on the first indicator light (such as a constantly lit light of a specific color or a breathing flash at a specific frequency), while the indicator lights of other non-target interfaces remain off.

[0182] This application's embodiments construct a display mechanism that combines a digital UI interface with physical hardware status. In complex scenarios where a multi-interface high-power charging device simultaneously powers multiple different devices (such as mobile phones, tablets, and laptops), the first real-time status data on the screen of the first terminal device is bound to the physical interface on the first charging device. When a user views a certain piece of first real-time status data, the corresponding interface indicator light on the first charging device lights up synchronously. This effectively prevents users from mistakenly unplugging the cables of critical devices that are currently providing high-power power due to misjudgment when plugging or unplugging devices, thus improving the safety of multi-interface charging scenarios.

[0183] In some embodiments, when the communication connection between the first application and the first charging device is interrupted, a second indicator light is turned on in the first charging device to indicate that the communication connection between the first application and the first charging device is interrupted; when the communication connection between the first application and the first charging device is restored, a third indicator light is turned on in the first charging device to indicate that the communication connection between the first application and the first charging device is restored.

[0184] As an example, a hardware-level heartbeat timer runs inside the communication controller of the first charging device. During normal communication, the server device or the first application periodically sends heartbeat packets to reset the timer. When the communication connection is unexpectedly interrupted, heartbeat packets stop being received, the timer overflows, and a link loss interrupt signal is sent to the main control microcontroller of the first charging device. After the MCU captures the interrupt, its internal state machine switches to the disconnected state and outputs specific general-purpose input / output control signals to the corresponding LED driver circuit to drive the second indicator light to turn on (e.g., controlling the red LED to flash at a high frequency, or illuminating a specific warning icon backlight). When the first application and the underlying RF or physical interface of the first charging device re-complete the protocol stack handshake and authentication, the communication controller of the first charging device reports the link connection event to the MCU. The MCU removes the drive of the second indicator light pin and outputs a drive level to another set of pins to turn on the third indicator light (e.g., controlling the green or blue LED to stay on for 3 seconds and then use a breathing light effect), completing the physical status feedback of connection restoration.

[0185] In normal scenarios, if the communication connection is interrupted, the user may not immediately notice the interruption because the first terminal device may be locked, in a pocket, or out of the user's sight. This embodiment enables the first charging device to autonomously issue a clear physical light warning (second alert light) upon disconnection and provide timely feedback (third alert light) upon successful reconnection. This achieves multimodal, cross-device delivery of status information, ensuring that the first charging device still possesses anomaly indication capabilities even when the first terminal device is unavailable.

[0186] In some embodiments, the process of the first charging device uploading first real-time status data to the server device can be triggered based on the status comparison result. Specifically, the first charging device collects its own current status record at the current moment, which includes parameters such as the charging power, voltage value, and current value of the first charging device at the current moment; the first charging device compares the current status record with the historical status record corresponding to the last upload to obtain the status comparison result; if the status comparison result indicates that at least one of the charging power, voltage value, or current value has changed (for example, the change magnitude exceeds a preset absolute threshold or the relative change rate exceeds a preset proportional threshold), then the first charging device uses the current status record as the first real-time status data, encapsulates it into a message of the corresponding communication protocol according to a preset message format (such as JSON format, including fields such as timestamp, device identifier, charging power, voltage value, and current value), and uploads the message to the server device through the established communication connection with the server device.

[0187] The embodiments of this application enable the first charging device to report to the server device only when the first real-time status data changes, thus avoiding the waste of network bandwidth and the power consumption of the first charging device itself caused by continuously uploading redundant data when the status has not changed.

[0188] In some embodiments, before uploading the first real-time status data to the server device, the first charging device may pre-establish a communication connection with the server device. Specifically, the first charging device connects to the Internet through a built-in WiFi module, cellular module, or other network access module, initiates a registration request to the server device, and establishes a communication connection for carrying the reporting of the first real-time status data after completing identity authentication with the server device. Identity authentication can be implemented based on authentication methods such as device certificates, tokens, or usernames and passwords; the communication connection can be implemented based on long connections using Message Queuing Telemetry Transport Protocol (MQTT) or bidirectional communication connections based on WebSocket.

[0189] As an example, when the communication connection between the first charging device and the server device is interrupted due to network abnormalities or other reasons, the first charging device initiates a disconnection and reconnection process, re-initiates a registration request to the server device according to a preset reconnection strategy, and restores the communication connection after re-authentication, and re-transmits the first real-time status data generated during the communication connection interruption to the server device.

[0190] The embodiments of this application enable the communication connection between the first charging device and the server device to be stable and recoverable, providing a link guarantee for the continuous uploading of the first real-time status data.

[0191] The following will describe in detail the complete implementation of the data processing method on the technical side provided in the embodiments of this application.

[0192] See Figure 4 , Figure 4This is a schematic diagram of the execution logic for displaying real-time status data of a charging device provided in this application embodiment. In step 601, the charging device connects to WiFi, that is, the communication connection establishment step is first executed. The first charging device accesses the Internet through its built-in WiFi module and establishes a long connection with the server (such as the server device 200 mentioned above), for example, a long connection based on the Message Queuing Telemetry Transport Protocol (MQTT). The established communication connection is used to carry the subsequent reporting of the first real-time status data. In step 602, the first charging device detects changes in the charging status and then executes a status change detection step: the first charging device detects its own charging parameters in real time, including charging power, voltage value, current value, etc., and compares the current status record at the current moment with the historical status record corresponding to the last report. When the comparison result indicates that the above charging parameters have changed, for example, the change magnitude exceeds a preset absolute threshold or the relative change rate exceeds a preset proportional threshold, the reporting of the first real-time status data is triggered. In step 603, the first charging device connects to the Internet through the MQTT protocol. The TT protocol sends the first real-time status data to the server, followed by a data reporting step: the first charging device encapsulates the collected first real-time status data into a message according to a preset message format, such as JSON format, including fields such as timestamp, device identifier, charging power, voltage value, and current value, into a message corresponding to the corresponding communication protocol, and publishes the message to a preset message topic on the server side via the MQTT protocol; in step 604, the cloud server receives the first real-time status data sent by the first charging device via the MQTT protocol, and then executes the first real-time status data receiving step: the message broker service on the server side receives the message published to the preset message topic, unpacks and deserializes the message to obtain the first real-time status data; then, a status detection step is executed, the server performs status detection on the first application of the first terminal device, obtains the detection result, and determines whether the first application is currently online or offline based on the detection result. The specific process of status detection can be found in the aforementioned embodiment of status detection based on heartbeat messages and offline duration thresholds.

[0193] When the detection result indicates that the first application is online (i.e., the first application is still subscribing to the preset message topic and communicating normally with the server), the delivery path for the first application corresponding to steps 605 to 607 is executed; when the detection result indicates that the first application is offline, the delivery path for the operating system of the first terminal device corresponding to steps 608 to 611 is executed.

[0194] In step 605, the cloud server pushes the first real-time status data to the first application (APP) via the MQTT protocol, and then performs the online delivery step: the server encapsulates the first real-time status data into a target push message, and pushes the target push message to the first application through the first communication connection corresponding to the first application; in step 606, the first application receives the target push message and updates the data locally, and then performs the first application data update step: after receiving the target push message through the first communication connection, the first application unpacks and deserializes the target push message according to the predetermined message format, parses out the first real-time status data, and drives the parsed first real-time status data to the local UI rendering layer; in step 607, the first application updates the presentation content of the application external display interface (e.g., the Dynamic Island), and then performs the application external display interface update step: the first application calls the application programming interface (e.g., the update method of the ActivityKit framework) of the real-time activity function provided by the operating system of the first terminal device, writes the parsed first real-time status data into the application external display interface (e.g., the Dynamic Island area), thereby completing the refresh of the content presented on the application external display interface.

[0195] In step 608, the cloud server sends the first real-time status data to the operating system of the first terminal device through the system-level remote push notification service (APNS), and then performs the offline delivery step: the server calls the system-level remote push notification service that matches the operating system of the first terminal device, creates a push task for the first terminal device, writes the first real-time status data into the payload field of the push task, and sends the push task carrying the first real-time status data to the operating system of the first terminal device through the system-level remote push notification service; in step 609, the operating system of the first terminal device receives the push task, and then performs the operating system receiving step: the first terminal device receives the push task through its built-in push notification daemon and reads the first real-time status data from the push task according to the predetermined payload format; in step 610, the operating system takes over the real-time activity function (Live (Activity), then execute the real-time activity takeover step: without waking up the main process of the first application, the system's underlying UI rendering engine takes over the rendering tasks corresponding to the registered real-time activity functions; in step 611, the operating system updates the presentation content of the application's external display interface, and then executes the application's external display interface update step: the operating system drives the first real-time state data it reads to the rendering process corresponding to the application's external display interface, thereby completing the refresh of the content presented on the application's external display interface without relying on the main process of the first application.

[0196] After the delivery path for the first application and the delivery path for the operating system of the first terminal device are completed, the application-external display interface of the first terminal device completes the update and presentation of the first real-time status data; finally, the server repeatedly executes the status detection step, continuously switching the delivery path of the first real-time status data according to the current running status of the first application, until the first charging device stops reporting the first real-time status data.

[0197] See Figure 5 , Figure 5 This is a timing logic diagram of the real-time status data of the charging device provided in the embodiment of this application. The timing diagram shows the complete interaction process of the first charging device, the server, the first application and the operating system of the first terminal device in processing and presenting the first real-time status data according to two parallel scenarios: scenario 1 (the first application is online) and scenario 2 (the first application is offline).

[0198] In Scenario 1, after detecting a change in its charging status, the first charging device sends an MQTT Publish message carrying the first real-time status data to the server via the MQTT protocol. The server receives the MQTT Publish message to obtain the first real-time status data and performs status detection on the first application. When the detection result indicates that the first application is online, the server pushes an MQTT Push message carrying the first real-time status data to the first application via the MQTT protocol. The first application receives the MQTT Push message through the corresponding first communication connection, parses out the first real-time status data, first drives the parsed first real-time status data to the local UI rendering layer to complete the update of the display interface within the first application, and then calls the application programming interface of the real-time activity function provided by the operating system of the first terminal device to synchronously refresh the first real-time status data to the display interface outside the application (such as the Lingdong Island area).

[0199] In Scenario 2, after the first charging device detects a change in its charging status, it also sends an MQTT Publish message carrying the first real-time status data to the server via the MQTT protocol. The server receives the MQTT Publish message to obtain the first real-time status data and performs status detection on the first application. When the detection result indicates that the first application is offline, the server calls a system-level remote push notification service (such as APNS) that matches the operating system of the first terminal device, and sends a remote notification carrying the first real-time status data to the operating system of the first terminal device via APNS Push. The operating system of the first terminal device receives the remote notification corresponding to APNS Push and takes over the real-time activity function (i.e., the system launches the Live Activity). The operating system then drives the first real-time status data to the rendering process corresponding to the external display interface, and refreshes the content presented on the external display interface (such as the dynamic island area) without relying on the main process of the first application.

[0200] A comparison of scenarios 1 and 2 shows that regardless of whether the first application is online or offline, the reporting path of the first charging device remains consistent (both report to the server via the MQTT protocol). The difference lies in the fact that the server's path for sending the first real-time status data dynamically switches based on the status detection results: In scenario 1, the server follows the path directed towards the first application, allowing the first application itself to update the external display interface; in scenario 2, the server follows the path directed towards the operating system of the first terminal device, allowing the operating system to take over the real-time activity functions and update the external display interface.

[0201] The above scheme can be summarized in the following steps: The first charging device connects to the Internet via WiFi and establishes a communication connection with the server; the first charging device detects its own charging status changes in real time and reports the first real-time status data to the server via the MQTT protocol; the server detects the online / offline status of the first application in real time; when the first application is online, the server pushes the first real-time status data to the first application through a distribution path directed to the first application, and the first application updates the data on its external display interface; when the first application is offline, the server pushes the first real-time status data to the operating system of the first terminal device through a system-level remote push notification service, and the operating system updates the data on its external display interface; the first real-time status data displayed on the external display interface is continuously refreshed through the application programming interface of the real-time activity function.

[0202] The status detection step in the above scheme is achieved by detecting the heartbeat messages continuously sent by the first application at a preset time period. When the server does not receive any heartbeat messages within a time window greater than or equal to a preset offline duration threshold, it determines that the first application is in an offline state. The activation of the real-time activity function is completed by the first application calling the corresponding application programming interface (such as the relevant interface of the ActivityKit framework) when it is running in the foreground. After activation, the application's corresponding external display interface is registered with the operating system. Subsequently, whether the first application is online and updates are made locally by calling the interface, or the operating system takes over the updates through remote push notification service when the first application is offline, the updates are performed on the registered application external display interface.

[0203] In some embodiments, for the communication link between the first charging device and the server, a QoS 1 (at least once) quality of service level can be used to carry the reporting of the first real-time status data to ensure that the first real-time status data is reliably delivered to the server. When the server pushes the first real-time status data through the delivery path for the first application, if it does not receive the delivery confirmation information for the target push message from the first application within a preset period, it triggers a degradation process, changing the first real-time status data to be pushed to the operating system of the first terminal device through the system-level remote push notification service, and the operating system takes over the update of the external display interface, thereby constructing a dual-path redundant delivery system of "delivery path for the first application and delivery path for the operating system" to ensure that the first real-time status data is delivered.

[0204] In some embodiments, for push tasks issued by the system-level remote push notification service, the push type of the push task can be set to background update type, and the priority of the push task can be set to the first priority corresponding to the first preset duration, so that the operating system can silently receive the push task without popping up a regular notification banner, and complete the update of the external display interface within the first preset duration.

[0205] In some embodiments, the external display interface supports a thumbnail display mode and a detailed display mode. In the thumbnail display mode, only the core charging power is displayed, while in the detailed display mode, at least two of the charging power, voltage value, and current information are displayed. Users can switch between the two display modes by performing display mode switching operations such as clicking or long-pressing on the external display interface.

[0206] In some embodiments, the communication connection between the first charging device and the server supports a long connection based on a message queue telemetry transmission protocol. The establishment of the communication connection is accompanied by an authentication process based on device certificate, token, or username and password to ensure the security of data transmission.

[0207] In some embodiments, the first real-time status data of the first charging device can be transmitted in JSON format, and the first real-time status data includes fields such as timestamp, device identifier, charging power, voltage value, and current value.

[0208] In some embodiments, multi-device management can be supported. A single first application login account can be bound to multiple first charging devices at the same time. After the server receives the first real-time status data reported by different first charging devices under the same login account, it sorts each set of first real-time status data according to the aforementioned priority evaluation mechanism based on charging event type and charging power. The first real-time status data with the highest priority is sent as the target status data to be sent. The remaining first real-time status data are sent in order of priority or switched on the display interface outside the application by sliding.

[0209] In some embodiments, the data processing method provided in this application is applicable to a first charging device equipped with a WiFi module, including but not limited to a power bank, charger, and charging pile.

[0210] In some embodiments, the data processing method provided in this application can complete the push from the first charging device to the server within 100ms after a state change, and complete the update and presentation of the external display interface within 500ms.

[0211] The data processing method provided in the above embodiments can improve real-time performance by replacing the traditional polling mechanism with an event-driven mechanism of active reporting by the first charging device and active push from the server. After a state change, cloud push and updates to the external display interface can be completed in a short time. It can achieve full-scene coverage by detecting the state of the first application and automatically switching the delivery path, enabling information updates in the foreground, background, and terminated states of the first application. Users can view the first charging device's real-time status data without opening the first application. It can achieve system-level integration by fully utilizing the system-level remote push notification service and real-time activity functions provided by the operating system of the first terminal device. Even when the first application is offline, the operating system can still manage the presentation of the first real-time status data on the external display interface. It can achieve immersive display by leveraging the hardware characteristics corresponding to the external display interface of the first terminal device, making the first real-time status data more intuitive and immersive. It presents the data in a visual format, allowing users to view it without switching to the primary application; it features a low-power design, eliminating the need for a persistent connection when the primary application is offline, with updates to the external display interface triggered by a system-level remote push notification service, effectively reducing power consumption compared to traditional solutions; it optimizes network resources by employing an event-driven mechanism that reports and sends data only when the primary real-time status data changes, significantly reducing network traffic compared to polling solutions; it achieves high reliability through a dual-path redundant delivery system consisting of a delivery path for the primary application and a delivery path for the operating system, automatically degrading when the delivery path for the primary application fails, ensuring reliable delivery of the primary real-time status data; it offers strong scalability, supporting a single login account to manage multiple primary charging devices based on a publish / subscribe model; and it standardizes the protocol, implementing it based on the message queue telemetry transmission protocol and the standard protocol corresponding to the system-level remote push notification service, ensuring cross-platform compatibility and long-term maintainability.

[0212] The following will describe in detail the complete implementation of the product-side data processing method provided in the embodiments of this application.

[0213] In some embodiments, the process first involves establishing a communication connection. The first charging device connects to the internet via its built-in WiFi module, establishes a communication connection with the server, and continuously reports its device type identifier (power bank / output device) and real-time status data (including power, battery level, temperature, interface status, etc.) to the server. Next, the process involves detecting the status of the first application. The server monitors the running status of the first application in real time, distinguishing between online and offline states. The following scenarios are considered offline: the first application is not opened, closed, or terminated by the user removing it from the multitasking list; some types of first applications are running in the background and their operation is paused or suspended by the operating system; and there is an abnormal network communication between the first application and the server. Finally, the process involves activating the background information display panel. When the server detects that the first application is offline, it automatically pushes information remotely through the system. The notification service activates the information display board in the designated display area of ​​the first terminal device's screen, registers, and begins rendering the first real-time status data of the first charging device. During this process, an adaptive display position step is performed, meaning the display position of the information display board is not limited to a fixed area of ​​the screen and supports multiple positions, including desktop, lock screen, and other interface formats. The information display board supports two display modes, which are switched according to the size of the display area and user interaction (click or long press). The information display board dynamically adjusts the display content and layout according to the type of the connected first charging device. While the first terminal device is offline, it continuously receives the first real-time status data sent by the server and updates the information display board content at a frequency of no less than once per second to ensure that the display parameters are synchronized with the actual status of the first charging device in real time. When the first application switches back to online status, the complete interface display is restored within the first application, and the information display board outside the application can be closed simultaneously.

[0214] The above technical solutions are summarized as follows: In a first terminal device equipped with a first application for managing the first charging device, when the first application is offline, the server automatically activates an information display board at a selectable location on the screen of the first terminal device through a system-level remote push notification service. The selectable locations include the top, middle, and bottom areas of the screen. The first real-time status data of the connected first charging device is continuously displayed in either a thumbnail display mode or a details display mode. When the first application switches back to an online state, the information display board is automatically closed or transferred to the internal storage of the first application.

[0215] In the above scheme, see [reference] Figure 6A , Figure 6A This is a schematic diagram of the first interface for displaying real-time status data of a charging device provided in an embodiment of this application. Figure 6AFrom left to right, the information display panels are arranged in four modes: top thumbnail display, middle detail display, top detail display again, and bottom detail display. The display panel can be located at the top of the screen (e.g., the top capsule / notch area), the middle of the screen (e.g., a floating card in the middle of the wallpaper), or the bottom of the screen (e.g., a bottom floating bar). The information display panel can be presented on various interface forms of the terminal device, such as the system desktop and lock screen, and can be displayed at the top, middle, and bottom of the screen, without being limited to a specific location or hardware area. The two display modes are thumbnail and detail display. The thumbnail mode displays only the 1-2 most critical parameters, occupying minimal screen space and suitable for quick viewing; the detail display mode presents multi-dimensional real-time status data in a structured layout, providing a complete view of charging parameters.

[0216] In the above scheme, see [reference] Figure 6B , Figure 6B This is a schematic diagram of the second interface for displaying real-time status data of a charging device, provided in an embodiment of this application. Figure 6B The left side shows a thumbnail display of power bank devices. Figure 6B The right side shows a thumbnail display of output-type charging devices, including power banks (energy storage type) and output devices (non-energy storage type). The thumbnail display of power banks shows at least one of the following: current power level (e.g., 99%) and overall operating mode; the thumbnail display of output devices shows at least one of the following: current output power (e.g., 120.8W MAX) and overall operating mode. See also Figure 6C , Figure 6C This is a schematic diagram of a third interface for displaying real-time status data of a charging device, provided in an embodiment of this application. Figure 6C This demonstrates the display mode for details of power bank devices. The display mode for power bank devices shows at least one of the following: product name (e.g., A1341--Anker PrimePower), output power (e.g., 13.0W), battery level (e.g., 100%), operating mode (e.g., custom mode), and temperature of the device being charged (e.g., 48℃). See also Figure 6D , Figure 6D This is a schematic diagram of the fourth interface for displaying real-time status data of the charging device provided in an embodiment of this application. Figure 6DThis shows the detail display mode of an output-type charging device in single-interface operation mode. The detail display mode for an output-type charging device in single-interface operation mode displays at least one of the following: product name (e.g., Anker Charger 2693), total output power (e.g., 250W), charging progress of the device being charged (e.g., 70% displayed as a progress bar), and overall operating mode (e.g., Fast Mode). See also Figure 6E , Figure 6E This is a schematic diagram of the fifth interface for displaying real-time status data of the charging device provided in an embodiment of this application. Figure 6E This shows the display effect of the details display mode when the output type charging device is in a multi-interface working state. The details display mode of the output type device in a multi-interface working state displays at least one of the following: product name (e.g., A120D), total output power (e.g., 150.0W), and displays the real-time output power and interface status of each working interface. The number of layout rows increases or decreases dynamically with the number of working interfaces. It can be seen that different numbers of interfaces will adapt to different layout methods.

[0217] In some embodiments, when the output device is in a multi-interface working state, the number of interface information rows dynamically increases or decreases with the number of working interfaces, and supports the concurrent display of the status of up to N interfaces (N≥2) on the same screen. Due to the limited display area, the number of working interfaces is negatively correlated with the number of rows of the first real-time status data displayed by each interface.

[0218] In some embodiments, when the server detects that the communication connection with the first charging device or the communication connection with the first application is interrupted, the information display board switches to a connection error prompt state and automatically returns to normal display after the communication connection is restored.

[0219] In some embodiments, the first charging device maintains a communication connection with the server through its built-in WiFi module, and the first application also maintains a communication connection with the server. When the first application is offline, the server continuously sends the first real-time status data to the first terminal device through a system-level remote push notification service to refresh the information display board.

[0220] In some embodiments, power bank devices establish a communication connection with a server via WiFi, and the server continuously receives first real-time status data reported by the power bank devices. When the first application is online, the complete first real-time status data is displayed within the first application. When the user presses the Home button to return to the desktop, causing the first application to switch from foreground to background operation or even be suspended by the operating system and enter offline mode, the server automatically activates a thumbnail-style information panel at the top of the first terminal device screen via a system-level remote push notification service, displaying core information such as the power bank's current battery level. In response to the user's click on the information panel, the information panel expands to a detailed display mode, presenting information such as product name, output power, battery level, overall operating mode, and temperature of the charged device. The first real-time status data is updated in real time at a frequency of 1 time per second, and the content of the information panel is completely synchronized with the status of the first charging device. In response to the user's long-press operation on the information panel, the thumbnail-style display mode can be switched back; when the user reopens the first application and puts it back online, the information panel automatically closes, and the first real-time status data is then displayed within the first application.

[0221] In some embodiments, the desktop charging station or charging plug establishes a communication connection with the server via WiFi. When the first application goes offline, the server activates a thumbnail-display information panel at the bottom of the lock screen of the first terminal device via a system-level remote push notification service. In response to a user's click on the information panel, it expands to a detailed display mode, presenting information such as the product name, total output power, charging progress of the device being charged, and the overall operating mode. The first real-time status data is updated in real time at a frequency of 1 time per second, and the content of the information panel is completely synchronized with the status of the first charging device.

[0222] The information display board is not limited to the system desktop and lock screen interface, but can also appear in any third-party application interface in the form of a floating window (floating ball), and can be further extended to be continuously visible under any interface; the activation mechanism of the information display board is not limited to the iOS system's Live Activity API, but can also achieve the same interactive effect through Android system's Dynamic Notification, Always-On Display, floating window service and other equivalent system capabilities; the information display board can also be projected onto the always-on mode of the watch face of wearable devices (such as smartwatches / wristbands), or displayed on the secondary screen display area of ​​the in-vehicle screen, so that users can view the first real-time status data of the first charging device without holding the first terminal device.

[0223] This application discloses a display information structure specification for a first charging device. Based on the physical attributes of the first charging device, the display information structure is divided into two display modes: energy storage devices (such as power banks) and non-energy storage output devices (such as charging plugs and desktop charging stations). For energy storage devices, their operating states are categorized as idle, output, self-charging, and simultaneous charging and discharging. The first-level (P0 level) status data includes at least one of the following: the power data of the device being charged, the temperature of the first charging device, the operating mode of the first charging device. The second-level (P1 level) status data includes at least one of the following: the product name of the first charging device, the output power of the first charging device, the estimated self-charging completion time of the first charging device, and the simultaneous charging and discharging status indicator of the first charging device. Furthermore, the core data, such as the power level, is displayed in a thumbnail mode on the external display interface of the first terminal device. For non-energy storage output products, the display mode is divided into single-interface display mode and multi-interface display mode based on the number of working interfaces. For single-interface working status, the P0 level status data includes at least one of the following: charging progress of the first charging device, charging threshold of the first charging device, working mode of the first charging device, output power or estimated charging time of the first charging device, and the product name of the first charging device. For multi-interface working status, the display layout is dynamically arranged and adjusted according to the number of working interfaces (e.g., two to five ports). The P0 level status data includes at least one of the following: the total global output power of the first charging device, the output power of each working interface, and the P1 level status data includes at least one of the following: the product name of the first charging device, the interface status of each working interface (e.g., acceleration, disabled, port priority allocation, and private protocol). The current power data can also be displayed in a thumbnail mode on the external display interface.

[0224] This application embodiment enables continuous visibility across all scenarios. Users can view the real-time status data of the first charging device in all background scenarios, such as when the screen is locked, on the desktop, or while using other applications, without needing to open the first application to check the charging status in real time. The display position of this application embodiment is flexible and unrestricted: the information display board is not limited to a fixed screen area and can be presented at the top, middle, or bottom of the screen, compatible with the display specifications of different models and operating systems. This application embodiment features intelligent form adaptation: a minimized display mode saves space, while a detailed display mode provides complete information; the two modes can be switched as needed, balancing screen efficiency and information completeness. This application embodiment achieves precise device type adaptation, targeting power bank-type devices and output-type devices. Each device defines a differentiated information architecture, with the displayed content highly matched to the device's functions, allowing users to quickly obtain the most critical charging parameters. This embodiment implements an adaptive layout for multiple interfaces; the display board layout for multi-interface devices dynamically adjusts according to the number of working interfaces, clearly presenting the independent status of each interface on a single screen without requiring manual page turning or switching. This embodiment achieves a consistent user experience; after the first charging device connects to the server via a Wi-Fi module, the same information display board interaction experience is provided regardless of whether the first application is online or offline. The operation steps in this embodiment are simple, reducing the need to open the first application to view information, making it readily available anytime, anywhere, and minimizing user intervention steps.

[0225] The following description continues to illustrate the exemplary structure of the data processing device 233 provided in the embodiments of this application as a software module. In some embodiments, such as Figure 2A As shown, the software modules stored in the data processing device 233 of the memory 230 may include: The data receiving module 2331 is used to receive the first real-time status data sent by the first charging device.

[0226] The status detection module 2332 is used to perform status detection on the first application of the first terminal device and obtain the detection result. The first application is an application used to manage and control the first charging device.

[0227] The first push module 2333 is used to push the first real-time status data to the first application when the detection result indicates that the first application is online, so as to display the first real-time status data on the first terminal device.

[0228] The second push module 2334 is used to push the first real-time status data to the operating system of the first terminal device when the detection result indicates that the first application is offline, so as to display the first real-time status data on the first terminal device.

[0229] In some embodiments, the data receiving module 2331 is further configured to establish a second communication connection with the first charging device; when the first charging device detects a change in the first real-time status data in real time, it receives the first real-time status data sent by the first charging device through the second communication connection.

[0230] In some embodiments, the data receiving module 2331 is further configured to construct a binding association between the login account of the first application and multiple first charging devices; and to receive first real-time status data reported by each of the first charging devices that have a binding association with the first login account.

[0231] In some embodiments, the state detection module 2332 is further configured to receive heartbeat messages continuously sent by the first application according to a preset time period, and record the receiving timestamp of each heartbeat message; determine the time difference between the current timestamp for detecting the first application and the most recent receiving timestamp; if the time difference is greater than or equal to a preset offline duration threshold, generate a detection result indicating that the first application is in an offline state; if the time difference is less than the offline duration threshold, generate a detection result indicating that the first application is in an online state.

[0232] In some embodiments, the first push module 2333 is further configured to establish a first communication connection between the server device and the first application; encapsulate the first real-time status data into a target push message and publish the target push message to a preset message topic; obtain the first application that has subscribed to the preset message topic; and send the target push message to the first application through the first communication connection with the first application so that the first application can parse the first real-time status data from the target push message.

[0233] In some embodiments, the first push module 2333 is further configured to push the first real-time status data to the operating system of the first terminal device if no delivery confirmation information for the target push message is received from the first application within a preset period, so as to display the first real-time status data on the first terminal device.

[0234] In some embodiments, the second push module 2334 is further configured to create a push task for the first terminal device by calling the remote push notification service of the operating system; write the first real-time status data into the push task; and send the push task to the operating system through the remote push notification service so that the operating system can read the first real-time status data from the push task.

[0235] In some embodiments, the second push module 2334 is further configured to set the push type of the push task to a background update type. At this time, displaying the first real-time status data on the first terminal device can be achieved by performing the following process: displaying the first real-time status data on the application-outside display interface of the first terminal device.

[0236] In some embodiments, the second push module 2334 is further configured to set the priority of the push task to a first priority corresponding to a first preset duration. In this case, displaying the first real-time status data on the first terminal device can be achieved by performing the following process: within the first preset duration after the operating system receives the push task, displaying the first real-time status data on the first terminal device.

[0237] In some embodiments, when the first application is offline, the first real-time status data is displayed in the application-outside display interface of the first terminal device; when the first application is online, the first real-time status data is displayed within the first application of the first terminal device.

[0238] The following description continues to illustrate the exemplary structure of the data processing apparatus 455 provided in the embodiments of this application as a software module. In some embodiments, such as Figure 2B As shown, the software modules stored in the data processing device 455 of the memory 450 may include: The first display module 4551 is used to receive first real-time status data of the first charging device sent by the server device through the first application when the first application of the first terminal device is online, and to display the first real-time status data on the first terminal device. The first application is an application used to manage the first charging device, and the first real-time status data is uploaded to the server device by the first charging device.

[0239] The second display module 4552 is used to receive first real-time status data sent by the server device through the operating system of the first terminal device when the first application is offline, and to display the first real-time status data on the first terminal device.

[0240] In some embodiments, the first display module 4551 is further configured to display first real-time status data within the first application when the first application is online.

[0241] In some embodiments, the second display module 4552 is further configured to display the first real-time status data of the first charging device on the off-application display interface of the first terminal device when the first application is offline.

[0242] In some embodiments, the second display module 4552 is further configured to display first real-time status data of the first charging device in a thumbnail display mode on the application-outside display interface of the first terminal device; and to display second real-time status data of the first charging device in a detail display mode in response to a display mode switching operation for the application-outside display interface; wherein the amount of data of the first real-time status data in the thumbnail display mode is less than the amount of data of the second real-time status data in the detail display mode.

[0243] In some embodiments, the first real-time status data displayed in thumbnail mode includes at least one of the following: power data of the first charging device, operating mode of the first charging device, and output power of the first charging device; the second real-time status data displayed in detail mode includes at least one of the following: power data of the first charging device, operating mode of the first charging device, output power of the first charging device, temperature of the first charging device, temperature of the device being charged corresponding to the first charging device, product name of the first charging device, estimated self-charging time of the first charging device, charging progress corresponding to the first charging device, estimated charging time corresponding to the first charging device, charging threshold corresponding to the first charging device, output power corresponding to each working interface, and interface status corresponding to each working interface.

[0244] In some embodiments, the second display module 4552 is further configured to perform any one of the following processes: displaying first real-time status data of the first charging device in an application-outside display interface in a first area of ​​the screen of the first terminal device, wherein the first area is any area in the screen; displaying the first real-time status data of the first charging device in an application-outside display interface in a second area of ​​the screen of the first terminal device, wherein the second area is an unoccupied blank area in the screen.

[0245] In some embodiments, the second display module 4552 is further configured to perform the following processing for each first real-time status data: when the first real-time status data is in a preset abnormal range, the first real-time status data is displayed on the application-outside display interface of the first terminal device based on a first visual style to indicate that the first real-time status data is in a preset abnormal range; when the first real-time status data is in a preset normal range, the first real-time status data is displayed on the application-outside display interface of the first terminal device based on a second visual style different from the first visual style to indicate that the first real-time status data is in a preset normal range.

[0246] The following description continues to illustrate the exemplary structure of the data processing apparatus 533 provided in the embodiments of this application as a software module. In some embodiments, such as Figure 2C As shown, the software modules stored in the data processing device 533 of the memory 530 may include: The data upload module 5331 is used to upload the first real-time status data of the first charging device itself to the server device; so that the server device can perform status detection on the first application of the first terminal device and obtain the detection result, wherein the first application is an application used to manage the first charging device; wherein, when the detection result indicates that the first application is online, the first real-time status data is pushed to the first application by the server device to be displayed on the first terminal device; when the detection result indicates that the first application is offline, the first real-time status data is pushed to the operating system of the first terminal device by the server device to be displayed on the first terminal device.

[0247] This application provides a computer program product, which includes a computer program or computer-executable instructions stored in a computer-readable storage medium. The processor of an electronic device (server device, terminal device, or charging device) reads the computer-executable instructions from the computer-readable storage medium and executes the computer-executable instructions, causing the electronic device to perform the data processing method described in this application.

[0248] This application provides a computer-readable storage medium storing computer-executable instructions or a computer program. When the computer-executable instructions or the computer program are executed by a processor, the processor will execute the data processing method provided in this application.

[0249] In some embodiments, the computer-readable storage medium may be a memory such as RAM, ROM, flash memory, magnetic surface memory, optical disk, or CD-ROM; or it may be a variety of devices including one or any combination of the above-mentioned memories.

[0250] In some embodiments, computer-executable instructions may take the form of programs, software, software modules, scripts, or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as stand-alone programs or as modules, components, subroutines, or other units suitable for use in a computing environment.

[0251] As an example, computer-executable instructions may, but do not necessarily, correspond to files in a file system. They may be part of a file of other programs or data, such as in one or more scripts stored in a Hyper Text Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple co-located files (e.g., files storing one or more modules, subroutines, or code sections).

[0252] As an example, computer-executable instructions can be deployed to execute on a single electronic device, or on multiple electronic devices located at one location, or on multiple electronic devices distributed across multiple locations and interconnected via a communication network.

[0253] In summary, through the embodiments of this application, after receiving the first real-time status data sent by the first charging device, the server device first performs status detection on the first application of the first terminal device. Based on the detection result, it selects between two paths: pushing to the first application and pushing to the operating system of the first terminal device, thereby displaying the first real-time status data on the first terminal device. From the perspective of the data delivery link, the server device no longer relies solely on the first application as a single receiver for delivering the first real-time status data, but uses the running status of the first application as the basis for path selection. Regardless of whether the first application is online or offline, the server device can find a path matching the current running status to deliver the first real-time status data to the first terminal device, avoiding the problem that the first real-time status data cannot be delivered when the first application is offline. This ensures that the first real-time status data generated by the first charging device can be stably and continuously presented on the first terminal device. From the perspective of the user interaction flow, since the server device changes the first real-time status data to be pushed to the operating system of the first terminal device when the first application is offline, the first real-time status data can be directly displayed on the first terminal device through the operating system, a level that is not constrained by the running status of the first application itself. Without the need to reopen the first application, wait for the first application to re-establish a connection with the server device, and then search for real-time status data within the first application, the first charging device's real-time status data can be presented to the user promptly, regardless of whether the first terminal device is locked, the user is using another application, or the first application has been switched to the background, suspended by the operating system, or closed (i.e., offline). This improves data viewing efficiency and human-computer interaction efficiency. From the server device's distribution behavior, since the server device has already determined the actual operating status of the first application through status detection before distributing the first real-time status data, it will not send invalid data to the first application when it is offline, nor will it bypass the first application and distribute data through the operating system when the first application is online. This more targeted distribution behavior effectively avoids the waste of server device resources caused by invalid distributions. From the first terminal device's receiving behavior, since the first real-time status data is received and triggered for display by the operating system when the first application is offline, the first terminal device does not need to keep the first application running in the background for an extended period to receive the first real-time status data, effectively reducing the power consumption of the first terminal device.

[0254] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, and improvements made within the spirit and scope of this application are included within the scope of protection of this application.

Claims

1. A data processing method, characterized by, The method includes: Receive the first real-time status data sent by the first charging device; A status detection is performed on the first application of the first terminal device to obtain a detection result, wherein the first application is an application used to manage the first charging device; When the detection result indicates that the first application is online, the first real-time status data is pushed to the first application so that the first real-time status data can be displayed on the first terminal device. When the detection result indicates that the first application is offline, the first real-time status data is pushed to the operating system of the first terminal device to display the first real-time status data on the first terminal device.

2. The method of claim 1, wherein, The step of performing state detection on the first application of the first terminal device to obtain the detection result includes: Receive heartbeat messages continuously sent by the first application according to a preset time period, and record the receiving timestamp of each heartbeat message; Determine the time difference between the current timestamp of the first application being detected and the most recent received timestamp; If the time difference is greater than or equal to a preset offline duration threshold, a detection result indicating that the first application is in an offline state is generated. If the time difference is less than the offline duration threshold, a detection result indicating that the first application is online is generated.

3. The method according to claim 1 or 2, characterized in that, Before pushing the first real-time status data to the first application, the method further includes: Establish a first communication connection between the server device and the first application; The step of pushing the first real-time status data to the first application includes: The first real-time status data is encapsulated into a target push message, and the target push message is published to a preset message topic; Obtain the first application that subscribes to the preset message topic; The server device sends the target push message to the first application through the first communication connection with the first application, so that the first application can parse the first real-time status data from the target push message.

4. The method of claim 3, wherein, After the server device sends the target push message to the first application through the first communication connection with the first application, the method further includes: If no delivery confirmation information for the target push message is received from the first application within a preset period, the first real-time status data is pushed to the operating system of the first terminal device so as to display the first real-time status data on the first terminal device.

5. The method according to claim 1 or 2, characterized in that, The step of pushing the first real-time status data to the operating system of the first terminal device includes: A push task for the first terminal device is created by invoking the remote push notification service of the operating system. Write the first real-time status data into the push task; The push task is sent to the operating system via the remote push notification service, so that the operating system can read the first real-time status data from the push task.

6. The method of claim 5, wherein, Before sending the push task to the operating system via the remote push notification service, the method further includes: Set the push type of the push task to background update type; The step of displaying the first real-time status data on the first terminal device includes: The first real-time status data is displayed on the external display interface of the first terminal device.

7. The method of claim 5, wherein, Before sending the push task to the operating system via the remote push notification service, the method further includes: Set the priority of the push task to the first priority corresponding to the first preset duration; The step of displaying the first real-time status data on the first terminal device includes: Within a first preset time period after the operating system receives the push task, the first real-time status data is displayed on the first terminal device.

8. The method of claim 1, wherein, Before receiving the first real-time status data sent by the first charging device, the method further includes: Establish a second communication connection with the first charging device; The receipt of the first real-time status data sent by the first charging device includes: When the first charging device detects a change in the first real-time status data, it receives the first real-time status data sent by the first charging device through the second communication connection.

9. The method of claim 1, wherein, The method further includes: Establish a binding association between the first login account of the first application and multiple first charging devices; The receipt of the first real-time status data sent by the first charging device includes: Receive first real-time status data reported by each of the first charging devices that have the binding relationship with the first login account.

10. The method according to claim 1, characterized in that, When the first application is offline, displaying the first real-time status data on the first terminal device includes: The first real-time status data is displayed in the application-external display interface of the first terminal device; When the first application is online, displaying the first real-time status data on the first terminal device includes: The first real-time status data is displayed within the first application of the first terminal device.

11. A data processing method, characterized by, Applied to a first terminal device, the method includes: When the first application on the first terminal device is online, the first real-time status data of the first charging device sent by the server device is received through the first application, and the first real-time status data is displayed on the first terminal device. The first application is an application used to manage the first charging device, and the first real-time status data is uploaded by the first charging device to the server device. When the first application is offline, the first real-time status data sent by the server device is received through the operating system of the first terminal device, and the first real-time status data is displayed on the first terminal device.

12. The method according to claim 11, characterized in that, When the first application is online, displaying the first real-time status data on the first terminal device includes: Display the first real-time status data within the first application; When the first application is offline, displaying the first real-time status data on the first terminal device includes: The first real-time status data of the first charging device is displayed on the external display interface of the first terminal device.

13. The method of claim 12, wherein, The display of the first real-time status data of the first charging device on the external display interface of the first terminal device includes: The first real-time status data of the first charging device is displayed in a thumbnail display mode on the external display interface of the first terminal device. The method further includes: In response to a display mode switching operation for the external display interface, the second real-time status data of the first charging device is displayed in a details display mode; The amount of data in the first real-time status data under the thumbnail display mode is less than the amount of data in the second real-time status data under the details display mode.

14. The method according to claim 13, characterized in that, The first real-time status data displayed in the thumbnail display mode includes at least one of the following: the power data of the first charging device, the operating mode of the first charging device, and the output power of the first charging device; The second real-time status data displayed in the details display mode includes at least one of the following: the power data of the first charging device, the working mode of the first charging device, the output power of the first charging device, the temperature of the first charging device, the temperature of the device being charged corresponding to the first charging device, the product name of the first charging device, the estimated self-charging time of the first charging device, the charging progress corresponding to the first charging device, the estimated charging time corresponding to the first charging device, the charging threshold corresponding to the first charging device, the output power corresponding to each working interface, and the interface status corresponding to each working interface.

15. The method of claim 12, wherein, The display of the first real-time status data of the first charging device on the external display interface of the first terminal device includes: Perform any of the following processes: On the application-outside display interface located in the first area of ​​the screen of the first terminal device, the first real-time status data of the first charging device is displayed, wherein the first area is any area in the screen; On the application-outside display interface located in the second area of ​​the screen of the first terminal device, the first real-time status data of the first charging device is displayed, wherein the second area is an unoccupied blank area on the screen.

16. The method of claim 12, wherein, The display of the first real-time status data of the first charging device on the external display interface of the first terminal device includes: For each of the first real-time status data, perform the following processing: When the first real-time status data is in a preset abnormal range, the first real-time status data is displayed on the application-outside display interface of the first terminal device based on a first visual style to indicate that the first real-time status data is in a preset abnormal range. When the first real-time status data is within a preset normal range, the first real-time status data is displayed on the application-outside display interface of the first terminal device based on a second visual style different from the first visual style, so as to indicate that the first real-time status data is within a preset normal range.

17. A data processing method, characterized by, Applied to a first charging device, the method includes: Upload the first real-time status data of the first charging device to the server device; The server device performs status detection on the first application of the first terminal device and obtains the detection result, wherein the first application is an application used to manage the first charging device. Specifically, when the detection result indicates that the first application is online, the first real-time status data is pushed to the first application by the server device to be displayed on the first terminal device; when the detection result indicates that the first application is offline, the first real-time status data is pushed to the operating system of the first terminal device by the server device to be displayed on the first terminal device.

18. A data processing apparatus, characterized by The device includes: The data receiving module is used to receive the first real-time status data sent by the first charging device; The status detection module is used to perform status detection on the first application of the first terminal device and obtain the detection result, wherein the first application is an application used to manage the first charging device. The first push module is used to push the first real-time status data to the first application when the detection result indicates that the first application is online, so as to display the first real-time status data on the first terminal device. The second push module is used to push the first real-time status data to the operating system of the first terminal device when the detection result indicates that the first application is offline, so as to display the first real-time status data on the first terminal device.

19. A data processing apparatus, characterized by Applied to a first terminal device, the device includes: The first display module is configured to receive first real-time status data of the first charging device sent by the server device through the first application of the first terminal device when the first application of the first terminal device is online, and display the first real-time status data on the first terminal device. The first application is an application for managing the first charging device, and the first real-time status data is uploaded by the first charging device to the server device. The second display module is used to receive the first real-time status data sent by the server device through the operating system of the first terminal device when the first application is offline, and to display the first real-time status data on the first terminal device.

20. A data processing apparatus, characterized in that, Applied to a first charging device, the device includes: The data upload module is used to upload the first real-time status data of the first charging device itself to the server device; The server device performs status detection on the first application of the first terminal device and obtains the detection result, wherein the first application is an application used to manage the first charging device. Specifically, when the detection result indicates that the first application is online, the first real-time status data is pushed to the first application by the server device to be displayed on the first terminal device; when the detection result indicates that the first application is offline, the first real-time status data is pushed to the operating system of the first terminal device by the server device to be displayed on the first terminal device.

21. A server device, comprising: The server device includes: Memory is used to store executable instructions or computer programs. A processor, when executing computer-executable instructions or computer programs stored in the memory, implements the data processing method according to any one of claims 1 to 10.

22. A terminal device, comprising: The terminal device includes: Memory is used to store executable instructions or computer programs. A processor, when executing computer-executable instructions or computer programs stored in the memory, implements the data processing method according to any one of claims 11 to 16.

23. A charging device, comprising: The charging device includes: Memory is used to store executable instructions or computer programs. A processor, when executing computer-executable instructions or computer programs stored in the memory, implements the data processing method of claim 17.

24. A computer-readable storage medium storing computer-executable instructions or a computer program, wherein the computer-executable instructions or the computer program comprise the steps of: When the computer-executable instructions or computer program are executed by a processor, they implement the data processing method according to any one of claims 1 to 10, or the data processing method according to any one of claims 11 to 16, or the data processing method according to claim 17.

25. A computer program product comprising computer-executable instructions or a computer program, characterized in that, When the computer-executable instructions or computer program are executed by a processor, they implement the data processing method according to any one of claims 1 to 10, or the data processing method according to any one of claims 11 to 16, or the data processing method according to claim 17.