Client code framework construction method, equipment and medium

By analyzing the target file to generate data structures and automatically generate client code frameworks, the problem of low update and adaptation efficiency of CPE device client software in the existing technology is solved, and automated construction is realized, efficiency is improved and error risk is reduced.

CN119861967AInactive Publication Date: 2025-04-22SICHUAN TIANYI COMHEART TELECOM
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202510353174.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-25
Publication Date
2025-04-22
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The client software of CPE devices in the prior art lacks automated methods for updating, new adaptation and transplantation, resulting in a large number of manual repeated construction of client code frameworks, which is extremely inefficient.

Method used

By obtaining the target file, parsing the data model node information it describes, creating data structures, generating header files and source files, and generating compiled information files based on these files, thereby automatically building the client code framework.

Benefits of technology

It realizes automatic generation of data structures, header files, source files and compiled information files, avoids manual writing of lengthy and duplicate code, significantly reduces development time and manual operation complexity, improves construction efficiency, and reduces the risk of human error.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119861967A_ABST
    Figure CN119861967A_ABST
Patent Text Reader

Abstract

The invention provides a construction method and equipment of a client code framework and a medium, relates to the technical field of computers, and aims to solve the problem of low construction efficiency of the client code framework. The method comprises the steps of obtaining a target file; the target file is used for describing all nodes of a target data model; each row of data of the target file describes information of each node; the target data model is a TR-069 data model, a TR-181 data model or a TR-369 data model; creating a data structure by analyzing the target file; generating a header file according to the data structure; generating a source file according to the data structure; and generating a compiled information file according to the header file and the source file. According to the method, the header file, the source file and the compiling information file are automatically generated based on the data structure, and the construction efficiency of the client code framework can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology and provides a method, device and medium for constructing a client code framework. Background Art

[0002] TR-069 (CPE WAN Management Protocol) and subsequent protocols (such as TR-181 and TR-369) released by the Broadband Forum (BBF) are all designed to effectively manage and configure CPE devices. These protocols help service providers remotely manage, monitor, and configure these devices, improve operational efficiency, and reduce maintenance costs. Each protocol has been extended to meet different network management needs and equipment development, and is widely used in broadband access networks (such as FTTR networks).

[0003] In order to meet the needs of modern network equipment management, protocol specifications are constantly updated and more and more new CPE devices are being developed. However, there is no mature automated method for updating, adapting and porting the client software of CPE devices. In order to adapt to CPE devices with different protocol versions, a large amount of manual work is required to repeatedly build the client code framework, which is extremely inefficient. Summary of the invention

[0004] The present application provides a method, device, equipment and medium for constructing a client code framework, which are used to solve the problem of low efficiency in constructing a client code framework.

[0005] In a first aspect, a method for constructing a client code framework is provided, comprising: Obtain a target file; the target file is used to describe all nodes of a target data model; each row of data in the target file describes information of each node; the target data model is a TR-069 data model, a TR-181 data model or a TR-369 data model; Creating a data structure by parsing the target file; Generate a header file according to the data structure; Generate a source file according to the data structure; A compilation information file is generated according to the header file and the source file.

[0006] Optionally, the creating a data structure by parsing the target file includes: Read and parse each line of data in the target file in sequence to obtain information about each node; the information about each node includes node type, node full path name, node operation authority, and node content data type; The data structure is updated according to the information of each node until the stop character in the target file is read, thereby obtaining a data structure containing all nodes of the target data model.

[0007] Optionally, generating a header file according to the data structure includes: Extracting object data from the data structure; the object data includes a name and attributes; Filling a predefined first template according to the object data to generate a client header file; the client header file includes operation functions of all nodes of the target data model; The client header file is saved in a specified folder.

[0008] Optionally, after saving the client header file in a designated folder, the method further includes: Extracting MIB related data from the object data; the MIB related data is information required by the management information base; Filling the predefined second template according to the MIB related data to generate a MIB header file; the MIB header file includes an operation function of the management information base; Save the MIB header file to the specified folder.

