Edge-end collaborative data caching method

By adopting edge-end collaborative data cache method in the power system, dynamically adjusting the cache space and deduplication processing, the problems of low data cache efficiency and insufficient space utilization in the power system are solved, and timely transmission and efficient storage of data are achieved.

CN119271712APending Publication Date: 2025-01-07CHINA SOUTHERN POWER GRID COMPANY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411325316.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-23
Publication Date
2025-01-07

AI Technical Summary

Technical Problem

When data caches in power systems, it is difficult to meet the real-time transmission needs of different types of data, resulting in the problem that important data cannot be cached in time and that important data does not occupy too much cache space.

Method used

Adopt edge-end collaborative data cache method, by determining the cache attributes of the data to be cached in the distributed service node, dynamically adjusting the cache space capacity, deduplication processing of duplicate data, and backing up the target data to improve cache efficiency and flexibility .

Benefits of technology

It realizes timely caching and efficient transmission of data, improves the cache space utilization of distributed service nodes, enhances the fault tolerance and availability of data, and solves the problem of unreasonable data transmission in real time and unreasonable cache space allocation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119271712A_ABST
    Figure CN119271712A_ABST
Patent Text Reader

Abstract

The invention discloses an edge-end collaborative data caching method. The method is applied to distributed service nodes, and the specific scheme is as follows: for each distributed service node, receiving at least one group of to-be-cached data based on the current distributed service node, and determining a cache attribute corresponding to the at least one group of to-be-cached data; according to the available cache space capacity of the current distributed service node and the cache attribute of the to-be-cached data, the cache space capacity required by the to-be-cached data is determined, and the to-be-cached data is cached; when it is detected that the cache meets a preset condition, determining repeated cache data in all the distributed service nodes according to the cache attribute and performing de-duplication processing, and performing backup processing on target cache data of the preset cache attribute; wherein the repeated cache data and the target cache data are data in the cached data. According to the invention, the efficiency and flexibility of data caching are improved, and the utilization rate of the cache space of the distributed service node is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to an edge-end collaborative data caching method. Background Art

[0002] With the development of the power industry and the popularization of smart grid systems, the amount of power data transmission is gradually increasing. The realization of business operations such as real-time monitoring, remote control, fault detection and status evaluation of power systems is based on real-time and accurate data transmission.

[0003] At present, in order to achieve fast data transmission, power data is usually cached based on fixed rules. However, as the data types and application scenarios of power data in power systems become increasingly complex, the above-mentioned data caching based on fixed rules is difficult to meet the needs of real-time transmission of different types of data, resulting in the problem that important data cannot be cached in time and relatively unimportant data occupies too much cache space. Summary of the invention

[0004] The present invention provides an edge-end collaborative data caching method, which improves the efficiency and flexibility of data caching and improves the utilization rate of the cache space of distributed service nodes.

[0005] According to one aspect of the present invention, a data caching method for edge collaboration is provided, which is applied to a distributed service node. The method includes:

[0006] For each distributed service node, receiving at least one set of data to be cached based on the current distributed service node, and determining a cache attribute corresponding to the at least one set of data to be cached;

[0007] According to the available cache space capacity of the current distributed service node and the cache attributes of the data to be cached, determine the required cache space capacity of the data to be cached and cache the data to be cached;

[0008] When it is detected that the cache meets the preset conditions, the duplicate cache data in all distributed service nodes is determined and deduplicated based on the cache attributes, and the target cache data with the preset cache attributes is backed up; wherein the duplicate cache data and the target cache data are data in the cached data.

[0009] According to another aspect of the present invention, there is provided an edge-end collaborative data caching device, which is applied to a distributed service node, and includes:

[0010] A data processing module, configured to receive at least one set of data to be cached based on the current distributed service node for each distributed service node, and determine a cache attribute corresponding to the at least one set of data to be cached;

[0011] A data cache module, used to determine the required cache space capacity of the data to be cached and cache the data to be cached according to the available cache space capacity of the current distributed service node and the cache attributes of the data to be cached;

[0012] The cache data deduplication and backup module is used to determine the duplicate cache data in all distributed service nodes and deduplicate it based on the cache attributes when it detects that the cache meets the preset conditions, and to back up the target cache data with the preset cache attributes; wherein the duplicate cache data and the target cache data are the data in the cached data.

[0013] According to another aspect of the present invention, there is provided an electronic device, the electronic device comprising:

[0014] at least one processor; and

[0015] a memory communicatively connected to at least one processor; wherein,

[0016] The memory stores a computer program that can be executed by at least one processor, and the computer program is executed by at least one processor so that the at least one processor can execute the edge-to-edge collaborative data caching method of any embodiment of the present invention.

[0017] According to another aspect of the present invention, a computer-readable storage medium is provided, which stores computer instructions, and the computer instructions are used to enable a processor to implement the edge-to-edge collaborative data caching method of any embodiment of the present invention when executed.

[0018] According to another aspect of the present invention, there is provided a computer program product, including a computer program, characterized in that when the computer program is executed by a processor, the computer program implements the edge-to-edge collaborative data caching method as in any embodiment of the present invention.

[0019] The technical solution of the embodiment of the present invention is applied to the distributed service node. For each distributed service node, based on the current distributed service node receiving at least one group of data to be cached, and determining the cache attributes corresponding to at least one group of data to be cached, a cache basis is provided for subsequent data caching, ensuring that the data to be cached with high cache attributes can be cached first. According to the available cache space capacity of the current distributed service node and the cache attributes of the data to be cached, the required cache space capacity of the data to be cached is determined, and the cache data to be cached is processed, ensuring that the data to be cached can be cached by the current distributed service node, avoiding the problem of being unable to cache in time due to insufficient cache space capacity. When it is detected that the cache meets the preset conditions, the duplicate cache data in all distributed service nodes is determined according to the cache attributes and deduplication is processed, thereby improving the utilization rate of the cache space of the distributed service node. The target cache data with preset cache attributes is backed up and processed, so that when the current distributed service node fails or the network is abnormal, the target cache data can be quickly restored and accessed, thereby improving the fault tolerance and availability of the target cache data. The present invention solves the problems of data inability to be transmitted in real time and unreasonable allocation of cache space capacity in the prior art, improves the efficiency and flexibility of data caching, and improves the utilization rate of the cache space of the distributed service node.

