A method for adaptive interconnection and data synchronization of a mobile power supply and a smart device

By building a digital twin model and adaptive interconnection between power banks and smart devices, and dynamically adjusting the data synchronization strategy, the reliability and intelligence of data synchronization between power banks and smart devices are solved, realizing bidirectional, hierarchical, and dynamic data collaboration, and improving the user experience.

CN122173235APending Publication Date: 2026-06-09HUAYI INTERACTIVE (SHENZHEN) NETWORK CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HUAYI INTERACTIVE (SHENZHEN) NETWORK CO LTD
Filing Date
2026-03-06
Publication Date
2026-06-09

AI Technical Summary

Technical Problem

Existing technologies struggle to achieve reliable and intelligent data synchronization between power banks and smart devices, and there is a risk of sudden interruptions during data synchronization.

Method used

By building a digital twin model using sensors built into the power bank, the system can predict battery energy change trends and establish adaptive interconnection with smart devices. It can also dynamically generate a data synchronization task queue and adjust the synchronization strategy according to the energy state to ensure that data flow and energy flow are coordinated.

Benefits of technology

It enables bidirectional, hierarchical, and dynamic data collaboration between power banks and smart devices, improving the continuity and reliability of data synchronization and enhancing the smoothness of the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122173235A_ABST
    Figure CN122173235A_ABST
Patent Text Reader

Abstract

The application provides a kind of mobile power supply and intelligent equipment adaptive interconnection and data synchronization method, comprising: mobile power supply collects battery parameters of battery and constructs digital twin model in combination with historical charge-discharge data;Predict the energy change trend of battery in the future;Adaptive interconnection is established with intelligent equipment, and the capability description information of both ends is exchanged and the interconnection context of both ends is established;The energy change trend is used as a constraint condition, the priority of the data reported by the intelligent equipment is combined, and a data synchronization task queue is generated;According to the data synchronization task queue, the data flow of both sides is synchronized along the direction of energy flow;In the data synchronization process, the battery parameters are fed back to the digital twin model to correct the prediction trend, and if it is detected that the energy change deviates from the expectation by more than a safety threshold, the priority of the data synchronization task queue is adjusted or the low-priority synchronization task is interrupted.The application realizes the two-way, hierarchical and dynamic data collaboration between power supply and equipment, and improves the intelligent level and user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing technology, and more specifically to an adaptive interconnection and data synchronization method between a power bank and a smart device. Background Technology

[0002] With the widespread adoption of mobile smart terminals and their increasing functional integration, users are placing higher demands on the interconnectivity and data management between devices. As a core peripheral device for ensuring the battery life of mobile devices, power banks have evolved from simply replenishing power to multi-functional integration, with some high-end power banks beginning to attempt limited data transmission while charging. However, existing technologies still have significant limitations, making it difficult to meet the requirements for reliable and intelligent data synchronization. Summary of the Invention

[0003] Based on the above-mentioned problems, this invention proposes an adaptive interconnection and data synchronization method between a power bank and a smart device. Through this invention, a new energy-sensing driven data synchronization mechanism is realized, which reduces abrupt interruptions during the synchronization process, improves the continuity and reliability of data synchronization, realizes bidirectional, hierarchical, and dynamic data collaboration between the power bank and the smart device, and enhances the overall system's intelligence level and the smoothness of the user experience.

[0004] In view of this, the present invention proposes an adaptive interconnection and data synchronization method between a power bank and a smart device, comprising: The power bank collects battery parameters such as state of charge, battery health, and temperature through built-in sensors, and combines them with historical charging and discharging data to build a digital twin model locally on the power bank. This digital twin model is then used to predict the energy change trend of the battery in the future. The power bank establishes an adaptive interconnection with the smart device through a short-range communication protocol, exchanging capability description information between the two ends during the handshake process, and establishing a consensus interconnection context for the two ends; Based on the interconnection context, the power bank uses the energy change trend predicted by the digital twin model as a constraint, and combines the priority of various data reported by smart devices to dynamically generate a data synchronization task queue. High-priority data is scheduled to be executed first when energy is sufficient, while low-priority data is scheduled to be executed on demand or delayed when energy is sufficient. According to the data synchronization task queue, during the charging process, the power bank synchronizes the user behavior and environmental perception data stored on its own to the smart device. During the discharging process, the smart device synchronizes the sensor data and operation log data generated locally to the power bank. The data streams of both parties flow in coordination with the energy flow, realizing bidirectional data synchronization. During the data synchronization process, the power bank continuously feeds real-time battery parameters back to the digital twin model to correct the predicted trend. If the energy change is detected to deviate from the expected value by more than the preset safety threshold, the priority of the data synchronization task queue will be automatically adjusted or low-priority synchronization tasks will be interrupted to ensure the safe availability of the remaining energy of the power bank.

[0005] Optionally, the portable power bank collects battery parameters such as state of charge, battery health, and temperature using built-in sensors, and combines this with historical charge and discharge data to build a digital twin model locally on the power bank. The step of using this digital twin model to predict the energy change trend of the battery over a future period includes: The power bank uses a built-in current sensor, temperature sensor, and voltage acquisition circuit to continuously collect the battery's terminal voltage, charging and discharging current, and temperature during each charging or discharging event. It also stores the start and end times, start and end states of charge, and corresponding current-temperature sequence of each charging and discharging event as a complete usage record locally on the power bank. After accumulating a preset number of usage records, the power bank uses the current state of charge and health of the battery as a benchmark, and utilizes the correspondence between current, temperature and state of charge changes in the locally stored historical usage records to build a digital twin model locally. The digital twin model includes a predictive sub-model that takes usage behavior as input and the trend of state of charge change as output. Whenever a new charging or discharging event occurs in the power bank and the corresponding usage record is collected, the new record is compared with the historical records used when the prediction sub-model was built. If there is a deviation between the actual state of charge change reflected in the new record and the prediction result of the prediction sub-model, the new record is used to correct the parameters of the prediction sub-model so that the prediction sub-model can iteratively approach the actual usage characteristics of the power bank itself. Before the power bank and smart device are about to establish an interconnection, the iteratively updated prediction sub-model is invoked. Using the current state of charge and the current ambient temperature as initial conditions, the trend of the battery's state of charge change in the future period is predicted to obtain the predicted trend. This predicted trend is then used as the energy constraint basis for the data synchronization task queue to output the data. During the feedback process, if the actual state of charge change deviates significantly from the predicted trend, the deviation information is written into the usage record and triggers a further correction of the prediction sub-model, so that the prediction capability of the prediction sub-model continues to improve with the long-term use of the power bank.

[0006] Optionally, the mobile power bank establishes an adaptive interconnection with the smart device via a short-range communication protocol, exchanges capability description information between the two ends during the handshake process, and establishes a consensus interconnection context for the two ends, including the following steps: The power bank initiates an interconnection request to the smart device via a short-range communication protocol. The interconnection request carries the first capability description information of the power bank. The first capability description information includes: the battery state of charge, battery health status, current energy status and predicted trend currently output by the digital twin model, as well as the types of data and storage status supported by the power bank itself. After receiving the interconnection request, the smart device will use the types of data it supports for synchronization and the synchronization priority of each type of data as the second capability description information on the smart device side, and send the second capability description information back to the power bank as response information. After receiving the second capability description information from the smart device, the power bank summarizes the first and second capability description information, uses the power bank's energy state and predicted trend as constraints, and combines various data reported by the smart device and their synchronization priorities to generate a consensus interconnection context between the two ends. The power bank sends the generated interconnection context to the smart device, and the smart device performs a consistency check with the known information on its own end after receiving it. If the consistency check passes, both ends confirm that the interconnection context is valid, and the adaptive interconnection is established. If the verification fails, the smart device will send the error information to the power bank, and the two ends will re-execute the interconnection process. The interconnection context is used as a common basis for generating the data synchronization task queue. The power bank side obtains the priority information of the smart device data based on the interconnection context, and the smart device side obtains the power bank's energy constraint information based on the interconnection context. The two ends work together to perform subsequent data synchronization based on the priority information and energy constraint information.

