Method for monitoring target information change, electronic device and storage medium

CN120972636BActive Publication Date: 2026-10-16SHENZHEN H&T CONTROL TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510844677.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-23
Publication Date
2026-10-16
Estimated Expiration
2045-06-23

AI Technical Summary

Technical Problem

此时,若目标信息在各监测周期内变化速度快或变化趋势改变迅速,则处理器难以对目标信息的变化情况进行有效地监测

Benefits of technology

[0016] It should be understood that the description in the Summary of the Invention section is not intended to limit the key or essential features of this disclosure, nor is it intended to restrict the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120972636B_ABST
    Figure CN120972636B_ABST
Patent Text Reader

Abstract

Embodiments of the present application relate to the technical field of electronic equipment, and particularly relate to a method for monitoring changes in target information, an electronic device, and a storage medium. In the method, a processor can sample target information n (n≥2) times in each monitoring period, so that n pieces of sampling data can be obtained in each monitoring period. In N monitoring periods, the processor can obtain (N-1)*n pairs of sampling data with a sampling time interval of one monitoring period, and monitor changes in the target information based on the (N-1)*n pairs of sampling data with a sampling time interval of one monitoring period. In the prior art, the processor can only obtain N-1 pairs of sampling data with a sampling time interval of one monitoring period in N monitoring periods, and monitor changes in the target information based on the N-1 pairs of sampling data with a sampling time interval of one monitoring period. (N-1)*n is greater than N-1. Embodiments of the present application increase the number of times of monitoring the target information by n times.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of electronic equipment technology, and in particular to a method, electronic equipment, and storage medium for monitoring changes in target information. Background Technology

[0002] In home appliances and other electronic devices, to improve the control accuracy of certain components (such as heat-generating devices), the processor needs to monitor changes in the target information (such as temperature) of these components. Specifically, the processor needs to periodically acquire sampling data from these components and analyze the sampling data to determine the changes in the sampling data. Based on these changes in the sampling data, the processor can control these components accordingly, thereby improving their control accuracy.

[0003] Currently, to monitor changes in target information, processors typically sample the target information once every monitoring cycle. That is, within two adjacent monitoring cycles, the processor can only obtain sampled data for one pair of target information to determine the change in the target information once. Therefore, if the target information changes rapidly or its trend changes quickly within each monitoring cycle, the processor will struggle to effectively monitor these changes. Summary of the Invention

[0004] This application provides a method, electronic device, and storage medium for monitoring changes in target information, which can more accurately and effectively monitor changes in target information.

[0005] In a first aspect of this application, a method for monitoring changes in target information is provided. The method includes: a processor determining a monitoring period for the target information; the processor sampling the target information n times within each monitoring period; the processor sequentially sampling the target information from the first to the (m+n)th sampling time according to the sampling time sequence, obtaining a plurality of sampled data, wherein the time interval between the m-th sampling and the (m+n)-th sampling is one monitoring period; the processor monitoring changes in the target information based on the sampled data obtained from the (m+n)-th sampling and the sampled data obtained from the m-th sampling; wherein n is a positive integer not less than 2, and m∈N. + N + A set used to represent positive integers.

[0006] In the embodiments of this application, the processor can sample the target information n times (n≥2) in each monitoring cycle, thereby obtaining n sampled data in each monitoring cycle. Over N monitoring cycles, the processor can acquire (N-1)*n pairs of sampled data with a sampling time interval of one monitoring cycle, and monitor the changes in the target information based on these (N-1)*n pairs of sampled data with a sampling time interval of one monitoring cycle. In contrast, in the prior art, since the processor only obtains 1 sampled data in each monitoring cycle, it can only obtain N-1 pairs of sampled data with a sampling time interval of one monitoring cycle over N monitoring cycles, and monitor the changes in the target information based on these N-1 pairs of sampled data with a sampling time interval of one monitoring cycle. (N-1)*n is greater than N-1. Compared to the prior art, the embodiments of this application increase the number of times the target information is monitored by n times. Therefore, the embodiments of this application can effectively improve the timeliness, stability, and accuracy of the target information monitoring results.

[0007] In some embodiments, the step of sequentially sampling the target information from the 1st to the (m+n)th time to obtain a plurality of sampled data includes: sequentially performing sampling from the mth to the (m+n-1)th time, storing the n sampled data obtained from the mth to the (m+n-1)th time sampling in a storage array, the storage array including storage locations from the 1st to the nth time, and storing the n sampled data obtained from the mth to the (m+n-1)th time sampling in the 1st to the nth time storage locations respectively; and performing the (m+n)th time sampling; after monitoring the changes in the target information based on the sampled data obtained from the (m+n)th time sampling and the sampled data obtained from the mth time sampling, the method further includes: correspondingly transferring the n-1 sampled data stored in storage locations from the 2nd to the nth time storage locations to storage locations from the 1st to the (n-1)th time storage locations respectively, and storing the sampled data obtained from the (m+n)th time sampling in the nth time storage location.