[0020] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.

[0022] Figure 1 It is a flow chart of a data caching method for edge-end collaboration provided by an embodiment of the present invention;

[0023] Figure 2 It is a flow chart of a data caching method for edge-end collaboration provided by an embodiment of the present invention;

[0024] Figure 3 It is a structural diagram of an edge-end collaborative data caching device provided by an embodiment of the present invention;

[0025] Figure 4 It is a structural diagram of an electronic device that implements the edge-end collaborative data caching method of an embodiment of the present invention. DETAILED DESCRIPTION

[0026] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0027] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0028] Embodiment 1

[0029] Figure 1 This is a flow chart of an edge-side collaborative data caching method provided in the first embodiment of the present invention. This embodiment is applicable to the case where cached data is cached according to cache attributes. The method can be executed by an edge-side collaborative data caching device. The edge-side collaborative data caching device can be implemented in the form of hardware and / or software. The edge-side collaborative data caching device can be configured in electronic devices such as mobile phones, computers or servers. Figure 1 As shown, the method includes:

[0030] S110: For each distributed service node, at least one group of data to be cached is received based on the current distributed service node, and a cache attribute corresponding to the at least one group of data to be cached is determined.

[0031] Among them, in the power distribution system, multiple distributed service nodes may be included. Each distributed service node may be a computing unit that provides a specific service. In an embodiment of the present invention, the distributed node may be used to receive data to be cached and perform data caching processing on the data to be cached. Optionally, the distributed service node may be a node corresponding to the edge server. The data to be cached may be understood as data that currently needs to be cached. Since the current distributed service node may correspond to one or more power devices, each power device may generate a set of data to be cached, and the current distributed service node may receive at least one set of data to be cached. The cache attribute may be used to characterize the cache priority attribute of the data to be cached. The cache attribute may be used to determine which group of data to be cached in at least one group of data to be cached can be cached first. Optionally, the cache attribute may include a cache priority score corresponding to the data to be cached. The cache priority score may be used to characterize the cache order of the data to be cached. The higher the cache priority score, the more the data to be cached will be cached first. Optionally, the data to be cached may be divided into three categories of high priority, medium priority and low priority according to the cache priority score in the cache attribute.

[0032] Specifically, in the power distribution system, multiple distributed service nodes are included. Each distributed service node includes one or more power devices in the current power area. These power devices will generate power data in real time. Among these power data, there are data to be cached that need to be cached. Then, at least one group of data to be cached corresponding to at least one power device is sent to the current distributed service node, so that the current distributed service node can receive at least one group of data to be cached. According to the received at least one group of data to be cached and the data attributes corresponding to the data to be cached, the cache attributes corresponding to the data to be cached are determined.

[0033] In an embodiment of the present invention, the cache attributes of the data to be cached may be determined by: for at least one group of data to be cached, determining the importance attribute, timeliness attribute and access frequency attribute of the data to be cached; and determining the cache attributes of the data to be cached based on the importance attribute, timeliness attribute, access frequency attribute and corresponding weight values.

[0034] Among them, the importance attribute can be an attribute used to characterize whether the data to be cached is important. Optionally, the importance attribute can be an importance score of the data to be cached. The timeliness attribute can be an attribute used to characterize the timeliness of the data to be cached. Optionally, the timeliness attribute can be a timeliness score of the data to be cached. The access frequency attribute can be an attribute used to characterize the historical access frequency of the data to be cached. Optionally, the access frequency attribute can be an access frequency score of the data to be cached. The weight value can be a weight value determined according to different data attributes of the data to be cached. For the importance attribute, timeliness attribute and access frequency attribute, the corresponding weight values ​​can be the same or different.

[0035] Specifically, for at least one group of data to be cached, the importance assessment range to which the data to be cached belongs is determined from the preset importance assessment range according to the data type and data source of the data to be cached. And the importance attribute corresponding to the importance assessment range is determined. Correspondingly, the timeliness assessment range to which the data to be cached belongs is determined from the preset timeliness assessment range according to the data type and data source of the data to be cached, and the timeliness attribute of the data to be cached is determined based on the timeliness assessment range. The historical access frequency of the data to be cached is determined according to the historical access volume of the data to be cached within the preset historical access time. The access frequency assessment range to which the historical access frequency belongs is determined from the preset access frequency assessment range. And the access frequency attribute of the data to be cached is determined according to the access frequency assessment range. It should be noted that the preset importance assessment range, the preset timeliness assessment range and the preset access frequency assessment range are all pre-set, and are used to determine the assessment range of the importance attribute, timeliness attribute and access frequency attribute corresponding to the data to be cached.

[0036] The importance attribute and the weight value corresponding to the importance attribute are multiplied to obtain a first multiplication result. The timeliness attribute and the weight value corresponding to the timeliness attribute are multiplied to obtain a second multiplication result. The access frequency attribute and the weight value corresponding to the access frequency attribute are multiplied to obtain a third multiplication result. The first multiplication result, the second multiplication result, and the third multiplication result are accumulated to obtain a cache attribute of the data to be cached.

