Data processing method and device, equipment, storage medium and program product

By acquiring and parsing the target area list of the configuration file, and using the target parsing domain-specific language text to convert it into a structured representation, the problem of misoperation caused by poor configuration file readability is solved, and higher accuracy of configuration file changes and development efficiency are achieved.

CN116167341BActive Publication Date: 2026-11-20TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111427697.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-24
Publication Date
2026-11-20
Estimated Expiration
2041-11-24

AI Technical Summary

Technical Problem

The poor readability of the configuration file leads to a high probability of accidental changes when modifying the configuration file, which may cause production environment failures.

Method used

By obtaining the target list of the target region from the target configuration file, using the target parsing domain-specific language text to obtain its structured format, compiling it into target parsing configuration processing code, and running the code to transform the target list of the target region into a structured representation.

Benefits of technology

It improves the readability of configuration files, reduces the probability of accidental changes when modifying configuration files, and enhances development and production efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116167341B_ABST
    Figure CN116167341B_ABST
Patent Text Reader

Abstract

The present disclosure provides a data processing method and device, equipment, storage medium and program product, and relates to the technical field of computers. The method comprises the following steps: obtaining a target configuration file to be processed, the target configuration file comprising a target list of a target area; obtaining a target analysis domain-specific language text of the target configuration file, the target analysis domain-specific language text configuring a structured format of the target list of the target area; compiling the target analysis domain-specific language text to obtain a target analysis configuration processing code; and running the target analysis configuration processing code to convert the target list of the target area into a structured representation according to the structured format of the target list of the target area, so as to obtain a target structured configuration file of the target configuration file. The method reduces the probability of misoperation when the configuration file is changed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of computer technology, and more specifically, to a data processing method, apparatus, electronic device, computer-readable storage medium, and computer program product. Background Technology

[0002] Configuration files used to modify system behavior and functionality often lack a common semantic description, resulting in poor readability. When updating or modifying configuration files, if it is not done by the person who wrote the configuration file, it is easy to make mistakes in the content of the configuration file, causing the modified configuration file to fail to execute, or even causing system failures in the production environment.

[0003] As mentioned above, reducing the probability of accidental changes when modifying configuration files is an urgent problem to be solved.

[0004] The information disclosed in the background section is only intended to enhance the understanding of the background of this disclosure, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention

[0005] The purpose of this disclosure is to provide a data processing method, apparatus, device, readable storage medium, and program product that at least to some extent reduces the probability of misoperation when changing configuration files.

[0006] Other features and advantages of this disclosure will become apparent from the following detailed description, or may be learned in part from practice of this disclosure.

[0007] This disclosure provides a data processing method, comprising: obtaining a target configuration file to be processed, the target configuration file including a target list of a target region; obtaining target parsing domain-specific language text of the target configuration file, the target parsing domain-specific language text configuring the structured format of the target list of the target region; compiling the target parsing domain-specific language text to obtain target parsing configuration processing code; and running the target parsing configuration processing code to convert the target list of the target region into a structured representation according to the structured format of the target list of the target region, thereby obtaining a target structured configuration file of the target configuration file.

[0008] This disclosure provides a data processing apparatus, comprising: a target configuration file acquisition module for acquiring a target configuration file to be processed, the target configuration file including a target list of a target region; a target parsing domain-specific language (DSL) text acquisition module for acquiring the target parsing DSL text of the target configuration file, the target parsing DSL text configuring the structured format of the target list of the target region; a target parsing DSL text compilation module for compiling the target parsing DSL text to obtain target parsing configuration processing code; and a structured conversion module for running the target parsing configuration processing code to convert the target list of the target region into a structured representation according to the structured format of the target list of the target region, thereby obtaining a target structured configuration file of the target configuration file.

[0009] According to an embodiment of this disclosure, the structured conversion module includes: a target region name information acquisition module, used to acquire the name information of the target region; a structured format acquisition module, used to acquire the structured format of the target list of the target region based on the name information of the target region; a target attribute value acquisition module, used to acquire multiple target attribute values ​​of the target attribute from the target list of the target region according to the structured format of the target list of the target region; and a structured representation acquisition module, used to acquire the structured representation based on the name information of the target region, the target attribute, and the multiple target attribute values.

[0010] According to an embodiment of this disclosure, the target region includes a first target region, the name information of the target region includes a first target region name, the structured format of the target list of the target region includes a structured format of a first target list corresponding to the first target region name, the structured format of the first target list includes a first target attribute name and a first attribute value separator, the multiple target attribute values ​​of the target attribute include multiple first target attribute values ​​of the first target attribute, the target list of the target region includes a list of first target attribute names and their corresponding first target attribute values ​​in the first target region, and the multiple first target attribute values ​​in the first target attribute value list are separated by the first attribute value separator; the target attribute value obtaining module includes: a first target attribute name obtaining module, used to obtain the first target attribute name in the first target region from the target list of the target region; and a first target attribute value obtaining module, used to obtain multiple first target attribute values ​​of the first target attribute corresponding to the first target attribute name from the first target attribute value list according to the first attribute value separator.

[0011] According to an embodiment of this disclosure, the structured representation acquisition module includes: a first target class object acquisition module, configured to use the first target region as an object of a first target class based on the first target region name; a first string list object acquisition module, configured to use the first target attribute as a first string list object in the object of the first target class based on the first target attribute name; and a first string list object value acquisition module, configured to use the plurality of first target attribute values ​​as the first string list object values ​​corresponding to the first string list object to obtain the structured representation.

[0012] According to one embodiment of this disclosure, the target region includes a second target region, the name information of the target region includes a second target region name, the structured format of the target list of the target region includes the structured format of the second target list corresponding to the second target region name, the structured format of the second target list includes a second target attribute name, a second attribute value separator, and a sub-attribute value separator, the multiple target attribute values ​​of the target attribute include multiple first sub-attribute values ​​and multiple second sub-attribute values ​​of the second target attribute, the target list of the target region includes the second target attribute name and its corresponding second target attribute value list in the second target region, and the value in the second target attribute value list corresponds to the second target attribute name. Multiple sub-attribute groups are separated by a second attribute value separator, and the first sub-attribute value and the second sub-attribute value in the sub-attribute group are separated by the sub-attribute value separator; the target attribute value obtaining module includes: a second target attribute name obtaining module, used to obtain the second target attribute name in the second target area from the target list of the target area; a sub-attribute group obtaining module, used to obtain multiple sub-attribute groups corresponding to the second target attribute name from the second target attribute value list according to the second attribute value separator; and a sub-attribute value obtaining module, used to obtain the first sub-attribute value and the second sub-attribute value for each sub-attribute group in the multiple sub-attribute groups according to the sub-attribute value separator.

[0013] According to an embodiment of this disclosure, the structured representation acquisition module includes: a second target class object acquisition module, configured to use the second target region as an object of a second target class based on the second target region name; a second string list object acquisition module, configured to use the second target attribute as a second string list object in the object of the second target class based on the second target attribute name; and a second string list object value acquisition module, configured to use the first sub-attribute value and the second sub-attribute value as the values ​​corresponding to the first sub-attribute and the second sub-attribute in the second string list object, respectively, to obtain the structured representation.

[0014] According to an embodiment of this disclosure, the target region includes a third target region, the name information of the target region includes a third target region name, the structured format of the target list of the target region includes the structured format of the third target list corresponding to the third target region name, the structured format of the third target list includes a target attribute name fragment, the multiple target attribute values ​​of the target attribute include multiple third target attribute values ​​corresponding to multiple third target attributes and multiple fourth target attribute values ​​corresponding to multiple fourth target attributes, the target list of the target region includes multiple third target attribute names and corresponding multiple fourth target attribute values ​​in the third target region, the third target attribute name includes the target attribute name fragment; the target attribute value obtaining module includes: a third target attribute value obtaining module, used to obtain the third target attribute value in the third target region from the multiple third target attribute names in the target list of the target region according to the target attribute name fragment; and a fourth target attribute value obtaining module, used to obtain the fourth target attribute value corresponding to the third target attribute value from the target list of the target region.

[0015] According to one embodiment of this disclosure, the structured format of the third target list further includes a first object attribute format and a second object attribute format in the first object list of objects of the third target class; the structured representation obtaining module includes: a third target class object obtaining module, configured to use the third target region as an object of the third target class according to the third target region name; a first object list obtaining module, configured to use the third target attribute as the first object list according to the third target attribute name; a first object attribute value obtaining module, configured to obtain the first object attribute value in the first object list from the third target attribute name according to the first object attribute format; and a second object attribute value obtaining module, configured to use the fourth target attribute value as the second object attribute value in the first object list according to the second object attribute format, thereby obtaining the structured representation.

[0016] According to an embodiment of this disclosure, the target region includes a plurality of fourth target regions, the name information of the target region includes a fourth target region name, the fourth target region name includes a target region name fragment, the structured format of the target list of the target region includes the structured format of the fourth target list corresponding to the target region name fragment, the structured format of the fourth target list includes the target region name fragment and a fifth target attribute name, the plurality of target attribute values ​​of the target attribute include the fifth target attribute values ​​in the plurality of fourth target regions, the target list of the target region includes the fifth target attribute names and corresponding fifth target attribute values ​​corresponding to the plurality of fourth target region names; the target attribute value obtaining module includes: a fifth target attribute name obtaining module, used to obtain the fifth target attribute name in the fourth target region from the target list of the target region according to the target region name fragment; and a fifth target attribute value obtaining module, used to obtain the fifth target attribute value corresponding to the fifth target attribute name from the target list of the target region.