[0008] In some embodiments, the number of storage locations in the storage array is equal to n.

[0009] In some embodiments, the storage array stores the sampled data using a first-in, first-out (FIFO) principle. The storage array includes consecutive storage locations from the 1st to the nth, and the length of each sampled data obtained from the 1st to the (m+n)th sampling is equal to a preset length. The step of moving the n-1 sampled data stored at the 2nd to the nth storage locations to the 1st to the (n-1)th storage locations respectively includes: moving the n sampled data obtained from the mth to the (m+n-1)th sampling stored in the storage array as a whole by the preset length, so that the n-1 sampled data stored at the 2nd to the nth storage locations are moved to the 1st to the (n-1)th storage locations respectively.

[0010] In some embodiments, monitoring the changes in the target information based on the sampling data obtained from the (m+n)th sampling and the sampling data obtained from the mth sampling includes: if it is determined that the (m+n)th sampling has not been completed at the current sampling time, storing the sampling data corresponding to the (m+n)th sampling collected at the current sampling time into a cache memory; if it is determined that the (m+n)th sampling has been completed at the current sampling time, monitoring the changes in the target information based on the sampling data obtained from the (m+n)th sampling and the sampling data obtained from the mth sampling.

[0011] In some embodiments, the change includes a trend and a rate of change. Monitoring the change of the target information based on the sampling data obtained from the (m+n)th sampling and the sampling data obtained from the mth sampling includes: based on data m and data m+n The magnitude relationship determines the changing trend of the target information; and, based on data m and data m+n The absolute value of the difference determines the rate of change of the target information; where, data m The value used to represent the sampled data collected in the m-th acquisition, data m+n Used to represent the numerical value of the sampled data collected in the (m+n)th collection.

[0012] In some embodiments, determining the monitoring period of the target information includes: acquiring feature information of the target information, the feature information including the type and / or change pattern of the target information; and determining the monitoring period of the target information based on the feature information.

[0013] In some embodiments, the step of sequentially sampling the target information from the first to the (m+n)th time according to the sampling time sequence includes: determining the sampling period of the target information; and sequentially sampling the target information from the first to the (m+n)th time according to the sampling time interval; wherein the sampling period is 1 / n of the monitoring period.

[0014] In a second aspect of this application, an electronic device is also provided, comprising at least one processor and a memory communicatively connected to the at least one processor, wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method described in the first aspect.

[0015] In a third aspect of this application, a computer-readable storage medium is also provided, the computer-readable storage medium storing computer-executable instructions for causing a computer device to perform the method described in the first aspect.

[0016] It should be understood that the description in the Summary of the Invention section is not intended to limit the key or essential features of this disclosure, nor is it intended to restrict the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description

[0017] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments of the present invention will be briefly described below. Obviously, the drawings described below are merely some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without any creative effort.

[0018] Figure 1 (a) in the diagram is a schematic diagram of a method for sampling target information using existing technology; Figure 1 (b) is a schematic diagram of a method for sampling target information provided in some embodiments of this application; Figure 2 This is a flowchart illustrating a method for monitoring changes in target information provided in some embodiments of this application; Figure 3 This is a schematic diagram of the structure of the array provided in some embodiments of this application.

[0019] Figure 4 This is a schematic diagram of the hardware structure of an electronic device for performing a method for monitoring changes in target information, provided in some embodiments of this application. Detailed Implementation

[0020] The principles and spirit of this disclosure will be described below with reference to several exemplary embodiments illustrated in the accompanying drawings. It should be understood that these specific embodiments are described merely to enable those skilled in the art to better understand and implement this disclosure, and are not intended to limit the scope of this disclosure in any way. In the following description and claims, 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.

[0021] As used herein, the term "comprising" and similar terms should be understood as open-ended inclusion, i.e., "including but not limited to". The term "based on" should be understood as "at least partially based on". The term "an embodiment" or "the embodiment" should be understood as "at least one embodiment". The terms "first", "second", etc., may refer to different or the same objects and are used only to distinguish the objects referred to, without implying a particular spatial order, temporal order, order of importance, etc., of the objects referred to.

[0022] In the embodiments of this application, the target information may specifically be any suitable sampling information such as temperature information, humidity information, speed information, or audio information.