[0037] Exemplarily, the importance attribute is the importance score, the timeliness attribute is the timeliness score, the access frequency attribute is the access frequency score, and the cache attribute is the cache priority score. If there are three preset importance assessment ranges, data of type A and type B belong to the first preset importance assessment range and the importance score corresponding to the first preset importance assessment range is 80 points; data of type C belongs to the second preset importance assessment range and the importance score corresponding to the second preset importance assessment range is 60 points; data of type D and type E belong to the third preset importance assessment range and the importance score corresponding to the third preset importance assessment range is 40 points. After receiving the data to be cached, based on the data type of the data to be cached being type A, it can be determined that the importance score corresponding to the data to be cached is 80 points.

[0038] Correspondingly, if there are two preset timeliness evaluation ranges, type A and type B belong to the first preset timeliness evaluation range, that is, type A and type B are data that need to be processed immediately, and the timeliness score corresponding to the first preset timeliness evaluation range is 90 points; type C data belongs to the second preset timeliness evaluation range, that is, type C data can be processed intermittently, and the timeliness score corresponding to the second preset timeliness evaluation range is 60 points. Based on the above, according to the data type of the data to be cached is type A, it can be determined that the timeliness score of the data to be cached is 90 points.

[0039] Accordingly, after receiving the data to be cached, the historical access frequency of the data to be cached can be determined by the historical access volume of the data to be cached within one hour before the current moment. According to the historical access frequency and the preset access frequency evaluation range, it is determined to which access frequency evaluation range the historical access frequency belongs, and according to the access frequency score corresponding to the access frequency evaluation range, the access frequency score of the data to be cached is obtained.

[0040] According to the importance score, timeliness score, access frequency score, and corresponding weight values, calculate the cached data D i The corresponding cache priority score is the cache attribute. The specific formula can be as follows:

[0041] P i =w1×I i +w2×T i +w3×F i

[0042] Among them, P i Indicates the data to be cached D i The cache priority score of I i Indicates the data to be cached D i The importance score, T i Indicates the data to be cached D i Timeliness score, Fi Indicates the data to be cached D i The access frequency score, w1, w2, and w3 represent the corresponding weight values.

[0043] Optionally, for each distributed service node, the current distributed service node periodically adjusts a preset importance evaluation range, a preset timeliness evaluation range, and a preset access frequency evaluation range to dynamically adjust cache attributes of the current data to be cached.

[0044] In an embodiment of the present invention, the cache attributes can also be updated through predicted access information, and the specific method can be: obtaining historical access information of historical cache data generated by the power equipment to which the data to be cached belongs before the current moment within the historical time length, wherein the end moment in the historical time length is the current moment, and the historical access information includes the access volume corresponding to each moment in the historical time length; determining the access change trend parameters within the historical time length based on the historical access information; inputting the access change trend parameters into the pre-trained access prediction model to determine the predicted access information for the next moment after the current moment; and updating the cache attributes of the data to be cached based on the predicted access information.

[0045] Among them, the historical cache data can be the cache data corresponding to the data to be cached, which is generated by the power equipment to which the data to be cached belongs before the current moment. The historical duration can be a period of time set according to actual needs before the current moment. The historical access information includes the number of visits corresponding to each moment in the historical duration. Since the access to cached data is based on actual needs, there may be a situation where the number of visits at the current moment is zero. For example, the historical duration can be 2 minutes, and the historical access information can be understood as being accessed once in the first second, once in the 5th second, and once in the 80th second within 2 minutes. The access change trend parameter can be the rate of change of the historical access information per unit time. The access prediction model can be a pre-trained model that calculates and outputs the preset access information of the next moment based on the input access change trend parameter. Optionally, the access prediction model can be a differential integrated moving average autoregressive model (Autoregressive Integrated Moving Average Model, ARIMA). The predicted access information can be understood as the number of visits corresponding to the next moment after the current moment.

[0046] Specifically, obtain the access volume corresponding to each moment in the historical time length of the historical cache data generated by the power equipment corresponding to the data to be cached before the current moment. Calculate the average access interval based on the access volume corresponding to each moment. According to the access change volume corresponding to multiple average access intervals in the historical time length, determine the access change rate per unit time under each average access interval, that is, obtain multiple access change trend parameters in the historical time length. Input the access change trend parameters into a pre-trained access prediction model to determine the predicted access information at the next moment after the current moment. Based on the predicted access information and the preset access threshold, determine whether to update the cache attributes of the data to be cached. Optionally, if the predicted access information is higher than the preset access threshold, the cache attributes of the data to be cached are updated. If the predicted access information is lower than the preset access threshold, the cache attributes of the data to be cached are not updated.

[0047] For example, in combination with the above example, the access prediction model is an ARIMA model. Get the data D to be cached before the current time i Historical cache data D' generated by the power equipment i Historical access information within the historical time. That is, the historical cache data is obtained at time t1, time t2, ..., t n The average access interval is calculated based on the above historical access information. The calculation formula is as follows:

[0048]

[0049] Among them, Δt i Indicates the average access interval.

[0050] According to the average access interval Δt i and the average access interval Δt i The corresponding access change B t , determine the access change rate per unit time, that is, the access change trend parameter. The specific calculation formula can be shown as follows.

[0051]

[0052] Among them, T i (t) represents the access change trend parameter, B t represents the average access interval Δt i The corresponding access change.

[0053] Place one or more T i (t) is input into the ARIMA model to obtain the predicted access information for the next moment. If the predicted access information is higher than the preset access threshold, it means that D iIf it is likely to be frequently accessed in the future, the cache attribute of the data to be cached corresponding to the historical cache data is adjusted so that it can be cached in the current distributed service node in advance.

[0054] Optionally, for each distributed service node, the load state of the current distributed service node is detected in real time to obtain a load detection result. When the load detection result is lower than a preset load threshold, the cache attribute of the cached data is reduced to implement a cache attribute update operation for the cached data. Based on this, the update frequency of the cache processing can be reduced to achieve the purpose of reducing communication overhead.