[0007] Optionally, the step of dynamically generating a data synchronization task queue based on the interconnection context, using the energy change trend predicted by the digital twin model as a constraint, and combining the priority of various data reported by smart devices, and prioritizing high-priority data for execution during periods of sufficient energy, while scheduling low-priority data for on-demand or delayed execution during periods of ample energy, includes: The power bank extracts the energy change trend from the interconnection context. The energy change trend describes the trajectory of the battery state of charge change in a future time period in the form of a time series, and divides the time period into several energy-sufficient stages and energy-scarce stages according to the predicted state of charge. The power bank extracts various types of data reported by smart devices and their corresponding synchronization priorities from the interconnection context. Based on the priority, the data is divided into three levels: high-priority data, medium-priority data, and low-priority data, forming a data priority mapping table. The power bank associates the energy-sufficient phase with high-priority data, prioritizing the synchronization of high-priority data at the start of the energy-sufficient phase to ensure that the most important data is synchronized first when the energy status is good; it schedules the synchronization of medium-priority data to be executed as needed during the remaining time of the energy-sufficient phase; and it schedules the synchronization of low-priority data to be executed during the energy surplus period before the energy shortage phase, or marks it as a delayed execution status to be processed in the next energy-sufficient phase. Based on the data allocation results associated with different priorities and energy-sufficient or energy-scarce phases, the power bank generates a data synchronization task queue in chronological order. This data synchronization task queue uses task number, data type corresponding to the task, predetermined execution time window, and energy status constraints as key attributes to form an ordered execution list containing all data to be synchronized. The generated data synchronization task queue will serve as the basis for bidirectional data synchronization execution. The power bank and the smart device will work together to perform data synchronization operations according to the task order and time window constraints in the data synchronization task queue. When the execution time window of a certain task in the queue arrives, the corresponding data transmission will be automatically triggered.

[0008] Optionally, the step of synchronizing data according to the data synchronization task queue, whereby the power bank synchronizes user behavior and environmental perception data stored locally to the smart device during charging, and the smart device synchronizes locally generated sensor data and operation logs to the power bank during discharging, with the data streams of both parties flowing in tandem with the energy flow direction to achieve bidirectional data synchronization, includes: The power bank monitors the current charging and discharging status in real time through its built-in charging and discharging status detection circuit, and uses this charging and discharging status as the trigger condition for data flow direction scheduling. When the power bank detects that it is in a charging state, it determines that energy is flowing into the power bank from the outside. The power bank extracts the data synchronization task from the data synchronization task queue from the smart device to the power bank and allocates a higher communication bandwidth to the direction of the power bank than the bandwidth allocated to the direction of the power bank to the smart device. When the power bank detects that it is in a discharging state, it determines that energy is flowing from the power bank to the smart device. The power bank extracts the data synchronization task from the task queue to the smart device and allocates a higher communication bandwidth to this direction than the bandwidth allocated to the direction from the smart device to the power bank, so that the power bank can efficiently synchronize local data to the smart device. During the charging or discharging process, the power bank and the smart device execute the scheduled synchronization tasks in the task queue in sequence according to the determined data flow direction and bandwidth allocation scheme, until all the high-priority tasks corresponding to the current energy state are completed, or the charging or discharging state changes and the data flow direction needs to be adjusted. Whenever the charging / discharging state changes, the power bank reschedules the data flow direction and bandwidth allocation according to the new energy flow direction, ensuring that the data flow always keeps in directional coordination with the energy flow, and achieving dynamic adaptation of bidirectional data synchronization.

[0009] Optionally, the step of continuously feeding real-time battery parameters back to the digital twin model during data synchronization to correct the predicted trend, and automatically adjusting the priority of the data synchronization task queue or interrupting low-priority synchronization tasks if the detected energy change deviates from the expectation by more than a preset safety threshold, to ensure the safe availability of the remaining energy of the power bank, includes: During the data synchronization process, the power bank continuously collects real-time battery parameters through its built-in sensors and inputs these parameters as feedback information into the digital twin model to correct the model's prediction of future energy change trends. The power bank compares the current state of charge collected in real time with the predicted state of charge of the digital twin model at the current moment, calculates the energy deviation value between the two, and compares the energy deviation value with a preset safety threshold to determine whether the actual energy change deviates from the expectation. If the energy deviation value does not exceed the preset safety threshold, the prediction trend of the digital twin model is determined to be still valid. The power bank continues to perform data synchronization according to the original data synchronization task queue, and at the same time, the real-time feedback information is used for the background iterative correction of the model. If the energy deviation value exceeds the preset safety threshold, it is determined that the actual energy state has significantly deviated from the predicted trend. The power bank immediately triggers the dynamic adjustment mechanism of the task queue, which includes: marking low-priority synchronization tasks that have not yet been executed in the data synchronization task queue as interrupted and pausing their execution; delaying the scheduled execution time window of medium-priority tasks; and retaining only high-priority tasks to continue execution, so as to ensure that the most important data synchronization is completed first in the case of energy shortage. After the data synchronization task queue is adjusted according to the dynamic adjustment mechanism of the task queue, the power bank calls the digital twin model again to predict the energy trend based on real-time feedback information, and re-evaluates the current energy balance based on the new prediction results. If the energy status is restored to a safe range, the interrupted or delayed tasks will be reinstated into the data synchronization task queue and resumed. If energy is still scarce, the current data synchronization task queue adjustment strategy will be maintained until data synchronization is completed or the charging / discharging state changes.

[0010] Optionally, the formula for predicting the energy change trend of the battery in the future time period using this digital twin model is as follows:

[0011] in, The remaining available energy at time t is the predicted energy. This represents the maximum usable capacity of the battery as determined by its current state of health (SOH), reflecting the battery's actual energy ceiling. The historical weighted average of the discharge current up to time t is normalized to [0, 1] and used to characterize the cumulative effect of recent discharge intensity on energy consumption. The deviation of the ambient temperature at time t from the baseline value of the battery's optimal operating temperature is normalized to [0, 1], reflecting the attenuation effect of temperature deviation on the battery's usable energy. The cumulative charge-discharge cycle count of the battery is normalized to [0, 1] to characterize the long-term degradation of energy capacity due to cycle aging. , , The weighting coefficients for the effects of three factors—discharge current, temperature environment, and cyclic degradation—are respectively, and satisfy the following conditions: This is used to reflect the relative contribution of each factor to energy decay; To unify the weighting time decay constant, the influence of the three factors naturally decays as the prediction time domain extends, avoiding excessive reliance on the current instantaneous state for far-future predictions; t is the time variable within the prediction time window relative to the current moment.

[0012] Optionally, in the steps of establishing an adaptive interconnection between the power bank and the smart device via a short-range communication protocol, exchanging capability description information between the two ends during the handshake process, and establishing a consensus interconnection context for both ends, when establishing the adaptive interconnection, after the handshake information exchange, a confidence level assessment is performed on the established interconnection context. A valid interconnection is only established when the confidence level exceeds a preset security threshold. The confidence level assessment formula is as follows:

[0013]

[0014] The ruling rule is: only when If the handshake is successful, the interconnection context is established; otherwise, the handshake is re-initiated or the interconnection is delayed. in, The overall confidence score for the interconnection context, with a value range of [0, 1], is used to measure whether the information obtained from the current handshake exchange between the two ends is reliable and sufficient; It is a communication signal quality index, normalized to [0, 1], and is derived from communication layer parameters such as signal strength and bit error rate. It reflects the physical layer reliability of the handshake information transmission. It is an information timeliness indicator, and is an exponential decay function used to reflect the degree of effectiveness decay of handshake information from acquisition to the current evaluation time; The time interval between the information acquisition time and the current evaluation time; This is the information timeliness decay constant, which characterizes the rate at which information becomes outdated. The dual-end capability matching index is normalized to [0, 1]. It is calculated from the matching degree between the current energy state of the power bank and the data synchronization capability reported by the smart device, reflecting whether the two ends have the conditions for effective collaboration. , , The weighting coefficients are for the three dimensions of signal quality, information timeliness, and capability matching, respectively, satisfying... ; The confidence threshold is used to determine whether the interconnection context is trustworthy.