[0023] This implementation uses temperature information as the target information and a household appliance as the electronic device as an example. For instance, a household appliance with a heating function achieves its heating function through a heating element. To more accurately control the temperature of the heating element, the processor needs to monitor the temperature change of the heating element. Specifically, the processor can sample the temperature information of the heating element through a temperature sensor, obtain several sampled temperature data, determine the temperature change of the heating element based on the sampled temperature data, and control the temperature of the heating element accordingly to improve the control accuracy of the heating element's temperature. The change of the sampled data can specifically include the trend and / or rate of change of the sampled data values. Among them, the trend can include an upward trend, a stable trend, and a downward trend.

[0024] Currently, in order to monitor changes in target information, the processor samples the target information once every monitoring cycle T, obtaining the sampled data corresponding to each monitoring cycle. For example, please refer to... Figure 1 In (a), the processor starts sampling from time 0, and then samples once every monitoring period T; where the sampling data collected by the processor in the first sampling is represented by Data1; the sampling data collected by the processor in the second sampling is represented by Data2; ...; the sampling data collected by the processor in the (N-1)th sampling is Data N-1 The sampled data collected by the processor in the Nth iteration is Data. N Therefore, the processor can collect N sample data points within N monitoring cycles, which are the first to the Nth sample data points. The processor can determine the changes in target information based on a pair of sample data points collected between every two adjacent monitoring cycles. Within N monitoring cycles, the processor can obtain N-1 pairs of sample data points with a sampling time interval equal to the monitoring cycle.

[0025] For example, the sampled values ​​of the data collected by the processor in the Mth and M+1th sampling sessions are Data, respectively. M and Data M+1 Where M∈[1, N-1], and M and N are positive integers. The processor can determine the appropriate parameters based on the Data. M+1 and Data M The magnitude of the value determines how the target information changes.

[0026] Specifically, if the processor determines Data M+1 Data MThen the processor can determine that the size of the sampled data shows an upward trend during the Mth monitoring period; if the processor determines Data M+1 =Data M When the processor determines that the size of the sampled data maintains a stable trend during the Mth monitoring period, the processor can then determine that the data size remains stable. M+1 <Data M Then the processor can determine that the size of the sampled data shows a decreasing trend during the Mth monitoring period. Additionally, the processor can also determine the data size based on the data... M+1 and Data M The absolute value Y of the difference determines the rate of change of the sampled data within the Mth monitoring period. Where Y = |Data M+1 -Data M-1 | The larger the Y value, the faster the sampled data changes; the smaller the Y value, the slower the sampled data changes.

[0027] Currently, the monitoring period for target information is typically equal to the sampling period. Starting from the second monitoring period, after each monitoring period, the processor can only obtain a pair of sampling data with a sampling time interval equal to the monitoring period, thus acquiring one instance of target information change. That is, the processor can only acquire N-1 instances of target information change within N monitoring periods. In this case, for target information where the sampling data changes rapidly or the trend changes quickly, if the processor only collects one sampling data point per monitoring period, it will be difficult for the processor to accurately monitor the changes in target information.

[0028] Therefore, in existing technologies, the number of samplings and the monitoring frequency of target information are limited by its monitoring cycle. However, the length of the monitoring cycle for target information usually depends on the characteristics of the target information, and the adjustable range is very limited. In this case, adjusting the length of the monitoring cycle for target information is unlikely to improve the efficiency and accuracy of judging changes in target information. For example, if the monitoring cycle for target information is shortened, the time interval between two adjacent samplings becomes shorter, which can easily lead to a small change between the two sampled data obtained from two adjacent samplings. This makes it difficult for the processor to capture changes in target information, resulting in a decrease in the timeliness and accuracy of determining changes in target information.

[0029] Therefore, embodiments of this application provide a method, electronic device, and storage medium for monitoring changes in target information. Please refer to... Figure 1In (b) of this method, the processor can sample the target information n (n≥2) times in each monitoring cycle while keeping the monitoring cycle of the target information constant, so that the processor can monitor the target information (N-1)*n times in N monitoring cycles. In N monitoring cycles, the number of times the target information is monitored in this embodiment is n (n≥2) times that of the prior art. Figure 1 Example (b) is given with n=4. Therefore, compared to the prior art, the embodiments of this application can improve the processor's efficiency and accuracy in monitoring changes in target information. To facilitate the reader's understanding of this application, specific embodiments are described below.

[0030] For example, Figure 1 The present application provides a flowchart of a method for monitoring changes in target information according to some embodiments, such as... Figure 1 As shown, the method includes the following steps: Step 11: The processor determines the monitoring cycle for target information.

[0031] In some embodiments, the monitoring period for target information can be a preset monitoring period. In other embodiments, the processor can also acquire feature information of the target information and determine the monitoring period for the target information based on the feature information; wherein, the features of the target information may include the type and / or change pattern of the target information, etc.

