Measurement data unvarnished transmission method, system and equipment based on unified addressing and medium
By optimizing data transmission in low-voltage distribution area power systems through unified addressing and time series analysis, the problems of complex terminal types and inconsistent protocols have been solved, enabling plug-and-play devices and efficient and stable data transmission.
Patent Information
- Application Number
- CN202511574730.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-31
- Publication Date
- 2025-12-12
AI Technical Summary
The low-voltage distribution area power system has a variety of terminal types and inconsistent protocols, resulting in chaotic address identification rules. It is impossible to establish a unified address mapping relationship between the master station and the terminal. The existing system lacks dynamic management and control, and the terminal data is cached in an disordered manner, consuming resources and reducing data transmission efficiency.
A unified address code is generated by a hash function, and a mapping relationship between the address code and the data storage area is established. A time series analysis model is used to predict terminal activity, and low-activity terminals are eliminated. A sliding window is used to optimize the cache, and address and data separation and multi-channel resource pool transmission technology are adopted.
It enables plug-and-play functionality for new devices, enhances expansion flexibility, optimizes cache resource allocation, improves data retrieval response speed, reduces system resource overhead, and ensures efficient and stable transmission of measurement data.
Smart Images

Figure CN121125683A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power system communication technology, specifically to a method, system, device, and medium for transparent transmission of measurement data based on unified addressing. Background Technology
[0002] Currently, in low-voltage distribution area power systems, with the development of technology, the system includes early data acquisition terminals as well as recently added, relatively intelligent data acquisition modules. Because multiple departments within the power grid company operate independently, each department needs to configure its own data monitoring terminals for its specific business needs. Based on the above, aside from differences in data acquisition equipment hardware, the main differences in data acquisition and data communication in low-voltage distribution areas are as follows: Regarding data links: different departments and different businesses use different acquisition terminals, resulting in differences in data links. For example, fieldbus uses the Modbus protocol, while power line communication uses the HPLC protocol. Regarding application protocols: power distribution services mainly use the MQTT+JSON mechanism, while user acquisition services mainly use the IEC104 protocol, DL / T698.45 protocol, etc., which are different. Regarding communication mechanisms: power distribution services mainly use a bus approach, while user acquisition systems use a polling mode to acquire data. The aforementioned differences necessitate deep decoding and encoding of the communication data between different data acquisition terminals and the main service station, based on the specific data acquisition terminal they are communicating with, to facilitate data identification and interoperability between the main station and the terminal. This hinders communication efficiency and business expansion. Furthermore, the diverse terminal types and inconsistent protocols lead to chaotic address identification rules, preventing the establishment of a unified address mapping relationship between the main station and terminals. This results in data interaction requiring additional resources to maintain multiple sets of address resolution logic and is prone to data transmission delays or loss due to address matching errors. The existing system lacks dynamic control over terminal communication status, resulting in long-term disordered caching of terminal data. This not only consumes significant storage resources but also reduces the response speed of data retrieval and transmission, making it difficult to meet the real-time and efficient transmission requirements of low-voltage distribution area measurement data. Summary of the Invention
[0003] In view of the above-mentioned problems, the present invention is proposed.
[0004] Therefore, the technical problem solved by this invention is that the variety of terminal types and the lack of unified protocols lead to chaotic terminal address identification rules, making it impossible to establish a unified address mapping relationship between the master station and the terminals; the existing system lacks dynamic control over the terminal communication status, and terminal data is cached in an unordered manner for a long time, which not only occupies a lot of storage resources, but also reduces the response speed of data retrieval and transmission.
[0005] To solve the above-mentioned technical problems, the present invention provides the following technical solution: a measurement data pass-through method based on unified addressing, which includes the following steps, Acquire measurement data and original identifiers from the acquisition terminal, and generate a unified address code based on the original identifiers; The interaction record table of the acquisition terminal is obtained, and an interaction record sequence is generated using the unified address code as the key. At the same time, a mapping relationship between the unified address code and the data storage area is established to store the measurement data. When the acquisition terminal obtains new interaction records, it updates the interaction record sequence and optimizes the interaction record sequence through a sliding window mechanism. The time series analysis model is used to predict and calculate terminal activity based on the interaction record sequence. The terminal activity level is compared with the activity threshold, and low-activity terminals are removed based on the comparison results. When data needs to be transmitted, the unified address code of the acquisition terminal is obtained from the message queue to be processed, and the measurement data is found according to the unified address code and sent to the business master station.
[0006] As a preferred embodiment of the measurement data pass-through method based on unified addressing described in this invention, the step of generating a unified address code based on the original identifier includes: Acquire measurement data and raw identifiers from the acquisition terminal; The original identifier is hashed to generate a unified address code.
[0007] The beneficial effects of this preferred technical solution are as follows: by using a hash function to generate a unique unified address code from the original identifiers of different terminals, a mapping relationship between the unified address code and the data storage area is established, address resolution barriers under multiple protocols are eliminated, and new devices can be plugged in and used without modifying the system, greatly improving the flexibility of expansion.
[0008] As a preferred embodiment of the measurement data pass-through method based on unified addressing described in this invention, the steps of generating an interactive record sequence, establishing a mapping relationship between a unified address code and a data storage area, and storing the measurement data include: Retrieve the interaction record table, and use the unified address code as the key to query the interaction record table to obtain the interaction record sequence; Simultaneously establish a mapping relationship between unified address codes and data storage areas; The currently received measurement data is written into the corresponding data storage area according to the unified address encoding.
[0009] As a preferred embodiment of the measurement data pass-through method based on unified addressing described in this invention, the steps of updating the interaction record sequence when the acquisition terminal obtains a new interaction record and optimizing the interaction record sequence through a sliding window mechanism include: Get the timestamp and current address code of the current interaction record; Determine whether the current address code exists in the unified address code in the interaction record table. If the current address code exists, append the timestamp of the current interaction record to the end of the interaction record sequence corresponding to the current address code in the interaction record table. If the current address code does not exist, the current address code is written into the unified address code, a new interaction record sequence is created in the interaction record table, and the timestamp of the current interaction record is used as the first record of the new interaction record sequence. Set the sliding window length. If the length of the interaction record sequence is greater than the sliding window length, delete the timestamp of the earliest interaction record in the interaction record sequence. If the length of the interactive record sequence is less than or equal to the length of the sliding window, then the interactive record sequence remains unchanged.
[0010] As a preferred embodiment of the measurement data pass-through method based on unified addressing described in this invention, the step of predicting and calculating terminal activity based on the interaction record sequence using a time series analysis model includes: Read the sequence of interaction records corresponding to the unified address codes in the interaction record table in sequence; Predict the timestamp of the next interaction record based on the sequence of interaction records using a time series analysis model; The timestamp of the next interaction record is merged into the interaction record sequence to obtain the extended interaction sequence; The terminal activity level is calculated by performing a double integral on the extended interaction sequence in two dimensions: communication duration and communication data length.
[0011] The beneficial effects of this preferred technical solution are: predicting communication time and calculating activity through time series analysis model, eliminating inactive terminals, cleaning up old records with sliding window, optimizing cache resource allocation, avoiding storage resource waste, and improving data retrieval response speed.
[0012] As a preferred embodiment of the measurement data pass-through method based on unified addressing described in this invention, the step of comparing terminal activity with an activity threshold and removing low-activity terminals based on the comparison result includes: Set an activity threshold and compare the terminal activity calculated from each interaction record sequence in turn; If the terminal activity level is less than the activity level threshold, the interaction record sequence corresponding to the terminal activity level will be removed. If the terminal activity level is greater than or equal to the activity level threshold, then the interaction record sequence corresponding to that terminal activity level is retained.
[0013] As a preferred embodiment of the measurement data transparent transmission method based on unified addressing described in this invention, the step of transparently encoding the data storage area of the data to be sent and sending it to the service master station includes: Obtain the unified address code of the acquisition terminal from the message queue to be processed for measurement data to be sent; Based on the unified address code, the mapping relationship is queried to locate the data storage area where the measurement data to be sent is located; The data storage area is transparently encoded and sent to the main business station.
[0014] The advantages of this preferred technical solution are: by using address and data separation, memory-level transparent encoding and decoding, and multi-channel resource pool transmission, the system resource overhead is reduced and the measurement data is transmitted efficiently and stably.
[0015] This invention provides a measurement data pass-through system based on unified addressing.
[0016] To address the aforementioned technical problems, the present invention further provides the following technical solution: a measurement data pass-through system based on unified addressing, comprising: Data acquisition module: acquires measurement data and raw identifiers from the acquisition terminal, and acquires the interaction record table of the acquisition terminal; First data calculation module: Generates a unified address code based on the original identifier, generates an interactive record sequence using the unified address code as the key, and establishes a mapping relationship between the unified address code and the data storage area; Data storage module: Stores the measurement data collected by the data acquisition module; The second data calculation module: uses a time series analysis model to predict based on the interaction record sequence, calculates terminal activity, and removes low-activity terminals based on terminal activity. Data transmission module: Obtains the unified address code of the acquisition terminal from the message queue to be processed, and locates the data storage area according to the unified address code; transparently encodes the data storage area of the data to be sent, and sends it to the business master station.
[0017] The present invention provides a computer device, including a memory and a processor, wherein the memory stores a computer program, characterized in that the processor executes the computer program to implement the steps of the measurement data pass-through method based on unified addressing.
[0018] The present invention provides a computer-readable storage medium having a computer program stored thereon, characterized in that, when the computer program is executed by a processor, it implements the steps of the measurement data pass-through method based on unified addressing.
[0019] The beneficial effects of this invention are as follows: This invention generates a unique unified address code from the original identifiers of different terminals using a hash function, establishes a mapping relationship between the unified address code and the data storage area, eliminates address resolution barriers under multiple protocols, and allows new devices to be used plug-and-play without system modifications, greatly improving expansion flexibility; it predicts communication time and calculates activity through a time series analysis model, eliminates inactive terminals, and optimizes cache resource allocation by using a sliding window to clean up old records, avoiding storage resource waste and improving data retrieval response speed; it adopts address and data separation, memory-level transparent encoding and decoding, and multi-channel resource pool transmission techniques to reduce system resource overhead and ensure efficient and stable transparent transmission of measurement data. Attached Figure Description
[0020] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0021] Figure 1 This is a flowchart illustrating a measurement data pass-through method based on unified addressing, as provided in one embodiment of the present invention.
[0022] Figure 2 This is a system framework diagram of a measurement data pass-through method based on unified addressing, provided as an embodiment of the present invention. Detailed Implementation
[0023] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the protection scope of the present invention.
[0024] Example 1, referring to Figure 1 This is the first embodiment of the present invention, which provides a measurement data pass-through method based on unified addressing, including: S100: Acquire the measurement data and original identifier of the acquisition terminal, and generate a unified address code based on the original identifier; S200: Obtain the interaction record table of the acquisition terminal, generate the interaction record sequence with the unified address code as the key, and establish the mapping relationship between the unified address code and the data storage area to store the measurement data; S300: When the acquisition terminal obtains a new interaction record, it updates the interaction record sequence and optimizes the interaction record sequence through a sliding window mechanism; S400: Predicts and calculates terminal activity based on the interaction record sequence using a time series analysis model; S500: Compare terminal activity with an activity threshold and remove low-activity terminals based on the comparison results; S600: When data needs to be transmitted, it obtains the unified address code of the acquisition terminal from the message queue to be processed, finds the measurement data according to the unified address code, and sends the measurement data to the business master station.
[0025] It should be noted that when different data acquisition terminals transmit data with the business master station, the terminal types are diverse and the protocols are not uniform, resulting in chaotic address identification rules for each terminal and the inability to establish a unified address mapping relationship between the master station and the terminals. The existing system lacks dynamic control over the terminal communication status, and the terminal data is cached in an unordered manner for a long time, which not only occupies a lot of storage resources, but also reduces the response speed of data retrieval and transmission. Therefore, it is very important to propose a measurement data pass-through method based on unified addressing.
[0026] Therefore, to address the aforementioned issues in data transmission between different data acquisition terminals and the main business station, a measurement data pass-through method based on unified addressing is constructed through steps S100~S600. A hash function is used to generate a unique unified address code from the original identifiers of different terminals, establishing a mapping relationship between the unified address code and the data storage area. This eliminates address resolution barriers under multiple protocols, allowing new devices to be used plug-and-play without system modifications, significantly improving expansion flexibility. A time series analysis model is used to predict communication time and calculate activity levels, eliminating inactive terminals. Simultaneously, a sliding window is used to clean up old records, optimizing cache resource allocation, avoiding storage resource waste, and improving data retrieval response speed. By employing address and data separation, memory-level transparent encoding and decoding, and multi-channel resource pool transmission techniques, system resource overhead is reduced, ensuring efficient and stable transmission of measurement data.
[0027] Example 2, refer to Figure 1 and Figure 2 This is the second embodiment of the present invention, which provides a measurement data pass-through method based on unified addressing.
[0028] In this embodiment of the application, the step S100 of generating a unified address code based on the original identifier includes the following steps A1~A2: A1: Acquire measurement data and original identifiers from the acquisition terminal; In this embodiment of the application, when the acquisition terminal reports the power equipment measurement data to the master station, the mass acquisition terminal sends the corresponding measurement data to the power communication gateway, which then forwards it to the master station. After receiving the data packet reported by the terminal, the power communication gateway extracts the terminal address of the acquisition terminal as the original identifier at a fixed location, and uses the real-time measurement value of the power equipment collected by the acquisition terminal as the measurement data.
[0029] A2: Hash the original identifier to generate a unified address code.
[0030] In this embodiment of the application, the formula for hashing the original identifier is as follows: ; in, To standardize address coding, The original identifier includes a set of information about the data collection terminal, such as device type, communication protocol, and host address. It should be noted that the hashing process transforms the original identifiers of different types and protocols of acquisition terminals into a unified address code, solving the problem of chaotic address identifiers for multiple terminals and providing a foundation for subsequent unified addressing and data pass-through.
[0031] In one alternative implementation, the unified address code can also be generated through the protocol adaptation layer. When a sampling terminal reports data to the power communication gateway, the protocol adaptation layer first parses the address information within the protocol, extracts information such as protocol type, station number, IP address and port number, standardizes this information, and then performs MD5 hash processing on the standardized string to generate the unified address code.
[0032] In another alternative implementation, the unified address code can also be generated through a distributed ID generator. When a sampling terminal accesses the system, the service combines the gateway ID, access timestamp, and sequence number according to the algorithm rules to generate a 128-bit distributed ID as the unified address code of the terminal.
[0033] In this embodiment of the application, step S200 involves obtaining the interaction record table of the acquisition terminal, generating an interaction record sequence using the unified address code as the key, and simultaneously establishing a mapping relationship between the unified address code and the data storage area. Storing the measurement data includes the following steps B1~B4: B1: Retrieve the interaction record table, using the unified address code as the key to query the interaction record table and obtain the interaction record sequence; In this embodiment of the application, the obtained interaction record table is as follows: ; in, The unified address code corresponding to the kth acquisition terminal. For the interaction record table, This is the interaction record sequence of the k-th acquisition terminal. For the interaction timestamp of the data acquisition terminal; In this embodiment of the application, the obtained interaction record table is By using the unified address code of the collection terminal as the key, the corresponding interaction record sequence can be retrieved from the interaction record table; the unified address code is... The data acquisition terminal has the following corresponding interaction record sequence: .
[0034] B2: Synchronously establish the mapping relationship between the unified address code and the data storage area; In this embodiment of the application, a mapping relationship between a unified address code and a data storage area is established as follows: ;in, The unified address code corresponding to the kth acquisition terminal. This is the encoding of the data storage area corresponding to the kth acquisition terminal; It should be noted that through this one-to-one mapping, the main business station can directly and quickly locate the corresponding data storage area through the unified address code. There is no need to perform complex protocol parsing or address matching on the original terminal data. Measurement data can be obtained directly, thus solving the problem of difficult data location for multi-protocol and multi-type terminals and laying the foundation for efficient data transmission.
[0035] B3: Write the currently received measurement data into the corresponding data storage area according to the unified address encoding; In this embodiment of the application, the power communication gateway encodes the unified address as follows: The raw measurement data collected by the sampling terminal is written into the encoding. The data storage area does not require protocol parsing or format conversion, maintaining the originality of the data. This avoids the parsing overhead caused by multi-protocol adaptation and provides data support for subsequent transparent data transmission, thus improving the efficiency of data storage and transmission.
[0036] In this embodiment of the application, step S300, where the acquisition terminal updates the interaction record sequence upon acquiring a new interaction record and optimizes the interaction record sequence using a sliding window mechanism, includes the following steps C1 to C4: C1: Get the timestamp and current address code of the current interaction record; In this embodiment of the application, a sampling terminal reports new measurement data to a power communication gateway. After receiving the measurement data, the power communication gateway extracts the unified address code of the corresponding sampling terminal, outputs it as the current address code, and records the timestamp of the current interaction record of the received measurement data. The power communication gateway uses the timestamp of the current interaction record as the new interaction record and prepares to update the corresponding interaction record sequence. C2: Determine whether the current address code exists in the unified address code in the interaction record table. If the current address code exists, append the timestamp of the current interaction record to the end of the interaction record sequence corresponding to the current address code in the interaction record table. In this embodiment of the application, the current address code obtained in step C1 is: The timestamp of the current interaction record is The power communication gateway queries the unified address code in the interaction record table, including... , , ... And the interaction record sequence corresponding to the current address encoding is ; The interaction log table at this time is as follows: ; A query of the interaction record table revealed the existence of a previous address code within the unified address code. Therefore, the timestamp of the current interaction record needs to be written to the end of the interaction record sequence corresponding to the current address code in the interaction record table, resulting in the updated interaction record sequence: ; The updated interaction log table is as follows: .
[0037] C3: If the current address code does not exist, write the current address code into the unified address code, create a new interaction record sequence in the interaction record table, and use the timestamp of the current interaction record as the first record of the new interaction record sequence; In this embodiment of the application, the current address code obtained in step C1 is: The timestamp of the current interaction record is The power communication gateway queries the unified address code in the interaction record table, including... , , ... ; The interaction log table at this time is as follows: ; A query of the interaction record table revealed that the previous address code was not found in the unified address code. Therefore, a new interaction record sequence needs to be created in the interaction record table, with the timestamp of the current interaction record used as the first record of the new sequence. The updated interaction record sequence is as follows: ; The updated interaction log table is as follows: .
[0038] C4: Set the sliding window length. If the length of the interaction record sequence is greater than the sliding window length, delete the timestamp of the earliest interaction record in the interaction record sequence; if the length of the interaction record sequence is less than or equal to the sliding window length, keep the interaction record sequence unchanged.
[0039] In this embodiment of the application, a sliding window length of 3 is taken as an example; The interaction log table at this time is as follows: ; If in step C2 the interaction record sequence is The timestamp for writing the current interaction record is The updated interaction record sequence is as follows: ; At this point, the length of the interaction record sequence is 4, which is greater than the length of the sliding window. Therefore, the timestamp of the earliest interaction record in the interaction record sequence needs to be deleted so that the length of the interaction record sequence is equal to the length of the sliding window. The interaction record sequence obtained by deleting the earliest timestamp is: ; If in step C2, the interactive record sequence The timestamp for writing the current interaction record is The updated interaction record sequence is as follows: ; At this point, the length of the interaction record sequence is 3, which is equal to the length of the sliding window, so the interaction record sequence remains unchanged.
[0040] In this embodiment of the application, step S400, which involves predicting and calculating terminal activity based on the interaction record sequence using a time series analysis model, includes the following steps D1 to D4: In one alternative implementation, the optimization of the interaction record sequence can also be achieved through time decay weighting. Each interaction record's timestamp in the sequence is assigned a weight that decreases over time, with the weight being higher for more recent times. The weighted sum of the timestamps of the interaction records in the sequence is calculated periodically, and the timestamp of the earliest interaction record is deleted when the weighted sum falls below a set threshold.
[0041] In another alternative implementation, the optimization of the interaction record sequence can also be achieved through cluster analysis. The timestamps of the interaction records are clustered, and records with small time intervals are grouped into one category. Only the representative timestamps of each category are retained. Taking a certain sampling terminal as an example, the timestamps are divided into two categories, morning and afternoon, by the clustering algorithm. The timestamps belonging to the morning or afternoon period are uniformly recorded as the timestamps of the center time of the morning and afternoon periods, respectively, reducing the computing power consumption of subsequent time prediction and activity calculation.
[0042] D1: Read the sequence of interaction records corresponding to the unified address codes in the interaction record table in sequence; In this embodiment of the application, the obtained interaction record table is as follows: ;, The unified address code is obtained as The interaction record sequence is .
[0043] D2: Predict the timestamp of the next interaction record based on the interaction record sequence using a time series analysis model; In this embodiment of the application, the time series analysis model adopts an autoregressive integral moving average model. The formula for predicting the timestamp of the next interaction record using an autoregressive integral moving average model based on the sequence of interaction records is as follows: ; in, Timestamp for the next interaction record It is an autoregressive integral moving average model. For interactive record sequences; By inputting the interaction record sequence corresponding to a certain acquisition terminal into the autoregressive integral moving average model, the timestamp of the next interaction record of the acquisition terminal can be predicted, providing a time dimension basis for subsequent terminal communication status prediction and cache resource scheduling.
[0044] In one alternative implementation, the prediction of the timestamp of the next interaction record can also be achieved through a machine learning model. A random forest classification model is used, with the statistical features of the device type, protocol type, and historical interaction timestamps of the collection terminal as input features. The random forest classification model is trained to predict the timestamp of the next interaction time. The interaction record sequence corresponding to a certain collection terminal is input into the trained random forest classification model to obtain the timestamp of the next interaction record.
[0045] In another alternative implementation, the timestamp of the next interaction record can also be predicted by periodic template matching. Communication periodic templates are pre-established for different types of acquisition terminals. For example, the typical communication period of a certain acquisition terminal is once every 15 minutes. The historical interaction timestamps of the terminal are matched with the template to predict the timestamp of the next interaction record.
[0046] D3: Merge the timestamp of the next interaction record into the interaction record sequence to obtain the extended interaction sequence; In this embodiment of the application, the timestamp of the next interaction record is obtained through step D2. The interaction record sequence is The timestamp of the next interaction record is merged into the interaction record sequence to obtain the extended interaction sequence: .
[0047] D4: The terminal activity level is calculated by performing a double integral on the extended interaction sequence in two dimensions: communication duration and communication data length.
[0048] In this embodiment of the application, the formula for calculating terminal activity is: ; in, To increase terminal activity, To extend the interactive sequence, an interactive record sequence is used. The prediction is obtained through step D2; Substituting the extended interaction sequence into the terminal activity calculation formula yields the terminal activity of the acquisition terminal corresponding to the extended interaction sequence. It should be noted that terminal activity can be used to determine the frequency of communication and the scale of data transmission of the corresponding sampled terminals, providing a quantitative basis for subsequent cache clearing of low-activity terminals and dynamic resource allocation.
[0049] In one alternative implementation, terminal activity can also be calculated through activity modeling using survival analysis. The survival analysis model analyzes the impact of factors such as the duration and interval of terminal communication on activity. By tracking the communication interval of a terminal, if the communication interval gradually shortens, the terminal activity is calculated to increase over time using the survival analysis model; if the interval lengthens, the terminal activity decreases.
[0050] In another alternative implementation, terminal activity can also be calculated using deep learning. The number of communications per hour and the data volume sequence over the past 7 days are input into a neural network model for training. After the neural network model learns the temporal pattern of its communication behavior, the terminal's real-time data for the day is input into the neural network model to output the terminal activity.
[0051] In this embodiment of the application, step S500, which compares the terminal activity level with an activity threshold and removes low-activity terminals based on the comparison result, includes the following steps E1~E2: E1: Set an activity threshold and compare the terminal activity calculated from each interaction record sequence in turn. If the terminal activity is less than the activity threshold, the interaction record sequence corresponding to that terminal activity will be removed. In this embodiment, the activity threshold is set to 5 based on experience. In a low-voltage distribution area power communication gateway, there are three acquisition terminals. The activity of the interaction record sequences of the three acquisition terminals is calculated. The terminal activity of acquisition terminal A is 6.5, the terminal activity of acquisition terminal B is 4.3, and the terminal activity of acquisition terminal C is 7.2. Since the terminal activity of acquisition terminal B is less than the set activity threshold, the interaction record sequence corresponding to acquisition terminal B is deleted, along with the data and mapping relationship in the data storage area corresponding to acquisition terminal B.
[0052] E2: If the terminal activity level is greater than or equal to the activity level threshold, then retain the interaction record sequence corresponding to the terminal activity level.
[0053] In this embodiment of the application, the activity threshold is set to 5 based on experience. In a power communication gateway of a low-voltage distribution area, there are three acquisition terminals. The activity of the interaction record sequences of the three acquisition terminals is calculated. The terminal activity of acquisition terminal A is 6.5, the terminal activity of acquisition terminal B is 4.3, and the terminal activity of acquisition terminal C is 7.2. Among them, the terminal activity of acquisition terminal A and acquisition terminal C is greater than the set activity threshold. The interaction record sequences corresponding to acquisition terminal A and acquisition terminal C are retained. By removing inactive terminals in steps E1 to E2, the power communication gateway releases the cache resources occupied by inactive terminals and improves the data processing efficiency of high-priority terminals.
[0054] In this embodiment of the application, step S600, which involves transparently encoding the data storage area of the data to be sent and sending it to the service master station, includes the following steps F1~F2: F1: Obtain the unified address code of the acquisition terminal that needs to send measurement data from the message queue to be processed, and locate the data storage area where the measurement data to be sent is located by querying the mapping relationship based on the unified address code. In this embodiment, the power communication gateway has a pending message queue containing requests for data to be sent, and obtains the unified address code of the acquisition terminal corresponding to the data to be sent. Based on the mapping relationship between the unified address code and the data storage area established in step B2 of the unified address code query, the data storage area where the data to be sent is located is located. .
[0055] The communication protocol data of the terminal can be parsed without further processing, and the data to be sent can be quickly obtained, providing a data foundation for subsequent transparent encoding and transmission to the main station. This demonstrates the efficiency of unified addressing in rapid data location.
[0056] F2: Perform transparent encoding on the data storage area and send it to the main business station.
[0057] In this embodiment of the application, the power communication gateway locates the data storage area in step F1. Using in-place local storage mechanism The corresponding data storage area memory space is directly mapped to the data encoding area. Transparent encoding is completed locally without copying data from memory to other storage areas or performing additional format conversions. For example, if the raw data from the sampling terminal is stored in binary form in memory, the format is standardized directly at the original memory address during encoding, reducing the number of memory copies and the overhead of system input / output. After encoding, the gateway selects an idle channel from the 4G communication channel resource pool and sends the encoded data to the business master station. By using transparent encoding and sending to the business master station, the system resource consumption during data processing is greatly reduced, the data processing performance is significantly improved, and the real-time transmission of measurement data is ensured.
[0058] Example 3, referring to Figure 1 This is a third embodiment of the present invention, which provides a measurement data pass-through system based on unified addressing, comprising: Data acquisition module: acquires measurement data and raw identifiers from the acquisition terminal, and acquires the interaction record table of the acquisition terminal; First data calculation module: Generates a unified address code based on the original identifier, generates an interactive record sequence using the unified address code as the key, and establishes a mapping relationship between the unified address code and the data storage area; Data storage module: Stores the measurement data collected by the data acquisition module; The second data calculation module: uses a time series analysis model to predict based on the interaction record sequence, calculates terminal activity, and removes low-activity terminals based on terminal activity. Data transmission module: Obtains the unified address code of the acquisition terminal from the message queue to be processed, and locates the data storage area according to the unified address code; transparently encodes the data storage area of the data to be sent, and sends it to the business master station.
[0059] Example 4, the fourth embodiment of the present invention, differs from the previous three embodiments in that: if the function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0060] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-including system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device.
[0061] More specific examples of computer-readable media (a non-exhaustive list) include: electrical connections (electronic devices) having one or more wires, portable computer disk drives (magnetic devices), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Furthermore, computer-readable media can even be paper or other suitable media on which the program can be printed, because the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in computer memory.
[0062] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0063] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
Claims
1. A measurement data pass-through method based on unified addressing, characterized in that, include: Acquire measurement data and original identifiers from the acquisition terminal, and generate a unified address code based on the original identifiers; The interaction record table of the acquisition terminal is obtained, and an interaction record sequence is generated using the unified address code as the key. At the same time, a mapping relationship between the unified address code and the data storage area is established to store the measurement data. When the acquisition terminal obtains new interaction records, it updates the interaction record sequence and optimizes the interaction record sequence through a sliding window mechanism. The time series analysis model is used to predict and calculate terminal activity based on the interaction record sequence. The terminal activity level is compared with the activity threshold, and low-activity terminals are removed based on the comparison results. When data needs to be transmitted, the unified address code of the acquisition terminal is obtained from the message queue to be processed, and the measurement data is found according to the unified address code and sent to the business master station.
2. The measurement data pass-through method based on unified addressing as described in claim 1, characterized in that, The steps for generating a unified address code based on the original identifier include: Acquire measurement data and raw identifiers from the acquisition terminal; The original identifier is hashed to generate a unified address code.
3. The measurement data pass-through method based on unified addressing as described in claim 2, characterized in that, The steps for generating an interaction record sequence, establishing a mapping relationship between a unified address code and the data storage area, and storing measurement data include: Retrieve the interaction record table, and use the unified address code as the key to query the interaction record table to obtain the interaction record sequence; Simultaneously establish a mapping relationship between unified address codes and data storage areas; The currently received measurement data is written into the corresponding data storage area according to the unified address encoding.
4. The measurement data pass-through method based on unified addressing as described in claim 3, characterized in that, The steps for updating the interaction record sequence when the acquisition terminal obtains a new interaction record and optimizing the interaction record sequence through a sliding window mechanism include: Get the timestamp and current address code of the current interaction record; Determine whether the current address code exists in the unified address code in the interaction record table. If the current address code exists, append the timestamp of the current interaction record to the end of the interaction record sequence corresponding to the current address code in the interaction record table. If the current address code does not exist, the current address code is written into the unified address code, a new interaction record sequence is created in the interaction record table, and the timestamp of the current interaction record is used as the first record of the new interaction record sequence. Set the sliding window length. If the length of the interaction record sequence is greater than the sliding window length, delete the timestamp of the earliest interaction record in the interaction record sequence. If the length of the interactive record sequence is less than or equal to the length of the sliding window, then the interactive record sequence remains unchanged.
5. The measurement data pass-through method based on unified addressing as described in claim 4, characterized in that, The steps for predicting and calculating terminal activity based on interaction record sequences using a time series analysis model include: Read the sequence of interaction records corresponding to the unified address codes in the interaction record table in sequence; Predict the timestamp of the next interaction record based on the sequence of interaction records using a time series analysis model; The timestamp of the next interaction record is merged into the interaction record sequence to obtain the extended interaction sequence; The terminal activity level is calculated by performing a double integral on the extended interaction sequence in two dimensions: communication duration and communication data length.
6. The measurement data pass-through method based on unified addressing as described in claim 5, characterized in that, The steps of comparing terminal activity with an activity threshold and removing low-activity terminals based on the comparison results include: Set an activity threshold and compare the terminal activity calculated from each interaction record sequence in turn; If the terminal activity level is less than the activity level threshold, the interaction record sequence corresponding to the terminal activity level will be removed. If the terminal activity level is greater than or equal to the activity level threshold, then the interaction record sequence corresponding to that terminal activity level is retained.
7. The measurement data pass-through method based on unified addressing as described in claim 6, characterized in that, The steps for transparently encoding the data storage area to be sent and sending it to the main business station include: Obtain the unified address code of the acquisition terminal from the message queue to be processed for measurement data to be sent; Based on the unified address code, the mapping relationship is queried to locate the data storage area where the measurement data to be sent is located; The data storage area is transparently encoded and sent to the main business station.
8. A measurement data pass-through system based on unified addressing, employing the measurement data pass-through method based on unified addressing as described in any one of claims 1 to 7, characterized in that, include: Data acquisition module: acquires measurement data and raw identifiers from the acquisition terminal, and acquires the interaction record table of the acquisition terminal; First data calculation module: Generates a unified address code based on the original identifier, generates an interactive record sequence using the unified address code as the key, and establishes a mapping relationship between the unified address code and the data storage area; Data storage module: Stores the measurement data collected by the data acquisition module; The second data calculation module: uses a time series analysis model to predict based on the interaction record sequence, calculates terminal activity, and removes low-activity terminals based on terminal activity. Data transmission module: Obtains the unified address code of the acquisition terminal from the message queue to be processed, and locates the data storage area according to the unified address code; transparently encodes the data storage area of the data to be sent, and sends it to the business master station.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the measurement data pass-through method based on unified addressing as described in any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the measurement data pass-through method based on unified addressing as described in any one of claims 1 to 7.