[0015] Optionally, in the dynamically generated data synchronization task queue, the dynamic priority of each task to be synchronized is calculated using the following formula:

[0016] in, This is the dynamic priority score of the nth task to be synchronized. The higher the value, the higher it is ranked in the task queue and the earlier it will be executed. The inherent importance of the nth task reported by the smart device, with a value range of [0, 1], reflects the importance of this type of data to the user or application; Let be the remaining battery energy ratio predicted by the digital twin model at time t, with a value range of [0, 1]. This is the nonlinear amplification index of the energy margin. This is used to make the priority response to energy margin nonlinear. When the energy margin is sufficient, the priority is increased less, and when the energy margin becomes scarce, the priority drops sharply, forming a step-by-step protection effect under energy constraints. The estimated data synchronization resource consumption weight for the nth task is [0, 1], which reflects the proportion of communication and energy consumption during the execution of the task; n is the task sequence number index.

[0017] Optionally, in the step of synchronizing data according to the data synchronization task queue, the power bank synchronizes user behavior and environmental perception data stored locally to the smart device during charging, and the smart device synchronizes locally generated sensor data and operation logs to the power bank during discharging. The data streams of both parties flow in tandem with the energy flow direction to achieve bidirectional data synchronization. During bidirectional data synchronization, the communication bandwidth is dynamically allocated according to the current energy flow direction, using the following formula:

[0018] in, The synchronization bandwidth allocated to the data flow direction d; This represents the total available bandwidth of the current communication channel. The energy flow direction coupling coefficient has a value range of [ 1, +1]; When the power bank is charging When in a discharge state , The magnitude reflects the intensity of the current energy flow; A bandwidth allocation sensitivity parameter, with a value range of (0, 1), is used to control the response sensitivity of bandwidth deflection as the energy flow coupling coefficient changes, avoiding overly aggressive bandwidth allocation; d is the data flow direction indicator. ,in This indicates that the smart device is moving towards the power bank. This indicates that power banks are geared towards smart devices; For the direction sign function, when The value is +1 when... The time value is 1. Used to map the direction of data flow to algebraic symbols for inclusion in formula calculations.

[0019] The technical solution of this invention provides an adaptive interconnection and data synchronization method between a power bank and a smart device. By using the energy state and predicted trend of the power bank as the core scheduling basis for data synchronization, it enables data flow and energy flow to form a synergistic coupling, avoiding data synchronization interruption and loss due to energy depletion, and realizing a new energy-sensing-driven data synchronization mechanism. This allows data synchronization strategies to be adjusted in advance, reducing sudden interruptions during the synchronization process and improving the continuity and reliability of data synchronization. Furthermore, it enables the power bank to become a collaborative node with data interaction and intelligent scheduling capabilities, achieving bidirectional, hierarchical, and dynamic data collaboration between the power bank and the smart device, thereby enhancing the overall system's intelligence level and the smoothness of the user experience. Attached Figure Description

[0020] Figure 1 This is a flowchart of an adaptive interconnection and data synchronization method between a power bank and a smart device provided in one embodiment of the present invention. Detailed Implementation

[0021] To better understand the above-mentioned objectives, features, and advantages of the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in these embodiments can be combined with each other.

[0022] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and therefore the scope of protection of the invention is not limited to the specific embodiments disclosed below.

[0023] The terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or apparatuses.

[0024] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0025] The following reference Figure 1 This describes an adaptive interconnection and data synchronization method between a power bank and a smart device, provided by some embodiments of the present invention.

[0026] like Figure 1 As shown, one embodiment of the present invention provides an adaptive interconnection and data synchronization method between a power bank and a smart device, comprising: The power bank collects battery parameters such as state of charge (SOC), state of health (SOH), and temperature through built-in sensors, and combines them with historical charge and discharge data to build a digital twin model locally on the power bank. This digital twin model is then used to predict the energy change trend of the battery in the future. Power banks establish adaptive interconnection with smart devices through short-range communication protocols (such as Bluetooth / Wi-Fi), exchange capability description information between the two ends during the handshake process, and establish a consensus interconnection context for the two ends; Based on the interconnection context, the power bank uses the energy change trend predicted by the digital twin model as a constraint, and combines the priority of various data reported by smart devices to dynamically generate a data synchronization task queue. High-priority data is scheduled to be executed first when energy is sufficient, while low-priority data is scheduled to be executed on demand or delayed when energy is sufficient. According to the data synchronization task queue, during the charging process, the power bank synchronizes the user behavior and environmental perception data stored on its own to the smart device. During the discharging process, the smart device synchronizes the sensor data and operation log data generated locally to the power bank. The data streams of both parties flow in coordination with the energy flow, realizing bidirectional data synchronization. During the data synchronization process, the power bank continuously feeds real-time battery parameters back to the digital twin model to correct the predicted trend. If the energy change is detected to deviate from the expected value by more than the preset safety threshold, the priority of the data synchronization task queue will be automatically adjusted or low-priority synchronization tasks will be interrupted to ensure the safe availability of the remaining energy of the power bank.

[0027] The technical solution of this embodiment uses the energy state and predicted trend of the power bank as the core scheduling basis for data synchronization, enabling data flow and energy flow to form a cooperative coupling. This avoids data synchronization interruption and loss due to energy depletion, realizing a new energy-sensing-driven data synchronization mechanism. It allows data synchronization strategies to be adjusted in advance, reducing sudden interruptions during the synchronization process and improving the continuity and reliability of data synchronization. Furthermore, it transforms the power bank into a collaborative node with data interaction and intelligent scheduling capabilities, achieving bidirectional, hierarchical, and dynamic data collaboration between the power bank and smart devices, thereby enhancing the overall system's intelligence level and the smoothness of the user experience.

[0028] In some possible embodiments of the present invention, the portable power bank collects battery parameters such as state of charge, battery health, and temperature through built-in sensors, and combines them with historical charge and discharge data to build a digital twin model locally on the portable power bank. The step of using this digital twin model to predict the energy change trend of the battery over a future time period includes: The power bank uses a built-in current sensor, temperature sensor, and voltage acquisition circuit to continuously collect the battery's terminal voltage, charging and discharging current, and temperature during each charging or discharging event. It also stores the start and end times, start and end states of charge, and corresponding current-temperature sequence of each charging and discharging event as a complete usage record locally on the power bank. After accumulating a preset number of usage records, the power bank uses the current state of charge and health of the battery as a benchmark, and utilizes the correspondence between current, temperature and state of charge changes in the locally stored historical usage records to build a digital twin model locally. The digital twin model includes a predictive sub-model that takes usage behavior as input and the trend of state of charge change as output. Whenever a new charging or discharging event occurs in the power bank and the corresponding usage record is collected, the new record is compared with the historical records used when the prediction sub-model was built. If there is a deviation between the actual state of charge change reflected in the new record and the prediction result of the prediction sub-model, the new record is used to correct the parameters of the prediction sub-model so that the prediction sub-model can iteratively approach the actual usage characteristics of the power bank itself. In this step, at the end of a new charging / discharging event, the power bank retrieves the complete usage record of the event from local storage, including the actual state of charge (SCC) change trajectory, current change sequence, and temperature change sequence during the charging / discharging process. Simultaneously, it calls the prediction sub-model, using the initial SCC and environmental conditions at the start of the event as input, to perform a new prediction calculation, obtaining the predicted SCC change trajectory for the event. The actual SCC change trajectory is compared with the predicted SCC change trajectory time-by-time, and the deviation at key time points is calculated. If the deviation exceeds a preset correction trigger threshold, the current parameters of the prediction sub-model are determined to no longer accurately reflect the actual usage characteristics of the power bank, requiring parameter correction. This new record is used as an incremental training sample, and gradient descent or other parameter optimization algorithms are employed to make minor adjustments to the key parameters in the prediction sub-model related to the charging / discharging event, reducing the deviation between the corrected model's prediction and the actual result to an acceptable range. This completes the incremental correction and updates the model parameter storage. This step implements a single-event-driven incremental correction mechanism for the prediction sub-model, enabling the model to adaptively adjust parameters immediately after each charging and discharging event based on actual usage. This avoids the high computational overhead and time delay of traditional batch retraining, and improves the model's speed of approximation and prediction accuracy of individual power bank usage characteristics.