[0055] Exemplarily, in combination with the above example, if it is detected that the load state of the current distributed service node is in a low load state, that is, the data processing demand of the current distributed service node is small, the cache priority score of the cached data can be lowered to achieve delayed caching of low-priority cached data.

[0056] S120: Determine the required cache space capacity of the data to be cached and cache the data to be cached according to the available cache space capacity of the current distributed service node and the cache attribute of the data to be cached.

[0057] The available cache space capacity can be understood as the storage space capacity that the current distributed service node can use to cache data. Optionally, the available cache space capacity corresponding to the current distributed service node can be dynamically determined based on the network conditions, total storage space capacity, and data receiving rate of the current distributed service node. The required cache space capacity can be the cache space capacity required by the current distributed service node to cache the data to be cached in order to implement cache processing of the data to be cached.

[0058] Specifically, since the current distributed service node can cache multiple data to be cached, it is possible to allocate appropriate required cache space capacity to each data to be cached according to the cache attribute of each data to be cached and the available cache space capacity to meet the data cache requirements. It can be understood that the cache attribute ratio of the current data to be cached is calculated according to the cache attribute of the current data to be cached and the cache attributes of all the data to be cached that currently need to be cached. The cache attribute ratio and the available cache space capacity are multiplied to calculate the required cache space capacity of the current data to be cached. The data to be cached is cached according to the required cache space capacity of the current data to be cached.

[0059] S130. When it is detected that the cache meets the preset conditions, duplicate cache data in all distributed service nodes are determined according to the cache attributes and deduplication is performed, and target cache data with preset cache attributes is backed up; wherein the duplicate cache data and target cache data are data in the cached data.

[0060] Among them, the preset condition may be a preset cache condition. Optionally, the preset condition may be that the distributed service node has no available cache space capacity, or that the data to be cached of the distributed service node has been cached. The repeated cached data may be the same or similar cached data in all distributed service nodes. Optionally, the repeated cached data may be determined based on the cache timestamp and version number of the cached data. The cache timestamp is the time point corresponding to when the cached data is cached. The version number is the data version number of the cached data. The preset cache attribute may be a preset standard value of the cache attribute. The target cache data may be cached data whose cache attributes reach the preset cache attributes. The cached data may be data that has been cached to the distributed service node.

[0061] Specifically, in order to improve the utilization rate of the cache space capacity of the distributed service nodes, when it is detected that the distributed service node has no available cache space capacity or the cached data has been cached, the cached data in all distributed service nodes can be detected to determine the cache timestamp and version number of the cached data, and the duplicate cached data in the cached data. And delete the duplicate cached data according to the order of cache attributes from low to high. In order to improve the availability and fault tolerance of the target cache data, the target cache data whose cache attributes reach the preset cache attributes can be determined according to the cache attributes of the cached data. And the target cache data is cached in other distributed service nodes that have not cached the target cache.

[0062] In the embodiment of the present invention, it is also included to determine whether the cached data needs to be removed according to the retention time of the cached data. The specific method can be: according to the cache attribute of the cached data cached in the current distributed service node, determine the retention time corresponding to the cached data; according to the retention time, remove the corresponding cached data from the cache space of the current distributed service node to update the available cache space capacity of the current distributed service node.

[0063] The retention time can be understood as the length of time that the cached data survives in the current distributed service node. For example, if the retention time of the cached data is one hour, it means that the cached data will be eliminated after being retained in the current distributed service node for one hour.

[0064] Specifically, the retention time corresponding to the cached data is determined according to the cache attribute of the cached data cached in the current distributed service node. Optionally, the higher the cache attribute of the cached data, the longer the retention time. According to the retention time corresponding to all cached data in the current distributed service node, the cached data whose storage time reaches the retention time is removed from the cache space of the current distributed service node, so as to update the available cache space capacity of the current distributed service node and achieve the purpose of saving the cache space of the current distributed service node.

[0065] In an embodiment of the present invention, the cache attribute includes a cache priority score, and the retention time may be determined by substituting the cache priority score of the cached data into a retention time determination function to determine the retention time corresponding to the cached data.

[0066] The cache attribute includes a cache priority score. The higher the cache priority score of the cached data, the longer the cached data is retained in the distributed service node. The retention duration determination function may be a function for calculating the retention duration of the cached data. The retention duration determination function may be as follows:

[0067]

[0068] Among them, TTL i D is the cached data i The retention time, P i D is the cached data i The cache priority score is α, β are preset constant coefficient values, which are used to control the dynamic range of retention time.

[0069] Specifically, the cache priority score of the cached data is substituted into the above retention time determination function to obtain the retention time corresponding to the cached data, so as to determine whether the cached data is expired according to the retention time, and clear the expired cached data.

[0070] Exemplarily, different retention durations are set for cached data with different cache attributes according to the TTL (Time To Live) optimization method. A specific method may be to set an elimination priority score that is inversely proportional to the cache priority score. The retention duration of cached data with a higher elimination priority score is shorter than the retention duration of cached data with a lower elimination priority score. i , determine the elimination priority score of cached data Substitute the elimination priority score into the above retention time determination function to determine the retention time TTL corresponding to the cached data i . According to the retention time TTL iWhen the storage time of cached data reaches the retention time, the cached data is automatically eliminated from the distributed service node.

[0071] In an embodiment of the present invention, data consistency processing is also included. The specific processing method may be: based on the consistency model deployed in each distributed service node, determining the consistency information corresponding to the same cache data; when there is a difference in consistency, determining the difference data corresponding to the same cache data, and updating the cache data in the distributed service node based on the difference data.

[0072] Among them, the consistency model can be a model for detecting whether the cached data of the distributed service node is consistent with the preset cached data. The preset cached data can be the cached data that is expected to be cached in advance. The consistency information is used to characterize whether the same cached data is consistent. Optionally, the consistency information can be determined based on the cache timestamp and version number of the cached data. The difference data can be data that has differences in the same cached data due to cache anomalies or cache failures when data is cached.

