FTTR gateway data configuration method, system, device and medium
By using the FTTR gateway data configuration method, configuration data is decompressed and decrypted based on device identification information, and the configuration data is loaded and verified in a preset priority order to generate target configuration data. This solves the problem of low flexibility in FTTR gateway data configuration and achieves multi-dimensional difference adaptation and system stability.
Patent Information
- Application Number
- CN202511407421.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-29
- Publication Date
- 2026-01-20
AI Technical Summary
Existing FTTR gateway data configuration methods suffer from low configuration flexibility and are difficult to adapt to diverse user needs.
By decompressing and decrypting configuration data based on device identification information, loading and verifying configuration data in a preset priority order, loading default baseline configuration data, and merging differentiated data to generate target configuration data, the system supports multi-dimensional differentiated configuration requirements and enhances system adaptability and stability through a partitioned storage mechanism.
It achieves precise adaptation to differences in multiple dimensions such as device attributes, models, and regions, reduces redundant configuration storage, lowers device failure rates, improves configuration processing efficiency and the flexibility of user-defined configurations, and enhances the system's adaptability and stability in the face of business changes.
Smart Images

Figure CN121367650A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of network communication, in particular to an FTTR gateway data configuration method, system, device and medium. BACKGROUND
[0002] The intelligent FTTR gateway is a reflection of the original government enterprise gateway under the SDN network technology architecture, combined with the existing smart home idea. Through the cloud management and control platform of the operator, the specific government enterprise FTTR gateway is customized for opening and operation, and the customer can also configure the device individually through the plug-in. At this time, the government enterprise FTTR gateway needs to provide a corresponding configuration storage interface and its implementation of corresponding functions.
[0003] The existing gateway data configuration method usually has two configuration areas: factory configuration and user configuration. When starting for the first time, the factory configuration is directly loaded into the user configuration area, the user configuration area is read first when reading, and the factory configuration area is not read; when writing, only the user configuration area is written; when restoring factory settings, the user configuration area is cleared.
[0004] However, the gateway data configuration method is difficult to adapt to the diversified needs of users, and has the problem of low configuration flexibility. SUMMARY
[0005] The embodiments of the present application provide an FTTR gateway data configuration method, system, device and medium to at least solve the problem of low configuration flexibility of FTTR gateway data configuration in related technologies.
[0006] In a first aspect, the embodiments of the present application provide an FTTR gateway data configuration method, which comprises:
[0007] According to the pre-acquired device identification information, the configuration data corresponding to the device identification information is processed by decompression and decryption, and the configuration data is loaded and verified according to a preset priority order;
[0008] When the configuration data verification fails, load the default reference configuration data;
[0009] Compare the configuration data that fails to pass the verification with the reference configuration data, obtain the differential data, and merge the differential data into the reference configuration data to obtain target configuration data, wherein the target configuration data is used to adapt to multi-dimensional difference configuration requirements;
[0010] According to the current business requirements, the target configuration data is called.
[0011] In an embodiment, the failed configuration data is compared with the reference configuration data to obtain differential data, and the differential data is merged into the reference configuration data to obtain target configuration data, comprising:
[0012] According to a unified configuration file format, the failed configuration data and the reference configuration data are respectively parsed into parameter trees with the same hierarchical structure;
[0013] By comparing corresponding nodes of the two parameter trees through hierarchical traversal, parameter nodes with differences and their values are identified and extracted to generate differential data;
[0014] The parameter node values in the differential data are overwritten into corresponding nodes of the reference configuration data parameter tree to generate the target configuration data.
[0015] In an embodiment, the comparison of corresponding nodes of the two parameter trees through hierarchical traversal, the identification and extraction of parameter nodes with differences and their values to generate differential data, comprising:
[0016] Starting from the root node of the parameter tree, each hierarchical node of the reference configuration data parameter tree and the failed configuration data parameter tree is recursively traversed and compared;
[0017] For each pair of compared nodes, if the node names are the same but the values are different, the node and its value in the failed configuration data are recorded as a piece of differential data;
[0018] If a node does not exist in the reference configuration data parameter tree, but exists in the failed configuration data parameter tree, the node and all child nodes structure and values are recorded as differential data;
[0019] The recorded differential data is organized according to the original parameter tree structure to generate target differential data.
[0020] In an embodiment, the differential data includes OEM configuration difference data, general model difference data, regional configuration difference data, and regional model difference data.
[0021] In an embodiment, after loading and verifying the configuration data according to the preset priority order, the method further comprises:
[0022] When the configuration data verification passes, the verified configuration data is stored;
[0023] According to the current business requirements, based on the verified configuration data, relevant business processing logic is executed.
[0024] In an embodiment, the decompression and decryption of the configuration data corresponding to the device identification information according to the pre-acquired device identification information, and the loading and verification of the configuration data according to the preset priority order, comprise:
[0025] The configuration loading strategy is determined according to the product model code, the delivery province and city code, and the OEM code in the device identification information.
[0026] Based on the configuration loading strategy, the configuration data is loaded from the user configuration area, the backup configuration area, the work order configuration area, and the factory pre-configuration area.
[0027] When each configuration area is loaded, the configuration data is decrypted and decompressed by the corresponding encryption algorithm and compression format.
[0028] The decrypted and decompressed configuration data is verified.
[0029] In an embodiment, the verification of the decrypted and decompressed configuration data comprises:
[0030] The cyclic redundancy check code of the configuration data is calculated and compared with the pre-stored check code to verify the integrity of the configuration data.
[0031] The source of the configuration data is authenticated according to the preset digital signature algorithm to verify the authenticity and legality of the configuration data.
[0032] If the integrity verification and authenticity verification are passed, it is determined that the configuration data verification is passed, and the area configuration loading is directly retained.
[0033] If the verification fails, the current configuration area data is discarded, and the default reference configuration is loaded.
[0034] In an embodiment, the device identification information comprises at least one of the product model code, the delivery province and city code, and the OEM code; wherein the device identification information is acquired by Boot Loader during the device startup process.
[0035] In a second aspect, the embodiments of the present application provide an FTTR gateway data configuration system, which comprises a loading and verification module, a reference configuration module, a target configuration data acquisition module, and a calling module; wherein:
[0036] The loading and verification module is configured to decompress and decrypt the configuration data corresponding to the device identification information according to the pre-acquired device identification information, and load and verify the configuration data according to the preset priority order.
[0037] The reference configuration module is configured to load the default reference configuration data when the configuration data verification fails.
[0038] The acquisition target configuration data module is configured to compare the configuration data that fails the verification with the reference configuration data, acquire differential data, and merge the differential data into the reference configuration data to obtain target configuration data, which is used to adapt to multi-dimensional differential configuration requirements.
[0039] The calling module is configured to call the target configuration data according to current business requirements.
[0040] In a third aspect, an embodiment of the present application provides a computer device, which comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the FTTR gateway data configuration method according to the first aspect.
[0041] In a fourth aspect, an embodiment of the present application provides a computer readable storage medium, which stores a computer program, and the program is executable on a processor to implement the FTTR gateway data configuration method according to the first aspect.
[0042] The FTTR gateway data configuration method, system and medium provided by the embodiment of the present application have at least the following technical effects.
[0043] The configuration data corresponding to the device identification information is decompressed and decrypted according to the pre-acquired device identification information, and the configuration data is loaded and verified according to the preset priority order. The configuration logic and configuration area are expanded, the business function is enriched, the integrity and security of the configuration data are ensured, the configuration processing efficiency during initialization is improved through the priority loading, and the low-priority configuration is avoided to interfere with the start of the core function. When the configuration data fails the verification, the default reference configuration data is loaded, the device failure rate caused by abnormal configuration is reduced, and the manual operation and maintenance cost is reduced. The differential data is acquired by comparing the configuration data that fails the verification with the reference configuration data, and the differential data is merged into the reference configuration data to obtain target configuration data, which is used to adapt to multi-dimensional differential configuration requirements. The precise adaptation to multi-dimensional differences such as device properties, models and regions is realized, the redundant configuration storage amount is significantly reduced, and the parameter conflict problem is solved. The target configuration data is called according to the current business requirements, the flexible expansion of user-defined configuration is supported, the adaptability and stability of the system in the business change are enhanced through the separate storage mechanism (user configuration area and factory configuration area), and the problem of low configuration flexibility of the FTTR gateway data configuration in the related art is solved.
[0044] The details of one or more embodiments of the present application are presented in the following drawings and description to make other features, objects and advantages of the present application more apparent. Attached Figure Description
[0045] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:
[0046] Figure 1 This is a flowchart of an FTTR gateway data configuration method;
[0047] Figure 2 This is a flowchart illustrating step S101 according to an exemplary embodiment.
[0048] Figure 3 This is a flowchart illustrating step S103 according to an exemplary embodiment.
[0049] Figure 4 This is a system architecture block diagram of an FTTR gateway data configuration system according to an exemplary embodiment;
[0050] Figure 5 This is a structural block diagram of an electronic device according to an exemplary embodiment. Detailed Implementation
[0051] To make the objectives, technical solutions, and advantages of this application clearer, the application is described and illustrated below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application. All other embodiments obtained by those skilled in the art based on the embodiments provided in this application without inventive effort are within the scope of protection of this application.
[0052] Obviously, the accompanying drawings described below are merely some examples or embodiments of this application. Those skilled in the art can apply this application to other similar scenarios based on these drawings without any inventive effort. Furthermore, it is understood that although the efforts made in this development process may be complex and lengthy, for those skilled in the art related to the content disclosed in this application, any changes to design, manufacturing, or production based on the technical content disclosed in this application are merely conventional technical means and should not be construed as insufficient disclosure of the content of this application.
[0053] Reference to an "embodiment" in this application means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are they necessarily mutually exclusive of one another. It is expressly understood that that the embodiments described in this application are open to be combined with each other in their pertinent fashions without conflicts being arisen.
[0054] Unless otherwise defined, technical terms and scientific terms used in the present application shall have the ordinary meanings as understood by one of ordinary skill in the art to which this application pertains. The terms "a", "an", "the", and "this" and similar referents in the context of this application are to be construed to be open-ended, for example, to mean either a singular or plural number of an element. The terms "comprising", "including", "having" and "with" and their variations, as used in the present application, are intended to be inclusive in a manner similar to the term "comprising" when employed as such terminology in open-ended claims, for example, an element proceeded by "comprises a", "includes an", "has an", or "with" does not, without
[0055] In a first aspect, the embodiments of the present application provide a FTTR gateway data configuration method, Figure 1 is a flowchart of a FTTR gateway data configuration method, as shown in Figure 1 The method comprises the following steps:
[0056] In step S101, the configuration data corresponding to the device identification information is decompressed and decrypted according to the pre-acquired device identification information, and the configuration data is loaded and verified according to the preset priority order.
[0057] In step S102, when the configuration data verification fails, the default reference configuration data is loaded.
[0058] Step S103, compare the configuration data that fails the check with the reference configuration data, obtain the differentiated data, merge the differentiated data into the reference configuration data, and obtain target configuration data, which is used to adapt to multi-dimensional difference configuration requirements.
[0059] Step S104, call the target configuration data according to the current business requirement.
[0060] To sum up, the embodiment of the present application provides an FTTR gateway data configuration method, which expands the configuration logic and configuration area, enriches the business function, ensures the integrity and security of the configuration data, and improves the configuration processing efficiency during initialization through priority loading, avoids interference of low-priority configuration with the start of core functions. When the configuration data fails the check, the default reference configuration data is loaded, which reduces the device failure rate caused by abnormal configuration and reduces the manual operation and maintenance cost. By comparing the configuration data that fails the check with the reference configuration data, obtaining the differentiated data, and merging the differentiated data into the reference configuration data, target configuration data is obtained, which is used to adapt to multi-dimensional difference configuration requirements. The precise adaptation to multi-dimensional differences such as device properties, models, and regions is realized, the redundant configuration storage amount is significantly reduced, and the parameter conflict problem is solved. By calling the target configuration data according to the current business requirement, the flexible expansion of user-defined configuration is supported, and the adaptability and stability of the system in business changes are enhanced through the separate storage mechanism (user configuration area and factory configuration area). The problem of low configuration flexibility of FTTR gateway data configuration in related technologies is solved.
[0061] Figure 2 is a flowchart of step S101 according to an exemplary embodiment, as shown in Figure 1 Step S101, according to the pre-acquired device identification information, the configuration data corresponding to the device identification information is decompressed and decrypted, and the configuration data is loaded and checked according to the preset priority order. Specifically, the following steps are included:
[0062] Step S1011, according to the product model code, the delivery province and city code, and the OEM code in the device identification information, the preset priority order is determined;
[0063] Step S1012, based on the preset priority order, configuration data is loaded from the user configuration area, the backup configuration area, the work order configuration area, and the factory pre-configuration area;
[0064] Step S1013, when loading each configuration area, the configuration data is decrypted and decompressed through the corresponding encryption algorithm and compression format.
[0065] Step S1014, the decrypted and decompressed configuration data is checked. It includes calculating the cyclic redundancy check code of the configuration data and comparing it with the pre-stored check code to verify the integrity of the configuration data. According to the preset digital signature algorithm, the source of the configuration data is authenticated to verify the authenticity and legality of the configuration data. If the integrity verification and authenticity verification pass, it is determined that the configuration area data passes the check, and the area configuration is directly retained for loading. If the verification fails, the current configuration area data is discarded, and the default baseline configuration is loaded.
[0066] Optionally, according to the encryption and compression mode of the configuration area, the decompression and decryption are performed to check whether the configuration area is valid, and the loading and checking are performed in the order of user configuration, backup configuration, work order configuration, and factory pre-configuration according to the priority. If the loading is successful, the step is directly exited. It is worth noting that the configuration area can be multiple, and the configuration files are divided into multiple configuration areas according to different functional requirements of different use scenarios.
[0067] Steps S1011-S1014 achieve intelligent and accurate adaptation of configuration strategies by dynamically determining the configuration loading priority order according to the device identification information, provide the optimal configuration loading path for different devices, attempt to load from multiple configuration areas based on the preset priority, build a fault-tolerant mechanism with the latest user configuration as the first choice and multiple backups as the guarantee, greatly improve the startup success rate and reliability of the system in complex environments, perform decryption and decompression on the data of each configuration area, effectively protect the storage security and transmission efficiency of the configuration data, and prevent data leakage or tampering. Finally, the mechanism directly loads the configuration after verification, and automatically reverts to the default baseline configuration when the verification fails, which not only ensures the startup efficiency of the system under normal circumstances, but also provides a stable and reliable backup solution in abnormal situations, and fully realizes the efficient unification of flexibility, security, and robustness in the configuration loading process.
[0068] In an embodiment, step S102, when the configuration data check fails, the default baseline configuration data is loaded.
[0069] Optionally, when any priority configuration area data fails to pass the integrity or authenticity verification in the checking process, the system immediately terminates the loading process of the current configuration area and discards the invalid configuration data. Then, the fallback mechanism is automatically triggered to load the pre-set default baseline configuration data. The default baseline configuration, as the minimum reliable configuration set of the system, contains key parameters such as network connection and basic service startup, ensuring that the device can obtain effective and secure initial configuration in any abnormal state. The loaded default configuration will be used as the baseline input for subsequent differential merging operations.
[0070] Step S102 provides the system with strong fault tolerance and security barriers by automatically rolling back to a trusted default baseline configuration, effectively preventing startup failures or functional abnormalities caused by configuration corruption, version incompatibility, or malicious tampering; at the same time, storing the baseline configuration in a read-only partition ensures the immutability and reliability of the basic configuration.
[0071] Figure 3 This is a flowchart illustrating step S103 according to an exemplary embodiment, as follows: Figure 3 As shown, step S103 involves comparing the configuration data that failed verification with the baseline configuration data to obtain the differential data, and then merging the differential data into the baseline configuration data to obtain the target configuration data. The target configuration data is used to adapt to multi-dimensional differential configuration requirements. Specifically, this includes the following steps:
[0072] Step S1031: According to the unified configuration file format, the configuration data that failed the verification and the baseline configuration data are respectively parsed into parameter trees with the same hierarchical structure.
[0073] Optionally, the system first identifies configuration data that failed verification and the default baseline configuration data, both of which follow a unified structured format (such as JSON, XML, or a specific key-value pair hierarchical format). Then, according to this format specification, the two sets of configuration data are synchronously parsed into a parameter tree structure in memory. During parsing, the system constructs a tree model according to the natural hierarchical relationship of the configuration items (e.g., "Device Model" as the root node, "WAN Interface Configuration" as its child node, and "Configuration 1" as its grandchild node), ensuring that the two parameter trees are completely consistent in node names, hierarchical depth, and branch structure, thus laying the foundation for subsequent node-by-node comparison. By converting heterogeneous configuration data into a standardized tree structure, a structured representation of the configuration content is achieved, providing a computable data model for accurate difference comparison.
[0074] Step S1032: By traversing and comparing the corresponding nodes of the two parameter trees level by level, identify and extract the parameter nodes and their values that are different, and generate differentiated data.
[0075] Optionally, starting from the root nodes of the two parameter trees, a recursive algorithm or an iterative approach is adopted to traverse each pair of corresponding nodes layer by layer downwards; at each level, the name, data type and value of the nodes are compared in turn: if the node names are different, it is recorded as a structural difference, if the node values are different, it is recorded as a value difference, and if a node is missing in the reference tree but exists in the verification tree, it is recorded as a newly added node; all detected difference node paths, difference types (modification / addition / deletion) and corresponding value information are organized and serialized into a standardized difference dataset (such as JSON Patch format) according to the original tree structure, which only contains the changed part and does not involve the unmodified nodes. By traversing and comparing nodes layer by layer, the system can accurately capture the micro-differences in configuration data and avoid the redundant overhead caused by full configuration replacement.
[0076] Step S1033, the parameter node value in the difference data is overwritten to the corresponding node in the reference configuration data parameter tree, and the target configuration data is generated.
[0077] Optionally, each change operation (such as modification, addition, deletion) recorded in the difference dataset is read, and the target node is accurately located in the reference configuration parameter tree according to the node path specified therein; for value modification operations, the value of the corresponding node in the reference tree is directly replaced with the new value in the difference data; for node addition operations, a complete new node and substructure are created under the target path in the reference tree; for node deletion operations, the corresponding node and all subordinate child nodes in the reference tree are removed; all change operations are strictly executed in the order in the difference dataset, ensuring the atomicity and consistency of the merge operation, and finally generating a complete target configuration parameter tree that integrates all valid changes, and serialized into a standard configuration file format that can be stored and loaded. Through accurate positioning based on path and directional value overlay, fine and minimal update of configuration changes is achieved, ensuring that only necessary parts are modified while maintaining the stability of other configurations.
[0078] Steps S1031-S1033 provide a structured and computable model for subsequent difference comparison by parsing the configuration data into a standardized parameter tree, laying the foundation for fine configuration fusion; by traversing and comparing nodes layer by layer and generating a difference dataset, all valid changes can be accurately identified and extracted, avoiding the redundancy of full configuration replacement and greatly improving processing efficiency; finally, the target configuration is generated through directional overlay operation, ensuring the stability of the reference configuration while accurately updating only the difference part, achieving the unity of flexibility and reliability. The three steps work together to achieve dynamic adaptation of multi-dimensional configuration with minimal overhead, significantly reducing storage and computing costs while ensuring the accuracy of configuration merging and the efficiency of system performance.
[0079] In an embodiment, step S104 calls the target configuration data according to the current service requirement. Specifically, it includes:
[0080] Optionally, after the generation of the target configuration data is completed, the configuration calling process is triggered actively according to the real-time service scenario (such as device startup, service switching or policy update). The whole process is implemented through a unified configuration management interface, and the latest and effective configuration parameters can be obtained as needed.
[0081] In an embodiment, after the configuration data is loaded and verified according to the preset priority order, the method further includes:
[0082] When the configuration data passes the verification, the configuration data that passes the verification is stored;
[0083] According to the current service requirement, the related service processing logic is executed based on the configuration data that passes the verification.
[0084] Optionally, after the data of a certain configuration area is successfully loaded and verified according to the preset priority order, the configuration data that passes the verification is stored in a specific area (such as a user configuration area or a backup configuration area). Subsequently, according to the real-time service scenario (such as device initialization, service function activation or policy update), the configuration data is parsed, the related service parameters are extracted, and are dynamically distributed to the corresponding service processing module (such as a network protocol stack, a policy execution engine or an application service) to drive the execution of service logic. By storing the configuration data that passes the verification in real time, the latest and effective user configuration is retained for quick recovery, and a reliable backup is provided for subsequent device startup, which significantly improves the reliability and continuity of the configuration,
[0085] In an embodiment, the differentiated data includes OEM configuration differentiated data, general model differentiated data, region configuration differentiated data and region model differentiated data.
[0086] Optionally, the generated differentiated data is strictly divided into OEM configuration differentiated data (carrying device manufacturer customized parameters), general model differentiated data (containing product series general characteristics), region configuration differentiated data (adapted to different provincial communication specifications) and region model differentiated data (joint customized configuration for specific regional specific model).
[0087] In an embodiment, the device identification information includes at least one of a product model code, a delivery province and city code and an OEM code; wherein the device identification information is obtained through Boot Loader in the device startup process.
[0088] Optionally, after the device is powered on, the Boot Loader reads the pre-burned device identification information from the read-only memory (such as EEPROM or a specific security chip) of the device in the hardware initialization stage, and the information at least contains a product model code (identifying the hardware specifications and basic functions of the device), a delivery province and city code (indicating the regional identification of the deployment of the device), and an OEM code (distinguishing the manufacturer or customizer of the device); these codes are stored in a structured format (such as key-value pairs or encoded strings), and the Boot Loader parses them and passes them to the upper-layer configuration management module as the basis for dynamic decision-making of the subsequent configuration loading strategy.
[0089] In summary, the embodiment of the present application provides an FTTR gateway data configuration method, which decompresses and decrypts configuration data corresponding to device identification information according to the pre-acquired device identification information, and loads and verifies the configuration data according to a preset priority order. The configuration logic and configuration area are expanded, the business function is enriched, the integrity and security of the configuration data are ensured, the configuration processing efficiency during initialization is improved through priority loading, and the startup of core functions is avoided from being disturbed by low-priority configuration. When the configuration data verification fails, a default baseline configuration is loaded. According to a differential file format, multiple levels of configuration difference information are merged into the baseline configuration to obtain target configuration data, wherein the target configuration data is used to adapt to multi-dimensional difference configuration requirements. Multi-dimensional difference adaptation of device attributes, models, regions, etc. is achieved, and the configuration flexibility is improved. The target configuration data is stored in the user configuration area and the factory configuration area, and the data in the user configuration area and the factory configuration area is called according to the current business requirements. The flexibility of user-defined configuration is supported, and the system recovery capability in extreme scenarios is ensured through the backup function of the factory configuration, solving the problem of low configuration flexibility of FTTR gateway data configuration in related technologies.
[0090] In a second aspect, the embodiment of the present application provides an FTTR gateway data configuration system. Figure 4 is a system structure block diagram of an FTTR gateway data configuration system according to an exemplary embodiment. As shown in Figure 4 The system includes a loading and verification module 410, a baseline configuration module 420, a target configuration data obtaining module 430, and a calling module 440; wherein:
[0091] The loading and verification module 410 is configured to decompress and decrypt configuration data corresponding to device identification information according to pre-acquired device identification information, and load and verify the configuration data according to a preset priority order;
[0092] The baseline configuration module 420 is configured to load a default baseline configuration when the configuration data verification fails;
[0093] The target configuration data acquisition module 430 is configured to compare the configuration data that fails the verification with the reference configuration data, acquire differential data, and merge the differential data into the reference configuration data to obtain target configuration data, which is used to adapt to multi-dimensional differential configuration requirements.
[0094] The calling module 440 is configured to call the target configuration data according to current business requirements.
[0095] To sum up, the FTTR gateway data configuration system provided in the application solves the problem of low configuration flexibility of FTTR gateway data configuration in the related art by loading the verification module 410, the reference configuration module 420, the target configuration data acquisition module 430, and the calling module 440.
[0096] Specifically, according to the pre-acquired device identifier information, the configuration data corresponding to the device identifier information is decompressed and decrypted, and the configuration data is loaded and verified according to a preset priority order. The configuration logic and the configuration area are expanded, the business function is enriched, the integrity and security of the configuration data are ensured, the configuration processing efficiency during initialization is improved through priority loading, and the core function startup is prevented from being disturbed by low-priority configuration. When the configuration data fails the verification, the default reference configuration is loaded. According to a differential file format, multiple levels of configuration differential information are merged into the reference configuration to obtain target configuration data, which is used to adapt to multi-dimensional differential configuration requirements. The multi-dimensional differential adaptation of device properties, models, regions, and the like is implemented, and the configuration flexibility is improved. The target configuration data is stored in the user configuration area and the factory configuration area, and the data in the user configuration area and the factory configuration area is called according to current business requirements. The flexibility of user-defined configuration is supported, the system recovery capability in an extreme scenario is ensured through the backup function of the factory configuration, and the problem of low configuration flexibility of FTTR gateway data configuration in the related art is solved.
[0097] It should be noted that the FTTR gateway data configuration system provided in the embodiment is used to implement the above-described embodiments, and details are not repeated. As used above, the terms "module", "unit", "sub-unit", and the like can be a combination of software and / or hardware that implements a predetermined function. Although the devices described in the above embodiments are preferably implemented in software, hardware or a combination of software and hardware is also possible and is contemplated.
[0098] In a third aspect, the embodiments of the application provide an electronic device, Figure 5 is a block diagram of an electronic device according to an exemplary embodiment. As Figure 5 shown, the electronic device can include a processor 51 and a memory 52 storing computer program instructions.
[0099] In particular, the processor 51 can include a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to perform the functions of the embodiments of the present application.
[0100] The memory 52 can include mass storage for data or instructions. By way of example, and not limitation, the memory 52 can include a hard disk drive (HDD), a floppy disk drive, a solid-state drive (SSD), flash memory, a USB drive, a magneto-optical disk, optical disks, such as CDs and DVDs, magnetic tapes, or other types of storage media, which can be removable or non-removable (or fixed). In some embodiments, the memory 52 is non-volatile memory. In some embodiments, the memory 52 includes read-only memory (ROM) and random-access memory (RAM). The ROM can be mask- programmed ROM, programmable ROM (PROM), erasable PROM (EPROM), electrically erasable PROM (EEPROM), electrically alterable ROM (EAROM), or flash memory, or a combination of two or more of these. The RAM can be static RAM (SRAM) or dynamic RAM (DRAM), which can be Fast Page Mode DRAM (FPM DRAM), Extended Data Output DRAM (EDO DRAM), synchronous DRAM (SDRAM), etc.
[0101] The memory 52 can be used to store or buffer various data files required for processing and / or communication, and possible computer program instructions executed by the processor 51.
[0102] The processor 51 realizes the FTTR gateway data configuration system in any of the above embodiments by reading and executing the computer program instructions stored in the memory 52.
[0103] In an embodiment, the FTTR gateway data configuration device can further include a communication interface 55 and a bus 50. As shown in the figure, the processor 51, the memory 52, and the communication interface 55 are connected through the bus 50 and complete communication with each other. Figure 5
[0104] The communication interface 55 is used to realize the communication between the modules, devices, units and / or equipment in the embodiments of the present application. The communication interface 55 can also realize data communication with other components, such as external devices, image / data acquisition devices, databases, external storage, image / data processing workstations, etc.
[0105] Bus 50 includes hardware, software, or both, to couple components of an FTTR gateway data configuration device to each other in a known manner. Although bus 50 is shown in Figure 1 as a single bus, it can comprise one or more buses. Although Figure 1 shows a bus 50 as a single component, the bus 50 can be implemented as multiple busses or separate communication lines. Bus 50 includes, without limitation, at least one of a Data Bus, an Address Bus, a Control Bus, an Expansion Bus, a Local Bus, etc. By way of example and not limitation, bus 50 can include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an InfiniBand interconnect, a Low Pin Count (LPC) bus, a memory bus, a MicroChannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local (VLB) bus, or another suitable bus or combination of two or more of these. Where appropriate, bus 50 can include one or more buses. Although a particular bus is described and shown in Figure 1, this application contemplates any suitable bus or interconnect.
[0106] In a fourth aspect, an embodiment of the present application provides a computer readable storage medium, having stored thereon a program, wherein the program is executed by a processor to implement the FTTR gateway data configuration method according to the first aspect.
[0107] More specifically, the computer readable storage medium can include, but is not limited to, portable discs, hard disks, random access memories, read-only memories, erasable programmable read-only memories, optical storage devices, magnetic storage devices, or any suitable combination of the above.
[0108] In possible implementation manners, the present application can also be implemented in the form of a program product, which comprises program codes for causing a terminal device to perform the steps of the FTTR gateway data configuration method provided by the first aspect when the program product is run on the terminal device.
[0109] The program code for executing the present application can be written in any combination of one or more programming languages, and can be executed entirely on the user device, partly on the user device, as a stand-alone software package, partly on the user device and partly on a remote device, or entirely on a remote device.
[0110] The technical features of the above-described embodiments can be combined in any manner. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described, but it should be understood that any combination of the technical features that does not cause contradiction shall be considered within the scope of the present disclosure.
[0111] The above-described embodiments only express several implementation manners of the present application, and the description is relatively specific and detailed, but it should not be understood as a limitation on the scope of the patent. It should be pointed out that, for those skilled in the art, without departing from the concept of the present application, a number of modifications and improvements can be made, which are all within the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the appended claims.
Claims
1. A method for FTTR gateway data configuration, characterized in that, The method comprises: According to the pre-acquired device identification information, the configuration data corresponding to the device identification information is decompressed and decrypted, and the configuration data is loaded and verified according to a preset priority order; When the configuration data verification fails, load the default reference configuration data; Compare the configuration data that fails to pass the verification with the reference configuration data, obtain the differential data, and merge the differential data into the reference configuration data to obtain target configuration data, which is used to adapt to multi-dimensional difference configuration requirements; According to the current business requirements, the target configuration data is called.
2. The FTTR gateway data configuration method of claim 1, wherein, The configuration data that fails to pass the verification is compared with the reference configuration data to obtain differential data, and the differential data is merged into the reference configuration data to obtain target configuration data, comprising: According to a unified configuration file format, the configuration data that fails to pass the verification and the reference configuration data are respectively parsed into parameter trees with the same hierarchical structure; By comparing the corresponding nodes of the two parameter trees through hierarchical traversal, the parameter nodes and their values that exist differences are identified and extracted to generate differential data; The parameter node values in the differential data are overwritten into the corresponding nodes of the reference configuration data parameter tree to generate the target configuration data.
3. The FTTR gateway data configuration method of claim 2, wherein, The corresponding nodes of the two parameter trees are compared by hierarchical traversal to identify and extract the parameter nodes and their values that exist differences to generate differential data, comprising: Starting from the root node of the parameter tree, recursively compare each hierarchical node of the reference configuration data parameter tree and the configuration data that fails to pass the verification parameter tree; For each pair of compared nodes, if the node name is the same but the value is different, record the node and its value in the configuration data that fails to pass the verification as a piece of differential data; If a node does not exist in the reference configuration data parameter tree, but exists in the configuration data that fails to pass the verification parameter tree, record the node and all child node structures and values as differential data; Organize each recorded differential data according to the original parameter tree structure to generate target differential data.
4. The FTTR gateway data configuration method of claim 2, wherein, The differential data includes OEM configuration difference data, general model difference data, regional configuration difference data, and regional model difference data.
5. The FTTR gateway data configuration method of claim 1, wherein, After loading and verifying the configuration data according to the preset priority order, the method further comprises: When the configuration data verification passes, store the configuration data that passes the verification; According to the current business requirements, based on the configuration data that passes the verification, execute related business processing logic.
6. The FTTR gateway data configuration method of claim 1, wherein, According to the pre-acquired device identification information, the configuration data corresponding to the device identification information is decompressed and decrypted, and the configuration data is loaded and verified according to a preset priority order, comprising: According to the product model code, the delivery province and city code, and the OEM code in the device identification information, determine the configuration loading strategy; Based on the configuration loading strategy, load configuration data from the user configuration area, the backup configuration area, the work order configuration area, and the factory pre-configuration area; When loading each configuration area, the configuration data is decrypted and decompressed by the corresponding encryption algorithm and compression format; The decrypted and decompressed configuration data is checked.
7. The FTTR gateway data configuration method of claim 6, wherein, The checking of the decrypted and decompressed configuration data comprises: calculating a cyclic redundancy check code of the configuration data and comparing it with a pre-stored check code to verify the integrity of the configuration data; authenticating the source of the configuration data according to a preset digital signature algorithm to verify the authenticity and legality of the configuration data; if both the integrity verification and the authenticity verification pass, it is determined that the configuration data passes the check, and the region configuration is directly loaded; if the verification fails, the current configuration region data is discarded, and default reference configuration is loaded.
8. The FTTR gateway data configuration method of claim 1, wherein, The device identification information comprises at least one of a product model code, a delivery province and city code, and an OEM code; wherein the device identification information is obtained by BootLoader during the device startup process.
9. An FTTR gateway data configuration system, characterized by, The system is used to execute the method of any one of claims 1 to 8, and the system comprises a loading and checking module, a reference configuration module, a target configuration data obtaining module, and a calling module; wherein: The loading and checking module is used to perform decompression and decryption processing on the configuration data corresponding to the device identification information according to the pre-acquired device identification information, and load and check the configuration data according to a preset priority order; The reference configuration module is used to load default reference configuration data when the configuration data check fails; The target configuration data obtaining module is used to compare the configuration data that fails the check with the reference configuration data, obtain differential data, merge the differential data into the reference configuration data, and obtain target configuration data, which is used to adapt to multi-dimensional differential configuration requirements; The calling module is used to call the target configuration data according to current business requirements.
10. A computer-readable storage medium having stored thereon a computer program, characterized in that, The program is executed by a processor to implement the FTTR gateway data configuration method of any one of claims 1 to 8. The program is executed by a processor to implement the FTTR gateway data configuration method of any one of claims 1 to 8.