[0029] Before the power bank and smart device are about to establish an interconnection, the iteratively updated prediction sub-model is invoked. Using the current state of charge and the current ambient temperature as initial conditions, the trend of the battery's state of charge change in the future period is predicted to obtain the predicted trend. This predicted trend is then used as the energy constraint basis for the data synchronization task queue to output the data. During the feedback process, if the actual state of charge change deviates significantly from the predicted trend, the deviation information is written into the usage record and triggers a further correction of the prediction sub-model, so that the prediction capability of the prediction sub-model continues to improve with the long-term use of the power bank.

[0030] In this embodiment, the model is driven by the historical charging and discharging usage records stored locally by the power bank. This avoids the problem of deploying complex mechanism models in scenarios where the computing power of portable devices is limited. At the same time, it enables the prediction model to naturally fit the actual usage habits and environment of the power bank, realizing personalized and lightweight modeling based on its own usage behavior. By comparing the actual results after each charging and discharging event with the model prediction results and providing feedback for correction, the accuracy of the model continues to improve with the accumulation of usage times, avoiding the problem of prediction deviation caused by changes in usage conditions in static models. The output of the prediction model is not only a separate energy trend information, but also an explicit energy constraint condition generated as a data synchronization task queue, so that the prediction results of the digital twin model can directly drive the data synchronization decision.

[0031] In some possible embodiments of the present invention, the steps of establishing an adaptive interconnection with a smart device via a short-range communication protocol, exchanging capability description information between the two ends during the handshake process, and establishing a consensus interconnection context for the two ends include: The power bank initiates an interconnection request to the smart device via a short-range communication protocol. The interconnection request carries the first capability description information of the power bank. The first capability description information includes: the battery state of charge, battery health status, current energy status and predicted trend currently output by the digital twin model, as well as the types of data and storage status supported by the power bank itself. After receiving the interconnection request, the smart device will use the types of data it supports for synchronization and the synchronization priority of each type of data (user-specified or system default) as the second capability description information on the smart device side, and send the second capability description information back to the power bank as response information. After receiving the second capability description information from the smart device, the power bank summarizes the first and second capability description information, uses the power bank's energy state and predicted trend as constraints, and combines various data reported by the smart device and their synchronization priorities to generate a consensus interconnection context between the two ends. In this step, the interconnection context includes: the current energy state and the predicted trend, the types of data that support synchronization at both ends and their corresponding priority mapping relationship, and the data synchronization feasible domain derived therefrom (i.e., the current energy state and the predicted trend, the types of data that support synchronization at both ends and their corresponding priority mapping relationship).

[0032] The power bank sends the generated interconnection context to the smart device, and the smart device performs a consistency check with the known information on its own end after receiving it. If the consistency check passes, both ends confirm that the interconnection context is valid, and the adaptive interconnection is established. If the verification fails, the smart device will send the error information to the power bank, and the two ends will re-execute the interconnection process. The interconnection context is used as a common basis for generating the data synchronization task queue. The power bank side obtains the priority information of the smart device data based on the interconnection context, and the smart device side obtains the power bank's energy constraint information based on the interconnection context. The two ends work together to perform subsequent data synchronization based on the priority information and energy constraint information.

[0033] In this embodiment, the energy state and predicted trend of the power bank are incorporated into the interconnection request as core components of the handshake information. This allows the smart device to know the energy constraints from the beginning of the interconnection, avoiding the inefficiency of discovering insufficient energy after interconnection is established, which would prevent the synchronization task from being executed. This achieves the fusion and transmission of energy information and data capability description information during the handshake process. After receiving information from both ends, the power bank summarizes it to generate an interconnection context that includes energy constraints, data types, and priority mappings. This context is then confirmed to be effective after consistency verification by the smart device. This allows both ends to form a common understanding of subsequent collaborative behavior at the time of interconnection establishment, providing a deterministic decision-making basis for task queue generation. As the input basis for task queue generation, the interconnection context enables the information exchange in the handshake process to directly serve the scheduling decision of data synchronization, achieving an organic connection between the interconnection context and subsequent task scheduling.

[0034] In some possible embodiments of the present invention, the step of dynamically generating a data synchronization task queue based on the interconnection context, using the energy change trend predicted by the digital twin model as a constraint, and combining the priority of various data reported by smart devices, and prioritizing the execution of high-priority data during the energy-sufficient phase, while scheduling low-priority data for on-demand or delayed execution under ample energy margins, includes: The power bank extracts the energy change trend from the interconnection context. The energy change trend describes the trajectory of the battery state of charge change in a future time period in the form of a time series, and divides the time period into several energy-sufficient stages and energy-scarce stages according to the predicted state of charge. The power bank extracts various types of data reported by smart devices and their corresponding synchronization priorities from the interconnection context. Based on the priority, the data is divided into three levels: high-priority data, medium-priority data, and low-priority data, forming a data priority mapping table. In this step, the power bank parses the data capability description information reported by the smart device from the interconnection context. This information records the names, data type identifiers, and synchronization priority values ​​corresponding to each type of data stored locally by the smart device in a structured data format. The synchronization priority values ​​are preset by the smart device according to user-specified or system default rules. Based on the extracted synchronization priority values ​​of various types of data, the power bank sets three priority threshold ranges: high, medium, and low. Data with priority values ​​falling within the high threshold range is classified as high-priority data, data with priority values ​​falling within the medium threshold range is classified as medium-priority data, and data with priority values ​​falling within the low threshold range is classified as low-priority data, completing the three-level stratification of data. The power bank organizes the stratified data types and their corresponding priority level information into a structured data priority mapping table. This mapping table uses data type identifiers as index keys and priority levels as mapping values, and stores this mapping table locally as the query basis for determining the execution order of various types of data when generating the data synchronization task queue later. This step automates the conversion from the interconnect context to a structured mapping table, enabling the diverse data reported by smart devices to be quickly categorized by priority. This avoids the tediousness and error-proneness of manually configuring mapping relationships, and provides a clear data priority query basis for the dynamic generation of subsequent task queues.

[0035] The power bank associates the energy-sufficient phase with high-priority data, prioritizing the synchronization of high-priority data at the start of the energy-sufficient phase to ensure that the most important data is synchronized first when the energy status is good; it schedules the synchronization of medium-priority data to be executed as needed during the remaining time of the energy-sufficient phase; and it schedules the synchronization of low-priority data to be executed during the energy surplus period before the energy shortage phase, or marks it as a delayed execution status to be processed in the next energy-sufficient phase. Based on the data allocation results associated with different priorities and energy-sufficient or energy-scarce phases, the power bank generates a data synchronization task queue in chronological order. This data synchronization task queue uses task number, data type corresponding to the task, predetermined execution time window, and energy status constraints as key attributes to form an ordered execution list containing all data to be synchronized. The generated data synchronization task queue will serve as the basis for bidirectional data synchronization execution. The power bank and the smart device will work together to perform data synchronization operations according to the task order and time window constraints in the data synchronization task queue. When the execution time window of a certain task in the queue arrives, the corresponding data transmission will be automatically triggered.