[0073] Specifically, when there are at least two distributed service nodes caching the same cache data at the same time, there may be discrepancies in the cache data when the same cache data is cached to the distributed service node due to cache failure or anomaly. Therefore, according to the consistency model deployed in each distributed service node, the consistency information corresponding to the same cache data is determined. According to the consistency information, it is determined whether there is a difference in the consistency of the same cache data. If there is a difference, the cache data in the distributed service node is updated according to the difference data.

[0074] Optionally, the method for determining whether there is a difference in consistency can be: for each distributed service node, when the current distributed service node caches the data to be cached, a cache timestamp is assigned to the current data to be cached, and the version number of the current data to be cached is determined. Based on the version number and cache timestamp of the same cached data, determine whether there is a difference in the version number and cache timestamp in the consistency information of the same cached data; perform data content verification processing on the same cached data based on a hash function to obtain a verification result, so as to determine whether there is a difference in the cached data content in the consistency information based on the verification result.

[0075] Optionally, when updating cached data based on differential data, it can be processed through event-triggered synchronization mechanism and active-triggered synchronization mechanism. The event-triggered synchronization mechanism triggers data update synchronization processing when it detects inconsistency between cached data read from the current distributed service node and cached data actually stored. The active-triggered data synchronization mechanism updates cached data in batches periodically according to the pre-configured update duration.

[0076] It should be noted that if the version numbers corresponding to the same cached data are consistent, the cached data with the latest cache timestamp is preferentially selected for cached data update processing of the distributed service node.

[0077] Exemplarily, the consistency model can be a weak consistency model. For distributed service nodes deployed with a weak consistency model, there may be inconsistencies in the cached data within a preset time period. All cached data of each distributed service node is detected. If differences are detected in the same cached data, the consistency repair mechanism is automatically started based on the weak consistency model. Data synchronization is performed based on the difference data in a way that minimizes the cost of communication, that is, in a way that minimizes the consumption of network bandwidth, to ensure the consistency of the cached data.

[0078] The technical solution of this embodiment is applied to the distributed service node. For each distributed service node, based on the current distributed service node receiving at least one group of data to be cached, and determining the cache attributes corresponding to at least one group of data to be cached, a cache basis is provided for subsequent data caching, ensuring that the data to be cached with high cache attributes can be cached first. According to the available cache space capacity of the current distributed service node and the cache attributes of the data to be cached, the required cache space capacity of the data to be cached is determined, and the cache data to be cached is processed, ensuring that the data to be cached can be cached by the current distributed service node, avoiding the problem of being unable to cache in time due to insufficient cache space capacity. When it is detected that the cache meets the preset conditions, the duplicate cache data in all distributed service nodes is determined according to the cache attributes and deduplication is processed, thereby improving the utilization rate of the cache space of the distributed service node. The target cache data with preset cache attributes is backed up, so that when the current distributed service node fails or the network is abnormal, the target cache data can be quickly restored and accessed, thereby improving the fault tolerance and availability of the target cache data. The present invention solves the problems of data inability to be transmitted in real time and unreasonable allocation of cache space capacity in the prior art, improves the efficiency and flexibility of data caching, and improves the utilization rate of the cache space of the distributed service node.

[0079] Embodiment 2

[0080] Figure 2 This is a flow chart of a data caching method for edge-end collaboration provided by Embodiment 2 of the present invention. This embodiment is a preferred embodiment of the above embodiment. For its specific implementation, please refer to the technical solution of this embodiment. Among them, the technical terms that are the same or corresponding to the above embodiment are not repeated here. Figure 2 As shown, the method includes:

[0081] S210: For each distributed service node, based on the current distributed service node, at least one group of data to be cached is received, and cache attributes corresponding to the at least one group of data to be cached are determined, wherein the cache attributes include a cache priority score.

[0082] S220 , processing the cached data in descending order according to the cache priority scores.

[0083] Specifically, the data to be cached are cached in the distributed service nodes in descending order according to the cache priority scores. That is, the data to be cached with high cache priority scores are first cached in the cache space of the distributed service node, and the data to be cached with low cache priority scores are cached in the cache space of the distributed service node later.

[0084] S230: Substitute the cache priority score of the data to be cached and the available cache space capacity into the cache space allocation function to determine the required cache space capacity of the data to be cached.

[0085] The cache space allocation function may be a function for calculating the required cache space capacity of the data to be cached in the distributed service node. The cache space allocation function may be expressed as follows:

[0086]

[0087] Among them, C i Indicates the data to be cached D i The required cache space capacity, C total Indicates the data to be cached D i The available cache space capacity, P i Indicates the data to be cached D i The cache priority score of .

[0088] Specifically, according to the cache priority score of the current data to be cached and all cache priority scores corresponding to at least one group of data to be cached, the ratio of the cache priority score of the current data to be cached to the sum of all cache priority scores is determined. According to the ratio and the available cache space capacity of the current distributed service node, the cache space capacity that can be allocated by the current distributed service node for the data to be cached, that is, the required cache space capacity of the data to be cached, is determined.

[0089] It should be noted that, according to the access frequency and network status of the distributed service nodes, the cache priority score is adaptively adjusted to optimize the cache space capacity allocation.

[0090] S240: Update the available cache space capacity according to the required cache space capacity, so as to determine the required cache space capacity of the next data to be cached based on the updated available cache space capacity.

[0091] Specifically, after caching the data to be cached to the current distributed service node, the available cache space capacity is updated according to the required cache space capacity corresponding to the data to be cached, that is, the updated available cache space capacity is the available cache space capacity before the update minus the required cache space capacity of the data to be cached. Based on this, the required cache space capacity of the next data to be cached can be determined according to the updated available cache space capacity and the cache priority score of the next data to be cached.

