A data synchronization control method of a multi-core heterogeneous processor of an intelligent power distribution terminal
By identifying and merging version tag ranges of strongly coupled channels in a multi-core heterogeneous processor and adopting a batch synchronous update mechanism, the time deviation problem of non-real-time core reading of multiple telemetry data is solved, achieving time consistency and phase consistency of telemetry values and improving the accuracy of power calculation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GUANGZHOU JOINT INSPECTION & CERTIFICATION TECHNOLOGY DEVELOPMENT SERVICES CO LTD
- Filing Date
- 2026-04-13
- Publication Date
- 2026-07-24
AI Technical Summary
In multi-core heterogeneous processors, the phase consistency of the multi-channel telemetry data read by the non-real-time computing core is disrupted due to physical coupling interference caused by sampling time deviation and cross-time mixed telemetry values, which affects the accuracy of power calculation.
By acquiring the write timestamps of multiple telemetry channels in the real-time acquisition core, identifying the version tag flip edge position, calculating the physical coupling strength between channels, merging the version tag intervals of strongly coupled channels into a batch refresh range, adopting a version tag batch synchronous update mechanism to obtain a snapshot of telemetry values at a unified sampling time, and triggering the insertion of additional tags when the mixing ratio exceeds the threshold, the version tag refresh strategy is dynamically adjusted to maintain the snapshot consistency and phase consistency of non-real-time core readings.
It significantly improves the timing accuracy and computational reliability of multi-channel telemetry data in heterogeneous processing environments, ensures the consistency of telemetry values read by non-real-time cores, and improves the accuracy of power calculation.
Smart Images