[0036] In this embodiment, the energy change trend predicted by the digital twin model is transformed into a time-dimensional division of energy sufficiency / scarcity stages. This expands energy constraints from single-point state judgments to a time-series resource allocation benchmark, laying the foundation for precise matching of subsequent tasks and time windows, and achieving a fine mapping from energy prediction trends to time segments. By adopting a hierarchical strategy that associates high-priority data with energy-sufficient stages and low-priority data with ample energy reserves, the scheduling decisions for data synchronization respect both the importance of the data itself and the availability constraints of energy resources. This avoids the risk that blindly executing low-priority tasks may prevent high-priority tasks from being completed when energy is insufficient. The generated task queue not only includes task numbers and data types but also specifies the predetermined execution time window and energy constraints for each task. This allows the bidirectional data synchronization process to be directly triggered based on queue attributes, achieving seamless connection between the task queue and subsequent execution stages.

[0037] In some possible embodiments of the present invention, the step of synchronizing data according to the data synchronization task queue, whereby the power bank synchronizes user behavior and environmental perception data stored locally to the smart device during charging, and the smart device synchronizes locally generated sensor data and operation logs to the power bank during discharging, with the data streams of both parties flowing in tandem with the energy flow direction to achieve bidirectional data synchronization, includes: The power bank uses a built-in charging and discharging status detection circuit to monitor the current charging and discharging status (whether it is in a charging state (energy inflow) or a discharging state (energy outflow)) in real time, and uses this charging and discharging status as a trigger condition for data flow direction scheduling. When the power bank detects that it is in a charging state, it determines that energy is flowing into the power bank from the outside. The power bank extracts the data synchronization task from the data synchronization task queue from the smart device to the power bank (the synchronized data includes sensor data, operation logs, application status and other data generated locally by the smart device), and allocates a higher communication bandwidth to this direction than the bandwidth allocated to the direction from the power bank to the smart device. When the power bank detects that it is in a discharging state, it determines that energy is flowing from the power bank to the smart device. The power bank extracts the data synchronization task from the task queue to the smart device (the synchronized data includes user behavior data, environmental perception data, historical charging and discharging records, etc. stored on the power bank itself), and allocates a higher communication bandwidth to this direction than the bandwidth allocated to the direction from the smart device to the power bank, so that the power bank can efficiently synchronize local data to the smart device. During the charging or discharging process, the power bank and the smart device execute the scheduled synchronization tasks in the task queue in sequence according to the determined data flow direction and bandwidth allocation scheme, until all the high-priority tasks corresponding to the current energy state are completed, or the charging or discharging state changes and the data flow direction needs to be adjusted. Whenever the charging / discharging state changes (e.g., from charging to discharging or from discharging to charging), the power bank reschedules the data flow direction and bandwidth allocation according to the new energy flow direction, ensuring that the data flow always keeps the energy flow in directional coordination, and achieving dynamic adaptation of bidirectional data synchronization.

[0038] In this embodiment, by monitoring the charging and discharging status of the power bank in real time, the energy flow direction is used as the trigger condition for data flow direction scheduling. This allows the data flow to switch naturally with the energy flow direction, avoiding the contradiction of occupying bandwidth to transmit data when energy is flowing in or to receive data when energy is flowing out. This improves the utilization efficiency of communication resources and realizes a real-time coupling mechanism between the data flow direction and the energy flow direction. During the charging state, higher bandwidth is allocated to the direction of the power bank for smart devices, and during the discharging state, higher bandwidth is allocated to the direction of the power bank for smart devices. This ensures that the allocation of bandwidth resources naturally corresponds to the direction of energy flow, ensuring that data aggregation is prioritized when energy is sufficient and data distribution is prioritized when energy is output. This improves the execution efficiency of data synchronization and the user experience. By re-executing data flow direction scheduling and bandwidth allocation during state transitions, the data synchronization strategy can quickly respond to changes in energy status, avoiding data flow blockage or bandwidth waste caused by state transitions.

[0039] In some possible embodiments of the present invention, the step of continuously feeding real-time battery parameters back to the digital twin model during data synchronization to correct the predicted trend, and automatically adjusting the priority of the data synchronization task queue or interrupting low-priority synchronization tasks if energy changes deviate from expectations by more than a preset safety threshold is detected, to ensure the safe availability of the remaining energy of the power bank, includes: During the data synchronization process, the power bank continuously collects real-time battery parameters (including current state of charge, current, temperature, etc.) through its built-in sensors, and inputs these real-time battery parameters as feedback information into the digital twin model to correct the model's prediction of future energy change trends. The power bank compares the current state of charge collected in real time with the predicted state of charge of the digital twin model at the current moment, calculates the energy deviation value between the two, and compares the energy deviation value with a preset safety threshold to determine whether the actual energy change deviates from the expectation. If the energy deviation value does not exceed the preset safety threshold, the prediction trend of the digital twin model is determined to be still valid. The power bank continues to perform data synchronization according to the original data synchronization task queue, and at the same time, the real-time feedback information is used for the background iterative correction of the model. If the energy deviation value exceeds the preset safety threshold, it is determined that the actual energy state has significantly deviated from the predicted trend. The power bank immediately triggers the dynamic adjustment mechanism of the task queue, which includes: marking low-priority synchronization tasks that have not yet been executed in the data synchronization task queue as interrupted and pausing their execution; delaying the scheduled execution time window of medium-priority tasks; and retaining only high-priority tasks to continue execution, so as to ensure that the most important data synchronization is completed first in the case of energy shortage. After adjusting the data synchronization task queue according to the dynamic adjustment mechanism of the task queue, the power bank re-invokes the digital twin model to predict energy trends based on real-time feedback information, and reassesses the current energy reserve based on the new prediction results. If the energy status recovers to a safe range, the interrupted or delayed tasks will be reinstated into the data synchronization task queue and resumed. If the energy status is still scarce, the current data synchronization task queue adjustment strategy will be maintained until data synchronization ends or the charging / discharging status changes.

[0040] In this embodiment, by continuously collecting real-time battery parameters during data synchronization and feeding them back to the digital twin model, the model can continuously correct its predicted trends based on actual energy changes. This avoids prediction failures caused by inaccurate initial model parameters or changes in operating conditions, improving the accuracy and robustness of energy trend prediction. By using the deviation between actual and predicted energy as a trigger condition, the task queue is subject to tiered correction. This allows the task queue adjustment strategy to quickly respond to sudden changes in energy status, avoiding the risk of power bank depletion and high-priority data synchronization failure due to blindly executing the original task queue. By organically linking digital twin prediction, task queue generation, data synchronization execution, deviation detection, and queue correction, a complete closed-loop feedback system is formed. This enables the power bank's energy management and data synchronization strategies to adaptively adjust, ensuring the safe availability of remaining power bank energy and the reliable execution of data synchronization tasks.

[0041] In some possible embodiments of the present invention, the calculation formula for predicting the energy change trend of a battery over a future time period using this digital twin model is as follows:

[0042] in, The remaining available energy at time t is the predicted energy. This represents the maximum usable capacity of the battery as determined by its current state of health (SOH), reflecting the battery's actual energy ceiling. It is an exponential decay function used to describe the decay characteristics of multi-factor weights over time; It is a time constant that controls the rate of decay; The historical weighted average of the discharge current up to time t is normalized to [0, 1] and used to characterize the cumulative effect of recent discharge intensity on energy consumption. The deviation of the ambient temperature at time t from the baseline value of the battery's optimal operating temperature is normalized to [0, 1], reflecting the attenuation effect of temperature deviation on the battery's usable energy. The cumulative charge-discharge cycle count of the battery is normalized to [0, 1] to characterize the long-term degradation of energy capacity due to cycle aging. , , The weighting coefficients for the effects of three factors—discharge current, temperature environment, and cyclic degradation—are respectively, and satisfy the following conditions: This is used to reflect the relative contribution of each factor to energy decay; To unify the weighting time decay constant, the influence of the three factors naturally decays as the prediction time domain extends, avoiding excessive reliance on the current instantaneous state for far-future predictions; t is the time variable within the prediction time window relative to the current moment.