[0092] S250. When it is detected that the available cache space capacity reaches the cache threshold, or all the data to be cached is cached, determine whether the cached data with the lowest cache priority score exists in other distributed service nodes according to the cache priority scores of the cache attributes from low to high.

[0093] The cache threshold may be a pre-set critical value of the available cache space capacity of the distributed service node. Optionally, the available cache space capacity may reach the cache threshold, which may be understood as the distributed service node temporarily having no available cache space capacity or having a small available cache space capacity.

[0094] Specifically, when the available cache space capacity reaches the cache threshold, that is, the current distributed service node has no available cache space capacity or the available cache space capacity is small, or when all the data to be cached in the current distributed service node are cached, the cached data with the lowest cache priority score is first judged in the order of cache priority scores of the cache attributes from low to high, that is, to determine whether the cached data with the lowest cache priority score exists in other distributed service nodes. Based on this, it is gradually judged whether there are cached data with corresponding cache priority scores in other distributed service nodes according to the cache priority scores from low to high.

[0095] S260: If yes, deduplicate the cached data according to preset deduplication rules.

[0096] The preset deduplication rule may be a pre-set rule for removing duplicate cached data. The preset deduplication rule includes at least one of the following: if the cache timestamps of the cached data are the same, the preset deduplication rule is to delete the cached data with a lower version number; if the version numbers of the cached data are the same, the preset deduplication rule is to delete the cached data that was cached the earliest; if there is inconsistency in the cached data, the preset deduplication rule is to delete the cached data with a smaller amount of data.

[0097] Specifically, if cached data with the lowest cache priority score already exists in other distributed service nodes, the cache timestamps, version numbers, and data volumes corresponding to the cached data with the lowest cache priority scores in different distributed service nodes are compared. When the cache timestamps of the cached data are the same and the version numbers of the cached data are different, the cached data with the lower version number in the distributed service node is deleted, and the cached data with the highest version number is retained. If the version numbers of the cached data are the same and the cache timestamps are different, the cached data with the earliest cache is deleted, and the cached data with the latest cache timestamp is retained. If the cache timestamp and version number of the cached data are the same, the data volume of the cached data corresponding to each distributed service node is detected, the cached data with a large data volume is retained, and the cached data with a small data volume is deleted.

[0098] Exemplarily, each distributed service node periodically shares data to determine whether there is redundant and duplicate cached data in the distributed service node. The cached data of each distributed service node is detected and compared to determine whether there is the same or similar cached data in each distributed service node, so as to avoid repeated storage of redundant and duplicate cached data occupying the cache space capacity of the distributed service node. When it is determined that there is the same or similar cached data in multiple distributed service nodes, the same or similar cached data is cleared according to the version number, cache timestamp and access frequency of the cached data, and only the cached data with the highest version number, the latest cache timestamp or the highest access frequency is retained. Based on this, it can be ensured that the cache space capacity of the distributed service node can be effectively utilized, thereby improving the utilization rate of the cache space.

[0099] S270: Determine whether the target cache data corresponding to the preset cache attribute has been cached in other distributed service nodes; if not, back up the target cache data in at least one other distributed service node.

[0100] The preset cache attribute is a cache attribute whose cache priority score is higher than a preset score threshold.

[0101] The preset scoring threshold may be a standard value of the cache priority score set according to actual needs. The at least one other distributed service node may be determined according to the available cache space capacity and the network status.

[0102] Specifically, the cache priority scores of cached data of each distributed service node are analyzed to determine the target cache data whose cache priority score is higher than the preset score threshold. It is also determined whether the target cache data is cached in other distributed service nodes. If the target cache data does not exist in other distributed service nodes, the target cache data is backed up in at least one other distributed service node to improve the fault tolerance and availability of the target data.

[0103] Exemplarily, for the target cache data in the distributed service node, a copy of the target cache data is automatically generated and stored in at least one other distributed service node. By saving copies of the target cache data in multiple distributed service nodes, the fault tolerance and availability of the target cache data can be improved, so that when the current distributed service node fails or the target cache data is lost, the target cache data can be obtained through other distributed service nodes. Through the available cache space capacity and network status of the distributed service node, other distributed service nodes that cache copies of the target cache data are dynamically adjusted to ensure the reasonable distribution of the target cache data in each distributed service node, so as to improve the disaster tolerance of the distributed service node and ensure that the target cache data can still be quickly restored and accessed when a service node failure or network anomaly occurs.

[0104] The technical solution of this embodiment is that for each distributed service node, based on the current distributed service node, at least one group of data to be cached is received, and the cache attribute corresponding to at least one group of data to be cached is determined, wherein the cache attribute includes a cache priority score, which provides a cache basis for subsequent data caching. The data to be cached are processed in order from high to low according to the cache priority score, ensuring that the data to be cached with a high cache priority score can be cached first. The cache priority score of the data to be cached and the available cache space capacity are substituted into the cache space allocation function to determine the required cache space capacity of the data to be cached. By dynamically allocating the required cache space capacity, the utilization rate of the cache space of the distributed service node can be improved. The available cache space capacity is updated according to the required cache space capacity, so as to determine the required cache space capacity of the next data to be cached based on the updated available cache space capacity. Based on this, the available cache space capacity is saved, and it is ensured that the data to be cached can be cached in time. When it is detected that the available cache space capacity reaches the cache threshold or all the data to be cached are cached, it is determined whether the cached data with the lowest cache priority score exists in other distributed service nodes according to the cache priority score of the cache attribute from low to high. If so, the cached data is deduplicated according to the preset deduplication rules, thereby improving the utilization rate of the cache space of the distributed service node. Determine whether the target cache data corresponding to the preset cache attribute has been cached in other distributed service nodes; if not, back up the target cache data in at least one other distributed service node, so that when the current distributed service node fails or the network is abnormal, the target cache data can be quickly restored and accessed, thereby improving the fault tolerance and availability of the target cache data. The present invention solves the problems in the prior art that data cannot be transmitted in real time and the unreasonable allocation of cache space capacity, improves the efficiency and flexibility of data caching, and improves the utilization rate of the cache space of distributed service nodes.