[0017] According to one embodiment of this disclosure, the structured format of the fourth target list further includes a third object attribute format and a fifth target attribute name in the second object list; the structured representation obtaining module includes: a second object list obtaining module, configured to use the fourth target region as the second object list according to the fourth target region name; a third object attribute value obtaining module, configured to obtain the third object attribute value in the second object list from the fourth target region name according to the third object attribute format; a first string object obtaining module, configured to use the fifth target attribute as the first string object in the second object list according to the fifth target attribute name; and a first string object value obtaining module, configured to use the fifth target attribute value as the first string object value corresponding to the first string object to obtain the structured representation.

[0018] According to one embodiment of this disclosure, the apparatus further includes: a target serialization domain-specific language (DNS) text acquisition module, configured to obtain the target serialization DNS text of the target configuration file based on the target parsing DNS text of the target configuration file; a target serialization DNS compilation module, configured to compile the target serialization DNS text to obtain target serialization processing code; a target configuration change information acquisition module, configured to acquire target configuration change information, the target configuration change information including changed target attribute values; a structured configuration file modification module, configured to replace the target attribute values ​​in the target list of the structured representation of the target region in the target structured configuration file with the changed target attribute values ​​to obtain a modified structured configuration file, the modified structured configuration file including a modified target list of the target region; and a serialization conversion module, configured to run the target serialization processing code to convert the modified target list of the structured representation of the target region into a modified target list of the target region to obtain a modified target configuration file.

[0019] This disclosure provides an apparatus including: a memory, a processor, and executable instructions stored in the memory and executable in the processor, wherein the processor, when executing the executable instructions, implements any of the methods described above.

[0020] This disclosure provides a computer-readable storage medium having computer-executable instructions stored thereon, which, when executed by a processor, implement any of the methods described above.

[0021] This disclosure provides a computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the methods provided in the various optional implementations described above.

[0022] The data processing method provided in the embodiments of this disclosure first obtains a target configuration file to be processed, including a target list of target regions, and then obtains a target parsing domain-specific language text in a structured format of the target list of the target regions in the target configuration file. The target parsing domain-specific language text is compiled to obtain target parsing configuration processing code. Then, the target parsing configuration processing code is run to convert the target list of the target regions into a structured representation according to the structured format of the target list of the target regions, thereby obtaining a target structured configuration file of the target configuration file. This transforms the target list of the target regions in the target configuration file, which has poor readability, into a target list of the target regions in a more readable structured representation, thereby reducing the probability of misoperation when the configuration file is changed.

[0023] It should be understood that the above general description and the following detailed description are merely exemplary and do not limit this disclosure. Attached Figure Description

[0024] The above and other objects, features and advantages of this disclosure will become more apparent from a detailed description of exemplary embodiments thereof with reference to the accompanying drawings.

[0025] Figure 1 A schematic diagram of a system structure according to an embodiment of this disclosure is shown.

[0026] Figure 2 A flowchart of a data processing method according to an embodiment of this disclosure is shown.

[0027] Figure 3 It shows Figure 2 The step S208 shown is a schematic diagram of the processing procedure in one embodiment.

[0028] Figure 4 according to Figure 3 It shows Figure 2 The step S208 shown is a schematic diagram of the processing procedure in another embodiment.

[0029] Figure 5 It shows Figure 4 The step S410 shown is a schematic diagram of the processing procedure in one embodiment.

[0030] Figure 6 according to Figure 3 It shows Figure 2 The step S208 shown is a schematic diagram of the processing procedure in another embodiment.

[0031] Figure 7 It shows Figure 6 The step S612 shown is a schematic diagram of the processing procedure in one embodiment.

[0032] Figure 8 according to Figure 3 It shows Figure 2 The step S208 shown is a schematic diagram of the processing procedure in another embodiment.

[0033] Figure 9 It shows Figure 8 The step S810 shown is a schematic diagram of the processing procedure in one embodiment.

[0034] Figure 10 according to Figure 3 It shows Figure 2 The step S208 shown is a schematic diagram of the processing procedure in another embodiment.

[0035] Figure 11 It shows Figure 10 The step S1010 shown is a schematic diagram of the processing procedure in one embodiment.

[0036] Figure 12 It is based on Figures 2 to 11 This diagram illustrates a configuration file parsing process.

[0037] Figure 13 It is based on Figures 2 to 11 The diagram shows a flowchart of a method for serializing a structured configuration file.

[0038] Figure 14 It is based on Figure 13 This diagram illustrates a serialization process for a structured configuration file.

[0039] Figure 15 A block diagram of a data processing apparatus according to an embodiment of the present disclosure is shown.

[0040] Figure 16 A block diagram of another data processing apparatus according to an embodiment of the present disclosure is shown.

[0041] Figure 17 A block diagram of a serialization processing apparatus according to an embodiment of the present disclosure is shown.

[0042] Figure 18 A schematic diagram of the structure of an electronic device according to an embodiment of the present disclosure is shown. Detailed Implementation

[0043] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, they are provided so that this disclosure will be more comprehensive and complete, and will fully convey the concept of the exemplary embodiments to those skilled in the art. The drawings are merely illustrative of this disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and therefore repeated descriptions of them will be omitted.

[0044] Furthermore, the described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. Numerous specific details are provided in the following description to give a thorough understanding of embodiments of this disclosure. However, those skilled in the art will recognize that the technical solutions of this disclosure can be practiced with one or more of the specific details omitted, or other methods, apparatuses, steps, etc., can be employed. In other instances, well-known structures, methods, apparatuses, implementations, or operations are not shown or described in detail to avoid obscuring various aspects of this disclosure.

[0045] Furthermore, in the description of this disclosure, unless otherwise expressly specified and limited, terms such as "connection" should be interpreted broadly, for example, meaning an electrical connection or the ability to communicate with each other; it can mean a direct connection or an indirect connection through an intermediate medium. "A plurality of" means at least two, such as two, three, etc., unless otherwise expressly and specifically limited. Those skilled in the art can understand the specific meaning of the above terms in this disclosure according to the specific circumstances.

[0046] The following explains some of the terms used in this disclosure.

[0047] Configuration: A human-machine interface used to modify system behavior, providing a low-overhead method to change system functions.

[0048] Configuration file: A text file used to store configurations; it is a storage medium that carries the configurations.

[0049] INI configuration files: "INI" is an abbreviation for the first three letters of "initialization," referring to configuration files with the ".ini" extension. INI configuration files have a simple format, consisting of parameters, sections, and comments. Therefore, broadly speaking, all configuration files that conform to this format, even those with extensions such as ".cfg," ".conf," or ".txt," can be collectively referred to as INI configuration files.

[0050] Domain-Specific Language (DSL): Generally, a DSL is a language specifically designed for handling tasks within a given problem domain. In a software development environment, a DSL is a computer programming language with limited expressive power.

[0051] As mentioned above, the syntax of INI configuration files used in some application scenarios is not very readable, as shown in the following example text 1:

[0052] Example text 1 [sectionName] This is a comment. key1 = value1 key2 = value2 The specific meaning of "value" is determined by the business developers according to their own reading and parsing logic. When configuration changes are needed, only the developer themselves may be capable of making those changes, as the semantics and writing rules of the configuration file are not readily apparent from the configuration text itself. Furthermore, even the developer may not fully understand the underlying logic without reviewing the corresponding system or application code. See example text 2 below: Example text 2 [refund1001000000] use_status=12 operator_list=100000|100001|100002 [refund1008600000] use_status=1 operator_list=200000|200001|200002 [limit] amount1001000000=1 amount1008600000=200 freq1001000000=10000 freq1008600000=20000 [custom_config] bank_info=1:CMB|2:ABC It's evident that almost all configuration items lack relevant comments and explanations. Take "bank_info=1:CMB|2:ABC" as an example. Superficially, this configuration file includes a list of configuration items, separated by the "|" symbol. The configuration value is an object-oriented data structure, separated by ":". However, the meanings of the values ​​1 and 2, and whether they could be 3, are difficult to ascertain from this configuration file. Furthermore, if a new configuration item is added and the "|" separator is mistakenly omitted, not only will the new item be ineffective, but the previous item may also be invalidated, potentially leading to unpredictable consequences after deployment. Additionally, "[refund1001000000]" and "[refund1008600000]" might be a configuration list specific to a particular merchant, but definitive conclusions cannot be drawn from the configuration text. Therefore, the configuration files in this technology exhibit poor readability, are prone to errors, and could even cause system failures in the production environment.

[0053] Therefore, this disclosure provides a data processing method. First, a target configuration file to be processed, including a target list of target regions, is obtained. Then, a target parsing domain-specific language text in a structured format of the target list of the target regions in the target configuration file is obtained. The target parsing domain-specific language text is compiled to obtain target parsing configuration processing code. Then, the target parsing configuration processing code is run to convert the target list of the target regions into a structured representation according to the structured format of the target list of the target regions, so as to obtain a target structured configuration file of the target configuration file. This transforms the target list of the target regions in the target configuration file, which has poor readability, into a target list of the target regions in a more readable structured representation, thereby reducing the probability of misoperation when the configuration file is changed.