[0032] In some embodiments, the monitoring period T of the target information may specifically fall within a suitable time range, which can be expressed as [T min T max ], where T min T is used to represent the minimum time interval that can be used to monitor target information. nax This represents the maximum time interval that can be used to monitor target information. Specifically, the processor can determine T based on the characteristic information of the target information. min and T max The specific value is too small. When the monitoring period for target information is less than T... min At times, because the time interval for the processor to monitor target information is too short, the change between a pair of sampled data with a sampling time interval equal to the monitoring period is too small to reflect the changes in target information; when the monitoring period for target information is greater than T... max If the time interval for the processor to monitor target information is too long, it will reduce the processor's efficiency and accuracy in monitoring changes to target information. In some embodiments of this application, in order to further improve the processor's efficiency and accuracy in monitoring changes to target information, the monitoring period T of the target information can specifically be equal to T0. min .

[0033] Step 12: The processor samples the target information from the first to the (m+n)th time according to the sampling time sequence, and obtains a number of sampled data. The time interval between the m-th sampling and the (m+n)th sampling in the first to the (m+n)th sampling is a monitoring cycle.

[0034] In this embodiment, the processor samples the target information n times within each monitoring cycle. The processor samples the target information n times within each monitoring cycle, sequentially from the first to the (m+n)th sampling time, obtaining a plurality of sampled data, including the sampled data obtained from the m-th sampling and the sampled data obtained from the (m+n)-th sampling. Each sampling corresponds to a different sampling time; that is, each monitoring cycle includes n sampling times, and the processor performs one sampling at each sampling time within each monitoring cycle, thus collecting n sampled data after each monitoring cycle.

[0035] In the embodiments of this application, n is a positive integer not less than 2. Those skilled in the art can determine the specific value of n according to actual needs; for example, n can be any suitable positive integer such as 2, 3, 4, 5, 6, 9, 10, 20, or 50. In the 1st to the (m+n)th sampling, the time interval between the m-th sampling and the (m+n)-th sampling is exactly one monitoring period; where m∈N + N + A set used to represent positive integers; N + ={1, 2, 3, ...}. That is, the time interval between the (n+1)th sample and the 1st sample is one interval period; the time interval between the (n+2)th sample and the 2nd sample is one interval period; ...; the time interval between the (n+N)th sample and the Nth sample is one interval period, where N is a positive integer. For example, as... Figure 1 As shown in (b), the monitoring period for target information is T, and the number of samples in each monitoring period is n=4; where the time interval between the 1st and 5th samples is T; the time interval between the 2nd and 6th samples is T; the time interval between the 3rd and 7th samples is T; and so on. That is, the time interval between two samples with a difference of n is T.

[0036] In some embodiments, during the process of the processor sampling the target information multiple times, the time interval between any two adjacent samples may be equal or unequal. Those skilled in the art can set the time interval between any two adjacent samples according to actual needs.

[0037] In some embodiments, the processor samples the target information at fixed time intervals (i.e., sampling periods), meaning that the time interval between any two adjacent samples is equal. The method for the processor to sequentially sample the target information from the first to the (m+n)th time according to the sampling time sequence specifically includes: the processor determining the sampling period of the target information; the processor sequentially sampling the target information from the first to the (m+n)th time at a time interval of one sampling period; wherein the sampling period is 1 / n of the monitoring period. Specifically, after determining the monitoring period of the target information, the processor can calculate the sampling period based on the monitoring period (T) and the number of samples (n) within each monitoring period, such that t = T / n; where t represents the sampling period; T represents the monitoring period, and n is a positive integer not less than 2.

[0038] Step 13: The processor monitors the changes in the target information based on the sampling data obtained from the (m+n)th sampling and the sampling data obtained from the mth sampling.

[0039] In some embodiments, the sampled values ​​of the sampled data collected by the processor in the m-th and m+n-th sampling sessions are respectively data m and data m+n The processor can be based on data m and data m+n The magnitude relationship determines the changing trend of the target information; and, based on data m and data m+n The absolute value of the difference determines the rate of change of the target information.

[0040] Specifically, if the processor determines data m+n >data m Then the processor can determine that the magnitude of the sampled data shows an increasing trend during the time interval between the m-th and m+n-th samples; if the processor determines data m+n =data m Then the processor can determine that the magnitude of the sampled data maintains a stable trend during the time interval between the m-th and m+n-th samples; if the processor determines data m+n <data m Then the processor can determine that the magnitude of the sampled data shows a decreasing trend during the time interval between the m-th and m+n-th samples. Additionally, the processor can also determine the magnitude of the sampled data based on the data... m and data m+n The magnitude of the absolute value Y of the difference is determined by the rate of change of the sampled data during the time interval between the m-th and (m+n)-th samplings; where Y = |data m+n -data m| The larger the Y value, the faster the sampled data changes; the smaller the Y value, the slower the sampled data changes.