[0105] Embodiment 3

[0106] Figure 3 Schematic diagram of the structure of a data cache device for edge-end collaboration provided by Embodiment 3 of the present invention. Figure 3 As shown, the device includes: a data processing module 310, a data cache module 320 and a cache data deduplication and backup module 330.

[0107] The data processing module 310 is used to receive at least one group of data to be cached for each distributed service node based on the current distributed service node, and determine the cache attributes corresponding to at least one group of data to be cached; the data cache module 320 is used to determine the required cache space capacity of the data to be cached and cache the cached data based on the available cache space capacity of the current distributed service node and the cache attributes of the data to be cached; the cache data deduplication and backup module 330 is used to determine the duplicate cached data in all distributed service nodes based on the cache attributes and deduplicate the data when it is detected that the cache meets the preset conditions, and to back up the target cache data with the preset cache attributes; wherein the duplicate cached data and the target cached data are the data in the cached data.

[0108] The technical solution of this embodiment is applied to the distributed service node. For each distributed service node, based on the current distributed service node receiving at least one group of data to be cached, and determining the cache attributes corresponding to at least one group of data to be cached, a cache basis is provided for subsequent data caching, ensuring that the data to be cached with high cache attributes can be cached first. According to the available cache space capacity of the current distributed service node and the cache attributes of the data to be cached, the required cache space capacity of the data to be cached is determined, and the cache data to be cached is processed, ensuring that the data to be cached can be cached by the current distributed service node, avoiding the problem of being unable to cache in time due to insufficient cache space capacity. When it is detected that the cache meets the preset conditions, the duplicate cache data in all distributed service nodes is determined according to the cache attributes and deduplication is processed, thereby improving the utilization rate of the cache space of the distributed service node. The target cache data with preset cache attributes is backed up, so that when the current distributed service node fails or the network is abnormal, the target cache data can be quickly restored and accessed, thereby improving the fault tolerance and availability of the target cache data. The present invention solves the problems of data inability to be transmitted in real time and unreasonable allocation of cache space capacity in the prior art, improves the efficiency and flexibility of data caching, and improves the utilization rate of the cache space of the distributed service node.

[0109] On the basis of the above embodiment, optionally, the data processing module includes: an attribute determination unit, used to determine the importance attribute, timeliness attribute and access frequency attribute of the data to be cached for at least one group of data to be cached; a cache attribute determination unit, used to determine the cache attribute of the data to be cached based on the importance attribute, timeliness attribute, access frequency attribute and corresponding weight values.

[0110] Optionally, the device also includes: a cache attribute update module, which includes: a historical access information determination unit, which is used to obtain historical access information of historical cache data generated by the power equipment to which the data to be cached belongs before the current moment within a historical time length, wherein the end moment in the historical time length is the current moment, and the historical access information includes the access volume corresponding to each moment in the historical time length; a trend parameter determination unit, which is used to determine the access change trend parameter within the historical time length based on the historical access information; a predicted access information determination unit, which is used to input the access change trend parameter into a pre-trained access prediction model to determine the predicted access information at the next moment after the current moment; and a cache attribute update unit, which is used to update the cache attributes of the data to be cached based on the predicted access information.

[0111] Optionally, the cache attributes include a cache priority score, and the data cache module includes: a cache unit for data to be cached, used to process the cache data in descending order according to the cache priority score; a required cache space capacity determination unit, used to substitute the cache priority score and the available cache space capacity of the data to be cached into a cache space allocation function to determine the required cache space capacity of the data to be cached; and an available cache space capacity updating unit, used to update the available cache space capacity according to the required cache space capacity, so as to determine the required cache space capacity of the next data to be cached based on the updated available cache space capacity.

[0112] Optionally, the cache data deduplication and backup module includes: a cached data judgment unit, which is used to determine whether the cached data with the lowest cache priority score exists in other distributed service nodes based on the cache priority scores of the cache attributes in order from low to high when it detects that the available cache space capacity has reached the cache threshold, or all the data to be cached has been cached; and a cached data deduplication unit, which is used to deduplicate the cached data according to preset deduplication rules if so.

[0113] Optionally, the preset deduplication rules include at least one of the following: if the cache timestamps of the cached data are the same, the preset deduplication rule is to delete the cached data with a lower version number; if the version numbers of the cached data are the same, the preset deduplication rule is to delete the cached data that is cached earliest; if there are inconsistencies in the cached data, the preset deduplication rule is to delete the cached data with a smaller amount of data.

[0114] Optionally, the cache data deduplication and backup module includes: a target cache data judgment unit, used to determine whether the target cache data corresponding to the preset cache attribute has been cached in other distributed service nodes; a target cache data backup unit, used to back up the target cache data in at least one other distributed service node if not.

[0115] Optionally, the device also includes: a data removal module, including: a retention time determination unit, used to determine the retention time corresponding to the cached data according to the cache properties of the cached data cached in the current distributed service node; a cached data removal unit, used to remove the corresponding cached data from the cache space of the current distributed service node based on the retention time, so as to update the available cache space capacity of the current distributed service node.

[0116] Optionally, the cache attributes include a cache priority score and a retention time determination unit, which is used to substitute the cache priority score of the cached data into a retention time determination function to determine the retention time corresponding to the cached data.