[0009] Optionally, generating a source file according to the data structure includes: Filling a predefined third template according to the object data to generate a client source file; the client source file includes an object initialization function, an object destruction function and other implementation functions; The client source file is saved in the specified folder.

[0010] Optionally, after saving the MIB header file to the designated folder, the method further includes: Filling a predefined fourth template according to the MIB-related data to generate a MIB source file; the MIB source file is used to implement function details and data interaction logic related to the MIB interface; Save the MIB source file to the specified folder.

[0011] Optionally, generating a compilation information file according to the header file and the source file includes: Unifying the generation of file names for the header file and the source file; Calling the compilation script software, generating a compilation information file according to the file name, and embedding the compilation information file into the USP system.

[0012] In a second aspect, the present application provides a device for constructing a client code framework, including: A file input module, used to obtain a target file; the target file is used to describe all nodes of a target data model; each row of data in the target file describes information of each node; the target data model is a TR-069 data model, a TR-181 data model or a TR-369 data model; A data parsing module, used for creating a data structure by parsing the target file; A code generation module, used to generate a header file according to the data structure; and to generate a source file according to the data structure; The compilation information generation module is used to generate a compilation information file according to the header file and the source file.

[0013] In a third aspect, the present application provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the method for constructing a client code framework described in the first aspect.

[0014] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, and a processor executes the computer program to implement the method for constructing a client code framework described in the first aspect.

[0015] Compared with the prior art, the present invention has the following beneficial effects: The present application provides a method for constructing a client code framework, the method comprising: obtaining a target file; the target file is used to describe all nodes of a target data model; each line of data in the target file describes information of each node; the target data model is a TR-069 data model, a TR-181 data model or a TR-369 data model; creating a data structure by parsing the target file; generating a header file according to the data structure; generating a source file according to the data structure; and generating a compilation information file according to the header file and the source file.

[0016] This application can avoid manually writing lengthy and repetitive code by automatically generating data structures, header files, source files, and compilation information files. Developers only need to replace the target files of different data models, and the system can automatically generate the corresponding code framework, which greatly reduces the development time and the complexity of manual operations and improves the efficiency of building the client code framework. The automatic code generation method eliminates the risk of human error, ensures that the generated code conforms to the expected data model, and improves code quality and stability. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, the drawings described below are only the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.

[0018] Figure 1 A schematic diagram of the computer device structure of the hardware operating environment involved in the embodiment of the present application; Figure 2 Schematic diagram of the process of constructing the client code framework provided in the embodiment of the present application Figure 1 ; Figure 3 A schematic diagram of sub-node enumeration provided in an embodiment of the present application; Figure 4 A schematic diagram of objects and subnodes provided in an embodiment of the present application; Figure 5 Schematic diagram of the process of constructing the client code framework provided in the embodiment of the present application Figure 2 ; Figure 6 A flowchart of a data analysis process provided in an embodiment of the present application; Figure 7 A schematic diagram of the test results provided in the embodiments of the present application; Figure 8 A schematic diagram of the structure of a device for constructing a client code framework provided in an embodiment of the present application.

[0019] Markings in the figure: 101 - processor, 102 - communication bus, 103 - network interface, 104 - user interface, 105 - memory. DETAILED DESCRIPTION

[0020] In order to make the purpose, technical scheme and advantages of the present application clearer, the technical scheme in the embodiment of the present application will be clearly and completely described below in conjunction with the drawings in the embodiment of the present application. Obviously, the described embodiment is only a part of the embodiment of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application. In the absence of conflict, the embodiments in the present application and the features in the embodiments can be combined with each other arbitrarily. In addition, although the logical order is shown in the flow chart, in some cases, the steps shown or described can be performed in an order different from that here.

[0021] In order to solve the problem of low efficiency in building a client code framework, the present application embodiment provides a method for building a client code framework. The method can be executed by a computer device, please refer to Figure 1 , which is a schematic diagram of the computer device structure of the hardware operating environment involved in the embodiment of the present application.