[0043] In this embodiment, three independent factors—discharge intensity, temperature effect, and cyclic aging—are coupled into a single energy prediction expression through a unified exponential decay weighting mechanism. This enables the prediction model to capture both the dynamic changes in short-term energy consumption and the long-term degradation trend, avoiding the limitations of existing dual exponential decay models that only model a single cyclic aging factor. This achieves multi-factor pre-transient prediction.

[0044] In some possible embodiments of the present invention, in the steps of establishing an adaptive interconnection between the mobile power supply and the smart device via a short-range communication protocol, exchanging capability description information between the two ends during the handshake process, and establishing a consensus interconnection context for the two ends, when establishing the adaptive interconnection, after the handshake information exchange, a confidence level assessment is performed on the established interconnection context. A valid interconnection is only established when the confidence level exceeds a preset security threshold. The confidence level assessment formula is as follows:

[0045]

[0046] The ruling rule is: only when If the handshake is successful, the interconnection context is established; otherwise, the handshake is re-initiated or the interconnection is delayed. in, The overall confidence score for the interconnection context, with a value range of [0, 1], is used to measure whether the information obtained from the current handshake exchange between the two ends is reliable and sufficient; It is a communication signal quality index, normalized to [0, 1], and is derived from communication layer parameters such as signal strength and bit error rate. It reflects the physical layer reliability of the handshake information transmission. It is an information timeliness indicator, and is an exponential decay function used to reflect the degree of effectiveness decay of handshake information from acquisition to the current evaluation time; The time interval between the information acquisition time and the current evaluation time; This is the information timeliness decay constant, which characterizes the rate at which information becomes outdated. The dual-end capability matching index is normalized to [0, 1]. It is calculated from the matching degree between the current energy state of the power bank and the data synchronization capability reported by the smart device, reflecting whether the two ends have the conditions for effective collaboration. , , The weighting coefficients are for the three dimensions of signal quality, information timeliness, and capability matching, respectively, satisfying... ; The confidence threshold is used to determine whether the interconnection context is trustworthy.

[0047] In this embodiment, based on the traditional communication handshake protocol which only focuses on signal layer connectivity, two dimensions are introduced: information timeliness attenuation and end-to-end capability matching. This enables the interconnection establishment process to have a comprehensive evaluation capability of the handshake information quality, avoiding the risk of data synchronization failure after interconnection is established based on outdated or mismatched information, and improving the robustness and practicality of interconnection.

[0048] In some possible embodiments of the present invention, when dynamically generating the data synchronization task queue, the dynamic priority of each task to be synchronized is calculated using the following formula:

[0049] in, This is the dynamic priority score of the nth task to be synchronized. The higher the value, the higher it is ranked in the task queue and the earlier it will be executed. The inherent importance (static weight) of the nth task reported by the smart device, with a value range of [0, 1], reflects the importance of this type of data to the user or application; Let t be the ratio of remaining battery energy predicted by the digital twin model at time t (i.e., the proportion of predicted usable energy to total safe usable energy), and its value range is [0, 1]. This is the nonlinear amplification index of the energy margin. This is used to make the priority response to energy margin nonlinear. When the energy margin is sufficient, the priority is increased less, and when the energy margin becomes scarce, the priority drops sharply, forming a step-by-step protection effect under energy constraints. The estimated data synchronization resource consumption weight for the nth task is [0, 1], which reflects the proportion of communication and energy consumption during the execution of the task; n is the task sequence number index.

[0050] In this embodiment, by coupling the predicted energy margin value to the task priority in a non-linear exponential manner, and introducing a resource consumption penalty term, a dynamic scheduling effect is achieved where the priority is close to the static importance when energy is abundant, and low-importance, high-consumption tasks are automatically suppressed when energy is scarce. This avoids the rigid execution problem of traditional static priority queues under energy constraints.

[0051] In some possible embodiments of the present invention, in the step of achieving bidirectional data synchronization according to the data synchronization task queue, the power bank synchronizes user behavior and environmental perception data stored locally to the smart device during charging, and the smart device synchronizes locally generated sensor data and operation logs to the power bank during discharging, with the data streams of both parties flowing in tandem with the energy flow direction, the communication bandwidth is dynamically allocated according to the current energy flow direction during bidirectional data synchronization, and the allocation formula is:

[0052] in, The synchronization bandwidth allocated to the data flow direction d; This represents the total available bandwidth of the current communication channel. The energy flow direction coupling coefficient has a value range of [ 1, +1]; When the power bank is charging (Energy inflow), when in a discharge state (Energy outflow) The magnitude reflects the intensity of the current energy flow; A bandwidth allocation sensitivity parameter, with a value range of (0, 1), is used to control the response sensitivity of bandwidth deflection as the energy flow coupling coefficient changes, avoiding overly aggressive bandwidth allocation; d is the data flow direction indicator. ,in This indicates that the smart device is moving towards the power bank. This indicates that power banks are geared towards smart devices; For the direction sign function, when The value is +1 when... The time value is 1. Used to map the direction of data flow to algebraic symbols for inclusion in formula calculations.

[0053] In this embodiment, by using the energy flow direction and its intensity as coupling variables for communication bandwidth allocation, a collaborative mechanism is realized that "priority bandwidth is allocated to data upload to the power bank during charging and priority bandwidth is allocated to data download to the smart device during discharging." This allows the data flow to naturally tilt with the energy flow direction, improving energy utilization and data synchronization transmission efficiency.

[0054] In some possible embodiments of the present invention, during the data synchronization process, the power bank continuously feeds real-time battery parameters back to the digital twin model to correct the predicted trend. If the detected energy change deviates from the expected value by more than a preset safety threshold, the priority of the data synchronization task queue is automatically adjusted or low-priority synchronization tasks are interrupted to ensure the safe availability of the remaining energy of the power bank. In the step of dynamically correcting the task queue, the deviation rate between the actual energy and the predicted energy is first calculated, and then the deviation rate is used as a correction signal to apply to the priority of each task. The correction formula is as follows:

[0055]

[0056] The judgment rule is: when When a task has a priority lower than the median priority in the queue, it is suspended from execution and rescheduled after the next round of prediction correction. in, Let be the energy deviation rate at time t. A positive value indicates that the actual energy is higher than the prediction (sufficient safety margin), and a negative value indicates that the actual energy is lower than the prediction (energy shortage). Let be the actual remaining battery energy at time t; The remaining energy at time t is the predicted energy given by the digital twin model; Let t be the priority of the nth task after adjustment; The dynamic priority generated before correction; To take the positive part of the negative deviation, the correction penalty is only activated when the actual energy is lower than the prediction, and no adjustment is made when the energy is higher than the prediction; The deviation sensitivity coefficient has a value range of (0, 1] and controls the response strength of the deviation signal to priority correction. For the nonlinear exponent of the correction function, This results in a gentle correction when the deviation is small, and a non-linear strengthening of the correction force when the deviation increases sharply, thus forming a gradual protection. The safety protection threshold has a value range of (0, 1). When the negative energy deviation rate exceeds this threshold, the low-priority task suspension mechanism is triggered.

[0057] In this embodiment, by feeding back the real-time energy deviation rate to the task priority correction loop in the form of a nonlinear function, the automatic and gradual adjustment of the synchronization task is realized when energy prediction error occurs, forming a closed feedback mechanism. This effectively avoids the risk of excessive battery energy consumption caused by the accumulation of prediction error and ensures the safe availability of the remaining energy of the power bank.

[0058] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.

[0059] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

[0060] In the several embodiments provided in this application, it should be understood that the disclosed apparatus can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of the units described above is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical or other forms.

[0061] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0062] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0063] If the aforementioned integrated units are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage device (CMD). Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned memory includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0064] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage device, which may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc.

[0065] The embodiments of this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

[0066] While the present invention has been disclosed above, it is not limited thereto. Any person skilled in the art can easily conceive of variations or substitutions without departing from the spirit and scope of the present invention, and various modifications and alterations can be made, including combinations of the different functions and implementation steps described above, as well as software and hardware implementation methods, all of which are within the protection scope of the present invention.