[0117] Optionally, the device also includes: a data consistency processing module, which is used to determine the consistency information corresponding to the same cache data based on the consistency model deployed in each distributed service node; when there is a difference in consistency, determine the difference data corresponding to the same cache data, and update the cache data in the distributed service node based on the difference data.

[0118] The edge-end collaborative data caching device provided in an embodiment of the present invention can execute the edge-end collaborative data caching method provided in any embodiment of the present invention, and has functional modules and beneficial effects corresponding to the execution method.

[0119] Embodiment 4

[0120] Figure 4 1 is a schematic diagram of the structure of an electronic device provided in Embodiment 4 of the present invention. The electronic device 10 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0121] like Figure 4As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0122] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0123] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the edge-end collaborative data caching method.

[0124] In some embodiments, the edge-to-edge collaborative data caching method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the edge-to-edge collaborative data caching method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the edge-to-edge collaborative data caching method in any other appropriate manner (e.g., by means of firmware).

[0125] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0126] The computer program for implementing the edge-to-edge collaborative data caching method of the present invention can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program can be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0127] Embodiment 5

[0128] Embodiment 5 of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to execute an edge-end collaborative data caching method, the method comprising:

[0129] For each distributed service node, based on the current distributed service node, at least one group of data to be cached is received, and the cache attributes corresponding to at least one group of data to be cached are determined; based on the available cache space capacity of the current distributed service node and the cache attributes of the data to be cached, the required cache space capacity of the data to be cached is determined and the cache data to be cached is processed; when it is detected that the cache meets the preset conditions, the duplicate cached data in all distributed service nodes is determined according to the cache attributes and de-duplication is processed, and the target cached data with the preset cache attributes is backed up; wherein, the duplicate cached data and the target cached data are data in the cached data.

[0130] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0131] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0132] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0133] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0134] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0135] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A data caching method for edge collaboration, characterized in that: Applied in a distributed service node, the method includes: For each of the distributed service nodes, receiving at least one group of data to be cached based on the current distributed service node, and determining a cache attribute corresponding to the at least one group of data to be cached; According to the available cache space capacity of the current distributed service node and the cache attribute of the data to be cached, determining the required cache space capacity of the data to be cached and caching the data to be cached; When it is detected that the cache meets the preset conditions, the duplicate cache data in all distributed service nodes is determined and deduplicated based on the cache attributes, and the target cache data with the preset cache attributes is backed up; wherein the duplicate cache data and the target cache data are data in the cached data.

2. The method according to claim 1, characterized in that The determining of the cache attribute corresponding to the at least one set of data to be cached includes: For the at least one group of data to be cached, determining the importance attribute, timeliness attribute, and access frequency attribute of the data to be cached; The cache attribute of the data to be cached is determined according to the importance attribute, timeliness attribute, access frequency attribute and corresponding weight values.

3. The method according to claim 2, characterized in that The method further comprises: Obtaining historical access information of historical cache data generated by the power equipment to which the data to be cached belongs before the current moment within a historical time length, wherein the end moment in the historical time length is the current moment, and the historical access information includes the access volume corresponding to each moment in the historical time length; Determine, based on the historical access information, access change trend parameters within the historical time period; Inputting the access change trend parameter into the access prediction model obtained by pre-training to determine the predicted access information at the next moment after the current moment; The cache attribute of the to-be-cached data is updated based on the predicted access information.

4. The method according to claim 1, characterized in that: The cache attribute includes a cache priority score, and determining the required cache space capacity of the data to be cached according to the available cache space capacity of the current distributed service node and the cache attribute of the data to be cached includes: Process cache data in descending order based on cache priority scores; Substituting the cache priority score of the data to be cached and the available cache space capacity into a cache space allocation function to determine the required cache space capacity of the data to be cached; The available cache space capacity is updated according to the required cache space capacity, so as to determine the required cache space capacity of the next data to be cached based on the updated available cache space capacity.

5. The method according to claim 1, characterized in that When it is detected that the cache meets the preset condition, determining the duplicate cache data in all distributed service nodes according to the cache attribute and performing deduplication processing, includes: When it is detected that the available cache space capacity reaches the cache threshold, or all the data to be cached are cached, it is determined whether the cached data with the lowest cache priority score exists in other distributed service nodes according to the cache priority scores of the cache attributes from low to high; If so, the cached data is deduplicated according to a preset deduplication rule.

6. The method according to claim 5, characterized in that The preset deduplication rule includes at least one of the following: If the cache timestamps of the cached data are the same, the preset deduplication rule is to delete the cached data with a lower version number; If the version numbers of the cached data are the same, the preset deduplication rule is to delete the cached data that is cached earliest; If there is inconsistency in the cached data, the preset deduplication rule is to delete the cached data with less data volume.

7. The method according to claim 1, characterized in that The preset cache attribute is a cache attribute whose cache priority score is higher than a preset score threshold, and the target cache data backup processing of the preset cache attribute includes: Determine whether the target cache data corresponding to the preset cache attribute has been cached in other distributed service nodes; If not, the target cache data is backed up in at least one other distributed service node.

8. The method according to claim 1, characterized in that The method further comprises: Determining a retention time corresponding to the cached data according to a cache attribute of the cached data cached in the current distributed service node; The corresponding cached data is removed from the cache space of the current distributed service node according to the retention time to update the available cache space capacity of the current distributed service node.

9. The method according to claim 8, characterized in that The cache attribute includes a cache priority score, and determining the retention time corresponding to the cached data according to the cache attribute of the cached data cached in the current distributed service node includes: The cache priority score of the cached data is substituted into a retention duration determination function to determine the retention duration corresponding to the cached data.

10. The method according to claim 1, characterized in that The method further comprises: Based on the consistency model deployed in each distributed service node, determine the consistency information corresponding to the same cache data; When there is a difference in the consistency, difference data corresponding to the same cache data is determined, and the cache data in the distributed service node is updated according to the difference data.