Figure CN122450700A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of information technology, and in particular to a data synchronization control method for a multi-core heterogeneous processor in an intelligent power distribution terminal. Background Technology
[0002] In the field of power system distribution automation, ensuring that terminal equipment can accurately perceive the grid's operating status is fundamental to implementing precise control and safety protection. The synchronous acquisition and consistent processing of multiple electrical quantities, such as voltage and current, are particularly crucial, as these data are the core inputs for subsequent advanced applications such as power calculation and fault diagnosis. Current common processing architectures employ a multi-core heterogeneous design, distributing high-real-time data acquisition tasks and less demanding data calculation tasks across different processor cores to improve overall efficiency. However, while this division of labor enhances processing power, it also introduces new challenges in data synchronization: ensuring that the multiple data streams used by non-real-time calculation cores are snapshots from the same moment, rather than a mixture of data from different times. Existing methods, to ensure that non-real-time cores can acquire new data as quickly as possible, often employ a strategy of independently setting version tags for each data channel and updating them one by one. This allows new data from each channel to be identified and read promptly. However, this update method, based on a single channel, ignores the inherent physical connections between multiple telemetry measurements. For example, when calculating three-phase power, the voltage and current data of each phase must be strictly aligned in time because they collectively characterize the grid state at the same instant. Updating version tags one by one can lead to a situation where, during the reading process, some data in the non-real-time core may have been updated to the new version corresponding to the new time, while other data remains in the old version corresponding to the old time. This time misalignment occurs directly at the data level. The core technical challenge arising from this lies in the contradiction between the "update range of version tags" and the "time consistency of multi-channel data." The update range of version tags determines the granularity at which data is identified as new, while the time consistency of multi-channel data requires all related data to be updated as a whole. When the update range is limited to a single channel, the freshness of the data is guaranteed, but the time consistency of the related datasets is compromised. In specific business applications, when the non-real-time core calculates load power, if the voltage value is sampled from ten milliseconds and the current value from twenty milliseconds, although each value itself is up-to-date and accurate, because they belong to two different moments of grid operation, the calculated power value cannot truly reflect the grid load situation at any given moment. Its accuracy will experience unpredictable deviations with the dynamic changes in load, rendering the analysis or control decisions based on this power meaningless. Therefore, ensuring that all the telemetry values read by the non-real-time terminal, which have physical coupling relationships, belong to the same sampling time while meeting the requirement of timely acquisition of the latest data, and thus guaranteeing the accuracy of key business results such as power calculation, has become a key issue in improving the reliability and application value of power distribution terminal data processing. Summary of the Invention
[0003] This invention provides a data synchronization control method for a multi-core heterogeneous processor in an intelligent power distribution terminal, mainly comprising: The process involves: acquiring the write timestamps of multiple telemetry channels in the real-time acquisition core; identifying the flip-edge position of the version tag for each channel from the write timestamps and extracting the corresponding sampling time marker; determining the physical coupling strength between channels based on the timing deviation between the sampling time markers of each channel; merging the version tag intervals covered by channels with physical coupling strength exceeding a preset threshold into a batch refresh range for version tags, resulting in a channel combination affected by coupling; identifying the distribution pattern of cross-timetime mixed telemetry values during non-real-time core reading based on the channel combination affected by coupling and the flip-edge position of the version tags, and determining potential phase consistency violation points; using a synchronous update mechanism within the batch refresh range of version tags to obtain a snapshot of telemetry values under a unified sampling time marker for the phase consistency violation points, and triggering the insertion of additional markers in the real-time acquisition core based on the proportion of mixed telemetry values; obtaining the updated flip-edge position of the version tags from the additional marker insertion result, verifying the consistency of the time assignment of telemetry values within the channel combination, and calculating the phase consistency error; determining the batch refresh range adjustment amount based on the phase consistency error, and dynamically updating the version tag refresh strategy to maintain snapshot consistency and phase consistency during non-real-time core reading.
[0004] Furthermore, identifying the flip edge position of each channel version tag from the written timestamp and extracting the corresponding sampling time marker includes: reading the numerical state of the version tag, identifying the flip edge position where the version tag jumps from the old value to the new value, and establishing a correspondence table between channel identifiers and flip edge positions; extracting the sampling time marker of each channel at the time of the flip edge occurrence based on the correspondence table between channel identifiers and flip edge positions. Further, determining the physical coupling strength between channels based on the timing deviation between the sampling time markers of each channel includes: traversing the sampling time markers of all channels, calculating the difference between the sampling time markers of any two channels to obtain the timing deviation value; if the timing deviation between two channels is lower than a preset threshold, it is determined that the channel combination has a physical association, and the reciprocal of the timing deviation value is used as the coupling strength assignment to obtain the physical coupling strength between each channel.
[0005] Furthermore, the step of merging the version tag intervals covered by channels with physical coupling strength exceeding a preset threshold into a batch refresh range for version tags includes: marking channel pairs with physical coupling strength exceeding a preset strength threshold as strongly coupled channel pairs to obtain a set of strongly coupled channel pairs; extracting the version tag corresponding to each channel from the set of strongly coupled channel pairs, and obtaining the start and end positions of each version tag; merging the version tag intervals covered by each channel in the set of strongly coupled channel pairs, and merging the tag intervals with overlapping or adjacent start and end positions into a batch refresh range for version tags.
[0006] Furthermore, the step of identifying the distribution pattern of cross-time mixed telemetry values during non-real-time core reading based on the coupled channel combination and version tag flip edge position includes: extracting the time record of non-real-time core access to the channel for each channel in the coupled channel combination; comparing the time record with the version tag flip edge position; identifying channels whose reading time falls in different intervals before and after the flip edge to obtain a set of channel identifiers with cross-time mixed telemetry values; statistically analyzing the time assignment status of each channel in the channel combination; and traversing the time assignment status of all channels to obtain the distribution pattern of mixed telemetry values during non-real-time core reading. Furthermore, determining potential phase consistency violation points includes: locating the flip edge region where mixed telemetry values appear in the set; statistically analyzing the ratio of the number of channels with alternating old and new time telemetry values in the flip edge region to the total number of channel combinations to obtain a mixing degree index; if the mixing degree index of a certain flip edge region exceeds a preset threshold, the flip edge region is marked as a potential phase consistency violation point.
[0007] Furthermore, the step of using a version tag batch refresh synchronous update mechanism to obtain telemetry value snapshots under a unified sampling time marker for the phase consistency violation point includes: performing a unified flip operation on the version tags of all channels within the batch refresh range at the same time to obtain a channel set after version tag synchronous update; reading the telemetry values of all channels within the batch refresh range from the shared storage area, the telemetry values corresponding to a unified sampling time marker, combining the telemetry values of all channels according to the channel identifier to obtain a telemetry value snapshot under a unified sampling time marker; calculating the ratio of the number of channels with mixed old and new time markers in the telemetry value snapshot to the total number of channels to obtain the mixed telemetry value ratio; if the mixed telemetry value ratio is higher than a preset threshold, sending an additional marker insertion instruction to the real-time acquisition core, the real-time acquisition core inserting the additional marker after the data writing of the next sampling cycle is completed.
[0008] Furthermore, the updated version tag flip edge position is obtained from the additional tag insertion result, and the consistency of the time assignment of telemetry values within the channel combination is verified. This includes: locating the version tag flip edge position of each channel within the channel combination according to the write completion flag to obtain the updated flip edge position set; extracting the sampling time marker corresponding to each channel telemetry value based on the updated flip edge position set, comparing the sampling time marker with the flip edge position to mark the time assignment status of each channel telemetry value; and counting the number of channels with the old time assignment status and the number of channels with the new time assignment status according to the time assignment marking results. If the number of both types of channels (old time and new time) is greater than zero, it is determined that there is an inconsistency in time assignment.
[0009] Furthermore, the batch refresh range adjustment amount is determined based on the phase consistency error, and the version tag refresh strategy is dynamically updated, including: if the phase consistency error exceeds a preset error threshold, the adjustment increment of the batch refresh range is determined based on the ratio of the error value to the preset error threshold, wherein the adjustment increment is the number of channels that are expanded outward from the current batch refresh range boundary to obtain the optimized batch refresh range adjustment amount; the boundary of the batch refresh range is expanded based on the optimized batch refresh range adjustment amount, and the expanded boundary position is updated to the shared storage area of the multi-core heterogeneous processing platform to obtain the dynamically updated version tag batch refresh range; in the next sampling cycle, a version tag synchronization update operation is performed to obtain a snapshot of the telemetry value read by the non-real-time core, and the phase consistency error value is recalculated; if the recalculated phase consistency error converges to within the preset threshold, the snapshot consistency reading and phase consistency maintenance are confirmed.
[0010] Furthermore, the dynamic update version tag refresh strategy to maintain snapshot consistency and phase consistency of non-real-time core reading includes: continuously performing version tag synchronous update operations in subsequent sampling cycles according to the batch refresh range of the dynamically updated version tags; obtaining the write timestamp containing additional markers from the real-time acquisition core and updating the correspondence between the flip edge position and the sampling time marker; re-determining the position of the channel combination affected by coupling and the phase consistency violation point according to the updated correspondence; and repeatedly performing synchronous updates and additional marker insertion for the phase consistency violation point until the phase consistency error value stabilizes within a preset threshold.
[0011] The technical solutions provided by the embodiments of the present invention may include the following beneficial effects: This invention discloses a data synchronization control method for a multi-core heterogeneous processor in an intelligent power distribution terminal. This method addresses the core issues of physical coupling interference between channels, cross-timetime mixed telemetry values, and phase consistency disruption caused by sampling time deviations during the collaborative processing of multiple telemetry channels by real-time acquisition cores and non-real-time cores. It accurately extracts the timing deviation between sampling time markers of each channel by using the write timestamp and version tag flip edge position of the real-time acquisition core, and quantifies the physical coupling strength between channels. When the coupling strength exceeds a preset threshold, the version tag intervals of the affected channels are dynamically merged into a batch refresh range, thereby identifying potential phase consistency disruption points appearing in the mixed telemetry value set. A batch synchronous update mechanism for version tags is adopted for these disruption points to obtain a snapshot of telemetry values at a unified sampling time. When the mixing ratio exceeds a threshold, additional tags are inserted to further calibrate the version tag flip edge position, ultimately achieving timetime consistency verification and phase consistency error optimization calculation for all telemetry values within the channel combination. Based on the error convergence, the version tag refresh strategy in the multi-core heterogeneous platform is dynamically adjusted to ensure that the non-real-time core obtains consistent snapshot readings and maintains stable phase consistency during power calculation, thereby significantly improving the timing accuracy and computational reliability of multi-channel telemetry data in a heterogeneous processing environment. Attached Figure Description
[0012] Figure 1 This is a flowchart of a data synchronization control method for a multi-core heterogeneous processor in an intelligent power distribution terminal according to the present invention.
[0013] Figure 2 This is a schematic diagram of a data synchronization control method for a multi-core heterogeneous processor in an intelligent power distribution terminal according to the present invention.
[0014] Figure 3 This is another schematic diagram of a data synchronization control method for a multi-core heterogeneous processor in an intelligent power distribution terminal according to the present invention. Detailed Implementation
[0015] To further understand the content of this invention, a detailed description of the invention is provided in conjunction with the accompanying drawings and embodiments. The specific embodiments described herein are for illustrative purposes only and are not intended to limit the invention. It should also be noted that, for ease of description, only the parts relevant to the invention are shown in the accompanying drawings.
[0016] like Figures 1-3 This embodiment of a data synchronization control method for a multi-core heterogeneous processor in an intelligent power distribution terminal may specifically include: Step S101: Obtain the write timestamps of multiple telemetry channels in the real-time acquisition core, extract the version tag flip edge position and sampling time mark of each channel, and calculate the physical coupling strength between channels based on the timing deviation between the sampling time marks of each channel.
[0017] The write timestamps of each telemetry channel in the real-time acquisition core are obtained. Each write timestamp contains the channel identifier and the time record of data writing. The version tag value is read from the write timestamps, and the position of the flip edge where the version tag changes from the old value to the new value is identified. A correspondence table between the channel identifier and the flip edge position is established. Based on the correspondence table, the sampling timestamp of each channel at the time of the flip edge is extracted. The sampling timestamp reflects the physical time point at which the telemetry data was acquired. The sampling timestamps of all channels are traversed, and the difference between the sampling timestamps of any two channels is calculated to obtain the timing deviation value of each channel combination. If the timing deviation of two channels is lower than a preset threshold, it is determined that the channel combination has a physical relationship. For channel combinations with a physical relationship, the reciprocal of the timing deviation value is used as the coupling strength to obtain the physical coupling strength between the channels.
[0018] In the multi-core heterogeneous processing architecture of the power distribution terminal, the real-time acquisition core is responsible for periodically acquiring data from each telemetry channel. Each write operation generates a corresponding write timestamp. The write timestamp includes a channel identifier and a data write time record. The channel identifier is used to distinguish different voltage or current acquisition channels, and the time record reflects the specific time when the channel data was written to the shared storage area.
[0019] Specifically, the version tag is a status marker maintained by the real-time acquisition core for each telemetry channel, used to indicate whether the channel data has been updated.
[0020] In one embodiment, the version tag employs a single-bit flipping mechanism. After the real-time acquisition core completes the data writing for a certain channel, it flips the version tag of that channel from zero to one, or from one to zero. The position of the flip edge is the moment when the version tag value changes. By continuously monitoring the value changes of the version tag for each channel, the flip edge time of each channel can be identified.
[0021] For example, if a three-phase current acquisition channel sequentially completes data writing within the same sampling period, the flip edge positions of each channel will exhibit slight time differences. This difference stems from the serial processing characteristics of real-time acquisition and verification of each channel. Based on the flip edge positions and channel identifiers, a correspondence table is established between the two. This correspondence table uses the channel identifier as an index to record the specific time when the flip edge of each channel occurs.
[0022] In one possible implementation, the sampling time marker for each channel at the time of the flip edge is extracted based on the flip edge times recorded in the correspondence table. The sampling time marker differs from the write timestamp; the sampling time marker reflects the physical time point at which the telemetry data is acquired by the analog-to-digital converter circuit, while the write timestamp reflects the time point at which the data is stored in the shared memory area. By traversing the sampling time markers of all channels, the difference between the sampling time markers of any two channels is calculated to obtain the timing deviation value for each channel combination.
[0023] It should be noted that the smaller the timing deviation value, the closer the sampling times of the two channels are, and the higher the degree of synchronization of their physical states. If the timing deviation of two channels is lower than a preset threshold, it is determined that the channel combination has a physical correlation. For channel combinations with physical correlation, the reciprocal of the timing deviation value is used as the coupling strength, and the smaller the timing deviation, the greater the coupling strength, thereby obtaining the physical coupling strength between each channel.
[0024] Step S102: Based on the writing timestamp and sampling timestamp, analyze whether the physical coupling strength between channels exceeds a preset threshold, merge the version tag ranges covered by channels that exceed the threshold into a batch refresh range of version tags, and obtain the channel combination affected by coupling.
[0025] Based on the write timestamp and sampling timestamp of each telemetry channel, the physical coupling strength is compared with a preset threshold. If the coupling strength between two channels exceeds the preset threshold, the channel pair is marked as a strongly coupled channel pair. After traversing all channels, a set of strongly coupled channel pairs is obtained. The version tag corresponding to each channel is extracted from the set of strongly coupled channel pairs, and the tag interval boundary of each version tag is obtained. The tag interval boundary is obtained from the flip edge position and includes the start position S and end position E of the version tag. Through the tag interval boundary, the version tag intervals covered by each channel in the set of strongly coupled channel pairs are merged. Tag intervals with overlapping or adjacent start and end positions are merged into a batch refresh range for version tags. Based on all channel identifiers included in the batch refresh range, the channel combination affected by coupling is obtained.
[0026] In the multi-core heterogeneous processing architecture of the power distribution terminal, the physical coupling strength reflects the degree of synchronization between different telemetry channels at the sampling time. Based on the physical coupling strength between each channel obtained in the previous steps, it is compared with a preset threshold. If the coupling strength value between two channels exceeds the preset threshold, it is determined that the channel pair has a strong correlation in physical characteristics and is marked as a strongly coupled channel pair.
[0027] For example, in a three-phase power acquisition scenario, if the coupling strength between the voltage channel and the current channel exceeds a preset threshold, it indicates that the voltage channel and the current channel have a strong dependency relationship when performing power calculations, and their data have consistency constraints at any given time.
[0028] Specifically, the version tag interval boundary refers to the effective range covered by each version tag in the time dimension. The starting position corresponds to the moment when the version tag is written, and the ending position corresponds to the moment before the next version tag flip.
[0029] In one embodiment, if the version tag of a current channel flips at the tenth millisecond and then flips again at the twentieth millisecond, the tag interval boundary of that version tag is from the tenth millisecond to the twentieth millisecond. By extracting the tag interval boundary of each channel in the strongly coupled channel pair set, the distribution of each channel's version tag on the time axis is obtained. This distribution directly affects the time attribution determination when the non-real-time computing core reads data.
[0030] In one possible implementation, the version tag intervals covered by each channel within a strongly coupled channel set are merged. If the tag intervals of two channels overlap at their start and end positions, or if the end position of one channel is adjacent to the start position of another, these two tag intervals are merged into a continuous version tag batch refresh range. Based on all channel identifiers included within the batch refresh range, a channel combination affected by coupling is formed, and all channels within this combination have a batch refresh constraint relationship when updating version tags.
[0031] Step S103: By combining the channels affected by coupling and the position of the flip edge of the version tag, identify the distribution pattern of the mixed telemetry values across time during the non-real-time kernel reading process, and determine the potential phase consistency violation point based on the flip edge region that appears in the mixed telemetry value set.
[0032] Obtain the channel combinations affected by coupling and the version tag flip edge positions of each channel. For each channel within the affected channel combinations, extract the time record of the non-real-time core accessing the channel during the reading process. Compare the time record with the version tag flip edge position to identify channels whose reading time falls in different intervals before and after the flip edge position, thus obtaining a set of channel identifiers with cross-time mixed telemetry values. Based on the set of channel identifiers with cross-time mixed telemetry values, statistically analyze the time attribution status of each channel within the channel combination. The time attribution status indicates whether the channel's telemetry value belongs to an old time before the flip edge position or a new time after the flip edge position. Traverse the time attribution status of all channels within the channel combination to obtain the distribution pattern of mixed telemetry values during the non-real-time core reading process. Based on the distribution pattern, the flip-edge regions where mixed telemetry values occur are located. These flip-edge regions are intervals on the time axis where the interval between the flip-edge positions of multiple channels is less than a preset time threshold. The ratio of the number of channels with both old and new assignments within this flip-edge region to the total number of channel combinations is used as a mixing degree index for the flip-edge region. Channels with both old and new assignments refer to channels whose read times fall within different intervals before and after the flip-edge position, resulting in inconsistent old and new time assignments. According to the mixing degree index, if the mixing degree index of a certain flip-edge region exceeds 0.5, this flip-edge region is marked as a potential phase consistency violation point. The phase consistency violation point indicates the risk of inconsistent time assignments for telemetry values within a channel combination in this region. The locations of all potential phase consistency violation points are then determined.
[0033] In the multi-core heterogeneous processing architecture of power distribution terminals, there is an asynchronous access relationship between non-real-time cores and real-time acquisition cores. When a non-real-time core reads telemetry data from the shared memory area, the real-time acquisition core is updating data for some channels. Cross-timetime mixed telemetry values refer to the situation where, in the same read operation, the telemetry values of multiple channels obtained by the non-real-time core belong to different sampling times. The data of some channels comes from the old sampling time, and the data of other channels comes from the new sampling time.
[0034] Specifically, for each channel within the coupled channel combination, the non-real-time core generates a corresponding time record when performing a read operation. This time record reflects the specific point in time when the non-real-time core accesses the channel's data. The time record is compared with the flip edge position of the channel's version tag. If the time record is before the flip edge position, it indicates that the non-real-time core is reading old data written before the flip edge; if the time record is after the flip edge position, it indicates that the non-real-time core is reading new data written after the flip edge.
[0035] In one embodiment, if the flip edge position of a voltage channel is the fifteenth millisecond, and the non-real-time core access time of the channel is recorded as the thirteenth millisecond, then the telemetry value of the voltage channel belongs to the old time; if the flip edge position of a current channel in the same channel combination is the twelfth millisecond, and the non-real-time core access time is recorded as the fourteenth millisecond, then the telemetry value of the current channel belongs to the new time.
[0036] It should be noted that the time-attribution status uses a binary identification method, that is, the telemetry value of each channel is identified as either the old time-attribute status or the new time-attribute status. After traversing all channels within the channel combination, the time-attribute status of each channel forms a status sequence, which intuitively reflects the distribution pattern of the mixed telemetry values during the non-real-time kernel reading process.
[0037] In one possible implementation, the distribution pattern is presented as a table mapping channel identifiers to time-based states. If a channel combination contains six channels, with three channels identified as old time-based states and the other three as new time-based states, then this distribution pattern indicates a significant cross-time-based mixing phenomenon. The formation of this distribution pattern is the fundamental data source for locating the flip-edge region.
[0038] For example, the process of locating the flip-edge region involves determining the spatial clustering of multiple channel flip-edge positions. The flip-edge region is defined as the interval between the flip-edge positions of multiple channels on the time axis that is less than a preset time threshold. In actual power distribution terminal scenarios, if the flip-edge positions of the three-phase voltage channels and the three-phase current channels are concentrated within a time window of 10 milliseconds to 15 milliseconds, and the time interval between any two adjacent flip-edges is less than the preset time threshold, then this time window is identified as a flip-edge region. The boundary of the flip-edge region is determined by the earliest and latest flip-edge positions within the region. Further, a mixing index is used to quantify the severity of the alternation of telemetry values at different times within the flip-edge region. Specifically, it is calculated by counting the number of channels with cross-time mixing within the flip-edge region and then taking the ratio of this number to the total number of channels in combination.
[0039] For example, if a channel combination contains six channels, four of which have alternations between old and new times in the flip edge region, then the blending index is the ratio of four to six.
[0040] Preferably, if the mixing degree index of a certain flip edge region exceeds a preset threshold, then the flip edge region is marked as a potential phase consistency violation point. The phase consistency violation point indicates that there is a risk of inconsistent time assignment of telemetry values within the channel combination in this region, that is, the voltage value and current value used for power calculation belong to different sampling times.
[0041] Understandably, the presence of phase inconsistency breaches can cause non-real-time kernels to use asynchronous telemetry data when performing power calculations. In a three-phase power calculation scenario, if the voltage value of a phase is sampled from the tenth millisecond while the current value is sampled from the twentieth millisecond, the calculated power value cannot accurately reflect the grid load state at any given moment. By identifying all potential phase inconsistency breach locations, the distribution terminal can pinpoint which regions of the flip edge have telemetry data with a risk of time inconsistency.
[0042] Step S104: For the phase consistency violation point, adopt the version tag batch refresh synchronous update mechanism within the version tag range, obtain the telemetry value snapshot under the unified sampling time mark, evaluate whether the proportion of mixed telemetry values is higher than the threshold, and trigger the insertion of additional tags in the real-time acquisition kernel.
[0043] Obtain the batch refresh range of version tags corresponding to the flip edge region where the phase consistency violation point is located. Extract the version tags of all channels from the batch refresh range. Perform a unified flip operation on the version tags of all channels at the same time to obtain the channel set after version tag synchronization update. Based on the channel set after version tag synchronization update, read the telemetry values of all channels within the batch refresh range from the shared storage area. The telemetry values correspond to a unified sampling time marker. Combine the telemetry values of all channels according to the channel identifier to obtain a telemetry value snapshot under the unified sampling time marker. Calculate the ratio of the number of channels with mixed old and new time markers in the telemetry value snapshot to the total number of channels to obtain the mixed telemetry value ratio. Compare the mixed telemetry value ratio with a preset threshold. If the mixed telemetry value ratio is higher than the preset threshold, send an additional marker insertion command to the real-time acquisition core. During the data writing process of the next sampling cycle, the real-time acquisition core inserts an additional marker after all channel data is written. The additional marker is a write completion flag.
[0044] In the multi-core heterogeneous processing architecture of the power distribution terminal, for the phase consistency violation point determined in the previous steps, the corresponding version tag batch refresh range is obtained from the flip edge region where the violation point is located. The version tag batch refresh range covers all channels with strong coupling relationships, where strong coupling relationship refers to the set of channels where the version tag update synchronization degree between channels exceeds 0.85. The current version tag value status of each channel is extracted from this range.
[0045] Specifically, version tag synchronization update refers to performing a unified flipping operation on the version tags of all channels within the batch refresh range at the same time.
[0046] In one embodiment, after the real-time acquisition core completes the data writing of the last channel within the batch refresh range, it simultaneously flips the version tags of all channels from the old values to the new values through an atomic operation. The atomic operation means that this flipping action will not be interrupted by other operations during execution, thus ensuring that when the non-real-time core reads the version tags at any time, all tags are either the old values or all are the new values, avoiding an intermediate state where some channels have been flipped while others have not. Through synchronous version tag updates, all channels within the batch refresh range form a channel set with synchronized version tag updates.
[0047] In one possible implementation, telemetry values for all channels are read from a shared storage area based on the channel set, each telemetry value corresponding to a unified sampling time marker. The telemetry values for all channels are then combined according to their channel identifiers to form a snapshot of the telemetry values under the unified sampling time marker. The number of channels in the snapshot that still contain a mixture of old and new time markers is counted, and this number is compared to the total number of channels in the channel set to obtain the mixed telemetry value ratio.
[0048] It should be noted that if the proportion of the mixed telemetry values is higher than a preset threshold, it indicates that the current synchronization update operation has not completely eliminated the time inconsistency problem. In this case, an additional flag insertion command is sent to the real-time acquisition core. During the data writing process of the next sampling cycle, the real-time acquisition core inserts an additional flag after all channel data has been written. The additional flag is a write completion flag, used to indicate that the data of all channels within the batch refresh range in this sampling cycle has been written. The non-real-time core can determine the integrity of the data by detecting this flag when reading the data.
[0049] Step S105: Obtain the position of the updated version label flip edge from the additional tag insertion result after triggering, verify the consistency of the time assignment of telemetry values within the channel combination, calculate the phase consistency error of each channel telemetry value component in the power calculation, and obtain the optimized batch refresh range adjustment amount.
[0050] From the additional marker insertion results triggered by the real-time acquisition core, the position information of the write completion flag is read. Based on the write completion flag, the flip edge position of the version tag of each channel in the channel combination is located, and the updated flip edge position set is obtained. Based on the updated flip edge position set, for each channel in the channel combination, the sampling time marker corresponding to the telemetry value of each channel is extracted. The sampling time marker is compared with the flip edge position to mark the time assignment status of each channel telemetry value, and the time assignment labeling result of all telemetry values in the channel combination is obtained. According to the time assignment labeling result, the consistency of the time assignment of each channel telemetry value in the channel combination is verified. The number of channels with the old time assignment status and the number of channels with the new time assignment status are counted. If the number of both types of channels is greater than zero, it is determined that there is a time assignment inconsistency, and the identifier set of inconsistent channels is obtained. Through the identifier set of inconsistent channels, the voltage channel telemetry value and the current channel telemetry value involved in the power calculation are extracted. The sampling time markers of the voltage channel and the current channel are obtained respectively, and the time difference between the two is calculated. The time difference is used as the phase consistency error value. Based on the phase consistency error value, if the error value exceeds the preset threshold of 0.1, the ratio r = p / preset threshold is calculated. According to the formula d = floor(r-1), d is the adjustment increment (number of channels), p is the phase error, and the adjustment increment is the number of channels that are expanded outward from the current batch refresh range boundary to obtain the optimized batch refresh range adjustment amount.
[0051] After the real-time acquisition core completes the insertion of the additional marker, the position information of the write completion flag is read from the shared storage area. The write completion flag indicates the moment when all channel data within the sampling period is written. Based on this moment, the flip edge position of the version tag of each channel in the channel combination is located, forming an updated flip edge position set.
[0052] In one embodiment, the telemetry values of all channels within the channel combination are traversed, and a sampling time marker corresponding to the telemetry value of each channel is obtained. The sampling time marker is then compared with the flip edge position corresponding to that channel in the flip edge position set. If the sampling time marker of a channel is after its corresponding flip edge position, it indicates that the telemetry value of that channel belongs to the new time data; if the sampling time marker is before the flip edge position, it indicates that the telemetry value of that channel belongs to the old time data. When the sampling time markers of all channels within the channel combination are after their respective flip edge positions, it is determined that the time attribution consistency of all telemetry values within the channel combination is established, indicating that all telemetry data read by the non-real-time core comes from the same sampling time. In another embodiment, the sampling time marker corresponding to the telemetry value of each channel within the channel combination is extracted.
[0053] Specifically, the sampling time marker for each channel is compared with the corresponding flip edge position in the set of flip edge positions. For example, if the sampling time marker for a voltage channel is the fifteenth millisecond, and the flip edge position for that channel is the twelfth millisecond, then the sampling time marker is after the flip edge position, and the channel's time assignment status is marked as the new time. If the sampling time marker for a current channel is the tenth millisecond, and the flip edge position for that channel is the twelfth millisecond, then the sampling time marker is before the flip edge position, and the channel's time assignment status is marked as the old time. After traversing all channels within the channel combination, a time assignment labeling result containing the time assignment status of each channel is generated.
[0054] In one possible implementation, consistency verification is performed based on the time-attribution labeling results. The number of channels with an old time-attribution status and the number of channels with a new time-attribution status are counted. If both types of channel counts are greater than zero, it is determined that there is an inconsistency in time-attribution within the channel combination.
[0055] It should be noted that when inconsistencies in time attribution are determined, channel identifiers whose time attribution status differs from that of most channels are selected from the time attribution labeling results to form a set of identifiers for inconsistent channels.
[0056] For example, power calculation involves multiplying the telemetry values of the voltage channel and the current channel. In a three-phase power calculation scenario, the active power of a phase is obtained by multiplying the instantaneous voltage value and the instantaneous current value of that phase. If the telemetry value of the voltage channel comes from the tenth millisecond sample and the telemetry value of the current channel comes from the twentieth millisecond sample, then the two telemetry values belong to different instants of grid operation. Since the grid load is in a dynamic state, there is no physical correspondence between the voltage and current values at different times, and directly using them for power calculation will lead to a deviation in the calculation results. The magnitude of the deviation depends on the magnitude of the load change between the two sampling times. Further, through the identifier set of the inconsistent channels, the telemetry values of the voltage channel and the current channel involved in the power calculation are extracted, and the sampling time markers of the voltage channel and the current channel are obtained respectively. The time difference between the two sampling time markers is calculated, and the time difference is used as the phase consistency error value. This error value directly reflects the degree of deviation between the voltage telemetry value and the current telemetry value in the time dimension.
[0057] In one embodiment, the phase consistency error value is compared with a preset threshold. If the phase consistency error value exceeds the preset threshold, it indicates that the current batch refresh range of the version tag has not completely covered channels with strong coupling relationships. In this case, the adjustment increment of the batch refresh range is determined based on the ratio of the error value to the preset threshold. The adjustment increment represents the number of channels that are expanded outward from the current batch refresh range boundary.
[0058] For example, if the error value is twice the preset threshold, the adjustment increment can be set to extend two adjacent channels outside the boundary of the batch refresh range.
[0059] It is understandable that by obtaining the optimized batch refresh range adjustment amount, when the power distribution terminal performs version tag synchronization update in the next sampling cycle, it will uniformly flip the version tags of more channels according to the expanded batch refresh range, thereby including more channels with physical coupling relationships into the scope of synchronization update.
[0060] Step S106: By adjusting the optimized batch refresh range, dynamically update the refresh strategy of the version tag in the multi-core heterogeneous processing platform, evaluate whether the phase consistency error has converged to within the preset threshold, and confirm that the snapshot consistency reading and phase consistency maintenance of the non-real-time core in power calculation are confirmed.
[0061] The boundary position of the current version tag batch refresh range is obtained. The boundary of the batch refresh range is expanded according to the batch refresh range adjustment amount. The expanded boundary position is updated to the shared storage area of the multi-core heterogeneous processing platform, resulting in a dynamically updated version tag batch refresh range. Based on the dynamically updated version tag batch refresh range, a version tag synchronization update operation is performed in the next sampling cycle. The real-time core writes a telemetry value snapshot to the shared storage area, and the non-real-time core reads the same version telemetry value snapshot from the shared storage area. The phase consistency error value between the voltage channel and the current channel in the power calculation is recalculated, where the error value is the absolute value of the difference between the voltage channel phase φv and the current channel phase φi, |φv-φi|. The error value is compared with a preset threshold to determine whether the phase consistency error has converged to within the preset threshold. If the phase consistency error has converged to within the preset threshold, it is confirmed that the snapshot consistency reading and phase consistency maintenance of the non-real-time core in the power calculation are valid, and the current version tag batch refresh range configuration is marked as effective. If the phase consistency error has not converged to within the preset threshold, an iterative update of the batch refresh range adjustment amount is triggered.
[0062] In the multi-core heterogeneous processing architecture of the power distribution terminal, the batch refresh range adjustment reflects the gap between the current version tag batch refresh range and the ideal coverage range. After obtaining the adjustment amount from the previous steps, the boundary position of the current version tag batch refresh range is read, and the boundary is expanded according to the adjustment amount.
[0063] Specifically, the boundary position of the batch refresh range of version tags is stored in the shared storage area of the multi-core heterogeneous processing platform, which can be accessed by both real-time acquisition cores and non-real-time cores.
[0064] In one embodiment, if the adjustment indicates an expansion of two channels outward, the starting boundary of the batch refresh range is moved forward by two channel positions, and the ending boundary is moved backward by two channel positions, forming the expanded boundary position. The expanded boundary position is written to the shared storage area. The real-time acquisition core reads this boundary position in the next sampling cycle and performs a version tag synchronization update operation according to the new batch refresh range. The synchronization update operation refers to uniformly flipping the version tags of all channels within the batch refresh range at the same time.
[0065] In one possible implementation, after the synchronization update operation is completed, the non-real-time core reads a snapshot of telemetry values from the shared memory area and recalculates the phase consistency error between the voltage and current channels in the power calculation. The error value is compared with a preset threshold. If the error value is less than or equal to the preset threshold, the phase consistency error is determined to have converged; if the error value is greater than the preset threshold, the phase consistency error is determined to have not converged.
[0066] It should be noted that when the phase consistency error converges to within the preset threshold, it indicates that the current version of the tag batch refresh range can cover all channels with strong coupling relationships, the telemetry snapshots read by the non-real-time core have time-based consistency, and the voltage and current values used in power calculations come from the same sampling time. At this point, the current version of the tag batch refresh range configuration is marked as valid, confirming that the non-real-time core maintains snapshot consistency and phase consistency in power calculations. If the phase consistency error does not converge, iterative updates of the batch refresh range adjustment amount are triggered, continuing to expand the batch refresh range until the error converges.
[0067] If the technical solution of this application involves the collection, processing, or application of personal information, the relevant products have strictly complied with the requirements of the "Personal Information Protection Law of the People's Republic of China" and other laws and regulations before implementing any personal information processing activities, clearly and explicitly informing individuals of the rules for personal information processing and obtaining their independent and voluntary authorization and consent. Specifically, if the information involved is sensitive personal information, the product has not only obtained the individual's separate consent before processing, but this consent is also an explicit consent made on the basis of full knowledge. For example, in areas where personal information collection devices such as cameras are deployed, prominent and eye-catching signs have been set up to clearly inform users that entering the area is considered as consenting to the collection of their personal information; or, on the personal information processing interface (such as applications, web pages, etc.), through pop-ups, checkboxes, or active uploads, the user is required to actively authorize the process after clearly displaying key rules such as the identity of the personal information processor, the purpose of processing, the processing method, and the types of information involved.
[0068] The above description is merely a preferred embodiment of one or more embodiments of this specification and is not intended to limit the scope of one or more embodiments of this specification. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of one or more embodiments of this specification should be included within the protection scope of one or more embodiments of this specification.
Claims
1. A data synchronization control method for a multi-core heterogeneous processor in an intelligent power distribution terminal, characterized in that, include: The process involves: acquiring the write timestamps of multiple telemetry channels in the real-time acquisition core; identifying the flip-edge position of the version tag for each channel from the write timestamps and extracting the corresponding sampling time marker; determining the physical coupling strength between channels based on the timing deviation between the sampling time markers of each channel; merging the version tag intervals covered by channels with physical coupling strength exceeding a preset threshold into a batch refresh range for version tags, resulting in a channel combination affected by coupling; identifying the distribution pattern of cross-timetime mixed telemetry values during non-real-time core reading based on the channel combination affected by coupling and the flip-edge position of the version tags, and determining potential phase consistency violation points; using a synchronous update mechanism within the batch refresh range of version tags to obtain a snapshot of telemetry values under a unified sampling time marker for the phase consistency violation points, and triggering the insertion of additional markers in the real-time acquisition core based on the proportion of mixed telemetry values; obtaining the updated flip-edge position of the version tags from the additional marker insertion result, verifying the consistency of the time assignment of telemetry values within the channel combination, and calculating the phase consistency error; determining the batch refresh range adjustment amount based on the phase consistency error, and dynamically updating the version tag refresh strategy to maintain snapshot consistency and phase consistency during non-real-time core reading.
2. The method as described in claim 1, characterized in that, The step of identifying the flip edge position of each channel version tag from the written timestamp and extracting the corresponding sampling time marker includes: reading the numerical state of the version tag, identifying the flip edge position where the version tag jumps from the old value to the new value, establishing a correspondence table between channel identifiers and flip edge positions; and extracting the sampling time marker of each channel at the time of the flip edge occurrence based on the correspondence table between channel identifiers and flip edge positions.
3. The method as described in claim 2, characterized in that, The physical coupling strength between channels is determined based on the timing deviation between the sampling time markers of each channel, including: traversing the sampling time markers of all channels, calculating the difference between the sampling time markers of any two channels to obtain the timing deviation value; if the timing deviation between two channels is lower than a preset threshold, it is determined that the channel combination has a physical relationship, and the reciprocal of the timing deviation value is used as the coupling strength value to obtain the physical coupling strength between each channel.
4. The method as described in claim 1, characterized in that, The step of merging the version tag intervals covered by channels with physical coupling strength exceeding a preset threshold into a batch refresh range for version tags includes: marking channel pairs with physical coupling strength exceeding a preset strength threshold as strongly coupled channel pairs to obtain a set of strongly coupled channel pairs; extracting the version tag corresponding to each channel from the set of strongly coupled channel pairs and obtaining the start and end positions of each version tag; merging the version tag intervals covered by each channel in the set of strongly coupled channel pairs, and merging the tag intervals with overlapping or adjacent start and end positions into a batch refresh range for version tags.
5. The method as described in claim 1, characterized in that, The method of identifying the distribution pattern of cross-time mixed telemetry values during non-real-time core reading based on the coupled channel combination and version tag flip edge position includes: extracting the time record of non-real-time core access to the channel for each channel in the coupled channel combination; comparing the time record with the version tag flip edge position; identifying channels whose reading time falls in different intervals before and after the flip edge to obtain a set of channel identifiers with cross-time mixed telemetry values; statistically analyzing the time assignment status of each channel in the channel combination; and traversing the time assignment status of all channels to obtain the distribution pattern of mixed telemetry values during non-real-time core reading.
6. The method as described in claim 5, characterized in that, Identifying potential phase consistency disruption points includes: locating the flip-edge region where mixed telemetry values appear in the flip-edge region of the mixed telemetry values, calculating the ratio of the number of channels where telemetry values at new and old times alternate within the flip-edge region of the mixed telemetry values to the total number of channel combinations to obtain a mixing degree index, and marking the flip-edge region as a potential phase consistency disruption point if the mixing degree index of a certain flip-edge region exceeds a preset threshold.
7. The method as described in claim 1, characterized in that, The method for obtaining telemetry snapshots under a unified sampling time marker by using a synchronous update mechanism within the batch refresh range of version tags to address the phase consistency violation point includes: performing a unified flip operation on the version tags of all channels within the batch refresh range at the same time to obtain a channel set after the version tags are synchronously updated; reading the telemetry values of all channels within the batch refresh range from the shared storage area, wherein the telemetry values correspond to a unified sampling time marker, and combining the telemetry values of all channels according to the channel identifier to obtain a telemetry snapshot under a unified sampling time marker; calculating the ratio of the number of channels with a mixture of old and new time markers in the telemetry snapshot to the total number of channels to obtain the mixed telemetry value ratio; if the mixed telemetry value ratio is higher than a preset threshold, sending an additional marker insertion instruction to the real-time acquisition core, wherein the real-time acquisition core inserts the additional marker after the data is written in the next sampling cycle.
8. The method as described in claim 1, characterized in that, The step of obtaining the updated version tag flip edge position from the additional tag insertion result and verifying the consistency of the time assignment of telemetry values within the channel combination includes: locating the version tag flip edge position of each channel within the channel combination according to the write completion flag to obtain the updated flip edge position set; extracting the sampling time marker corresponding to each channel telemetry value based on the updated flip edge position set, comparing the sampling time marker with the flip edge position to mark the time assignment status of each channel telemetry value; and counting the number of channels with the old time assignment status and the number of channels with the new time assignment status according to the time assignment marking results. If the number of both types of channels (old time and new time) is greater than zero, it is determined that there is an inconsistency in time assignment.
9. The method as described in claim 1, characterized in that, The step of determining the batch refresh range adjustment amount based on the phase consistency error and dynamically updating the version tag refresh strategy includes: if the phase consistency error exceeds a preset error threshold, determining the adjustment increment of the batch refresh range based on the ratio of the error value to the preset error threshold, wherein the adjustment increment is the number of channels extended outward from the current batch refresh range boundary to obtain the optimized batch refresh range adjustment amount; expanding the boundary of the batch refresh range based on the optimized batch refresh range adjustment amount, and updating the expanded boundary position to the shared storage area of the multi-core heterogeneous processing platform to obtain the dynamically updated version tag batch refresh range; performing a version tag synchronization update operation in the next sampling cycle, obtaining a snapshot of telemetry values read by non-real-time cores, recalculating the phase consistency error value, and confirming that the snapshot consistency reading and phase consistency are maintained if the recalculated phase consistency error converges to within the preset threshold.
10. The method as described in claim 1, characterized in that, The dynamic update version tag refresh strategy to maintain snapshot consistency and phase consistency of non-real-time core reading includes: continuously performing version tag synchronous update operations in subsequent sampling cycles according to the batch refresh range of the dynamically updated version tags; obtaining the write timestamp containing additional markers from the real-time acquisition core and updating the correspondence between the flip edge position and the sampling time marker; re-determining the position of the channel combination affected by coupling and the phase consistency violation point according to the updated correspondence; and repeatedly performing synchronous updates and additional marker insertion for the phase consistency violation point until the phase consistency error value stabilizes within a preset threshold.