[0041] In some embodiments, to reduce the storage space occupied by the sampled data in the electronic device, step 12 specifically includes: the processor performing sampling from the mth to the (m+n-1)th sampling in the order of sampling time from first to last, storing the n sampled data obtained from the mth to the (m+n-1)th sampling in a storage array, which includes storage locations 1 to n, and storing the n sampled data obtained from the mth to the (m+n-1)th sampling in the 1st to the nth storage locations respectively; at this time, the correspondence between the sampled data and the storage locations is shown in Table 1; then, the processor performs the (m+n)th sampling; after step 13, the above method further includes: the processor transferring the n-1 sampled data stored in the 2nd to the nth storage locations to the 1st to the (n-1)th storage locations respectively, and storing the sampled data obtained from the (m+n)th sampling in the nth storage location; at this time, the correspondence between the sampled data and the storage locations is shown in Table 2.

[0042] In Tables 1 and 2, the sampled data obtained from the m-th to the (m+n-th)-th sampling are respectively represented as data. m , data m+1 ..., data m+n-1 and data m+n The storage locations from the 1st to the nth are represented as data[1], data[2], ..., data[n-1] and data[n], respectively.

[0043] Table 1:

[0044] Table 2:

[0045] Please refer to Tables 1 and 2. In the example above, the processor moves the n-1 sampled data stored in storage locations 2 to n to storage locations 1 to n-1 respectively, so that the data originally stored in storage locations 2 to n in Table 1 can be... m+1 , data m+2 ... and data m+n-1 These correspond to the data originally stored in storage locations 1 to n-1 in Table 1. m , data m+1 ...and data m+n-2 Then, the processor will process the data. m+n Write to the nth storage location.

[0046] In some embodiments, to further reduce the storage space occupied by sampled data in an electronic device, the number of storage locations in the storage array is equal to n; that is, the storage array consists of n storage locations. For example, the storage array can specifically be a register array, with the storage locations being registers. During the monitoring of changes in target information, the processor only needs to record n ​​sampled data points in the n storage locations of the register array, reducing the storage space occupied by the sampled data in the register array.

[0047] Specifically, in some embodiments, the storage array stores the sampled data in accordance with the First-In-First-Out (FIFO) principle. That is, the processor writes each sampled data into the storage array in the order of sampling time to form a queue data structure. Then, the sampled data in the storage array is updated in such a way that the sampled data at the head of the queue (the first one stored) is discarded first, and the sampled data at the tail of the queue (the last one stored) is discarded last.

[0048] In some embodiments, the storage array includes consecutive storage locations from the 1st to the nth. The length of each sampled data obtained by the processor from the 1st to the (m+n)th sampling is equal to a preset length. The preset length can specifically be 8 bits (i.e., 1 byte), 16 bits (2 bytes), or 32 bits (4 bytes), etc. The processor can set the size of the preset length according to actual needs. The processor moves the n-1 sampled data stored at the 2nd to the nth storage locations to the 1st to the (n-1)th storage locations accordingly, including: the processor moves the n sampled data obtained from the mth to the (m+n-1)th sampling in the storage array as a whole by the preset length, so that the n-1 sampled data stored at the 2nd to the nth storage locations are moved to the 1st to the (n-1)th storage locations accordingly.

[0049] In some embodiments, the step of the processor monitoring changes in target information based on the sampling data obtained from the (m+n)th sampling and the sampling data obtained from the mth sampling includes: if the processor determines that the (m+n)th sampling has not been completed at the current sampling time, the processor stores the sampling data corresponding to the (m+n)th sampling collected at the current sampling time into a cache memory (such as a cache register); if the processor determines that the (m+n)th sampling has been completed at the current sampling time, the processor monitors changes in target information based on the sampling data obtained from the (m+n)th sampling and the sampling data obtained from the mth sampling.

[0050] Specifically, in some embodiments, the processor performs the (m+n)th sampling and monitors changes in target information based on the sampling data obtained from the (m+n)th sampling and the sampling data obtained from the mth sampling. This includes: during the (m+n)th sampling, the processor determines whether the (m+n)th sampling has been completed at the current sampling time, that is, whether all the sampling data from the (m+n)th sampling has been collected; if not, the processor continues to collect the remaining sampling data from the (m+n)th sampling and stores the currently collected portion of the (m+n)th sampling data in a cache memory; if yes, the processor stores all the sampling data from the (m+n)th sampling in a cache memory and monitors changes in target information based on the sampling data obtained from the (m+n)th sampling and the sampling data obtained from the mth sampling.