[0022] like Figure 1 As shown, the computer device may include: a processor 101, such as a central processing unit (CPU), a communication bus 102, a user interface 104, a network interface 103, and a memory 105. Among them, the communication bus 102 is used to realize the connection and communication between these components. The user interface 104 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the user interface 104 may include a standard wired interface and a wireless interface. The network interface 103 may include a standard wired interface and a wireless interface (such as a wireless fidelity (WIreless-FIdelity, WI-FI) interface). The memory 105 may be a high-speed random access memory (Random Access Memory, RAM) memory, or a stable non-volatile memory (Non-Volatile Memory, NVM), such as a disk memory. The memory 105 may optionally also be a storage device independent of the aforementioned processor 101.

[0023] Those skilled in the art will understand that Figure 1 The structure shown in the figure does not constitute a limitation of the device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.

[0024] like Figure 1 As shown, the memory 105 as a storage medium may include an operating system, a network communication module, a user interface module, and a construction device for a client code framework.

[0025] exist Figure 1 In the computer device shown, the network interface 103 is mainly used for data communication with the network server; the user interface 104 is mainly used for data interaction with the user; the processor 101 and the memory 105 in the computer device of the present invention can be set in the computer device, and the computer device calls the construction device of the client code framework stored in the memory 105 through the processor 101, and executes the construction method of the client code framework provided in the embodiment of the present application.

[0026] based on Figure 1 The computer equipment shown below Figure 2 A method for constructing a client code framework is introduced as shown in the following figure.

[0027] S201, obtain the target file.

[0028] The target file can be a text file (CSV format), a table file (Excel or CSV format), etc. The target file is used to describe all nodes of the target data model. Each row of data in the target file describes the information of each node. The information of each node includes the following: 1. Node type: refers to the function or category of the node.

[0029] For example, a container represents a parent node that contains other nodes, and a parameter represents a specific data item or configuration item.

[0030] An object represents a complex type in the data model that contains multiple parameters or containers.

[0031] 2. Node full path name (name): refers to the unique identifier of the node in the data model. It is usually a path composed of multiple parts, reflecting the position of the node in the hierarchy.

[0032] 3. Node operation permissions (access): describes the access control of the user or system to the node.

[0033] Common operation permissions include the following: (1) Read: Indicates that the value of the node can be read.

[0034] (2) Write: Indicates that the value of the node can be modified.

[0035] (3) Execution: Indicates that the node allows certain operations to be performed, such as starting or stopping a service.

[0036] (4) Configuration: allows you to configure the value of this node.

[0037] 4. Node content data type (data_tpye): specifies the format or type of the node value.

[0038] For example, String represents a text string, Integer represents an integer, DateTime represents a date and time, and Enum represents an enumeration type with multiple possible values.

[0039] The description of the node information in the target file is defined according to a specific data model, and the target data model may be a TR-069 data model, a TR-181 data model, a TR-369 data model, etc. These three data models are introduced below.

[0040] 1. TR-069 (CPE WAN Management Protocol) TR-069 is a standard developed by the Broadband Forum for remote management of CPE devices. It manages various devices in the home network through automatic configuration and remote management. TR-069 defines the communication and data exchange protocol between the client (usually CPE devices) and the remote management system (ACS, Auto Configuration Server).

[0041] (II) TR-181 TR-181 is a data model extension of TR-069, which defines a more comprehensive and modern data model that covers more types of devices and services. Its goal is to enable network operators to better control and manage home gateway devices by defining more device attributes and management interfaces.

[0042] (3) TR-369 (User Services Platform, USP) USP is event-driven, supports multiple control points and uses modern transmission protocols to provide a more flexible, secure and scalable management framework to meet the needs of modern network device management, especially in applications such as smart homes, the Internet of Things and broadband access networks (such as FTTR networks).

[0043] In a specific implementation process, the official website of the Broadband Forum may be visited to find a target file describing a target data model (eg, TR-369), and the target file may be manually downloaded.

[0044] S202: Create a data structure by parsing the target file.

[0045] In a possible embodiment, each line of data in the target file is read and parsed in sequence to obtain information of each node; the data structure is updated according to the information of each node until the stop character in the target file is read to obtain a data structure containing all nodes of the target data model.