[0054] Figure 1 An exemplary system architecture 10 is shown that can be applied to the data processing methods and apparatus of this disclosure.

[0055] like Figure 1 As shown, system architecture 10 may include terminal device 102, network 104, and server 106. Terminal device 102 may be various electronic devices with a display screen and supporting input and output, including but not limited to smartphones, tablets, laptops, desktop computers, wearable devices, in-vehicle terminals, virtual reality devices, smart home devices, etc. Network 104 is used as a medium to provide a communication link between terminal device 102 and server 106. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, etc. Server 106 may be a server or server cluster providing various services, such as a backend processing server, database server, etc.

[0056] Users can use terminal device 102 to connect to server 106 via network 104 to receive or send data. For example, a user can use terminal device 102 to retrieve a target configuration file containing a target list of target regions from server 106 via network 104, and then view the target configuration file using software on terminal device 102. Alternatively, a user can write a structured target parsing domain-specific language text containing the target list of target regions in the target configuration file on terminal device 102, and then operate on terminal device 102 to have the compiler software installed on terminal device 102 compile the target parsing domain-specific language text to obtain target parsing configuration processing code. Another example is that a user can run software on terminal device 102 to execute the target parsing configuration processing code, and then send the resulting structured target configuration file to server 106 via network 104 for storage or to modify system functions.

[0057] It should be understood that Figure 1 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.

[0058] Figure 2 This is a flowchart illustrating a data processing method according to an exemplary embodiment. For example... Figure 2 The method shown can be applied, for example, to the server of the above system, or to the terminal device of the above system.

[0059] refer to Figure 2 The method 20 provided in this embodiment may include the following steps.

[0060] In step S202, the target configuration file to be processed is obtained, which includes a list of targets in the target area.

[0061] In some embodiments, the target configuration file can be a target file used to modify system behavior or program parameters, such as an INI configuration file, an XML (eXtensible Markup Language) configuration file, a cfg configuration file, etc.

[0062] In some embodiments, the content of a target configuration file may include one or more target sections, and the content of the target configuration file within a target section may include one or more target lists. For example, "refund1001000000" in example text 2 is the name of the first target section from top to bottom, and "use_status=12 operator_list=100000|100001|100002" below it is the content of the target configuration file within that target section.

[0063] In some embodiments, the target list can be a list of multiple target attribute values ​​corresponding to a single target attribute. For example, in example text 2, "operator_list=100000|100001|100002" represents the target attribute, whose name is "operator_list," and whose three values ​​are 100000, 100001, and 100002. As another example, refer to example text 3 below: Example text 3 [genernal2] keyList=10086|10010|10000 Among them, the first target area name, "keyList" can be the first target attribute name, "10086|10010|10000" can be the first target attribute value list, and "10086", "10010", and "10000" can be three first target attribute values.

[0064] In other embodiments, the target list can also be a list of multiple target attribute values ​​corresponding to a target attribute, wherein each target attribute value can further include multiple sub-attribute groups composed of multiple sub-attribute values. For example, in example text 2, "bank_info=1:CMB|2:ABC" corresponds to the target attribute name "bank_info", "1:CMB" and "2:ABC" are two sub-attribute groups, and 1 and CMB, 2 and ABC are the values ​​of two sub-attributes in the two sub-attribute groups, respectively. For another example, refer to the following example text 4: Example text 4 [genernal3] keyObject=1:10086|2:10010|3:10000 In this context, “genernal3” can be the name of the second target region, “keyObject” can be the name of the second target attribute, “1:10086|2:10010|3:10000” can be the list of second target attribute values, “1:10086”, “2:10010”, and “3:10000” can be three sub-attribute groups, 1, 2, and 3 can be the first sub-attribute value in each sub-attribute group, and 10086, 10010, and 10000 can be the second sub-attribute value in each sub-attribute group.

[0065] In other embodiments, the target list may also be a list of multiple target attributes, each of which corresponds to a target attribute value. For example, in example text 2, “amount1001000000=1 amount1008600000=200”, the target attribute names are “amount1001000000” and “amount1008600000”, and 1 and 200 are the values ​​corresponding to the two target attributes.

[0066] For example, see the following example text 5: Example text 5 [genernal4] key10010=1 key10086=2 key10000=3 Among them, “genernal4” can be the name of the third target region, “key10010”, “key10086”, and “key10000” can be three different third target attribute names (in the form of the above list), 10086, 10010, and 10000 can be the third target attribute values ​​corresponding to the three third target attribute names, and 1, 2, and 3 can be the fourth target attributes corresponding to the three third target attribute names.

[0067] In other embodiments, the target list may also be a list of multiple target regions, each target region including a target attribute and its corresponding target attribute value, for example, refer to the following example text 6: Example text 6 [section10010] key=value1 [section10086] key=value2 [section10000] key=value3 Among them, “section10010”, “section10086”, and “section10000” can be the names of three third target regions (in list form), “key” can be the name of the fifth target attribute, and “value1”, “value2”, and “value3” can be the values ​​of the fifth target attributes corresponding to the three third target regions.

[0068] In step S204, the target parsing domain-specific language text of the target configuration file is obtained, and the target parsing domain-specific language text configures the structured format of the target list of the target region.

[0069] In some embodiments, the corresponding target parsing domain-specific language (DSL) text can be obtained based on the target configuration file. The target parsing DSL text can be a DSL text used to parse the target configuration file, containing a structured format of the target list for the target region. The structured format of the target list for the target region can be information used to identify the contents of the list in the target configuration file. For example, after completing the target configuration file, developers can write the target parsing DSL text according to its logic. Compiling the target parsing DSL text will allow the parsing of the target attributes and / or target attribute values ​​in list form from the target configuration file. The target parsing DSL text, the structured format of the target list for the target region, and their parsing logic corresponding to example texts 3-6 in step S202 can be referenced accordingly. Figures 4 to 11 .

[0070] In other embodiments, for example, the target configuration file can be automatically converted into target parsed DSL text by writing corresponding conversion code and using methods such as word segmentation and regular expression matching in the logic of the conversion code.

[0071] In step S206, the target parsing domain-specific language text is compiled to obtain the target parsing configuration processing code.

[0072] In some embodiments, a compiler with the ability to compile target parsing DSL text can be used to compile it, such as a C++ compiler, a JSON (JavaScript Object Notation) compiler, etc., to obtain the corresponding executable target parsing configuration processing code.

[0073] In step S208, the target parsing configuration processing code is run to convert the target list of the target region into a structured representation according to the structured format of the target list of the target region, so as to obtain the target structured configuration file of the target configuration file.

[0074] In some embodiments, when the target parsing configuration processing code is executed, the configuration text in the target area can be parsed according to the name of the target area. For specific implementation details, please refer to... Figure 3 .

[0075] In some embodiments, for example, the structured representation transformation process corresponding to example texts 3-6 in step S202 can be referred to Figures 4 to 11 .

[0076] According to the data processing method provided in this disclosure, firstly, a target configuration file to be processed, including a target list of target regions, is obtained. Then, a structured target parsing domain-specific language (DSL) text of the target list of the target regions in the target configuration file is obtained. This DSL text is compiled to obtain target parsing configuration processing code. The target parsing configuration processing code is then run to convert the target list of the target regions into a structured representation according to the structured format of the target list, thus obtaining a target structured configuration file of the target configuration file. Firstly, converting the target list of the target regions in the target configuration file, which has poor readability, into a more readable structured representation of the target regions' target list can reduce the probability of erroneous operations when the configuration file is changed. Secondly, the target configuration file is converted using parsing DSL text. DSL provides a more expressive form for reading and operation abstraction, improving development efficiency and greatly enhancing production efficiency. DSL can visualize the model for understanding and communication, making it suitable for communication between domain experts. The writing of DSL text is platform-independent, adaptable to the execution environment, and can be mapped to a specific platform for implementation.

[0077] Figure 3 It shows Figure 2 The step S208 shown is a schematic diagram of the processing procedure in one embodiment. (See attached diagram.) Figure 3 As shown in the present embodiment, step S208 may further include the following steps.

[0078] Step S302: Obtain the name information of the target area.

[0079] In some embodiments, the name information of the target area may be the name of the target area (see reference). Figure 4 , Figure 6 and Figure 8 It can also be a fragment of the target region name (see...). Figure 10 ).

[0080] Step S304: Obtain the structured format of the target list of the target area based on the name information of the target area.

[0081] In some embodiments, the structured format of the target list in the target parsing DSL text of Example Texts 3-6 can be referred to accordingly. Figure 4 , Figure 6 , Figure 8 and Figure 10 .

[0082] Step S306: According to the structured format of the target list of the target area, obtain multiple target attribute values ​​of the target attributes from the target list of the target area.

[0083] Step S308: Obtain a structured representation based on the name information of the target region, the target attributes, and multiple target attribute values.

[0084] In some embodiments, there can be one or more target attributes, and each of the one or more target attributes can correspond to multiple target attribute values. Taking example text 3-6 as an example... Figures 4 to 11 The parsing process for steps S306 and S308 under various target list scenarios is described. Figures 4 to 11 This is merely an example of processing example texts 3-6 separately. The target lists in example texts 3-6 can be combined with each other, and the target parsing DSL texts can also be combined accordingly. This disclosure does not impose any restrictions.