[0051] In some embodiments, the processor performs the (m+n)th sampling. The processor first stores the sampled data obtained from the (m+n)th sampling in the cache memory, and then obtains the changes in the target information based on the sampled data obtained from the (m+n)th sampling and the sampled data obtained from the mth sampling. Then, according to the first-in-first-out principle, the processor moves the n-1 sampled data stored in the 2nd to the nth storage locations to the 1st to the (n-1)th storage locations respectively, and moves the sampled data obtained from the (m+n)th sampling stored in the cache memory to the nth storage location.

[0052] Specifically, in some embodiments, the processor may first allocate a storage array, which stores data consisting of n consecutive storage locations, and each of the n storage locations is associated with a corresponding index identifier, such as index identifiers 1 to n, or index identifiers 0 to n-1, etc. Please refer to [link to relevant documentation]. Figure 3 In (a), before the sampled data is written, each storage location in the array is an empty storage location; where an empty storage location is used to represent the storage location in the array where no sampled data has been written. Then, the processor samples the target information n times in each monitoring cycle, sequentially sampling the target information from the first to the (m+n)th time according to the sampling time. Specifically, the processor performs the first sampling, obtains data1, and writes data1 to the empty storage location with index 1; the processor performs the second sampling, obtains data2, and writes data2 to the empty storage location with index 2, and so on. The processor performs n samplings, obtaining data... n and data n Write to the empty storage location with index n; therefore, after completing the nth sampling, the structure of the stored array is as follows: Figure 3 As shown in (b); subsequently, the processor performs the (n+1)th sampling to obtain data. n+1 At this time, data n+1The sampling time interval between data1 and data1 is exactly one sampling period; the processor first processes data1... n+1 Write to the cache memory, and then based on data n+1 And data1 monitors changes in target information. Please refer to [link / reference]. Figure 3 In (c), the processor is based on data n+1 After monitoring the changes in target information with data1, the processor, based on the first-in, first-out principle, assigns storage locations with indices 2 to n to the stored data2 to data1, respectively. n Shift the entire data by one data unit, so that data2 to data... n Each of the corresponding storage locations with index identifiers from 1 to n-1 is written, forming a structure as follows: Figure 3 The array shown in (d) is used for storage; then, the processor stores the data in the cache memory. n+1 Write to the storage location identified by index n, forming a structure like... Figure 3 The array shown in (e) is the storage array.

[0053] Specifically, in some embodiments, the processor samples n=6 times in each monitoring cycle, and the storage array consists of 6 consecutive storage locations; the storage array is defined as Data[6]; the 6 consecutive storage locations are represented as data[1], data[2], data[3], data[4], data[5] and data[6] respectively; assuming m∈[1, 1000]; then the method of the processor monitoring changes in target information includes the following steps: The processor performs the first sampling at the start time, obtains data1, and stores data1 in data[1]; then, the processor performs the second sampling, obtains data2, and stores data2 in data[2]; ...; the processor performs the sixth sampling, obtains data6, and stores data6 in data[6].

[0054] The processor performs the 7th sampling and obtains data7; at this time, the sampling time interval between data7 and data1 is exactly one monitoring cycle. The processor first writes data7 into the cache memory, and then monitors the changes in target information based on data7 and data1; then, based on the first-in-first-out principle, the processor moves the data in the array Data[6] by one data unit length, so that data[2], data[3], ... and data[6] respectively move the corresponding data2, data3, ... and data6 to data[1], data[2], ... and data[5] respectively; the processor then stores data7 in the cache memory into data[6]. At this time, data1 in the sampled data is discarded.

[0055] The processor performs the 8th sampling and obtains data8; at this time, the sampling time interval between data8 and data2 is exactly one monitoring cycle. The processor first writes data8 into the cache memory, and then monitors the changes in the target information based on data8 and data2; then, based on the first-in-first-out principle, the processor moves the data in the array Data[6] by one data unit length, so that data3, data4, ... and data7 stored in data[2], data[3], ... and data[6] are respectively moved to data[1], data[2], ... and data[5]; the processor then stores data8 stored in the cache memory into data[6]. At this time, data2 in the sampled data is discarded.

[0056] ... The processor performs the 1006th sample and obtains data. 1006 At this time, data 1006 With data 1000 The sampling time interval between them is exactly one monitoring cycle. The processor first processes the data... 1006 Write to the cache memory, and then based on data 1006 and data 1000 The processor monitors changes in target information; then, based on the first-in-first-out principle, it moves the data in the array Data[6] by one data unit, so that the corresponding data stored in data[2], data[3], ... and data[6] are shifted. 1001 , data 1002 ... and data 1005 The processor then moves the data stored in the cache memory to data[1], data[2], ... and data[5] respectively; 1006Stored in data[6]. At this time, the data in the sampled data... 1000 It was discarded.