[0046] In the specific implementation process, after obtaining the target file, the target file can be opened, each line of data therein can be read and parsed in turn, comments or spaces can be automatically ignored, and the information of each node can be obtained until the stop character (such as "END") in the target file is read. The parsing is completed and the created data structure is returned.

[0047] It should be noted that the enumeration is generated in order according to the child node naming rules. The purpose is to find this node in the array and return the value required by this node when the program is running. By reading the target file, starting with "e", from left to right, all the parent nodes of this node tree are generated. Each parent node is separated by "_" and the end is the child node name, so as to generate an example of enumeration as shown in the figure below: Figure 3 As shown. Figure 3 It can be seen that all the node tree can be seen by splitting by the enumeration value "_". The first parent node (object) is on the left, and the child nodes, grandchild nodes, etc. are on the right. The rightmost is a parameter name of the last node.

[0048] Please refer to Figure 4 , is an example diagram of a parent node and subordinate parameter values ​​provided in an embodiment of the present application, wherein object represents a parent node read from a target file, and param represents the subordinate parameter value of the parent node.

[0049] S203. Generate a header file according to the data structure.

[0050] In a possible embodiment, object data is extracted from a data structure; a predefined first template is filled according to the object data to generate a client header file; and the client header file is saved in a designated folder.

[0051] In the specific implementation process, the object data can be extracted from the created data structure by calling the header file generation function. Among them, the object is a variable defined by the data structure, and the object data includes the name and attributes (such as the permissions for operations such as read and write). Then fill the object data into the pre-defined first template (such as a string template) to obtain the client header file. The client header file includes the operation functions of all nodes of the target data model, which are used to respond to the server through the client. Finally, the generated client header file is saved in the first directory of the specified folder with a ".h" extension.

[0052] In a possible embodiment, after saving the client header file in a designated folder, the method further includes: Extract MIB related data from the object data; the MIB related data is the information required by the management information base; fill the predefined second template according to the MIB related data to generate a MIB header file; save the MIB header file to the specified folder.

[0053] In the specific implementation process, the MIB-related data can be extracted from the object data by calling the header file generation function, wherein the MIB-related data is the information required by the Management Information Base (MIB). Then the MIB-related data is filled into the pre-defined second template to generate the MIB header file. The MIB header file is an operation function of the management information base, which is used to obtain the information of the management information base. The MIB header file includes function declarations and necessary structure definitions. Finally, the generated MIB header file is saved to the second directory of the specified folder.

[0054] S204: Generate source files according to the data structure.

[0055] In a possible embodiment, a predefined third template is filled according to the object data to generate a client source file; and the client source file is saved in a designated folder.

[0056] In the specific implementation process, the object data can be filled into the predefined third template (such as a string template) by calling the source file generation function to generate the corresponding C code, i.e., the client source file. Among them, the client source file includes the object initialization function, the object destruction function, and other implementation functions. The initialization function is responsible for allocating memory and initializing the fields of the object, and the destruction function is responsible for releasing the memory resources occupied by the object. Finally, the generated client source file is saved in the third directory of the specified folder.

[0057] In a possible embodiment, after the MIB header file is saved in the designated folder, the method further includes: According to the MIB related data, the predefined fourth template is filled to generate a MIB source file; and the MIB source file is saved in a specified folder.

[0058] In the specific implementation process, MIB related data can be filled into the predefined fourth template to generate a MIB source file, which is used to implement the function details and data interaction logic related to the MIB interface. Finally, the generated MIB source file is saved in the fourth directory of the specified folder.

[0059] S205. Generate a compilation information file according to the header file and the source file.

[0060] In a possible embodiment, the file names of the header file and the source file are uniformly generated; the compilation script software is called to generate a compilation information file according to the file name, and the compilation information file is embedded into the USP system.

[0061] In the specific implementation process, the file names of the client header file, client source file, MIB header file, and MIB source file are uniformly generated, the compilation script software is called, the file names are pasted into the compilation script for compilation, and after the compilation information file is generated, the compilation information file is embedded in the USP system. The compilation information file usually includes source files, header files, and compilation commands, which define how to convert source code into machine code or target files.