Claims

1. A method for adaptive interconnection and data synchronization between a power bank and a smart device, characterized in that, include: The power bank collects battery parameters such as state of charge, battery health, and temperature through built-in sensors, and combines them with historical charging and discharging data to build a digital twin model locally on the power bank. This digital twin model is then used to predict the energy change trend of the battery in the future. The power bank establishes an adaptive interconnection with the smart device through a short-range communication protocol, exchanging capability description information between the two ends during the handshake process, and establishing a consensus interconnection context for the two ends; Based on the interconnection context, the power bank uses the energy change trend predicted by the digital twin model as a constraint, and combines the priority of various data reported by smart devices to dynamically generate a data synchronization task queue. High-priority data is scheduled to be executed first when energy is sufficient, while low-priority data is scheduled to be executed on demand or delayed when energy is sufficient. According to the data synchronization task queue, during the charging process, the power bank synchronizes the user behavior and environmental perception data stored on its own to the smart device. During the discharging process, the smart device synchronizes the sensor data and operation log data generated locally to the power bank. The data streams of both parties flow in coordination with the energy flow, realizing bidirectional data synchronization. During the data synchronization process, the power bank continuously feeds real-time battery parameters back to the digital twin model to correct the predicted trend. If the energy change is detected to deviate from the expected value by more than the preset safety threshold, the priority of the data synchronization task queue will be automatically adjusted or low-priority synchronization tasks will be interrupted to ensure the safe availability of the remaining energy of the power bank.

2. The adaptive interconnection and data synchronization method between a power bank and a smart device according to claim 1, characterized in that, The portable power bank collects battery parameters such as state of charge, battery health, and temperature through built-in sensors, and combines this with historical charge and discharge data to build a digital twin model locally on the power bank. The steps for using this digital twin model to predict the battery's energy change trend over a future period include: The power bank uses a built-in current sensor, temperature sensor, and voltage acquisition circuit to continuously collect the battery's terminal voltage, charging and discharging current, and temperature during each charging or discharging event. It also stores the start and end times, start and end states of charge, and corresponding current-temperature sequence of each charging and discharging event as a complete usage record locally on the power bank. After accumulating a preset number of usage records, the power bank uses the current state of charge and health of the battery as a benchmark, and utilizes the correspondence between current, temperature and state of charge changes in the locally stored historical usage records to build a digital twin model locally. The digital twin model includes a predictive sub-model that takes usage behavior as input and the trend of state of charge change as output. Whenever a new charging or discharging event occurs in the power bank and the corresponding usage record is collected, the new record is compared with the historical records used when the prediction sub-model was built. If there is a deviation between the actual state of charge change reflected in the new record and the prediction result of the prediction sub-model, the new record is used to correct the parameters of the prediction sub-model so that the prediction sub-model can iteratively approach the actual usage characteristics of the power bank itself. Before the power bank and smart device are about to establish an interconnection, the iteratively updated prediction sub-model is invoked. Using the current state of charge and the current ambient temperature as initial conditions, the trend of the battery's state of charge change in the future period is predicted to obtain the predicted trend. This predicted trend is then used as the energy constraint basis for the data synchronization task queue to output the data. During the feedback process, if the actual state of charge change deviates significantly from the predicted trend, the deviation information is written into the usage record and triggers a further correction of the prediction sub-model, so that the prediction capability of the prediction sub-model continues to improve with the long-term use of the power bank.

3. The adaptive interconnection and data synchronization method between a power bank and a smart device according to claim 2, characterized in that, The mobile power bank establishes an adaptive interconnection with the smart device via a short-range communication protocol, exchanging capability description information between the two ends during the handshake process, and establishing a consensus interconnection context for both ends, including the following steps: The power bank initiates an interconnection request to the smart device via a short-range communication protocol. The interconnection request carries the first capability description information of the power bank. The first capability description information includes: the battery state of charge, battery health status, current energy status and predicted trend currently output by the digital twin model, as well as the types of data and storage status supported by the power bank itself. After receiving the interconnection request, the smart device will use the types of data it supports for synchronization and the synchronization priority of each type of data as the second capability description information on the smart device side, and send the second capability description information back to the power bank as response information. After receiving the second capability description information from the smart device, the power bank summarizes the first and second capability description information, uses the power bank's energy state and predicted trend as constraints, and combines various data reported by the smart device and their synchronization priorities to generate a consensus interconnection context between the two ends. The power bank sends the generated interconnection context to the smart device, and the smart device performs a consistency check with the known information on its own end after receiving it. If the consistency check passes, both ends confirm that the interconnection context is valid, and the adaptive interconnection is established. If the verification fails, the smart device will send the error information to the power bank, and the two ends will re-execute the interconnection process. The interconnection context is used as a common basis for generating the data synchronization task queue. The power bank side obtains the priority information of the smart device data based on the interconnection context, and the smart device side obtains the power bank's energy constraint information based on the interconnection context. The two ends work together to perform subsequent data synchronization based on the priority information and energy constraint information.

4. The adaptive interconnection and data synchronization method between a power bank and a smart device according to claim 3, characterized in that, According to the interconnection context, the mobile power bank uses the energy change trend predicted by the digital twin model as a constraint, and combines the priority of various data reported by smart devices to dynamically generate a data synchronization task queue. The steps include prioritizing high-priority data for execution during periods of sufficient energy, and scheduling low-priority data for on-demand or delayed execution when energy reserves are ample. The power bank extracts the energy change trend from the interconnection context. The energy change trend describes the trajectory of the battery state of charge change in a future time period in the form of a time series, and divides the time period into several energy-sufficient stages and energy-scarce stages according to the predicted state of charge. The power bank extracts various types of data reported by smart devices and their corresponding synchronization priorities from the interconnection context. Based on the priority, the data is divided into three levels: high-priority data, medium-priority data, and low-priority data, forming a data priority mapping table. The power bank associates the energy-sufficient phase with high-priority data, prioritizing the synchronization of high-priority data at the start of the energy-sufficient phase to ensure that the most important data is synchronized first when the energy status is good; it schedules the synchronization of medium-priority data to be executed as needed during the remaining time of the energy-sufficient phase; and it schedules the synchronization of low-priority data to be executed during the energy surplus period before the energy shortage phase, or marks it as a delayed execution status to be processed in the next energy-sufficient phase. Based on the data allocation results associated with different priorities and energy-sufficient or energy-scarce phases, the power bank generates a data synchronization task queue in chronological order. This data synchronization task queue uses task number, data type corresponding to the task, predetermined execution time window, and energy status constraints as key attributes to form an ordered execution list containing all data to be synchronized. The generated data synchronization task queue will serve as the basis for bidirectional data synchronization execution. The power bank and the smart device will work together to perform data synchronization operations according to the task order and time window constraints in the data synchronization task queue. When the execution time window of a certain task in the queue arrives, the corresponding data transmission will be automatically triggered.

5. The adaptive interconnection and data synchronization method between a power bank and a smart device according to claim 4, characterized in that, The steps for bidirectional data synchronization, according to the data synchronization task queue, include: During charging, the power bank synchronizes user behavior and environmental perception data stored locally to the smart device; during discharging, the smart device synchronizes locally generated sensor data and operation logs to the power bank. The data streams of both devices flow in tandem with the energy flow, achieving bidirectional data synchronization. The power bank monitors the current charging and discharging status in real time through its built-in charging and discharging status detection circuit, and uses this charging and discharging status as the trigger condition for data flow direction scheduling. When the power bank detects that it is in a charging state, it determines that energy is flowing into the power bank from the outside. The power bank extracts the data synchronization task from the data synchronization task queue from the smart device to the power bank and allocates a higher communication bandwidth to the direction of the power bank than the bandwidth allocated to the direction of the power bank to the smart device. When the power bank detects that it is in a discharging state, it determines that energy is flowing from the power bank to the smart device. The power bank extracts the data synchronization task from the task queue to the smart device and allocates a higher communication bandwidth to this direction than the bandwidth allocated to the direction from the smart device to the power bank, so that the power bank can efficiently synchronize local data to the smart device. During the charging or discharging process, the power bank and the smart device execute the scheduled synchronization tasks in the task queue in sequence according to the determined data flow direction and bandwidth allocation scheme, until all the high-priority tasks corresponding to the current energy state are completed, or the charging or discharging state changes and the data flow direction needs to be adjusted. Whenever the charging / discharging state changes, the power bank reschedules the data flow direction and bandwidth allocation according to the new energy flow direction, ensuring that the data flow always keeps in directional coordination with the energy flow, and achieving dynamic adaptation of bidirectional data synchronization.