[0057] In the example above, since the processor is based on data 1006 and data 1000 To monitor changes in target information, before performing the 1006th sample, the processor can store the sampled data obtained from samples 1000 to 1005 in a storage array, and store the sampled data data1 to data2 obtained from samples 1 to 999 respectively. 999 Discarding data can reduce the amount of sampled data stored, saving storage space in electronic devices. This embodiment uses m∈[1, 1000] as an example. In other embodiments, m can be other ranges; for example, m∈[1, 10000], m∈[1, 50000] or m∈[1, 100000], etc.

[0058] For example, in some embodiments, the target information is a temperature value, and the corresponding monitoring period T = 1 minute. In the prior art, the processor samples once every 1 minute. The temperature value collected by the processor in the first sampling is A1, the temperature value collected by the processor in the second sampling is A2, and the processor uses A1 and A2 to obtain the temperature change within the first monitoring period; ..., the processor performs the Nth sampling, and when the temperature value collected is A... N Afterwards, the processor is based on A N and A N-1 The processor acquires the temperature changes during the (N-1)th monitoring period. In other words, the processor acquires the temperature changes every minute.

[0059] However, in the embodiments of this application, the monitoring period T=1 minute can be divided into 6 equal parts (i.e., n=6), each time period being a sampling period t, and t=10 seconds. The processor samples the temperature value every 10 seconds. The method for the processor to monitor temperature changes may specifically include the following steps: When the processor performs the first to sixth sampling, the sampled values ​​obtained by the processor are a1, a2, a3, a4, a5 and a6 respectively; the processor stores a1, a2, a3, a4, a5 and a6 into the first to sixth storage locations data[1], data[2], data[3], data[4], data[5] and data[6] respectively.

[0060] When the processor performs the 7th sampling, the sampled value obtained by the processor is a7; and the time interval between the 7th sampling and the 1st sampling is exactly 1 minute. Therefore, the processor can use a7 and a1 to obtain the temperature value change. At this time, the processor can discard a1 stored in data[1], and transfer the sampled values ​​stored in data[2], data[3], data[4], data[5] and data[6] to data[1], data[2], data[3], data[4] and data[5] respectively, and store a7 in data[6].

[0061] When the processor performs the Nth sample, the sampled value obtained by the processor is a. N At this point, the time interval between the Nth sample and the (N-6th)th sample is exactly 1 minute. Therefore, the processor utilizes a N and a N-6 This allows us to obtain the temperature value change once more.

[0062] In the aforementioned method for monitoring temperature changes using a processor, starting from the time of the processor's sixth sampling, the processor can acquire a temperature change value every t=10 seconds. That is, the processor can acquire six temperature change values ​​in each monitoring cycle after the first monitoring cycle. Compared to existing technologies, this embodiment increases the number of temperature change monitoring times by six times within the same monitoring time. Therefore, this embodiment can effectively improve the timeliness, stability, and accuracy of the monitoring results.

[0063] Please see Figure 4 , Figure 4 A hardware structure diagram of an electronic device for performing the method for monitoring changes in target information provided in embodiments of this application is shown. In some embodiments, the electronic device 120 includes one or more processors 121 and a memory 122 communicatively connected to the processors 121.

[0064] Figure 4 Taking a processor 121 as an example, the processor 121 and the memory 122 can be connected via a bus or other means. Figure 2 Taking the example of a connection between China and Israel via a bus.

[0065] The memory 122, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. The processor 121 executes various functional applications and data processing of the controller by running the non-volatile software programs, instructions, and modules stored in the memory 122, thereby implementing the methods described in any embodiment of this application, such as executing the above-described... Figure 2 Steps 11-13 in the process.

[0066] The memory 122 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the Bluetooth adapter, etc. Furthermore, the memory 122 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory 122 may optionally include memory remotely located relative to the processor 121, and these remote memories may be connected to the controller via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0067] The one or more modules are stored in the memory 122. When executed by the at least one processor 121, they perform the methods described in the method embodiments of this application, such as the methods described above. Figure 2 Steps 11-13 in the process.

[0068] The above-described product can execute the method for identifying the host operating system on the electronic device side provided in the embodiments of this application, and has the corresponding functional modules and beneficial effects of executing the method. Technical details not described in detail in this embodiment can be found in the method provided in the embodiments of this invention.

