A storage optimization method, terminal and device of an intelligent converged terminal
By setting bit acquisition flags and the first character of OAD classification in the power acquisition terminal, the problems of storage space overhead and data accuracy in data management are solved, the accurate differentiation and integrity of data are achieved, and the query efficiency and storage optimization effect are improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- QINGDAO ITECHENE TECH CO LTD
- Filing Date
- 2026-05-21
- Publication Date
- 2026-06-19
AI Technical Summary
Existing technologies for data management in power acquisition terminals suffer from problems such as excessive storage space overhead and insufficient data accuracy and integrity. In particular, when merging storage, it is impossible to distinguish between uncollected data and data with a collection value of 0, and data from different acquisition schemes can overwrite each other, leading to data loss.
By setting a bit acquisition flag, invalid values NULL that have not been acquired are distinguished from valid data with an acquired value of 0. The OAD first character is used for classification and cross-scheme data concatenation to generate an OAD statistical table, ensuring the accuracy and integrity of the data.
It enables precise differentiation of data, improves data accuracy and table lookup efficiency, reduces storage overhead, and ensures data integrity.
Smart Images

Figure CN122240036A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of terminal data storage technology, and particularly relates to a storage optimization method, terminal and device for intelligent converged terminals. Background Technology
[0002] With the deep integration of smart grids and IoT technologies, the data management model of power acquisition terminals is undergoing significant changes. The China Electric Power Research Institute has proposed a new requirement for acquisition terminals: unified data management by a data center. The converged terminal data center uses the primary DI (hexadecimal representation of the Object Attribute Descriptor (OAD)) and secondary DI for each acquisition point as basic storage units, achieving complete decoupling of data and task schemes, significantly improving data scalability and query retrieval efficiency. However, in practical engineering applications, it has been found that this full-scale storage method in the data center leads to a significant increase in storage space overhead when the acquisition files are large and the task scheme configuration is complex.
[0003] To address this, existing technologies propose merging multiple secondary DI data sets under the same primary DI, with identical OAD definition formats, consistent attribute characteristics, and different element indices within the attributes, into a single database record for storage—a process known as itemized data merging and storage. For example, for the data acquisition scheme "50050200, 20010201, 20010203", before merging, each successful execution of the scheme by each meter would add two stored records; however, after merging, only one record will be added. The more OADs in the configuration scheme that satisfy this merging rule, the more significant the optimization effect, thereby reducing storage overhead.
[0004] However, this merged storage method still has the following drawbacks: when a certain DI is not configured in the acquisition scheme, it is impossible to distinguish whether the acquired value of the data is 0 or not acquired (data is NULL) during data query, thus affecting the accuracy of the data; if multiple acquisition schemes acquire different sub-items of the same meter at the same time, such as scheme 1 acquiring 20010202 and scheme 2 acquiring 20010203, since the data center only retains the last data content about 2001, the data acquired by different schemes will overwrite each other, and only the last updated data content will be retained, resulting in the loss of other sub-item data and failing to guarantee the integrity of the acquired data. Summary of the Invention
[0005] To address the problems existing in the prior art, the present invention provides a storage optimization method for intelligent converged terminals, comprising the following steps: Step S1: Based on the data collection task plan, parse the item comparison table defined by OAD and generate the OAD statistics table that needs to be queried for this data collection task. Step S2: Execute the data collection task to send a meter reading frame to the collection point, receive and parse the returned meter reading response frame, obtain the data items and determine whether the sub-item data is valid; if the sub-item data is valid, set the bit of the corresponding sub-item collection success flag to 1; if the sub-item data is invalid, set the bit to 0. Step S3: Determine whether the data item collected this time exists in the OAD statistics table. If it exists in the OAD statistics table, query the data center for the historical data corresponding to the collection point at the collection time. Step S4: The historical data is spliced into the data items collected this time, and the spliced data is written into the data center.
[0006] Based on the above scheme, the method for generating the OAD statistical table in step S1 is as follows: S11: Obtain the sub-item lookup table based on the data item lookup table, and classify them according to the first character of the OAD; S12: Based on the item comparison table, OADs with the same object identifier and attributes but different items in different data acquisition task schemes are classified and statistically analyzed to obtain an OAD statistics table.
[0007] Preferably, the method for determining whether the sub-item data is valid in step S2 is as follows: S21: Extract data items from the meter reading response frame. Data items include sub-item data. The structure of sub-item data includes the maximum sub-item index of the sub-item data successfully collected this time, the sub-item collection flag, and the actual data content. S22: Set the sub-item collection flag according to whether the data collection was successful, determine whether the sub-item data is valid according to the sub-item collection flag, and update the maximum sub-item index according to the sub-item value of the sub-item data.
[0008] Specifically, the return result is determined based on the value of the bit corresponding to the sub-item acquisition flag: if the bit is 1, the data value stored for that sub-item is returned; if the bit is 0, an invalid value NULL is returned.
[0009] Based on the above scheme, step S12 specifically includes: S121: Based on the main OAD, data items are divided into multiple preset categories; S122: For each category, iterate through all collection task schemes. For each scheme processed, set the sub-items of the data items belonging to the current category in the scheme to 0, and write the non-duplicate data items into the cache queue. S123: Perform a forward self-traversal of the cache queue. If a data item appears repeatedly in the cache queue, then put the data item into the OAD statistics table.
[0010] Specifically, step S2 further includes: After the intelligent fusion terminal successfully collects multiple sub-items of data, the data center saves the merged sub-items of data in the form of data blocks. Based on the successfully collected sub-items of data, the bit corresponding to the sub-item collection flag is set to 1, and the remaining bits are set to 0.
[0011] Preferably, the sub-item acquisition flag and the maximum sub-item index are rsv and nNum in the data structure defined by the object-oriented electricity information data exchange protocol, respectively; wherein, each bit of rsv corresponds to the acquisition status of a sub-item; and nNum is used to record the maximum sub-item index of the successful acquisition.
[0012] On the other hand, the present invention provides an intelligent converged terminal, using the storage optimization method for the intelligent converged terminal as described above, including: The statistics table generation module is used to parse the item comparison table defined by OAD based on the data collection task plan and generate the OAD statistics table required for this data collection task. The data acquisition and processing module is used to execute data acquisition tasks, send meter reading frames to the acquisition points, receive and parse the returned meter reading response frames, obtain data items, and determine whether the sub-item data is valid. If the sub-item data is valid, the bit of the corresponding sub-item acquisition success flag is set to 1; if the sub-item data is invalid, the bit is set to 0. The query and judgment module is used to determine whether the OAD collected this time exists in the OAD statistics table. If it exists in the OAD statistics table, it queries the data center for the historical data corresponding to the collection point at the collection time. The splicing and writing module is used to splice the historical data with the data items collected this time, and write the spliced data into the data center.
[0013] Preferably, the acquisition and processing module includes a first processing unit and a second processing unit; wherein: The first processing unit is used to extract the sub-item data in the meter reading response frame. The sub-item data includes the maximum sub-item index of the sub-item data that was successfully collected, the sub-item collection flag, and the actual data content. The second processing unit is used to set a sub-item acquisition flag based on whether the data acquisition was successful, determine whether the sub-item data is valid based on the sub-item acquisition flag, and update the maximum sub-item index based on the sub-item value of the sub-item data.
[0014] In another aspect, the present invention provides an electronic device, comprising: a memory and a processor, wherein the memory stores a computer program; and the processor, when executing the computer program, implements the steps of the storage optimization method for the intelligent fusion terminal as described above.
[0015] Compared with the prior art, the present invention has the following beneficial effects: This invention, by setting a bit acquisition flag, can accurately distinguish between invalid values (NULL) that have not been acquired and valid data with a acquired value of 0. When querying data through a host computer, it can clearly distinguish between invalid data items that have not been acquired and data items with a value of 0 that have been acquired. This fundamentally solves the problem that traditional merged storage cannot determine the validity of data, and greatly improves the accuracy and reliability of the acquired data. This invention uses the same OI and attributes but different sub-items of data to merge them into data blocks for storage, and uses the first character of OAD for classification and fast matching, which can significantly reduce the number of records in the data center, while reducing the frequency of database read and write and storage overhead, and effectively improve table lookup efficiency; This invention generates an OAD statistical table of different sub-items with the same attribute from the same collection point by identifying duplicate items and splicing data across different scenarios. Then, it determines whether to perform cross-scenario data splicing, ensuring data integrity while optimizing storage. Attached Figure Description
[0016] Figure 1 This is a flowchart of the storage optimization method for the intelligent fusion terminal of the present invention; Figure 2 This is a flowchart illustrating the data splicing logic of the present invention. Figure 3 A flowchart illustrating the method for generating OAD statistical tables. Detailed Implementation
[0017] The invention will be further described below with reference to specific embodiments.
[0018] As is known from the prior art, the Object Attribute Descriptor (OAD) is a standard definition for representing data objects as specified in the "Object-Oriented Electricity Information Data Exchange Protocol". Its members include the object identifier (OI), attributes, and sub-items. According to a specific embodiment, the voltage is 20000200, where 2000, 02, and 00 correspond to the OI, attribute, and sub-item, respectively. When the sub-item is 00, it represents a data block (which can simultaneously represent the voltages of phases A, B, and C). Sub-item values of 01, 02, and 03 represent the voltages of phases A, B, and C, respectively.
[0019] It should be clarified that each data item requested by a data acquisition task is represented by a corresponding OAD. Therefore, the terms "acquired OAD" and "acquired data item" in this invention have the same meaning and can be used interchangeably.
[0020] like Figure 1 and Figure 2 As shown, the present invention provides a storage optimization method for intelligent converged terminals, comprising the following steps: Step S1: The intelligent fusion terminal performs an initialization operation, based on the data acquisition task plan, parses the item comparison table defined by OAD, and generates the OAD statistical table to be queried for this data acquisition task.
[0021] Specifically, the method for generating the OAD statistics table in step S1 is as follows: S11: Obtain the sub-item comparison table based on the data item comparison table; The data item lookup table is an object-oriented data type definition file (oopType.h) released by the Electric Power Research Institute. Based on this file, a sub-item lookup table is obtained, which records data items with sub-item structures.
[0022] S12: Based on the item comparison table, object identifiers (OIs) and object access points (OADs) with the same attributes but different items in different data acquisition task schemes are categorized and statistically analyzed to obtain an OAD statistics table. This OAD statistics table is used to identify OADs with different items but other similarities, thereby enabling cross-scheme data querying and splicing based on the OAD statistics table.
[0023] Step S12 categorizes and tables OADs, such as... Figure 3 As shown, specifically: S121: According to the different main OADs, the data items are divided into several preset categories, including categories 0000, 5001, 5002, ..., 5006, for a total of seven categories; S122: For each category, iterate through all collection task schemes. For each scheme processed, set the sub-items of the data items belonging to the current category in the scheme to 0, and write the non-duplicate data items into the cache queue. The data collection scheme includes a primary OAD and a secondary OAD. According to a possible implementation, the scheme is configured with 50020200, 20010201, 20010203, and 20040202. The primary OAD is 5002, and the secondary OADs are 20010201, 20010203, and 20040202. Their individual items are set to zero, i.e., converted to 20010200, 20010200, and 20040200. 20010200 and 20040200 are written to the cache queue, and only written once. S123: After all solutions have been traversed, perform a forward self-traversal of the cache queue. If a certain data item appears repeatedly in the cache queue, then put the data item into the OAD statistics table. This data item is the data item in the OAD statistics table under the current class. It should be noted that, according to S122, the non-repeating data items obtained by traversing all collection task schemes are written into the cache queue. Therefore, the data items that appear repeatedly in step S123 correspond to the data items that are repeated in different collection task schemes, which need to be further processed and optimized.
[0024] S124: Process all categories according to steps S122-S123 to obtain the complete OAD statistics table; S125: Group the OAD statistics table according to the first character of each OAD.
[0025] The data items in the OAD (Object Address Translation) are categorized based on the first character of each OAD. For example, if the OAD is 00100200, 20010200, ..., then 00100200 is classified as category 0, 20010200 as category 2, and so on. This initial categorization of the data items facilitates subsequent indexing and improves table lookup efficiency.
[0026] Step S2: The intelligent fusion terminal executes the data collection task and sends a meter reading frame to the collection point. It receives and parses the returned meter reading response frame, obtains the data item based on the meter reading response frame, and determines whether the sub-item data is valid. If the sub-item data is valid, the corresponding sub-item collection flag bit is set to 1; if the sub-item data is invalid, the bit is set to 0. When applying the method of this invention, the data collection point is not limited to electricity meters, but can also be metering devices that follow object-oriented protocols, such as water meters, gas meters, and heat meters. Regardless of the specific type of the data collection point, as long as its data conforms to the OAD definition and adopts a primary DI + secondary DI storage structure, the data storage method of this invention can be applied.
[0027] Step S2 distinguishes between invalid values that have not been collected and the collected 0 value by setting a data acquisition flag. The specific method for setting the data acquisition flag is as follows: Based on the data items in the oopType.h file released by the China Electric Power Research Institute, the definition structure of the data items is obtained; the definition structure of the data items includes the upper limit of data length nNum, the actual effective length rsv received this time, and the actual data content nValue. According to this invention, the maximum value of each item is no more than 8 bytes, and each item can be represented using data types such as int8, int16, int32, and int64. Therefore, the rsv and nNum fields in the original defined structure cannot function effectively. Thus, this invention modifies their functionality. Specifically, the definition structure of the item data is modified so that nNum becomes the maximum sub-index of the successfully collected data item, rsv becomes the sub-item collection flag, and nValue remains unchanged.
[0028] Based on the above steps, the method for determining whether the sub-item data is valid in step S2 is as follows: S21: Extract the data items from the meter reading response frame. The data items contain sub-items. The definition structure of the sub-items includes the maximum sub-item index nNum of the sub-item data collected this time, the sub-item collection flag rsv, and the actual data content. S22: Set the sub-item collection flag rsv according to whether the data collection was successful, determine whether the sub-item data is valid according to the sub-item collection flag, and update the maximum sub-item index nNum according to the sub-item value of the sub-item data.
[0029] Those skilled in the art should understand that the meter reading response frame contains the data items read from the meter, and each data item contains multiple sub-items. Therefore, it is necessary to determine the validity of the data items based on the sub-items contained within them.
[0030] According to a specific embodiment, the data item positive active energy 00100200 supports a maximum rate of 12. Therefore, the effective range of the sub-item value is 00, 01, ..., 0D. The actual sub-item values returned during the data collection process of this task are 1, 2, 8, and 12. Then, 12 is assigned the maximum sub-item index nNum.
[0031] Furthermore, after the intelligent fusion terminal successfully collects multiple data items, the data center saves the merged data items in the form of data blocks. Simultaneously, based on the successfully collected data items, the bit corresponding to the item collection flag is set to 1, and the remaining bits are set to 0. Each bit in the rsv field corresponds to the collection status of one item.
[0032] According to a specific embodiment, the OAD configuration for the data acquisition sub-items includes 20010201 and 20010203. After successful acquisition, the data center saves the merged data according to the data block format 20010200. At this time, nNum is 3, bit1 and bit3 of rsv are set to 1, and the remaining bits are set to 0.
[0033] According to the itemized data collection flag set by this invention, during the main station's call, the return result is determined based on the value of the corresponding bit of the data item: if the bit is 1, the stored data value of that item is returned; if the bit is 0, an invalid value NULL is returned. According to the specific embodiment above, when the main station calls 20010202, since the corresponding bit is 0, an invalid value NULL is returned; when the main station calls 20010200, the itemized value is filled with 3, 20010201 and 20010203 are filled with the collected data, and 2001202 is filled with NULL. Based on this, when querying data from the data center, the corresponding bit of the itemized data collection flag can accurately distinguish between the uncollected invalid value NULL and the actual value of 0 collected.
[0034] Step S3: The intelligent fusion terminal determines whether the OAD collected this time exists in the OAD statistics table. If it exists in the OAD statistics table, it means that the OAD collected this time has been marked as a duplicate data item, and cross-scheme query logic needs to be executed to query the data center for the historical data corresponding to this collection point at this collection time. If the OAD collected this time does not exist in the OAD statistics table, the collected data is directly written to the data center.
[0035] In step S11 of the invention, OADs are divided into multiple categories based on the first letter or number of the OAD. Data items are first matched by category and then matched completely to prevent searching from starting from the first group every time, resulting in N invalid traversals. This makes step S3 include: Preliminary matching and determination of the category to which the collected data items belong are achieved by querying the major categories; Iterate through the relevant categories to determine if the collected data items exist in the OAD statistics table.
[0036] If a data item exists in the OAD statistics table, then query the data center for the historical data corresponding to that collection point at that collection time.
[0037] According to one possible implementation, there are 20 sets of OADs starting with 0, 1, 2, and 3. When matching the OAD of 3XXX, it is necessary to first match all OADs from 0 to 2, which is equivalent to 20+20+20=60 invalid loops before matching the three categories. According to an embodiment of the present invention, there are 20 sets of OADs starting with 0, 1, 2, and 3. When matching the OAD of 3XXX, it directly enters the specific matching of OADs in the three categories.
[0038] If step S3 finds that the OAD collected this time does not exist in the OAD statistics table, then the historical data query and splicing will not be performed.
[0039] Step S4: For the same bit, if the historical data bit retrieved from the data center is 1 and the corresponding bit in this collection is 0, then the historical data is concatenated into the data item in this collection, and the concatenated data is written into the data center.
[0040] When it is determined that the OAD to be written to the data center exists in the OAD statistics table, according to step S4, historical data is queried based on the table number, timestamp and other characteristics carried by the data.
[0041] Those skilled in the art should understand that the data stored in the data center (dbCenter) does not contain scheme information. That is, if both scheme 1 and scheme 2 collect the frozen data X of table A at the same time, then they are stored in the same location in dbCenter.
[0042] If the collected data are the first item and the third item of X respectively, saving the data according to the data block of X will cause a data overwriting problem, where the later data will overwrite the earlier data. In summary, because dbCenter chooses to save data by data block in order to save costs, it leads to validity and data overwriting problems. In order to solve the incompleteness problem caused by overwriting, this application performs cross-scheme splicing.
[0043] In step S4, if no data is collected this time, historical data is retrieved from the data center and spliced together. The spliced data is then written into the data center, effectively improving the integrity and accuracy of the collected data.
[0044] According to the above embodiment, before the newly collected data is written to the data center, the system first queries the data center to see if the table contains old data at that moment. If it does, the data is concatenated to solve the data overwriting problem. In one possible implementation, if the newly written data is A and B, and the existing old data found in the data center is B and C, then the new data A and B are concatenated with the old data C.
[0045] Based on existing optimizations to the storage space of collected data, this invention effectively improves the accuracy and completeness of collected data. Table 1 shows the number of cross-scheme splicing operations and the time consumption when 300 table files are sent to the intelligent fusion terminal and a collection scheme with multiple sets of duplicate data items is configured. This proves that when using the method of this invention in practice, cross-scheme splicing is required, and the average execution time is 44ms. The terminal's operating efficiency can meet the requirements.
[0046] Table 1. Cross-scheme splicing execution data
[0047] Based on the same technical concept, the present invention also provides an intelligent fusion terminal, comprising: The statistics table generation module is used to parse the item comparison table defined by OAD based on the data collection task plan and generate the OAD statistics table required for this data collection task. The data acquisition and processing module is used to execute the data acquisition task, send the meter reading frame to the acquisition point, receive and parse the returned meter reading response frame, obtain the data item, and determine whether the sub-item data is valid. If the sub-item data is valid, the bit of the corresponding sub-item acquisition success flag is set to 1; if the sub-item data is invalid, the bit is set to 0. The acquisition and processing module includes a first processing unit and a second processing unit; wherein: The first processing unit is used to extract the sub-item data in the meter reading response frame. The sub-item data includes the maximum sub-item index of the data item successfully collected this time, the sub-item collection flag, and the actual data content. The second processing unit is used to set a sub-item acquisition flag based on whether the data acquisition was successful, determine whether the sub-item data is valid based on the sub-item acquisition flag, and update the maximum sub-item index based on the sub-item value of the sub-item data.
[0048] The query and judgment module is used to determine whether the OAD collected this time exists in the OAD statistics table. If it exists in the OAD statistics table, it queries the data center for the historical data corresponding to the collection point at the collection time. The splicing and writing module is used to splice the historical data with the data collected this time, and write the spliced data into the data center.
[0049] For specific implementation details of this device, please refer to the specific embodiments of the above methods, which will not be elaborated here.
[0050] Furthermore, this application embodiment also provides an electronic device, which may include a processor and a memory, both of which can be connected via a bus. The processor can perform various actions and processes according to a program stored in the memory. Specifically, the processor can be an integrated circuit chip with signal processing capabilities. The aforementioned processor can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), an off-the-shelf programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of this invention. The general-purpose processor can be a microprocessor or any conventional processor, and can be based on an x86 architecture or an ARM architecture.
[0051] The memory stores computer-executable instructions, implementing a storage optimization method for intelligent converged terminals when these instructions are executed by a processor. The memory can be volatile or non-volatile, or may include both. Non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous linked dynamic random access memory (SLDRAM), and direct memory bus random access memory (DR RAM). It should be noted that the memory of the methods described in this invention is intended to include, but is not limited to, these and any other suitable types of memory.
[0052] In general, various exemplary embodiments of the present invention can be implemented in hardware or dedicated circuitry, software, firmware, logic, or any combination thereof. Some aspects can be implemented in hardware, while others can be implemented in firmware or software that can be executed by a controller, microprocessor, or other computing device. When aspects of embodiments of the present invention are illustrated or described as block diagrams, flowcharts, or represented using certain other images, it will be understood that the blocks, apparatuses, systems, techniques, or methods described herein can be implemented as non-limiting examples in hardware, software, firmware, dedicated circuitry or logic, general-purpose hardware or controllers or other computing devices, or certain combinations thereof.
[0053] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
[0054] While the specific embodiments of the present invention have been described above, they are not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art without creative effort based on the technical solutions of the present invention are still within the scope of protection of the present invention.
Claims
1. A storage optimization method for an intelligent converged terminal, characterized in that, Includes the following steps: Step S1: Based on the data collection task plan, parse the item comparison table defined by OAD and generate the OAD statistics table that needs to be queried for this data collection task. Step S2: Execute the data collection task, send a meter reading frame to the collection point, receive and parse the returned meter reading response frame, obtain the data items and determine whether the sub-item data is valid; if the sub-item data is valid, set the corresponding sub-item collection flag bit to 1; if the sub-item data is invalid, set the bit to 0. Step S3: Determine whether the data item collected this time exists in the OAD statistics table. If it exists in the OAD statistics table, query the data center for the historical data corresponding to the collection point at the time of this collection. Step S4: The historical data is spliced into the data items collected this time, and the spliced data is written into the data center.
2. The storage optimization method for the intelligent converged terminal according to claim 1, characterized in that, The method for generating the OAD statistics table in step S1 is as follows: S11: Obtain the sub-item comparison table based on the data item comparison table; S12: Based on the item comparison table, OADs with the same object identifier and attributes but different items in different data acquisition task schemes are classified and statistically analyzed to obtain an OAD statistics table.
3. The storage optimization method for the intelligent converged terminal according to claim 1, characterized in that, The method for determining whether the itemized data is valid in step S2 is as follows: S21: Extract data items from the meter reading response frame. Data items include sub-item data. The structure of sub-item data includes the maximum sub-item index of successfully collected sub-item data, sub-item collection flag, and actual data content. S22: Set the sub-item collection flag according to whether the data collection was successful, determine whether the sub-item data is valid according to the sub-item collection flag, and update the maximum sub-item index according to the sub-item value of the sub-item data.
4. The storage optimization method for the intelligent converged terminal according to claim 3, characterized in that, The return result is determined based on the value of the corresponding bit of the sub-item acquisition flag: if the bit is 1, the data value stored for that sub-item is returned; If the bit is 0, then return an invalid value NULL.
5. The storage optimization method for the intelligent converged terminal according to claim 2, characterized in that, Step S12 specifically includes: S121: Based on the main OAD, data items are divided into multiple preset categories; S122: For each category, iterate through all collection task schemes. For each scheme processed, set the sub-items of the data items belonging to the current category in the scheme to 0, and write the non-duplicate data items into the cache queue. S123: Perform a forward self-traversal of the cache queue. If a data item appears repeatedly in the cache queue, then put the data item into the OAD statistics table.
6. The storage optimization method for an intelligent converged terminal according to claim 1, characterized in that, Step S2 further includes: After the intelligent fusion terminal successfully collects multiple sub-items of data, the data center saves the merged sub-items of data in the form of data blocks. Based on the successfully collected sub-items of data, the bit corresponding to the sub-item collection flag is set to 1, and the remaining bits are set to 0.
7. The storage optimization method for an intelligent converged terminal according to claim 1, characterized in that, The sub-item acquisition flag and the maximum sub-item index are rsv and nNum in the data structure defined by the object-oriented electricity information data exchange protocol, respectively; where each bit of rsv corresponds to the acquisition status of a sub-item; nNum is used to record the maximum sub-item index of the successful acquisition.
8. A smart converged terminal, characterized in that, The storage optimization method for an intelligent converged terminal as described in any one of claims 1 to 7, wherein the intelligent converged terminal comprises: The statistics table generation module is used to parse the item comparison table defined by OAD based on the data collection task plan and generate the OAD statistics table required for this data collection task. The data acquisition and processing module is used to execute data acquisition tasks, send meter reading frames to the acquisition points, receive and parse the returned meter reading response frames, obtain data items, and determine whether the sub-item data is valid. If the sub-item data is valid, the bit of the corresponding sub-item acquisition success flag is set to 1; if the sub-item data is invalid, the bit is set to 0. The query and judgment module is used to determine whether the OAD collected this time exists in the OAD statistics table. If it exists in the OAD statistics table, it queries the data center for the historical data corresponding to the collection point at the time of this collection. The splicing and writing module is used to splice the historical data with the data items collected this time, and write the spliced data into the data center.
9. The intelligent fusion terminal according to claim 8, characterized in that, The acquisition and processing module includes a first processing unit and a second processing unit; wherein: The first processing unit is used to extract the sub-item data in the meter reading response frame. The sub-item data includes the maximum sub-item index of the data item successfully collected this time, the sub-item collection flag, and the actual data content. The second processing unit is used to set a sub-item acquisition flag based on whether the data acquisition was successful, determine whether the sub-item data is valid based on the sub-item acquisition flag, and update the maximum sub-item index based on the sub-item value of the sub-item data.
10. An electronic device, characterized in that, include: A memory and a processor, wherein the memory stores a computer program; the processor is used to execute the computer program to implement the storage optimization method of the intelligent fusion terminal as described in any one of claims 1 to 7.