[0085] Figure 4 according to Figure 3 It shows Figure 2 The step S208 shown is a schematic diagram of the processing procedure in another embodiment. (See diagram below.) Figure 4 As shown in the embodiments of this disclosure, step S208 may further include the following steps. In these embodiments, the target configuration file including example text 3 is used as an example for illustration.

[0086] Step S402: Obtain the name of the first target area.

[0087] In some embodiments, the first target region name "genernal2" can be obtained by matching the target configuration file.

[0088] Step S404: Based on the first target region name, obtain the structured format of the first target list corresponding to the first target region name. The structured format of the first target list includes the first target attribute name and the first attribute value separator.

[0089] In some embodiments, the target parsed DSL text can be obtained using the DSL syntax of example text 7 as follows: Example text 7 section:equals("${section name}") = ${section variable name} { key:equals("${key name}") = ${key variable name} { value = implode("${separator}") } } This syntax supports nesting; therefore, in example text 3, the "section name" is "genernal2", the "key name" is "keyList", and the "delimiter" is "|". The target parsed DSL text of example text 3 is obtained as shown in example text 8: Example text 8 section:equals("genernal2") = genernal2 { key:equals("keyList") = keyList { value = implode("|") } } Then, for the target parsing DSL text, the structured format of the first target list is "Key=equals("keylist")=keylist { Value=implode("|")}", the first target attribute name is "keylist", and the first attribute value separator is "|".

[0090] Step S406: Obtain the first target attribute name in the first target region from the target list of the first target region, which includes the first target attribute name and the corresponding first target attribute value list in the first target region.

[0091] In some embodiments, based on the target parsing DSL text, the attribute names in the “genernal2” area of ​​the example text 3 can be matched. When the first target attribute name “keylist” is matched, its corresponding content “keyList=10086|10010|10000” is used as the first target attribute value list to continue processing the logic in the “{}” after “keylist” in the target parsing DSL text.

[0092] Step S408: From the list of first target attribute values, obtain multiple first target attribute values ​​corresponding to the first target attribute name based on the first attribute value separator.

[0093] In some embodiments, based on the logic within the "{}" after the target parsing DSL text keylist, the content after "keylist" in the first target attribute value list "keyList=10086|10010|10000" in example text 3 can be matched. When the first attribute value separator "|" is matched, multiple first target attribute values ​​separated by it are obtained.

[0094] Step S410: Obtain a structured representation based on the first target region name, the first target attribute name and its corresponding multiple first target attribute values.

[0095] Figure 5 It shows Figure 4 The step S410 shown is a schematic diagram of the processing procedure in one embodiment. (See diagram below.) Figure 5 As shown in the embodiments of this disclosure, step S410 may further include the following steps. In these embodiments, the example of converting the target configuration file content shown in example text 3 into a structured representation using the target parsing DSL text shown in example text 8 is used for illustration.

[0096] Step S502: Based on the name of the first target region, the first target region is used as an object of the first target class.

[0097] Step S504: Based on the first target attribute name, use the first target attribute as the first string list object in the object of the first target class.

[0098] Step S506: Use multiple first target attribute values ​​as the values ​​of the first string list object corresponding to the first string list object to obtain a structured representation.

[0099] In some embodiments, the section named "genernal2" is parsed as an object of the first target class, with the object name "genernal2". Within the parameters of this section, the record with the key "keyList" (the first target attribute) is parsed as a first string list object, with the object name "keyList". The values ​​of the first string list object are then obtained as multiple target attribute values ​​separated by "|". This yields a structured representation of the target configuration file content shown in Example Text 3, presented in JSON format as shown in Example Text 9 below: Example text 9 "genernal2": { "keyList": ["10086", "10010", "10000"] } According to the structured method provided in this disclosure, by matching the first target attribute name and the first attribute value separator in the target list corresponding to the first target region name, a unified structured representation in the form of a first string list object and its corresponding first string list object value is obtained, thus avoiding the technical problem of misoperation due to unfamiliarity with the list format when different developers communicate about configuration files.

[0100] Figure 6 according to Figure 3 It shows Figure 2 The step S208 shown is a schematic diagram of the processing procedure in another embodiment. (See diagram below.) Figure 6 As shown in the embodiments of this disclosure, step S208 may further include the following steps. In these embodiments, the target configuration file includes example text 4 as an example for illustration.

[0101] Step S602: Obtain the name of the second target area.

[0102] In some embodiments, the second target region name "genernal3" can be obtained by matching the target configuration file.

[0103] Step S604: Based on the second target region name, obtain the structured format of the second target list corresponding to the second target region name. The structured format of the second target list includes the second target attribute name, the second attribute value separator, and the sub-attribute value separator.

[0104] In some embodiments, the target parsed DSL text can be obtained using the DSL syntax of the following example text 10: Example text 10 section:equals("${section name}") = ${section variable name} { key:equals("${key name}") = ${key variable name} { value = implode("${object separator}").format(${property1 variable name}, "${property separator}", ${property2 variable name}) } } This syntax supports nesting; therefore, in example text 4, "section name" is "genernal3", "key name" (corresponding to the second target attribute name) is "keyObject", "object separator" (corresponding to the second attribute value separator) is "|", and "attribute separator" (corresponding to the sub-attribute value separator) is ":"; "attribute1 variable name" and "attribute2 variable name" are the first and second sub-attribute names used to display in the structured representation; the target parsed DSL text of example text 3 is obtained as shown in example text 11: Example text 11 section:equals("genernal3") = genernal3 { key:equals("keyObject") = keyObject { value = implode("|").format(type, ":", mchId); } } Then, for the target parsing DSL text, the structured format of the second target list is "key:equals("keyObject") = keyObject { value = implode("|").format(type, ":", mchId);}", where the second target attribute name is "keyObject", the second attribute value separator is "|", the sub-attribute value separator is ":", the first sub-attribute name is "type", and the second sub-attribute name is "mchID".

[0105] Step S606: Obtain the second target attribute name in the second target region from the target list of the second target region, which includes the second target attribute name and the corresponding second target attribute value list in the second target region.

[0106] In some embodiments, based on the target parsing DSL text, the attribute names in the “genernal3” area of ​​example text 4 can be matched. When the second target attribute name “keyObject” is matched, its corresponding content “keyObject=1:10086|2:10010|3:10000” is used as the first target attribute value list to continue processing the logic in the “{}” after “keyObject” in the target parsing DSL text.

[0107] Step S608: From the list of second target attribute values, obtain multiple sub-attribute groups corresponding to the second target attribute name according to the second attribute value separator.

[0108] In some embodiments, based on the logic within the "{}" after the target parsing DSL text keyObject, the content after "keyObject" in the second target attribute value list "keyObject=1:10086|2:10010|3:10000" in example text 4 can be matched. When the second attribute value separator "|" is matched, the multiple sub-attribute groups "1:10086", "2:10010" and "3:10000" separated by it are obtained.

[0109] Step S610: For each sub-attribute group in the multiple sub-attribute groups, obtain the first sub-attribute value and the second sub-attribute value according to the sub-attribute value separator.

[0110] In some embodiments, based on the logic in the "{}" after parsing the DSL text keyObject, the contents of each sub-attribute group can be matched. When the sub-attribute value separator ":" is matched, the first sub-attribute value is obtained, with the preceding string being the first sub-attribute "type" and the following string being the second sub-attribute value "mchID".

[0111] Step S612: Obtain a structured representation based on the second target region name, the second target attribute name, the first sub-attribute value, and the second sub-attribute value.

[0112] Figure 7 It shows Figure 6 The step S612 shown is a schematic diagram of the processing procedure in one embodiment. (See attached diagram.) Figure 7 As shown in the embodiments of this disclosure, step S612 may further include the following steps. In these embodiments, the example of converting the target configuration file content shown in example text 4 into a structured representation using the target parsing DSL text shown in example text 11 is used for illustration.

[0113] Step S702: Based on the name of the second target region, treat the second target region as an object of the second target class.

[0114] Step S704: Based on the name of the second target attribute, use the second target attribute as the second string list object in the object of the second target class.

[0115] Step S706: Use the first sub-attribute value and the second sub-attribute value as the values ​​corresponding to the first and second sub-attributes in the second string list object, respectively, to obtain a structured representation.

