A method and system for hierarchical ordered access of measurement data based on dynamic grouping
By grouping power measurement data using density-based spatial clustering and an improved K-means clustering algorithm, and combining this with dynamic polling priority scheduling, the problems of low data processing efficiency and poor accuracy in traditional methods are solved. This enables real-time data processing and orderly access to the power system, improving the efficiency and security of power system operation and management.
Patent Information
- Application Number
- CN202310467712.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-23
- Publication Date
- 2026-02-13
- Estimated Expiration
- 2043-04-23
AI Technical Summary
Traditional methods for processing electrical power measurement data are insufficient to meet the needs of real-time processing and analysis. They suffer from low data processing efficiency, poor accuracy, and the inability to achieve dynamic grouping and orderly access.
A density-based spatial clustering algorithm is used for data denoising, and an improved K-means clustering algorithm is used to divide the electrical measurement data into multiple dynamic groups. Combined with a dynamic polling priority scheduling algorithm, data processing is performed to achieve hierarchical and orderly access of the data.
It improves the efficiency and accuracy of data processing, enables real-time processing in multi-task scenarios, enhances the quality and stability of data processing, reduces errors and anomalies, and ensures the safety and management efficiency of the power system.
Smart Images

Figure CN116737789B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the technical field of data processing and analysis in power systems, and particularly relates to a measurement data hierarchical and ordered access method and system based on dynamic grouping. BACKGROUND
[0002] The statements in this section merely provide background information related to the present application and do not necessarily constitute the prior art.
[0003] The data hierarchical and ordered access system based on dynamic grouping can be applied to power measurement data processing and analysis. Power measurement data refers to the current, voltage, power and other parameter data collected by various instruments and equipment during the operation of the power system. These data are crucial for the operation and management of the power system and can be used for power load forecasting, power equipment state monitoring and power fault diagnosis. Due to the complexity of the power system and the large amount of data, traditional data processing methods often fail to meet the real-time processing and analysis requirements and cannot achieve dynamic grouping and ordered access.
[0004] During the operation of the power system, real-time monitoring and prediction of power equipment and power load are required to ensure the stable operation and safety of the power system. Therefore, power measurement data needs to be collected, processed and analyzed. Traditional power measurement data processing methods have some problems, such as low data processing efficiency, poor processing accuracy, poor data processing quality and stability, etc. SUMMARY
[0005] In order to solve the technical problems existing in the background art, the present application provides a measurement data hierarchical and ordered access method and system based on dynamic grouping, which can achieve dynamic grouping and ordered access, hierarchical and ordered access of power measurement data, and improve the quality and stability of data processing.
[0006] In order to achieve the above-mentioned purpose, the present application adopts the following technical solutions:
[0007] The first aspect of the present application provides a measurement data hierarchical and ordered access method based on dynamic grouping.
[0008] A measurement data hierarchical and ordered access method based on dynamic grouping, comprising:
[0009] Obtaining power measurement data and pre-processing;
[0010] Clustering the pre-processed power measurement data to obtain a plurality of dynamic groups;
[0011] Inserting the data in each dynamic group into the existing data sequence in order;
[0012] According to the difference of delay tolerance, dynamic polling priority scheduling is adopted, and the inserted data is processed according to the rule that a polling period is entered every dynamic scheduling period.
[0013] Further, the method further comprises: calculating the user resource block after dynamic grouping, controlling the ratio of the number of dynamic scheduling periods to the number of polling scheduling periods, and updating the unit dynamic time consumption.
[0014] Further, the pre-processed power measurement data is clustered by using a K-means clustering algorithm.
[0015] Further, the process of clustering by using the K-means clustering algorithm comprises:
[0016] Randomly selecting 1 sample from the pre-processed power measurement data as an initial clustering center c1;
[0017] Calculating the shortest distance D(i) between each sample and the existing clustering center, and calculating the probability P of each sample being selected as the next clustering center i =D(i) 2 / ∑ i∈x D(i) 2 , and selecting the next clustering center according to the roulette method, wherein x represents a sample set;
[0018] Repeating the distance calculation and clustering center selection process until the clustering center C={c1, c2,..., c k} is selected;
[0019] Calculating the distance of each sample in the pre-processed power measurement data to the clustering center, and dividing the data into the class corresponding to the clustering center with the smallest distance;
[0020] Recalculating each clustering center wherein c j represents the original clustering center, j∈{1,2,...,k}, and x∈c j represents the sample in the original clustering center c j ;
[0021] Repeating the class division and clustering center calculation process until the position of the clustering center no longer changes.
[0022] Further, in the clustering process, the error sum of squares and the silhouette coefficient are used to cross-evaluate the clustering result, determine the optimal clustering number, and obtain the clustering result according to the optimal clustering number.
[0023] Further, the delay tolerance difference includes: a delay-intolerant task with small data transmission amount and low time consumption, a communication task occurring under human intervention, a task with minimum transmission rate requirement, and a task with small transmission amount and delay tolerance.
[0024] Further, the dynamic round-robin priority scheduling includes:
[0025] Processes are added to the ready queue in the order of arrival;
[0026] At the beginning of each scheduling cycle, the priority of each process is re-allocated;
[0027] According to the priority, the processes are divided into different priority groups;
[0028] In each priority group, the round-robin scheduling algorithm is used to allocate CPU time, the processes are executed in the order in the queue, and run within the allocated time slice, when the time slice expires, the process will be removed from the CPU, and the next process will start execution; if the process is completed within its time slice, it will be deleted from the ready queue;
[0029] At the end of each scheduling cycle, the priority is adjusted according to the actual performance of the process;
[0030] Until all processes are completed.
[0031] Further, the preprocessing includes: sorting according to the data source, data type and timestamp of the power measurement data; and using a density-based spatial clustering algorithm to denoise the sorted power measurement data.
[0032] The second aspect of the application provides a measurement data hierarchical ordered access system based on dynamic grouping.
[0033] A measurement data hierarchical ordered access system based on dynamic grouping includes:
[0034] A data acquisition and preprocessing module configured to acquire power measurement data and preprocess the power measurement data;
[0035] A grouping module configured to cluster the preprocessed power measurement data to obtain a plurality of dynamic groups;
[0036] An ordered access module configured to insert the data in each dynamic group into an existing data sequence in order;
[0037] A data processing module configured to use dynamic round-robin priority scheduling to process the inserted data according to the difference in delay tolerance, and enter a polling cycle every dynamic scheduling cycle.
[0038] The third aspect of the present application provides a computer readable storage medium.
[0039] A computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the dynamic grouping based measurement data hierarchical ordered access method according to the first aspect.
[0040] The fourth aspect of the present application provides a computer device.
[0041] A computer device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor implements the steps of the dynamic grouping based measurement data hierarchical ordered access method according to the first aspect when executing the program.
[0042] Compared with the prior art, the present application has the following beneficial effects:
[0043] 1. The present application uses a density-based spatial clustering algorithm for data denoising, and then uses an improved K-means clustering algorithm to divide the power measurement data into multiple dynamic groups, so that the data in each group has similar time characteristics and rules, which can improve the efficiency and accuracy of data processing.
[0044] 2. The present application sets the data processing task priority rules based on the dynamic polling priority scheduling algorithm, realizes the ordered access of multiple time-consuming type tasks, can process and analyze the inserted data in real time, improves the timeliness and quality of data processing in the multi-task scenario, improves the quality and stability of data processing, and reduces the occurrence of data processing errors and abnormal situations.
[0045] 3. The present application constructs a hierarchical ordered access system for measurement data, realizes the whole chain disposal of data from hierarchical collection to ordered access to real-time processing, improves the timeliness of data processing from each link, and also ensures the security of data to a certain extent.
[0046] 4. The present application can be applied to power load forecasting, power equipment state monitoring, and power fault diagnosis, etc., to improve the operation and management efficiency of the power system, and reduce the occurrence of power failures and accidents. BRIEF DESCRIPTION OF DRAWINGS
[0047] The drawings accompanying the specification of the present application form a part thereof, serve to provide further understanding of the present application, and together with the exemplary embodiments of the present application and their description, serve to explain the present application, and do not constitute an improper limitation of the present application.
[0048] Figure 1 The flowchart of the dynamic grouping based measurement data hierarchical ordered access method according to the first aspect of the present application is shown in the following.
[0049] Figure 2 A flow chart of the improved K-means clustering algorithm based on density space clustering denoising is shown in Embodiment One of the present application;
[0050] Figure 3 A clustering effect diagram under different K values of Experiment 1 shown in Embodiment One of the present application is shown in Embodiment One of the present application;
[0051] Figure 4 A data transmission average time delay comparison diagram of Experiment 2 shown in Embodiment One of the present application is shown in Embodiment One of the present application;
[0052] Figure 5 A throughput comparison diagram of each group task of Experiment 2 shown in Embodiment One of the present application is shown in Embodiment One of the present application;
[0053] Figure 6 A system throughput comparison diagram under different algorithms of Experiment 2 shown in Embodiment One of the present application is shown in Embodiment One of the present application;
[0054] Figure 7 A structure diagram of the measurement data hierarchical ordered access system based on dynamic grouping is shown in Embodiment Two of the present application. DETAILED DESCRIPTION
[0055] The present application is further described below in conjunction with the accompanying drawings and embodiments.
[0056] It should be noted that the following detailed description is illustrative only, and is intended to provide further description in order to provide a further understanding of the exemplary embodiments of the present application. Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which the present application pertains.
[0057] It is to be understood that the singular forms "a," "an," and "the" include plural referents unless the context clearly dictates otherwise. It should be noted that the terms "comprises", "comprising", "includes", "including", "contains", "containing" and the like are used in the detailed description and in the claims to mean that the stated features, steps, components, devices, elements, and / or combinations thereof are present in the described embodiments, but not to exclude the presence of one or more other features, steps, components, devices, elements, and / or combinations thereof.
[0058] It should be noted that the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of methods and systems according to various embodiments of this disclosure. It should be noted that each block in a flowchart or block diagram may represent a module, segment, or portion of code, which may include one or more executable instructions for implementing the logical functions specified in the various embodiments. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than that shown in the drawings. For example, two consecutively represented blocks may actually be executed substantially in parallel, or they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the flowcharts and / or block diagrams, and combinations of blocks in the flowcharts and / or block diagrams, may be implemented using a dedicated hardware-based system that performs the specified functions or operations, or using a combination of dedicated hardware and computer instructions.
[0059] Example 1
[0060] like Figure 1 As shown, this embodiment provides a hierarchical and orderly access method for measurement data based on dynamic grouping. This embodiment uses the application of this method to a server as an example for illustration. It is understood that this method can also be applied to terminals, and can also be applied to systems including terminals, servers, and other components, and can be implemented through interaction between the terminal and the server. The server can be an independent physical server, a server cluster composed of multiple physical servers, or a distributed system. It can also be a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network servers, cloud communication, middleware services, domain name services, CDN security services, and big data and artificial intelligence platforms. The terminal can be a smartphone, tablet, laptop, desktop computer, smart speaker, smartwatch, etc., but is not limited to these. The terminal and server can be directly or indirectly connected via wired or wireless communication, which is not limited herein. In this embodiment, the method includes the following steps:
[0061] Acquire electrical force measurement data and perform preprocessing;
[0062] The preprocessed electrical force measurement data are clustered to obtain several dynamic groups;
[0063] Insert the data within each dynamic group into the existing data sequence in an orderly manner;
[0064] Based on the differences in latency tolerance, dynamic polling priority scheduling is adopted, and the inserted data is processed according to the rule of entering a polling cycle every certain period of dynamic scheduling.
[0065] In this embodiment, the source of experimental data is taken from the real data of a provincial power company power system, which is obtained by legal means and has obtained the authorization of the formula; here only part of the experimental examples are shown, in actual application, the data source can be specified according to the project requirements, and the invention does not limit the data source. Specifically, the measurement data hierarchical ordered access method based on dynamic grouping of the embodiment includes the following steps:
[0066] A, sort the collected power measurement data according to data source, data type and timestamp. First, group the collected power measurement data according to its source, for example, data from different substations or power equipment can be grouped separately to distinguish and analyze data from different sources; then, group the collected power measurement data according to its type, for example, different types of data such as voltage, current and power can be grouped separately to specially process and analyze different types of data; finally, sort the collected power measurement data according to the timestamp, and divide it into multiple time periods, then group according to the characteristics and laws of data in each time period, so that the data in each group has similar time characteristics and laws.
[0067] B, according to the characteristics and laws of power measurement data, formulate data grouping strategy for large-scale, high-dimensional user data, use density-based spatial clustering algorithm for data denoising, and then use improved K-means clustering algorithm to divide power measurement data into multiple dynamic groups, so that the data in each group has similar characteristics and laws.
[0068] In step B, the density-based spatial clustering algorithm is used for data denoising, which overcomes the problem that the clustering result of the original K-means clustering algorithm is easily affected by noise points in the data set; then the optimal number of clusters is determined by using the silhouette coefficient and the sum of squared errors; finally, the improved K-means clustering algorithm is used to divide the power measurement data into multiple dynamic groups, so that the data in each group has similar characteristics and laws, not only giving the test of clustering effectiveness, but also avoiding falling into local optimum. As shown in Figure 2 The improved K-means algorithm process is as follows:
[0069] B1, randomly select 1 sample from the data set as the initial cluster center c1;
[0070] B2, calculate the shortest distance D(i) between each sample and the existing cluster center, and calculate the probability P i of each sample being selected as the next cluster center 2 / ∑ i∈x D(i) 2 , and select the next cluster center according to the roulette method;
[0071] B3, repeat step two until the cluster centers C = {c1, c2,..., cK} are selected. k};
[0072] B4, calculate the distance of each sample in the data set to the cluster center and divide it into the class corresponding to the cluster center with the smallest distance;
[0073] B5, recalculate each cluster center
[0074] B6, repeat step B4 and step B5 until the position of the cluster center no longer changes.
[0075] In summary, first, the K value selection range is given, and then the data denoised by the density clustering algorithm is imported; second, the improved K-means clustering algorithm is used to cluster each K value in the given K value range, and the two clustering effectiveness indicators (error sum of squares and silhouette coefficient) given by the application are used to cross-evaluate the clustering results of each K value to determine the best cluster number; finally, the best cluster number is returned, and the clustering result is output.
[0076] This embodiment takes a certain simulation software as a test program development environment, and performs clustering analysis on the annual electricity data of 256 users in a certain region of a city. The data includes annual electricity data of 256 users, collected once every 30 minutes. The clustering effectiveness indicators are used to determine the best cluster number, and then the improved K-means clustering algorithm is used to analyze the regional power load curve. After obtaining the clustering result, the method is compared with the original K-means clustering algorithm through the DBI index (Davies-Bouldin index: the smaller the value, the better the clustering effect). (To avoid the influence of seasonal factors, the experimental data in this experiment are all taken from the same season)
[0077] The higher the average silhouette coefficient, the better the clustering effect, and the smaller the error sum of squares, the better the fitting effect. Let K take values 2, 3, 4, 5, 6, 7, 8, 9 respectively, and calculate the corresponding average silhouette coefficient and error sum of squares. As shown in Figure 3 , when K = 4, the error sum of squares is at the inflection point, and the silhouette coefficient is close to the maximum value. Therefore, K = 4 is the best cluster number.
[0078] The algorithm of the application is compared with the K-means clustering algorithm. When K = 4, the fitting degree of the ordinary K-means clustering algorithm is the highest. The DBI indexes of the two algorithms are calculated, as shown in Table 1.
[0079] Table 1 Clustering algorithm effect
[0080] Clustering algorithm DBI Density clustering denoising + improved K-means algorithm 7.12 Original K-means algorithm 13.89
[0081] It can be seen that the clustering effect of the method of the application is obviously better than that of the ordinary K-means clustering algorithm.
[0082] C. Sequential access to data within each dynamic group, according to the amount of power measurement data types (voltage, current, active power, reactive power, etc.) and time priority (the earlier the data of the same type, the earlier it enters the sequence), sequentially insert the data into the existing data sequence.
[0083] D. According to the difference of delay tolerance, set the data processing task priority rules based on dynamic polling priority scheduling algorithm, in order to realize real-time processing and analysis of the inserted data sequence, and further realize power load prediction, power equipment state monitoring and power fault diagnosis and other applications.
[0084] In step D, according to the current system load, the prediction result of data packet processing time, the characteristics of data packet and other factors, the priority of grouping and data is dynamically adjusted to meet the needs of different scenarios. The dynamic scheduling of tasks is combined with polling scheduling. When the amount of low priority tasks is significantly greater than that of high priority tasks, high priority tasks should be serviced as much as possible; otherwise, the lowest priority task cannot be scheduled when resources are tight. The steps of dynamic polling priority scheduling algorithm are:
[0085] D1. The current system task to be executed set is {G1, G2,..., G n}, take n = 4, wherein G1 is a delay intolerant task with small data transmission amount but low time consumption, such as various alarm tasks, which have strong random burst and need to be reported immediately; G2 is a communication task that occurs under human intervention, such as querying meter information through the State Grid terminal background, which has different data size and high delay sensitivity; G3 is a task with the lowest transmission rate requirement, such as video monitoring, which has a certain delay tolerance, but a certain amount of data must be scheduled within a certain time to meet the minimum transmission bit rate; G4 is a small transmission and delay tolerant task, such as environmental monitoring, which has the largest proportion and low real-time requirement, and the priority is lower than the above three types. If the wireless resource is tight, the scheduling of this type of flow can be appropriately delayed.
[0086] D2. Set the execution time, priority and proportion of different types of tasks, as shown in Table 2:
[0087] Table 2 Different types of tasks
[0088]
[0089]
[0090] D3, combine dynamic scheduling with polling scheduling, enter a polling period every dynamic scheduling period, the polling scheduling period can avoid the phenomenon that the lowest priority task cannot be scheduled all the time when resources are tight, record the time proportion of polling as a%, that is, the ratio of the number of dynamic scheduling periods to the number of polling scheduling periods (fixed as 1).
[0091] The specific implementation of the dynamic polling priority scheduling algorithm is as follows:
[0092] D31, initialization: add processes to the ready queue according to their arrival order.
[0093] D32, calculate priority: at the beginning of each scheduling period, reassign priority to each process, priority calculation can be based on factors such as process waiting time, remaining running time, resource demand, etc. According to this information, a weight can be assigned to each process, the higher the weight, the higher the priority.
[0094] D33, grouping: group processes into different priority groups according to the calculated priority. Each group can contain one or more processes. Generally, the higher the priority of the group, the longer the time slice allocated.
[0095] D34, round-robin scheduling: in each priority group, use round-robin scheduling algorithm to allocate CPU time. Processes are executed in the order of their position in the queue and run within the allocated time slice. When the time slice expires, the process will be removed from the CPU and the next process will start execution. If a process completes within its time slice, it will be deleted from the ready queue.
[0096] D35, feedback: at the end of each scheduling period, adjust the priority according to the actual performance of the process. For example, if a process completes a large amount of work within its time slice, its priority may be reduced to avoid other low-priority processes from being scheduled for a long time.
[0097] D36, repeat: repeat steps D32-D35 until all processes complete execution.
[0098] This embodiment uses a certain simulation software as a platform to simulate and evaluate the dynamic polling priority scheduling algorithm. The simulation mainly focuses on performance evaluation of algorithm latency and throughput. Settings: number of concurrent communications (100-1000); scheduling period length (1ms); simulation duration (1000 scheduling periods); number of user resources per period (15); communication device distribution (uniform distribution).
[0099] First, calculate the average delay of sending messages when the number of concurrent communications is 100 and 400 under the fair scheduling algorithm (PF) and the algorithm of the present application, as follows: Figure 4When the number of communications is small, the delay performance of the two scheduling algorithms is not much different; when the number of communications is large, the transmission delay distribution of each priority data under the fair scheduling algorithm (PF) is relatively uniform, and the average delay of the dynamic algorithm of the present embodiment shows good discrimination. The user resource space is shared among the groups of tasks, and the dynamic algorithm determines the transmission order according to the priority, which reduces the delay of high-priority tasks, but at the same time increases the delay of low-priority tasks.
[0100] The throughput of different grouped tasks of the dynamic polling priority scheduling algorithm proposed in the present embodiment is shown in Figure 5 When the number of concurrent communications is large, the throughput of the first three high-priority tasks increases, and the algorithm allocates user space resources to higher-priority tasks first, and provides services to low-priority tasks in a "best effort" manner.
[0101] From Figure 6 It can be seen that, under the proportional fair scheduling algorithm and the polling scheduling algorithm, in order to ensure the continuity of the user resource space, the size of the resource block allocated to the task is constant, and some tasks with small data volume are allocated to redundant user resource space, causing resource waste. The dynamic polling priority scheduling algorithm of the present embodiment allocates variable-size blocks to ensure the continuity of the user resource space, and requires less user resource space when transmitting the same amount of data, and compared with the static class-based priority algorithm, the proportional fair scheduling algorithm and the polling scheduling algorithm, the likelihood of task transmission failure due to missed deadline in the present embodiment algorithm is greatly reduced, and the final algorithm improves the system throughput while also ensuring that urgent information is delivered faster and more effectively. Under the current simulation conditions, the system throughput of the algorithm of the present embodiment is about 15% higher than that of the proportional fair scheduling algorithm, and about 40% higher than that of the polling scheduling algorithm.
[0102] D4. Calculate the user resource block after dynamic grouping, and form a task priority rule. Use a to control the ratio of the number of dynamic scheduling cycles to the number of polling scheduling cycles, and on the premise of not affecting the system throughput, adjust the time interval of the two polling cycles according to the task volume ratio of the non-delay tolerant task and the delay tolerant task, update the unit dynamic time consumption of the unscheduled task, form a task priority rule, and then reallocate the user resource block of the task of different priority.
[0103] Embodiment Two
[0104] The present embodiment provides a measurement data hierarchical and ordered access system based on dynamic grouping.
[0105] As shown in Figure 7 , a measurement data hierarchical and ordered access system based on dynamic grouping, comprising:
[0106] a data acquisition and preprocessing module configured to acquire power measurement data and perform preprocessing;
[0107] a grouping module configured to cluster the preprocessed power measurement data to obtain a plurality of dynamic groups;
[0108] an orderly access module configured to orderly insert data in each dynamic group into an existing data sequence;
[0109] a data processing module configured to process the inserted data according to a dynamic round-robin priority scheduling rule that enters a polling period every dynamic scheduling period.
[0110] It should be noted that the data acquisition and preprocessing module, the grouping module, the orderly access module and the data processing module are the same as the examples and application scenarios realized by the steps in Embodiment One, but are not limited to the content disclosed in Embodiment One. It should be noted that the modules as part of the system can be executed in a computer system such as a set of computer executable instructions.
[0111] Embodiment Three
[0112] The embodiment provides a computer readable storage medium, which stores a computer program, and the program is executed by a processor to realize the steps in the dynamic grouping based measurement data hierarchical orderly access method according to Embodiment One.
[0113] Embodiment Four
[0114] The embodiment provides a computer device, which comprises a memory, a processor and a computer program stored in the memory and executable on the processor, and the processor realizes the steps in the dynamic grouping based measurement data hierarchical orderly access method according to Embodiment One when executing the program.
[0115] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system or a computer program product. Therefore, the present application can be in the form of a hardware embodiment, a software embodiment or an embodiment combining software and hardware aspects. Moreover, the present application can be in the form of a computer program product implemented on one or more computer usable storage media (including but not limited to disk storage and optical storage, etc.) containing computer usable program code.
[0116] The embodiments of methods, apparatuses (systems) and computer program products according to the present application can be described in the general context of method steps and processes, which can be implemented in one embodiment by a program of instructions on a computer-readable storage medium executed by a computer or other programmable apparatus. The apparatuses can be specially constructed for executing the embodiments of methods, apparatuses (systems) and computer program products according to the present application or can include a computer or other programmable apparatus. Figure 1 The flow and / or block diagram in which each flow and / or block includes the functions specified in that flow and / or block. Figure 1 The apparatus that carries out the functions specified in one flow or multiple flows and / or one block or multiple blocks.
[0117] The computer program instructions can also be loaded onto a computer or other programmable apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flow Figure 1 The flow and / or block diagram in which each flow and / or block includes the functions specified in that flow and / or block. Figure 1 The apparatus that carries out the functions specified in one flow or multiple flows and / or one block or multiple blocks.
[0118] The computer program instructions can also be loaded onto a computer or other programmable apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flow Figure 1 The flow and / or block diagram in which each flow and / or block includes the functions specified in that flow and / or block. Figure 1 The apparatus that carries out the functions specified in one flow or multiple flows and / or one block or multiple blocks.
[0119] A person of ordinary skill in the art can understand that all or part of the above-mentioned flow of the embodiment method can be completed by a computer program instructing related hardware, and the program can be stored in a computer readable storage medium. When the program is executed, it can include the flow of the above-mentioned embodiment of each method. The storage medium can be a magnetic disc, an optical disc, a read-only memory (ROM) or a random access memory (RAM), etc.
[0120] The above only describes the preferred embodiments of the present application and is not intended to limit the present application. For those skilled in the art, the present application can have various changes and modifications. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A hierarchical and orderly access method for measurement data based on dynamic grouping, characterized in that, include: Acquire electrical force measurement data and perform preprocessing; The preprocessed electrical force measurement data are clustered to obtain several dynamic groups; The preprocessed electrical force measurement data were clustered using the K-means clustering algorithm. The process of clustering using the K-means clustering algorithm includes: One sample was randomly selected from the preprocessed power measurement data as the initial cluster center. ; Calculate the shortest distance between each sample and the existing cluster centers. Calculate the probability that each sample will be selected as the next cluster center. Then, the next cluster center is selected using the roulette wheel method; Repeat the process of distance calculation and cluster center selection until cluster centers are selected. ; Calculate the distance from each sample in the preprocessed power measurement data to the cluster center, and assign the data to the class corresponding to the cluster center with the smallest distance; Recalculate each cluster center ,in, Indicates the original cluster centers. , Indicates the original cluster center The samples in; Repeat the process of classifying and calculating each cluster center until the position of the cluster centers no longer changes; The clustering process includes cross-evaluating the clustering results using the sum of squared errors and the silhouette coefficient to determine the optimal number of clusters, and obtaining the clustering results based on the optimal number of clusters. Insert the data within each dynamic group into the existing data sequence in an orderly manner; Based on the differences in latency tolerance, dynamic polling priority scheduling is adopted, and the inserted data is processed according to the rule of entering a polling cycle every certain period of dynamic scheduling.
2. The hierarchical and orderly access method for measurement data based on dynamic grouping according to claim 1, characterized in that, The method further includes: calculating the user resource blocks after dynamic grouping, controlling the ratio of dynamic scheduling cycles to polling scheduling cycles, and updating the unit dynamic time consumption.
3. The hierarchical and orderly access method for measurement data based on dynamic grouping according to claim 1, characterized in that, The differences in latency tolerance include: latency-intolerant tasks that send small amounts of data but have low latency, communication tasks that occur under human intervention, tasks with minimum transmission rate requirements, and tasks that send small amounts of data and are latency-tolerant.
4. The hierarchical and orderly access method for measurement data based on dynamic grouping according to claim 1, characterized in that, The dynamic polling priority scheduling includes: Add processes to the ready queue in the order of arrival; At the beginning of each scheduling cycle, priorities are reassigned to each process; Processes are divided into different priority groups based on their priority. In each priority group, CPU time is allocated using a round-robin scheduling algorithm. Processes execute in the order they are in the queue and run within their allocated time slices. When a time slice expires, the process is removed from the CPU, and the next process begins execution. If a process completes within its time slice, it is removed from the ready queue. At the end of each scheduling cycle, the priority is adjusted based on the actual performance of the processes; Until all processes have finished executing.
5. The hierarchical and orderly access method for measurement data based on dynamic grouping according to claim 1, characterized in that, The preprocessing includes: sorting the power measurement data according to its source, data type, and timestamp; and using a density-based spatial clustering algorithm to denoise the sorted power measurement data.
6. A hierarchical and orderly access system for measurement data based on dynamic grouping, characterized in that, include: The data acquisition and preprocessing module is configured to acquire electrical force measurement data and perform preprocessing. The grouping module is configured to cluster the preprocessed electrical measurement data to obtain several dynamic groups; The preprocessed electrical force measurement data were clustered using the K-means clustering algorithm. The process of clustering using the K-means clustering algorithm includes: One sample was randomly selected from the preprocessed power measurement data as the initial cluster center. ; Calculate the shortest distance between each sample and the existing cluster centers. Calculate the probability that each sample will be selected as the next cluster center. Then, the next cluster center is selected using the roulette wheel method; Repeat the process of distance calculation and cluster center selection until cluster centers are selected. ; Calculate the distance from each sample in the preprocessed power measurement data to the cluster center, and assign the data to the class corresponding to the cluster center with the smallest distance; Recalculate each cluster center ,in, Indicates the original cluster centers. , Indicates the original cluster center The samples in; Repeat the process of classifying and calculating each cluster center until the position of the cluster centers no longer changes; The clustering process includes cross-evaluating the clustering results using the sum of squared errors and the silhouette coefficient to determine the optimal number of clusters, and obtaining the clustering results based on the optimal number of clusters. The ordered access module is configured to insert the data within each dynamic group into the existing data sequence in an orderly manner. The data processing module is configured to process the inserted data by using dynamic polling priority scheduling based on the difference in latency tolerance, and by entering a polling cycle every certain period of dynamic scheduling.
7. The hierarchical and orderly access system for measurement data based on dynamic grouping according to claim 6, characterized in that, The dynamic polling priority scheduling includes: Add processes to the ready queue in the order of arrival; At the beginning of each scheduling cycle, priorities are reassigned to each process; Processes are divided into different priority groups based on their priority. In each priority group, CPU time is allocated using a round-robin scheduling algorithm. Processes execute in the order they are in the queue and run within their allocated time slices. When a time slice expires, the process is removed from the CPU, and the next process begins execution. If a process completes within its time slice, it is removed from the ready queue. At the end of each scheduling cycle, the priority is adjusted based on the actual performance of the processes; Until all processes have finished executing.
8. The hierarchical and orderly access system for measurement data based on dynamic grouping according to claim 6, characterized in that, The preprocessing includes: sorting the power measurement data according to its source, data type, and timestamp; and using a density-based spatial clustering algorithm to denoise the sorted power measurement data.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the steps in the hierarchical ordered access method for measurement data based on dynamic grouping as described in any one of claims 1-5.
10. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps in the hierarchical and orderly access method for measurement data based on dynamic grouping as described in any one of claims 1-5.
Citation Information
Patent Citations
Extensible full-flow priority dispatching method
CN101714947A
Big data application system and method based on Internet of Things
CN111858722A