[0062] Please refer to Figure 5 , which is a schematic diagram of the process of constructing a client code framework provided in an embodiment of the present application Figure 2 .

[0063] S501. Start the script.

[0064] Modular automatic scripts are written based on Python language. After starting the script, standard library modules are imported. Standard library modules are used for file operations and logging. Standard library modules include configuration management module, data parsing module, code generation module, and compilation information generation module. Through these modules, the construction method of the client code framework is automatically implemented.

[0065] S502: Configure logs.

[0066] Configure the automated script running log to facilitate debugging and monitoring of the entire code generation process.

[0067] S503: Parse the input target file.

[0068] S504: Create a data structure.

[0069] S505: Generate a header file.

[0070] Generate header files (including client header files and MIB header files) based on the data structure.

[0071] S506: Generate source files.

[0072] Generate source files (including client source files and MIB source files) according to the data structure.

[0073] S507: Generate a compilation information file.

[0074] Generate compilation information files based on header files and source files.

[0075] S508. Record logs.

[0076] The log records which files are generated, whether the automation script is successful, the file path, etc. during the execution of the automation script. The automation script can be debugged later based on the log content.

[0077] Please refer to Figure 6 , which is a flow chart of the data parsing process provided in an embodiment of the present application.

[0078] S601. Open the target file and set n=0.

[0079] S602: Read and parse the nth line of data.

[0080] Read the nth line of data in the target file in sequence and parse it.

[0081] S603: Update data structure.

[0082] Update the data structure based on the parsing results of the nth row of data.

[0083] S604: Determine whether a stop character is read.

[0084] Determine whether it is the end character of the target file, such as "END".

[0085] S605. Let n=n+1.

[0086] If the stop character is not read, n=n+1 is set and the process continues to execute S602.

[0087] S606. Return the data structure.

[0088] If the stop character is read, the data structure is returned.

[0089] In summary, the present application provides a method for constructing a client code framework, which realizes an end-to-end process for automatic generation from data models to codes (header files, source files, and compilation information files), parses complex data models into objects, operations, and MIB nodes, and automatically generates standard-compliant code language files using templates and parsing logic. And by adopting a modular design, it allows for fine-tuning and expansion of node generation, MIB, and operation implementation. There is no need to invest in labor costs for repetitive work, and efficiency is greatly improved. The required nodes can be flexibly generated by modifying the target file, and can be generated for a single model of equipment. It is easy to maintain, the program is streamlined, the system performance occupied is greatly reduced, and hardware costs are saved.

[0090] Please refer to Figure 7 , is a schematic diagram of a test structure provided in an embodiment of the present application, from Figure 7 It can be seen that the total number of nodes created is: 2114, and the total execution time is: 1.04s.

[0091] Based on the same inventive concept, the present application also provides a device for constructing a client code framework, such as Figure 8 As shown, the device comprises: A file input module is used to obtain a target file; the target file is used to describe all nodes of a target data model; each line of data in the target file describes information of each node; the target data model is a TR-069 data model, a TR-181 data model or a TR-369 data model; The data parsing module is used to create a data structure by parsing the target file; The code generation module is used to generate header files according to the data structure; and to generate source files according to the data structure; The compilation information generation module is used to generate a compilation information file based on header files and source files.

[0092] It should be noted that each module in the client code framework construction device in this embodiment corresponds one-to-one to each step in the client code framework construction method in the aforementioned embodiment. Therefore, the specific implementation of this embodiment can refer to the implementation of the aforementioned client code framework construction method, which will not be repeated here.

[0093] In addition, in one embodiment, the present application also provides a computer device, which includes a processor, a memory, and a computer program stored in the memory, and the computer program implements the aforementioned method for constructing a client code framework when executed by the processor.

[0094] In addition, in one embodiment, the present application further provides a computer storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the aforementioned method for constructing a client code framework is implemented.

[0095] In some embodiments, the computer readable storage medium may be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface memory, optical disk, or CD-ROM; or various devices including one or any combination of the above memories. The computer may be various computing devices including intelligent terminals and servers.