[0116] In some embodiments, the section named "genernal3" is parsed as an object of the second target class, with the object name "genernal3". Within the parameters of this section, the record with the key "keyObject" (the second target attribute) is parsed as a list of second strings, named "keyObject", separated by "|". The first sub-attribute value of the first sub-attribute "type" and the second sub-attribute value of the second sub-attribute "mchId" in each string of the second string list object, separated by ":", are then obtained. This yields a structured representation of the target configuration file content shown in Example Text 4, presented in JSON as Example Text 12 below: Example text 12 "genernal3": { "keyObject": [{ "type": "1", "mchId": "10086" }, { "type": "2", "mchId": "10010 }, { "type": "3", "mchId": "10000" }] According to the structured method provided in this disclosure, by matching the second target attribute name, the second attribute value separator, and the sub-attribute value separator in the target list corresponding to the second target region name, a unified structured representation in the form of a second string list object and its corresponding first and second sub-attribute values ​​is obtained, thus avoiding the technical problem of misoperation due to unfamiliarity with the list format when different developers communicate about configuration files.

[0117] Figure 8 according to Figure 3 It shows Figure 2 The diagram illustrates step S208 in another embodiment. (See attached diagram.) Figure 8 As shown in the embodiments of this disclosure, step S208 may further include the following steps. In these embodiments, the target configuration file includes example text 5 as an example for illustration.

[0118] Step S802: Obtain the name of the third target region.

[0119] In some embodiments, the third target region name "genernal4" can be obtained by matching the target configuration file.

[0120] Step S804: Based on the name of the third target region, obtain the structured format of the third target list corresponding to the name of the third target region. The structured format of the third target list includes target attribute name fragments.

[0121] In some embodiments, the target parsed DSL text can be obtained using the DSL syntax of the following example text 13: Example text 13 section:equals("${section name}") = ${section variable name}{ key:startsWith("${key name prefix}") = ${key list variable name} { name = format("${key name prefix}", ${key name suffix variable name}) value = format("${separator between prefix and suffix}", ${attribute value variable name}) } } This syntax supports nesting; therefore, in example text 5, "section name" is "genernal4", "key name prefix" (corresponding to the target attribute name fragment) is "key", and "separator between prefix and suffix" is "", meaning there are no characters between the key name prefix and suffix; "key name suffix variable" and "attribute value variable name" are the first object attribute name and the second object attribute name used to display in the structured representation; the target parsed DSL text obtained from example text 5 is as follows: Example text 14: Example text 14 section:equals("genernal4") = genernal4 { key:startsWith("key") = keyObjectList { name = format("key", mchId) value = format("", value) } } Then, for the target parsing DSL text, the structured format of the third target list is "key:startsWith("key") = keyObjectList { name = format("key", mchId) value = format("",value)}", where the target attribute name fragment is "key", the first object list name is "keyObjectList", the first object attribute name is "mchId", and the second sub-attribute name is "value".

[0122] Step S806: Based on the target attribute name fragment, obtain the third target attribute value in the third target area from multiple third target attribute names in the target list of the target area.

[0123] In some embodiments, according to the target parsing DSL text, the third target attribute name in the "genernal4" area of ​​example text 5 can be matched according to the target attribute name fragment. After matching "key10010", "key10086", and "key10000" which start with "key", the third target attribute values ​​of these three third target attribute names are obtained as their suffixes "10010", "10086", and "10000", respectively.

[0124] In some embodiments, the target attribute name fragment can also be a suffix, middle section, etc., of the target attribute name, and the corresponding target parsing DSL text logic is also set accordingly. This disclosure uses the example of the target attribute name fragment being a prefix of the target attribute name for illustration, and is not limited thereto.

[0125] Step S808: Obtain the fourth target attribute value corresponding to the third target attribute value from the target list of the target area.

[0126] In some embodiments, based on the target parsing DSL text, after matching the three third target attribute names "key10010", "key10086", and "key10000" that begin with "key", the fourth target attribute values ​​"1", "2", and "3" corresponding to these three third target attribute names can be obtained.

[0127] Step S810: Obtain a structured representation based on the third target region name, the third target attribute name, and the fourth target attribute value.

[0128] Figure 9 It shows Figure 8 The step S810 shown is a schematic diagram of the processing procedure in one embodiment. (See attached diagram.) Figure 9As shown in the embodiments of this disclosure, step S810 may further include the following steps. In these embodiments, the example of converting the target configuration file content shown in example text 5 into a structured representation using the target parsing DSL text shown in example text 14 is used for illustration.

[0129] Step S902: Based on the name of the third target region, treat the third target region as an object of the third target class.

[0130] Step S904: Based on the name of the third target attribute, use the third target attribute as the first object list.

[0131] Step S906: Based on the first object attribute format in the first object list of the third target class in the structured format of the third target list, obtain the first object attribute value in the first object list from the third target attribute name.

[0132] Step S908: Based on the second object attribute format in the first object list of the third target class in the structured format of the third target list, the fourth target attribute value is used as the second object attribute value in the first object list to obtain a structured representation.

[0133] In some embodiments, the section named "genernal4" is parsed as an object of a third target class, named "genernal4". Within the parameters of this section, records starting with "key" (third target attributes) are parsed as a list of first objects named "keyObjectList". Third target attribute names in the format "key" + "$mchId" are parsed as the first object attribute values ​​in the first object list, and fourth target attribute values ​​in the format "value" are assigned to the second object attribute values. This yields a structured representation of the target configuration file content shown in example text 5, presented in JSON format as example text 15 below: Example text 15 "genernal4": { "keyList": [{ "mchId": "10010", value: "1" }, { "mchId": "10086", value: "2" }, { "mchId": "10000", value: "3"}] } According to the structured method provided in this disclosure, by matching and extracting the third target attribute name in the target list corresponding to the third target region name, a unified structured representation in the form of a first object list and the first object attribute value and the second object attribute value therein is obtained, which avoids the technical problem of misoperation due to unfamiliarity with the list format when different developers communicate about configuration files.

[0134] Figure 10 according to Figure 3 It shows Figure 2 The step S208 shown is a schematic diagram of the processing procedure in another embodiment. (See diagram below.) Figure 10 As shown in the embodiments of this disclosure, step S208 may further include the following steps. In these embodiments, the target configuration file including example text 6 is used as an example for illustration.

[0135] Step S1002: Obtain the name of the fourth target region, which includes a fragment of the target region name.

[0136] In some embodiments, the fourth target region may include multiple regions, resulting in multiple fourth target region names such as "Section 10010", "Section 10086", and "Section 10000". The target region name fragment may be a prefix, suffix, or middle segment, etc. This disclosure uses the prefix "Section" as an example for illustration, but does not impose any limitations.

[0137] Step S1004: Obtain the structured format of the fourth target list corresponding to the target region name fragment. The structured format of the fourth target list includes the target region name fragment and the fifth target attribute name.

[0138] In some embodiments, the target parsed DSL text can be obtained using the DSL syntax of the following example text 16: Example text 16 section:startsWith("${section name prefix}") = ${section list variable name} { name = format("${section name prefix}", ${section suffix variable name}); key:equals("${key name}") = ${key variable name} { } } This syntax supports nesting; therefore, in example text 6, the "section name prefix" is "Section" and the "key name" is "key". The target parsed DSL text of example text 6 is obtained as shown in example text 17: Example text 17 section:startsWith("section") = sectionList { name = format("section", mchId); key:equals("key") = key { } } Then, for the target parsing DSL text, the structured format of the fourth target list is "name = format("Section", mchId); key:equals("key") = key", the target region name fragment is "Section", and the fifth target attribute name is "key".

[0139] Step S1006: Based on the target region name fragment, obtain the fifth target attribute name in the fourth target region from the target list of the fourth target regions, which includes the fifth target attribute name and the corresponding fifth target attribute value corresponding to multiple fourth target region names.

[0140] In some embodiments, based on the target parsing DSL text, the target region name fragment "Section" can be matched in the example text 6. When the fourth target region names "Section 10010", "Section 10086", and "Section 10000" that start with the target region name fragment are matched, the attribute names in each fourth target region are matched to obtain the fifth target attribute name "key".

[0141] Step S1008: Obtain the fifth target attribute value corresponding to the fifth target attribute name from the target list of the target area.

[0142] In some embodiments, the fifth target attribute values ​​“value1”, “value2”, and “value3” corresponding to the fifth target attribute name “key” in each fourth target region of Example Text 6 are obtained.

[0143] Step S1010: Obtain a structured representation based on the name of the fourth target region, the name of the fifth target attribute, and the value of the fifth target attribute.

[0144] Figure 11 It shows Figure 10 The step S1010 shown is a schematic diagram of the processing procedure in one embodiment. (See attached diagram.) Figure 11 As shown in the embodiments of this disclosure, step S1010 may further include the following steps. In these embodiments, the example of converting the target configuration file content shown in example text 6 into a structured representation using the target parsing DSL text shown in example text 17 is used for illustration.

[0145] Step S1102: Based on the name of the fourth target region, the fourth target region is included in the second object list.

[0146] Step S1104: Based on the structured format of the fourth target list, the value of the third object attribute in the second object list is obtained from the name of the fourth target region.

[0147] Step S1106: Based on the fifth target attribute name in the second object list included in the structured format of the fourth target list, the fifth target attribute is used as the first string object in the second object list.

[0148] Step S1108: Use the fifth target attribute value as the first string object value corresponding to the first string object to obtain a structured representation.

[0149] In some embodiments, sections whose names begin with the target region name fragment "Section" are parsed as a second object list, named sectionList. The content following the target region name fragment "Section" in the fourth target region name is assigned to the value of the third object property named "mchId". In the parameters under this section, the record with the key "key" (the fifth target property) is parsed as a first string object and its corresponding first string object. This yields a structured representation of the target configuration file content shown in example text 6, presented in JSON as shown in example text 18 below: Example text 18 "sectionList": [{ "mchId": "10010", "key": "value1" }, { "mchId": "10086", "key": "value2" }, { "mchId": "10000", "key": "value3" }] According to the structured method provided in this disclosure, by matching the target region name fragment and the fifth target attribute name in the target list corresponding to the fourth target region name, a unified structured representation in the form of the third object attribute value and the first string object value in the second object list is obtained, thus avoiding the technical problem of misoperation due to unfamiliarity with the list format when different developers communicate about configuration files.

[0150] Figure 4-11 The present invention can cover most scenarios involving configuration file text formats in daily work. Different types of list-formatted target configuration file texts can be arbitrarily combined and / or nested. Correspondingly, the target parsing DSL text used is also combined and / or nested accordingly. Specific implementation details are not elaborated here. For configuration texts without list content, such as "[genernal1]key=value", the key name and its corresponding value can be obtained intuitively, for example, represented as ""genernal1": { "key": "value"}, without the need for specific parsing DSL text.

[0151] Figure 12 It is based on Figures 2 to 11 This diagram illustrates a configuration file parsing process. Figure 12 As shown, configuration text 1202 corresponds to the text of the target configuration file mentioned above, which is serialized language text that is difficult for humans to read and can be processed by the system and / or the corresponding application. Parsing domain-specific language text 1204 corresponds to the target parsing domain-specific language text mentioned above, which is the target parsing DSL text manually written and / or automatically generated based on the target configuration file. The parsing domain-specific language text 1204 is compiled using a compiler, and the parsing domain-specific language text 1204 is mapped to parsing configuration processing code 1206 (corresponding to the target parsing configuration processing code mentioned above). The parsing configuration processing code 1206 is run to perform structuring processing on configuration text 1202 to obtain structured configuration text 1208 (corresponding to the text of the target structured configuration file mentioned above).

[0152] Figure 13 It is based on Figures 2 to 11 The diagram illustrates a method for serializing a structured configuration file. Figure 13 The method shown can be applied, for example, to the server of the above system, or to the terminal device of the above system.

[0153] refer to Figure 13 The method 130 provided in this embodiment may include the following steps.

[0154] In step S1302, the target serialized domain-specific language text of the target configuration file is obtained based on the target parsed domain-specific language text of the target configuration file.

[0155] In some embodiments, target serialized DSL text can be automatically generated based on target parsed DSL text.

[0156] In step S1304, the target serialization domain-specific language text is compiled to obtain the target serialization processing code.

[0157] In some embodiments, similar to step S206, a compiler capable of compiling DSL text can be used to compile it.

[0158] In step S1306, target configuration change information is obtained, which includes the changed target attribute values.

[0159] In some embodiments, target configuration change information can be obtained through an interface for inputting change information.

[0160] In step S1308, the target attribute values ​​in the target list of the target region represented in the target structured configuration file are replaced with the changed target attribute values ​​to obtain the modified structured configuration file. The modified structured configuration file includes the target list of the target region represented in the modified structure.

[0161] In step S1310, the target serialization processing code is run to convert the target list of the target region in the modified structured representation into the modified target list of the target region, so as to obtain the modified target configuration file.

[0162] According to the structured method provided in this disclosure, an abstract configuration model is used to design a DSL language that is simple and easy for developers to understand, capable of managing all service configurations. For existing configurations, complex INI configuration file text is taken as input. Through the DSL, the configuration text can be structured without changing the configuration file content—that is, without any modification to the business system—and the final output is a structured configuration with clear semantics. This provides reliable support for configuration item rule constraints and graphical configuration interaction. Configuration personnel only need to set up the DSL for the configuration file once, and no further operations are required. Each time the configuration is changed, only structured configuration text is seen, and operations are performed on this structured configuration text.

[0163] Figure 14 It is based on Figure 13 This diagram illustrates a serialization process for a structured configuration file. Figure 14As shown, the structured configuration text 1402 corresponds to the text of the target structured configuration file mentioned above, and is in a highly readable language. The configuration change content 1404 is the target configuration change information obtained through the human-computer interaction interface. The parsed domain-specific language text 1406 corresponds to the target parsed domain-specific language text mentioned above, and is the target parsed DSL text manually written and / or automatically generated based on the target configuration file. The serialized domain-specific language text 1408 (corresponding to the target serialized domain-specific language text) can be automatically generated based on the parsed domain-specific language text 1406. Then, the serialized domain-specific language text 1408 is compiled using a compiler, and the serialized domain-specific language text 1408 is mapped to serialization processing code 1410 (corresponding to the target serialization processing code mentioned above). The serialization processing code 1410 is run to serialize the structured configuration text 1402 that has updated the configuration change content 1404, and the modified configuration text 1412 (corresponding to the text of the modified target configuration file mentioned above) is in a language that can be processed by the system and / or the corresponding application.

[0164] Figure 15 This is a block diagram illustrating a data processing apparatus according to an exemplary embodiment. Figure 15 The device shown can be applied, for example, to the server side of the above system, or to the terminal device of the above system.

[0165] refer to Figure 15 The apparatus 150 provided in this embodiment may include a target configuration file acquisition module 1502, a target parsing domain-specific language text acquisition module 1504, a target parsing domain-specific language text compilation module 1506, and a structured conversion module 1508.

[0166] The target configuration file acquisition module 1502 can be used to acquire the target configuration file to be processed, which includes a list of targets in the target region.

[0167] The target parsing domain-specific language text acquisition module 1504 can be used to acquire the target parsing domain-specific language text of the target configuration file, which is a structured format of the target list of the target region.

[0168] The Target Parsing Domain-Specific Language Text Compilation Module 1506 can be used to compile Target Parsing Domain-Specific Language Text to obtain Target Parsing Configuration Processing Code.

[0169] The structured transformation module 1508 can be used to run the target parsing configuration processing code, which transforms the target list of the target region into a structured representation according to the structured format of the target list of the target region, so as to obtain the target structured configuration file of the target configuration file.

[0170] Figure 16 This is a block diagram illustrating another data processing apparatus according to an exemplary embodiment. Figure 16 The device shown can be applied, for example, to the server side of the above system, or to the terminal device of the above system.

[0171] refer to Figure 16 The apparatus 160 provided in this embodiment may include a target configuration file acquisition module 1602, a target parsing domain-specific language text acquisition module 1604, a target parsing domain-specific language text compilation module 1606, and a structure conversion module 1608. The structure conversion module 1608 may include a target region name information acquisition module 16082, a structured format acquisition module 16084, a target attribute value acquisition module 16086, and a structured representation acquisition module 16088. The target attribute value acquisition module 16086 may include: a first target attribute name acquisition module 160862, a first target attribute value acquisition module 160864, ​​a second target attribute name acquisition module 160866, a sub-attribute group acquisition module 160868, a sub-attribute value acquisition module 1608610, a third target attribute value acquisition module 1608612, a fourth target attribute value acquisition module 1608614, and a fifth target attribute name acquisition module. Module 1608616 and the fifth target attribute value acquisition module 1608618, the structured representation acquisition module 16088 may include: the first target class object acquisition module 160882, the first string list object acquisition module 160884, the first string list object value acquisition module 160886, the second target class object acquisition module 160888, the second string list object acquisition module 1608810, the second string list object value acquisition module 1608812, the third target class object acquisition module 1608814, the first object list acquisition module 1608816, the first object attribute value acquisition module 1608818, the second object attribute value acquisition module 1608820, the second object list acquisition module 1608822, the third object attribute value acquisition module 1608824, the first string object acquisition module 1608826, and the first string object value acquisition module 1608828.

[0172] The target configuration file acquisition module 1602 can be used to acquire the target configuration file to be processed, which includes a list of targets in the target region.

[0173] The target parsing domain-specific language text acquisition module 1604 can be used to acquire the target parsing domain-specific language text of the target configuration file, which is a structured format of the target list of the target region.

[0174] The Target Parsing Domain-Specific Language Text Compilation Module 1606 can be used to compile Target Parsing Domain-Specific Language Text to obtain Target Parsing Configuration Processing Code.

[0175] The structured transformation module 1608 can be used to run the target parsing configuration processing code, which transforms the target list of the target region into a structured representation according to the structured format of the target list of the target region, so as to obtain the target structured configuration file of the target configuration file.

[0176] The target area name information acquisition module 16082 can be used to obtain the name information of the target area.

[0177] The structured format acquisition module 16084 can be used to obtain the structured format of the target list of the target region based on the name information of the target region.

[0178] The target attribute value acquisition module 16086 can be used to obtain multiple target attribute values ​​of a target attribute from the target list of a target region according to the structured format of the target list of the target region.

[0179] The target region may include a first target region, the name information of the target region may include the name of the first target region, the structured format of the target list of the target region may include the structured format of the first target list corresponding to the name of the first target region, the structured format of the first target list may include the name of the first target attribute and the separator of the first attribute value, the multiple target attribute values ​​of the target attribute may include multiple first target attribute values ​​of the first target attribute, the target list of the target region may include the name of the first target attribute in the first target region and the list of its corresponding first target attribute values, and the multiple first target attribute values ​​in the list of first target attribute values ​​are separated by the separator of the first attribute value.

[0180] The first target attribute name acquisition module 160862 can be used to obtain the first target attribute name in the first target region from the target list of the target region.

[0181] The first target attribute value acquisition module 160864 can be used to obtain multiple first target attribute values ​​corresponding to the first target attribute name from the first target attribute value list, based on the first attribute value separator.

[0182] The target region may include a second target region. The name information of the target region may include the name of the second target region. The structured format of the target list of the target region may include the structured format of the second target list corresponding to the name of the second target region. The structured format of the second target list may include the name of the second target attribute, the second attribute value separator, and the sub-attribute value separator. Multiple target attribute values ​​of the target attribute may include multiple first sub-attribute values ​​and multiple second sub-attribute values ​​of the second target attribute. The target list of the target region may include the name of the second target attribute in the second target region and its corresponding list of second target attribute values. Multiple sub-attribute groups corresponding to the name of the second target attribute in the list of second target attribute values ​​are separated by the second attribute value separator. The first sub-attribute value and the second sub-attribute value in the sub-attribute group are separated by the sub-attribute value separator.

[0183] The second target attribute name acquisition module 160866 can be used to obtain the second target attribute name in the second target region from the target list of the target region.

[0184] The sub-attribute group acquisition module 160868 can be used to obtain multiple sub-attribute groups corresponding to the second target attribute name from the second target attribute value list, based on the second attribute value separator.

[0185] The sub-attribute value acquisition module 1608610 can be used to obtain the first sub-attribute value and the second sub-attribute value for each sub-attribute group in multiple sub-attribute groups, based on the sub-attribute value separator.

[0186] The target region may include a third target region. The name information of the target region may include the name of the third target region. The structured format of the target list of the target region may include the structured format of the third target list corresponding to the name of the third target region. The structured format of the third target list may include a target attribute name fragment. The multiple target attribute values ​​of the target attribute may include multiple third target attribute values ​​corresponding to multiple third target attributes and multiple fourth target attribute values ​​corresponding to multiple fourth target attributes. The target list of the target region may include multiple third target attribute names and corresponding multiple fourth target attribute values ​​in the third target region. The third target attribute name may include a target attribute name fragment.

[0187] The third target attribute value acquisition module 1608612 can be used to obtain the third target attribute value in the third target area from multiple third target attribute names in the target list of the target area based on the target attribute name fragment.

[0188] The fourth target attribute value acquisition module 1608614 can be used to obtain the fourth target attribute value corresponding to the third target attribute value from the target list of the target area.

[0189] The target region may include multiple fourth target regions. The name information of the target region may include the name of the fourth target region. The name of the fourth target region may include a fragment of the name of the target region. The structured format of the target list of the target region may include the structured format of the fourth target list corresponding to the fragment of the name of the target region. The structured format of the fourth target list may include the fragment of the name of the target region and the name of the fifth target attribute. The multiple target attribute values ​​of the target attribute may include the fifth target attribute values ​​in multiple fourth target regions. The target list of the target region may include the fifth target attribute names and the corresponding fifth target attribute values ​​corresponding to the names of multiple fourth target regions.

[0190] The fifth target attribute name acquisition module 1608616 can be used to obtain the fifth target attribute name in the fourth target region from the target list of the target region based on the target region name fragment.

[0191] The fifth target attribute value acquisition module 1608618 can be used to obtain the fifth target attribute value corresponding to the fifth target attribute name from the target list of the target area.

[0192] The structured representation acquisition module 16088 can be used to obtain a structured representation based on the name information of the target region, the target attributes, and multiple target attribute values.

[0193] The first target class object acquisition module 160882 can be used to obtain the first target region as an object of the first target class based on the name of the first target region.

[0194] The module 160884, which obtains the first string list object, can be used to obtain the first string list object in the first target class based on the first target attribute name.

[0195] The module 160886 for obtaining the value of the first string list object can be used to take multiple first target attribute values ​​as the values ​​of the first string list object corresponding to the first string list object, thereby obtaining a structured representation.

[0196] The second target class object acquisition module 160888 can be used to obtain the second target region as an object of the second target class based on the name of the second target region.

[0197] The second string list object acquisition module 1608810 can be used to obtain the second string list object in the object of the second target class based on the second target attribute name.

[0198] The second string list object value acquisition module 1608812 can be used to obtain a structured representation by taking the first sub-attribute value and the second sub-attribute value as the values ​​corresponding to the first and second sub-attributes in the second string list object, respectively.

[0199] The structured format of the third target list can also include the format of the first object attribute and the second object attribute in the first object list of objects of the third target class.

[0200] The third target class object acquisition module 1608814 can be used to obtain the third target region as an object of the third target class based on the name of the third target region.

[0201] The first object list acquisition module 1608816 can be used to obtain the third target attribute as the first object list based on the third target attribute name.

[0202] The first object attribute value acquisition module 1608818 can be used to obtain the first object attribute value from the third target attribute name in the first object list according to the first object attribute format.

[0203] The second object attribute value acquisition module 1608820 can be used to obtain a structured representation by using the fourth target attribute value as the second object attribute value in the first object list according to the second object attribute format.

[0204] The structured format of the fourth target list may also include the third object attribute format and the fifth target attribute name from the second object list.

[0205] The second object list acquisition module 1608822 can be used to obtain the fourth target region as the second object list based on the name of the fourth target region.

[0206] The third object attribute value acquisition module 1608824 can be used to obtain the third object attribute value from the second object list based on the third object attribute format from the fourth target area name.

[0207] The first string object acquisition module 1608826 can be used to obtain the fifth target attribute as the first string object in the second object list based on the fifth target attribute name.

[0208] The first string object value acquisition module 1608828 can be used to obtain a structured representation by taking the fifth target attribute value as the first string object value corresponding to the first string object.

[0209] Figure 17 This is a block diagram illustrating a serialization processing apparatus according to an exemplary embodiment. Figure 17 The device shown corresponds to the above. Figure 13 The serialization processing method shown can be integrated into... Figure 16 In the device shown.

[0210] refer to Figure 17The apparatus 170 provided in this embodiment may include a target serialization domain-specific language text acquisition module 1702, a target serialization domain-specific language compilation module 1704, a target configuration change information acquisition module 1706, a structured configuration file change module 1708, and a serialization conversion module 1710.

[0211] The target serialization domain-specific language text acquisition module 1702 can be used to obtain the target serialization domain-specific language text of the target configuration file based on the target parsing domain-specific language text of the target configuration file.

[0212] The Target Serialization Domain-Specific Language Compiler Module 1704 can be used to compile Target Serialization Domain-Specific Language text to obtain Target Serialization processing code.

[0213] The target configuration change information acquisition module 1706 can be used to acquire target configuration change information, which includes the changed target attribute values.

[0214] The structured configuration file modification module 1708 can be used to replace the target attribute values ​​in the target list of the target region represented in the target structured configuration file with the modified target attribute values ​​to obtain the modified structured configuration file. The modified structured configuration file includes the target list of the target region represented in the modified structure.

[0215] The serialization conversion module 1710 can be used to run target serialization processing code to convert the target list of the target region in the modified structured representation into the modified target list of the target region in order to obtain the modified target configuration file.

[0216] The specific implementation of each module in the device provided in this embodiment can be referred to the content of the above method, and will not be repeated here.

[0217] Figure 18 A schematic diagram of the structure of an electronic device according to an embodiment of this disclosure is shown. It should be noted that... Figure 18 The devices shown are merely examples of computer systems and should not be construed as limiting the functionality and scope of use of the embodiments disclosed herein.

[0218] like Figure 18As shown, device 1800 includes a central processing unit (CPU) 1801, which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 1802 or a program loaded from storage section 1808 into random access memory (RAM) 1803. The RAM 1803 also stores various programs and data required for the operation of device 1800. CPU 1801, ROM 1802, and RAM 1803 are interconnected via bus 1804. Input / output (I / O) interface 1805 is also connected to bus 1804.

[0219] The following components are connected to I / O interface 1805: an input section 1806 including a keyboard, mouse, etc.; an output section 1807 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 1808 including a hard disk, etc.; and a communication section 1809 including a network interface card such as a LAN card, modem, etc. The communication section 1809 performs communication processing via a network such as the Internet. A drive 1810 is also connected to I / O interface 1805 as needed. Removable media 1811, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., are installed on drive 1810 as needed so that computer programs read from them can be installed into storage section 1808 as needed.

[0220] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 1809, and / or installed from removable medium 1811. When the computer program is executed by central processing unit (CPU) 1801, it performs the functions defined above in the system of this disclosure.

[0221] It should be noted that the computer-readable medium disclosed herein may be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium may be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media can also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.

[0222] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0223] The modules described in the embodiments of this disclosure can be implemented in software or hardware. The described modules can also be housed in a processor; for example, a processor can be described as including a target configuration file acquisition module, a target domain-specific language text acquisition module, a target domain-specific language text compilation module, and a structured conversion module. The names of these modules do not necessarily limit the module itself; for example, the target configuration file acquisition module can also be described as "a module for acquiring a target configuration file to be structured."

[0224] This disclosure also provides a computer-readable medium, which may be included in the device described in the above embodiments; or it may exist independently and not assembled into the device. The computer-readable medium carries one or more programs, which, when executed by the device, cause the device to include: Obtain the target configuration file to be processed, which includes a target list of target regions; obtain the target parsing domain-specific language text of the target configuration file, which configures the structured format of the target list of target regions; compile the target parsing domain-specific language text to obtain the target parsing configuration processing code; run the target parsing configuration processing code to convert the target list of target regions into a structured representation according to the structured format of the target list of target regions, so as to obtain the target structured configuration file of the target configuration file.

[0225] This disclosure provides a computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the methods provided in the various optional implementations described above.

[0226] Exemplary embodiments of this disclosure have been specifically shown and described above. It should be understood that this disclosure is not limited to the detailed structures, arrangements, or implementations described herein; rather, this disclosure is intended to cover various modifications and equivalent arrangements contained within the spirit and scope of the appended claims.

Claims

1. A data processing method, characterized in that, include: Obtain the target configuration file to be processed, the target configuration file including a list of targets in the target region; Obtain the target parsing domain-specific language text of the target configuration file. The target parsing domain-specific language text configures the structured format of the target list. The structured format is used to identify the target attribute names and target attribute values ​​in the target list. Compile the target parsing domain-specific language text to obtain the target parsing configuration processing code; Run the target parsing configuration processing code to extract the target attribute name and target attribute value corresponding to the structured format from the target list, and convert the target list into a structured representation with the target attribute name and target attribute value constructed according to the structured format, so as to obtain the target structured configuration file of the target configuration file.

2. The method according to claim 1, characterized in that, Extracting the target attribute name and target attribute value corresponding to the structured format from the target list, and converting the target list into a structured representation constructed according to the structured format, containing the target attribute name and target attribute value, includes: Obtain the name information of the target area; Based on the name information of the target region, obtain the structured format of the target list of the target region; According to the structured format of the target list of the target region, obtain multiple target attribute values ​​of the target attribute from the target list of the target region; The structured representation is obtained based on the name information of the target region, the name of the target attribute, and the values ​​of the multiple target attributes.

3. The method according to claim 2, characterized in that, The target region includes a first target region, the name information of the target region includes the name of the first target region, and the structured format of the target list of the target region includes the structured format of the first target list corresponding to the name of the first target region; The structured format of the first target list includes a first target attribute name and a first attribute value separator, and the multiple target attribute values ​​of the target attribute include multiple first target attribute values ​​of the first target attribute; The target list of the target area includes the first target attribute name and its corresponding first target attribute value list in the first target area, and the multiple first target attribute values ​​in the first target attribute value list are separated by the first attribute value separator. According to the structured format of the target list of the target region, obtain multiple target attribute values ​​of the target attribute from the target list of the target region, including: Obtain the first target attribute name in the first target area from the target list of the target area; From the first target attribute value list, based on the first attribute value separator, obtain multiple first target attribute values ​​corresponding to the first target attribute name.

4. The method according to claim 3, characterized in that, Based on the name information of the target region, the target attributes, and the multiple target attribute values, the structured representation is obtained, including: Based on the name of the first target region, the first target region is taken as an object of the first target class; Based on the first target attribute name, the first target attribute is used as the first string list object in the object of the first target class; The structured representation is obtained by using the multiple first target attribute values ​​as the values ​​of the first string list object corresponding to the first string list object.

5. The method according to claim 2, characterized in that, The target region includes a second target region, the name information of the target region includes the name of the second target region, and the structured format of the target list of the target region includes the structured format of the second target list corresponding to the name of the second target region; The structured format of the second target list includes a second target attribute name, a second attribute value separator, and a sub-attribute value separator. The multiple target attribute values ​​of the target attribute include multiple first sub-attribute values ​​and multiple second sub-attribute values ​​of the second target attribute. The target list of the target area includes the second target attribute name and its corresponding second target attribute value list in the second target area; In the second target attribute value list, multiple sub-attribute groups corresponding to the second target attribute name are separated by the second attribute value separator, and the first sub-attribute value and the second sub-attribute value in the sub-attribute group are separated by the sub-attribute value separator. According to the structured format of the target list of the target region, obtain multiple target attribute values ​​of the target attribute from the target list of the target region, including: Obtain the second target attribute name in the second target area from the target list of the target area; From the second target attribute value list, based on the second attribute value separator, obtain multiple sub-attribute groups corresponding to the second target attribute name; For each of the plurality of sub-attribute groups, the first sub-attribute value and the second sub-attribute value are obtained according to the sub-attribute value separator.

6. The method according to claim 5, characterized in that, Based on the name information of the target region, the target attributes, and the multiple target attribute values, the structured representation is obtained, including: Based on the name of the second target region, the second target region is treated as an object of the second target class; Based on the second target attribute name, the second target attribute is used as the second string list object in the object of the second target class; The first sub-attribute value and the second sub-attribute value are respectively used as the values ​​of the first sub-attribute and the second sub-attribute in the second string list object to obtain the structured representation.

7. The method according to claim 2, characterized in that, The target area includes a third target area, and the name information of the target area includes the name of the third target area; The structured format of the target list of the target region includes the structured format of the third target list corresponding to the name of the third target region, and the structured format of the third target list includes target attribute name fragments; The multiple target attribute values ​​of the target attribute include multiple third target attribute values ​​corresponding to multiple third target attributes and multiple fourth target attribute values ​​corresponding to multiple fourth target attributes; The target list of the target region includes multiple third target attribute names and corresponding multiple fourth target attribute values ​​in the third target region, wherein the third target attribute name includes a fragment of the target attribute name; According to the structured format of the target list of the target region, obtain multiple target attribute values ​​of the target attribute from the target list of the target region, including: Based on the target attribute name fragment, the value of the third target attribute in the third target region is obtained from multiple third target attribute names in the target list of the target region; From the target list of the target area, obtain the fourth target attribute value corresponding to the third target attribute value.

8. The method according to claim 7, characterized in that, The structured format of the third target list also includes the first object attribute format and the second object attribute format in the first object list of the third target class; Based on the name information of the target region, the target attributes, and the multiple target attribute values, the structured representation is obtained, including: Based on the name of the third target region, the third target region is used as an object of the third target class; Based on the name of the third target attribute, the third target attribute is used as the first object list; Based on the first object attribute format, obtain the first object attribute value from the third target attribute name in the first object list; Based on the second object attribute format, the fourth target attribute value is used as the second object attribute value in the first object list to obtain the structured representation.

9. The method according to claim 2, characterized in that, The target region includes multiple fourth target regions, and the name information of the target region includes the name of the fourth target region, which includes a fragment of the target region name. The structured format of the target list of the target region includes the structured format of the fourth target list corresponding to the target region name fragment, and the structured format of the fourth target list includes the target region name fragment and the fifth target attribute name; The multiple target attribute values ​​of the target attribute include the fifth target attribute values ​​in the multiple fourth target regions, and the target list of the target regions includes the fifth target attribute names and corresponding fifth target attribute values ​​corresponding to the names of the multiple fourth target regions. According to the structured format of the target list of the target region, obtain multiple target attribute values ​​of the target attribute from the target list of the target region, including: Based on the target region name fragment, obtain the fifth target attribute name in the fourth target region from the target list of the target region; From the target list of the target area, obtain the fifth target attribute value corresponding to the fifth target attribute name.

10. The method according to claim 9, characterized in that, The structured format of the fourth target list also includes the third object attribute format and the fifth target attribute name in the second object list; Based on the name information of the target region, the target attributes, and the multiple target attribute values, the structured representation is obtained, including: Based on the name of the fourth target region, the fourth target region is used as the second object list; Based on the third object attribute format, obtain the third object attribute value from the second object list from the fourth target region name; Based on the name of the fifth target attribute, the fifth target attribute is used as the first string object in the second object list; The fifth target attribute value is used as the first string object value corresponding to the first string object to obtain the structured representation.

11. The method according to claim 2, characterized in that, Also includes: Based on the target parsed domain-specific language text of the target configuration file, obtain the target serialized domain-specific language text of the target configuration file; Compile the target serialization domain-specific language text to obtain the target serialization processing code; Obtain target configuration change information, which includes changed target attribute values; Replace the target attribute values ​​in the target list of the target region represented in the structured configuration file with the changed target attribute values ​​to obtain the modified structured configuration file. The modified structured configuration file includes the target list of the target region represented in the modified structure. Run the target serialization processing code to convert the target list of the target region in the modified structured representation into the modified target list of the target region, so as to obtain the modified target configuration file.

12. A data processing apparatus, characterized in that, include: The target configuration file acquisition module is used to acquire the target configuration file to be processed, wherein the target configuration file includes a target list of the target region; The target parsing domain-specific language text acquisition module is used to acquire the target parsing domain-specific language text of the target configuration file. The target parsing domain-specific language text configures the structured format of the target list. The structured format is used to identify the target attribute names and target attribute values ​​in the target list. A target parsing domain-specific language text compilation module is used to compile the target parsing domain-specific language text to obtain target parsing configuration processing code; The structured transformation module is used to run the target parsing configuration processing code, extract the target attribute name and the target attribute value corresponding to the structured format from the target list, and transform the target list into a structured representation constructed according to the structured format, which has the target attribute name and the target attribute value, so as to obtain the target structured configuration file of the target configuration file.

13. An electronic device, comprising: A memory, a processor, and executable instructions stored in the memory and executable in the processor, characterized in that the processor, when executing the executable instructions, implements the method as described in any one of claims 1-11.

14. A computer-readable storage medium having computer-executable instructions stored thereon, characterized in that, When the executable instructions are executed by the processor, they implement the method as described in any one of claims 1-11.

15. A computer program product comprising a computer program / instructions, characterized in that, When the computer program / instructions are executed by the processor, they implement the method as described in any one of claims 1-11.

Citation Information

Patent Citations

  • Data conversion method and device based on DSL

    CN113656475A