[0069] It should be understood that Figure 4 The illustrated structure does not constitute a specific limitation on the electronic device 120. In other embodiments of this application, the electronic device 120 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0070] This invention provides a non-volatile computer-readable storage medium storing computer-executable instructions. These instructions are executed by an electronic device using the identification host operating system on the electronic device side, for example, executing the instructions described above. Figure 2 Steps 11-13 in the process.

[0071] This invention provides a computer program product, including a computing program stored on a non-volatile computer-readable storage medium. The computer program includes program instructions that, when executed by a computer, cause the computer to execute the identification host operating system on the electronic device side of any of the above method embodiments, for example, to execute the above-described... Figure 2 Steps 11-13 in the process.

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

[0073] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented using software and a general-purpose hardware platform, or it can be implemented using hardware. Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (RON), or random access memory (RAN), etc.

[0074] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; under the concept of the present invention, the technical features of the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other variations of different aspects of the present invention as described above, which are not provided in detail for the sake of brevity; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for monitoring changes in target information, characterized in that, The method includes: The monitoring period for the target information is determined, and the target information is sampled n times within each monitoring period; The target information is sampled sequentially from the first to the (m+n)th time according to the sampling time sequence, to obtain a number of sampled data. The time interval between the m-th sampling and the (m+n)-th sampling in the first to the (m+n)-th sampling is one monitoring cycle. The step of sequentially sampling the target information to obtain a number of sampled data includes: sequentially performing the m-th to the (m+n-1)-th sampling, storing the n sampled data obtained from the m-th to the (m+n-1)-th sampling in a storage array, and performing the (m+n)-th sampling. The storage array includes storage positions from the first to the nth, and the n sampled data obtained from the m-th to the (m+n-1)-th sampling are respectively stored in the storage positions from the first to the nth. The changes in the target information are monitored based on the sampling data obtained from the (m+n)th sampling and the sampling data obtained from the mth sampling. The n-1 sampled data stored in the second to the nth storage locations are respectively moved to the first to the (n-1)th storage locations, and the sampled data obtained from the (m+n)th sampling is stored in the nth storage location; Where n is a positive integer not less than 2, and m∈N + N + A set used to represent positive integers.

2. The method according to claim 1, characterized in that, In the storage array, the number of storage locations is equal to n.

3. The method according to claim 2, characterized in that, The storage array stores the sampled data in a first-in, first-out manner. The storage array includes consecutive storage locations from the 1st to the nth, and the length of each sampled data obtained from the 1st to the (m+n)th sampling is equal to a preset length. The step of transferring the n-1 sampled data stored in storage locations 2 to n to storage locations 1 to n-1 respectively includes: The n sampled data obtained from the m-th to m+n-1-th samplings stored in the storage array are moved as a whole by the preset length, so that the n-1 sampled data stored in the 2nd to nth storage positions are respectively moved to the 1st to n-1st storage positions.

4. The method according to claim 1, characterized in that, The monitoring of changes in the target information based on the sampling data obtained from the (m+n)th sampling and the sampling data obtained from the mth sampling includes: If it is determined that the (m+n)th sampling has not been completed at the current sampling time, the sampled data corresponding to the (m+n)th sampling collected at the current sampling time is stored in the cache memory. If it is determined that the (m+n)th sampling has been completed at the current sampling time, then the changes in the target information are monitored based on the sampling data obtained from the (m+n)th sampling and the sampling data obtained from the mth sampling.

5. The method according to claim 1, characterized in that, The changes include the trend and rate of change. Monitoring the changes in the target information based on the sampling data obtained from the (m+n)th sampling and the sampling data obtained from the mth sampling includes: Based on data m and data m+n The magnitude relationship determines the changing trend of the target information; and, Based on data m and data m+n The absolute value of the difference determines the rate of change of the target information; Among them, data m The value used to represent the sampled data collected in the m-th acquisition, data m+n Used to represent the numerical value of the sampled data collected in the (m+n)th collection.

6. The method according to claim 1, characterized in that, The monitoring period for determining target information includes: Acquire feature information of the target information, the feature information including the type and / or change pattern of the target information; The monitoring cycle for the target information is determined based on the aforementioned feature information.

7. The method according to any one of claims 1-6, characterized in that, The step of sampling the target information sequentially from the first to the (m+n)th time according to the sampling time order includes: Determine the sampling period for the target information; The target information is sampled sequentially from the 1st to the (m+nth)th time, with each sampling period being sampled once. The sampling period is 1 / n of the monitoring period.

8. An electronic device, characterized in that, The electronic device includes: At least one processor, and The memory communicatively connected to the at least one processor, wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1-7.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions for causing a computer device to perform the method according to any one of claims 1-7.

Citation Information

Patent Citations

  • Method and device for quickly identifying sudden load change, storage medium and electronic equipment

    CN115663851A