[0096] In some embodiments, executable instructions may be in the form of a program, software, software module, script or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine or other unit suitable for use in a computing environment.

[0097] As an example, executable instructions may, but need not, correspond to a file in a file system, may be stored as part of a file storing other programs or data, such as in one or more scripts in a HyperText Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files storing one or more modules, subroutines, or code portions).

[0098] By way of example, executable instructions may be deployed to be executed on one computing device, or on multiple computing devices located at one site, or on multiple computing devices distributed across multiple sites and interconnected by a communication network.

[0099] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.

[0100] The serial numbers of the embodiments of the present application are for description only and do not indicate the advantages or disadvantages of the embodiments.

[0101] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as a read-only memory / random access memory, a disk, or an optical disk), and includes a number of instructions for a multimedia terminal device to execute the methods described in each embodiment of the present application.

[0102] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A method for constructing a client code framework, characterized in that: include: Get the target file; The target file is used to describe all nodes of the target data model; Each line of data in the target file describes the information of each node; The target data model is a TR-069 data model, a TR-181 data model or a TR-369 data model; Creating a data structure by parsing the target file; Generate a header file according to the data structure; Generate a source file according to the data structure; A compilation information file is generated according to the header file and the source file.

2. The method for constructing a client code framework according to claim 1, wherein: The step of creating a data structure by parsing the target file includes: Read and parse each line of data in the target file in sequence to obtain information about each node; the information about each node includes node type, node full path name, node operation authority, and node content data type; The data structure is updated according to the information of each node until the stop character in the target file is read, thereby obtaining a data structure containing all nodes of the target data model.

3. The method for constructing a client code framework according to claim 1, wherein: Generating a header file according to the data structure includes: Extracting object data from the data structure; the object data includes a name and attributes; Filling a predefined first template according to the object data to generate a client header file; the client header file includes operation functions of all nodes of the target data model; The client header file is saved in a specified folder.

4. The method for constructing a client code framework according to claim 3, wherein: After saving the client header file in a designated folder, the method further includes: Extracting MIB related data from the object data; the MIB related data is information required by the management information base; Filling the predefined second template according to the MIB related data to generate a MIB header file; the MIB header file includes an operation function of the management information base; Save the MIB header file to the specified folder.

5. The method for constructing a client code framework according to claim 3, wherein: Generating a source file according to the data structure includes: Filling a predefined third template according to the object data to generate a client source file; the client source file includes an object initialization function, an object destruction function and other implementation functions; The client source file is saved in the specified folder.

6. The method for constructing a client code framework according to claim 4, characterized in that: After saving the MIB header file to the designated folder, the method further includes: Filling a predefined fourth template according to the MIB-related data to generate a MIB source file; the MIB source file is used to implement function details and data interaction logic related to the MIB interface; Save the MIB source file to the specified folder.

7. The method for constructing a client code framework according to claim 1, wherein: The generating of the compilation information file according to the header file and the source file comprises: Unifying the generation of file names for the header file and the source file; Calling the compilation script software, generating a compilation information file according to the file name, and embedding the compilation information file into the USP system.

8. A device for constructing a client code framework, characterized in that: include: File input module, used to obtain target files; The target file is used to describe all nodes of the target data model; Each line of data in the target file describes the information of each node; The target data model is a TR-069 data model, a TR-181 data model or a TR-369 data model; A data parsing module, used for creating a data structure by parsing the target file; A code generation module, used to generate a header file according to the data structure; and to generate a source file according to the data structure; The compilation information generation module is used to generate a compilation information file according to the header file and the source file.

9. A computer device, characterized in that: The computer device includes a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the method for constructing a client code framework according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the processor executes the computer program to implement the method for constructing a client code framework according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Method and device for generating executable documents

    CN102520941A

  • Method and system for automatically generating MIB function codes of software platform

    CN108509187A

  • Method for automatically generating codes of home gateway router configuration file data table

    CN116170305A

  • Network communication protocol code generation method based on model refinement

    CN119109992A

  • Automatic generation method, system and device for RTE code of Autosar CP

    CN119148996A