6. The adaptive interconnection and data synchronization method between a power bank and a smart device according to claim 5, characterized in that, During the data synchronization process, the power bank continuously feeds real-time battery parameters back to the digital twin model to correct the predicted trend. If an energy change deviates from the expected value by more than a preset safety threshold, the power bank automatically adjusts the priority of the data synchronization task queue or interrupts low-priority synchronization tasks to ensure the safe availability of the remaining energy of the power bank. This includes the following steps: During the data synchronization process, the power bank continuously collects real-time battery parameters through its built-in sensors and inputs these parameters as feedback information into the digital twin model to correct the model's prediction of future energy change trends. The power bank compares the current state of charge collected in real time with the predicted state of charge of the digital twin model at the current moment, calculates the energy deviation value between the two, and compares the energy deviation value with a preset safety threshold to determine whether the actual energy change deviates from the expectation. If the energy deviation value does not exceed the preset safety threshold, the prediction trend of the digital twin model is determined to be still valid. The power bank continues to perform data synchronization according to the original data synchronization task queue, and at the same time, the real-time feedback information is used for the background iterative correction of the model. If the energy deviation value exceeds the preset safety threshold, it is determined that the actual energy state has significantly deviated from the predicted trend. The power bank immediately triggers the dynamic adjustment mechanism of the task queue, which includes: marking low-priority synchronization tasks that have not yet been executed in the data synchronization task queue as interrupted and pausing their execution; delaying the scheduled execution time window of medium-priority tasks; and retaining only high-priority tasks to continue execution, so as to ensure that the most important data synchronization is completed first in the case of energy shortage. After the data synchronization task queue is adjusted according to the dynamic adjustment mechanism of the task queue, the power bank calls the digital twin model again to predict the energy trend based on real-time feedback information, and re-evaluates the current energy balance based on the new prediction results. If the energy status is restored to a safe range, the interrupted or delayed tasks will be reinstated into the data synchronization task queue and resumed. If energy is still scarce, the current data synchronization task queue adjustment strategy will be maintained until data synchronization is completed or the charging / discharging state changes.

7. The adaptive interconnection and data synchronization method between a mobile power supply and a smart device according to claim 6, characterized in that, The formula for predicting the energy change trend of a battery over a future time period using this digital twin model is as follows: in, The remaining available energy at time t is the predicted energy. This represents the maximum usable capacity of the battery as determined by its current state of health (SOH), reflecting the battery's actual energy ceiling. The historical weighted average of the discharge current up to time t is normalized to [0, 1] and used to characterize the cumulative effect of recent discharge intensity on energy consumption. The deviation of the ambient temperature at time t from the baseline value of the battery's optimal operating temperature is normalized to [0, 1], reflecting the attenuation effect of temperature deviation on the battery's usable energy. The cumulative charge-discharge cycle count of the battery is normalized to [0, 1] to characterize the long-term degradation of energy capacity due to cycle aging. , , The weighting coefficients for the effects of three factors—discharge current, temperature environment, and cyclic degradation—are respectively, and satisfy the following conditions: This is used to reflect the relative contribution of each factor to energy decay; To unify the weighting time decay constant, the influence of the three factors naturally decays as the prediction time domain extends, avoiding excessive reliance on the current instantaneous state for far-future predictions; t is the time variable within the prediction time window relative to the current moment.

8. The adaptive interconnection and data synchronization method between a power bank and a smart device according to claim 7, characterized in that, In the steps of establishing an adaptive interconnection between a power bank and a smart device via a short-range communication protocol, exchanging capability description information between the two ends during the handshake process, and establishing a consensus interconnection context for both ends, during the establishment of the adaptive interconnection, after the handshake information exchange, a confidence level assessment is performed on the established interconnection context. A valid interconnection is only established when the confidence level exceeds a preset security threshold. The confidence level assessment formula is as follows: The ruling rule is: only when At that time, the interconnected context is established; Otherwise, re-initiate the handshake or delay the interconnection; in, The overall confidence score for the interconnection context, with a value range of [0, 1], is used to measure whether the information obtained from the current handshake exchange between the two ends is reliable and sufficient; It is a communication signal quality index, normalized to [0, 1], and is derived from communication layer parameters such as signal strength and bit error rate. It reflects the physical layer reliability of the handshake information transmission. It is an information timeliness indicator, and is an exponential decay function used to reflect the degree of effectiveness decay of handshake information from acquisition to the current evaluation time; The time interval between the information acquisition time and the current evaluation time; This is the information timeliness decay constant, which characterizes the rate at which information becomes outdated. The dual-end capability matching index is normalized to [0, 1]. It is calculated from the matching degree between the current energy state of the power bank and the data synchronization capability reported by the smart device, reflecting whether the two ends have the conditions for effective collaboration. , , The weighting coefficients are for the three dimensions of signal quality, information timeliness, and capability matching, respectively, satisfying... ; The confidence threshold is used to determine whether the interconnection context is trustworthy.

9. The adaptive interconnection and data synchronization method between a mobile power supply and a smart device according to claim 8, characterized in that, In the dynamic generation of the data synchronization task queue, the dynamic priority of each task to be synchronized is calculated using the following formula: in, This is the dynamic priority score of the nth task to be synchronized. The higher the value, the higher it is ranked in the task queue and the earlier it will be executed. The inherent importance of the nth task reported by the smart device, with a value range of [0, 1], reflects the importance of this type of data to the user or application; Let be the remaining battery energy ratio predicted by the digital twin model at time t, with a value range of [0, 1]. This is the nonlinear amplification index of the energy margin. This is used to make the priority response to energy margin nonlinear. When the energy margin is sufficient, the priority is increased less, and when the energy margin becomes scarce, the priority drops sharply, forming a step-by-step protection effect under energy constraints. The estimated data synchronization resource consumption weight for the nth task is [0, 1], which reflects the proportion of communication and energy consumption during the execution of the task; n is the task sequence number index.

10. The adaptive interconnection and data synchronization method between a mobile power supply and a smart device according to claim 9, characterized in that, According to the data synchronization task queue, during the charging process, the power bank synchronizes user behavior and environmental perception data stored on its own to the smart device. During the discharging process, the smart device synchronizes locally generated sensor data and operation logs to the power bank. The data streams of both parties flow in tandem with the energy flow direction to achieve bidirectional data synchronization. During the execution of bidirectional data synchronization, the communication bandwidth is dynamically allocated according to the current energy flow direction. The allocation formula is as follows: in, The synchronization bandwidth allocated to the data flow direction d; This represents the total available bandwidth of the current communication channel. The energy flow direction coupling coefficient has a value range of [ 1, +1]; When the power bank is charging When in a discharge state , The magnitude reflects the intensity of the current energy flow; A bandwidth allocation sensitivity parameter, with a value range of (0, 1), is used to control the response sensitivity of bandwidth deflection as the energy flow coupling coefficient changes, avoiding overly aggressive bandwidth allocation; d is the data flow direction indicator. ,in This indicates that the smart device is moving towards the power bank. This indicates that power banks are geared towards smart devices; For the direction sign function, when The value is +1 when... The time value is 1. Used to map the direction of data flow to algebraic symbols for inclusion in formula calculations.