Configuration file updating method and device based on natural language, equipment and medium

By building a target graph and using a language model to generate code, the problem of inaccurate configuration parameter positioning in natural language processing is solved, and the accuracy and reliability of configuration file updates are achieved.

CN120743331APending Publication Date: 2025-10-03PING AN HEALTH INSURANCE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510837904.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-20
Publication Date
2025-10-03

AI Technical Summary

Technical Problem

In the prior art, due to the ambiguity of natural language, it is difficult for a computer system to accurately locate the configuration parameters that need to be updated, resulting in poor accuracy in updating the configuration parameters.

Method used

Build a target graph, use the parameter groups in the configuration file as nodes, filter the target nodes and related nodes based on natural language requests, generate code through the language model to update the configuration file, and use the topological relationship of the related nodes to reduce positioning errors.

Benefits of technology

Improves the accuracy and reliability of configuration file updates, reduces configuration parameter positioning errors caused by natural language ambiguity, and ensures the consistency of configuration files with topological relationships in multiple environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120743331A_ABST
    Figure CN120743331A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a configuration file updating method and device based on a natural language, equipment and a medium, and can be applied to financial science and technology scenes and medical science and technology scenes, the method comprises the following steps: constructing a target graph based on a configuration file, in the target graph, taking a first parameter group as a first node and taking a first parameter as a second node, a first edge is configured between the first node and the second node, and the first edge indicates that the first parameter is stored in the first parameter group; obtaining a request configuration updating request based on a natural language to screen out a target node from the second nodes; based on the target node, screening out an associated node from the first node; wherein a first edge is connected between the associated node and the target node; on the basis of the association node, code generation is performed through a language model to obtain a target code; and updating the configuration file through the target code. According to the embodiment, the configuration file updating accuracy can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of natural language processing technology, and is applicable to financial technology scenarios and medical technology scenarios, and in particular to a configuration file updating method and apparatus, device and medium based on natural language. Background Art

[0002] Configuration parameters are configurable elements defined during the software development and maintenance process to manage and control the various components of a software system. As business evolves, the functionality and behavior of a software system need to be adjusted. Updating configuration parameters can flexibly change the software's behavior, adjusting or expanding its functionality. For example, in a fintech scenario, when a user needs to enable a large-amount transfer reminder in a bank system, they can use natural language to request this feature from a voice assistant. The voice assistant uses natural language processing technology to understand the request and automatically updates the reminder configuration parameters in the bank system backend. This can include adding the user account to a monitoring list, setting a minimum amount to trigger the reminder, and setting the reminder push channel to SMS. Another example is in a healthcare scenario, when medical staff need to update the drug inventory warning threshold in a hospital system, they can use natural language to request this feature from a voice assistant. The voice assistant uses natural language processing technology to understand the request and automatically updates the inventory warning configuration parameters in the hospital system backend.

[0003] Related technologies use natural language processing to translate user natural language requests into tasks that a computer system can understand and execute, thereby updating configuration parameters. However, due to the ambiguity of natural language, computer systems struggle to accurately locate the configuration parameters that require updating. This can lead to incorrect updates of unneeded parameters, resulting in poor accuracy in configuration parameter updates. Summary of the Invention

[0004] The main purpose of the embodiments of the present application is to provide a configuration file updating method, apparatus, device, and medium based on natural language, aiming to improve the accuracy of configuration file updating.

[0005] To achieve the above objectives, a first aspect of an embodiment of the present application proposes a configuration file updating method based on natural language, the method comprising:

[0006] Obtain a configuration file, where the configuration file stores a first parameter group, and the first parameter group stores a first parameter;

[0007] Based on the configuration file, a target graph is constructed; wherein the target graph includes a first node and a second node, the first parameter group is used as the first node, the first parameter is used as the second node, and a first edge is configured between the first node and the second node, the first edge indicating that the first parameter is stored in the first parameter group;

[0008] Obtain a configuration update request; the configuration update request is a natural language-based request;

[0009] Based on the configuration update request, filtering the target node from the second node;

[0010] Based on the target node, a related node is selected from the first node; wherein a first edge is connected between the related node and the target node;

[0011] Based on the associated nodes, code is generated through the language model to obtain the target code;

[0012] Update the configuration file through the target code.

[0013] To achieve the above-mentioned purpose, a second aspect of an embodiment of the present application provides a configuration file updating device based on natural language, the device comprising:

[0014] A configuration file acquisition module is used to acquire a configuration file, wherein the configuration file stores a first parameter group, and the first parameter group stores a first parameter;

[0015] A target graph construction module is configured to construct a target graph based on the configuration file; wherein the target graph includes a first node and a second node, wherein the first parameter group is used as the first node, the first parameter is used as the second node, and a first edge is configured between the first node and the second node, wherein the first edge indicates that the first parameter is stored in the first parameter group;

[0016] A configuration update request acquisition module is used to obtain a configuration update request; the configuration update request is a request based on natural language;

[0017] A target node screening module, configured to screen a target node from the second node based on the configuration update request;

[0018] An associated node screening module, configured to screen associated nodes from the first node based on the target node; wherein a first edge is connected between the associated node and the target node;

[0019] A code generation module is used to generate code based on associated nodes using a language model to obtain target code;

[0020] The configuration file update module is used to update the configuration file through the target code.

[0021] To achieve the above-mentioned purpose, the third aspect of an embodiment of the present application proposes an electronic device, which includes a memory and a processor, the memory stores a computer program, and the processor implements the method of the above-mentioned first aspect when executing the computer program.

[0022] To achieve the above-mentioned purpose, the fourth aspect of the embodiments of the present application proposes a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the method of the above-mentioned first aspect.

[0023] The natural language-based configuration file update method, apparatus, device, and medium proposed in the present application construct a target graph based on the configuration file, wherein the target graph has a first parameter group as a first node, a first parameter as a second node, and a first edge configured between the first node and the second node. The first edge indicates that the first parameter is stored in the first parameter group, and the resulting target graph reflects the topological relationship between the first parameter group and the first parameter; based on the configuration update request, a target node related to the configuration update request is screened out from the second node; based on the target node, an associated node connected to the target node by a first edge is screened out from the first node, and the first parameter group can be reversely located through the first edge; based on the associated node, code is generated through a language model to obtain a target code, and the associated node, as a semantic constraint, provides the language model with a topological relationship between the first parameter and the first parameter group, thereby reducing configuration parameter positioning errors caused by natural language ambiguity and improving the accuracy of configuration file updates. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] Figure 1 is a flow chart of the method provided in an embodiment of the present application;

[0025] Figure 2 is another flow chart of the method provided in an embodiment of the present application;

[0026] Figure 3 yes Figure 1 Flowchart of step S103 in FIG.

[0027] Figure 4 yes Figure 1 Flowchart of step S104 in FIG.

[0028] Figure 5 yes Figure 1 Flowchart of step S107 in FIG.

[0029] Figure 6 yes Figure 5 Flowchart of step S502 in FIG.

[0030] Figure 7 is another flow chart of the method provided in the embodiment of the present application;

[0031] Figure 8 is a schematic structural diagram of the device provided in an embodiment of the present application;

[0032] Figure 9 This is a schematic diagram of the hardware structure of the electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0033] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.

[0034] It should be noted that although the device schematics illustrate functional module divisions and the flowcharts illustrate logical sequences, in certain circumstances, the steps shown or described may be performed in a sequence that differs from the module divisions in the device or the sequence in the flowcharts. The terms "first," "second," and so on, in the specification, claims, and drawings, are used to distinguish similar items and are not necessarily used to describe a specific sequence or precedence.

[0035] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which this application pertains. The terms used herein are for the purpose of describing the embodiments of this application only and are not intended to limit this application.

[0036] First, let’s analyze some of the terms used in this application:

[0037] Artificial intelligence (AI) is a new technical discipline that studies and develops theories, methods, technologies, and application systems for simulating, extending, and expanding human intelligence. A branch of computer science, AI seeks to understand the essence of intelligence and produce new intelligent machines that can respond in a manner similar to human intelligence. Research in this field includes robotics, speech recognition, image recognition, natural language processing, and expert systems. AI can simulate the information processes of human consciousness and thinking. It also encompasses the theories, methods, technologies, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, to perceive the environment, acquire knowledge, and use that knowledge to achieve optimal results.

[0038] Natural Language Processing (NLP): A core branch of artificial intelligence, NLP aims to enable machines to parse and generate natural language, encompassing grammatical analysis, semantic reasoning, and contextual understanding. The NLP technology stack includes lexical analysis (such as word segmentation), syntactic parsing (dependencies), and semantic modeling (entity recognition and intent classification).

[0039] Code Generation (CG): refers to the automatic generation of executable code through algorithms, usually relying on pre-trained models (such as LLM) or template engines. Its goal is to convert abstract natural language descriptions into specific programming language instructions.

[0040] A configuration file (CF) is a computer file that typically stores configuration parameters in text format, such as XML, YAML, and JSON. Configuration files are used to decouple code from configuration parameters, allowing program behavior to be dynamically adjusted through the configuration file, eliminating the maintenance costs associated with hard-coding. For example, database connection information, user preferences, or interface parameters can all be dynamically loaded through the configuration file.

[0041] Related technologies use natural language processing to translate user natural language requests into tasks that a computer system can understand and execute, thereby updating configuration parameters. However, due to the ambiguity of natural language, computer systems struggle to accurately locate the configuration parameters that require updating. This can lead to incorrect updates of unneeded parameters, resulting in poor accuracy in configuration parameter updates.

[0042] Based on this, embodiments of the present application provide a configuration file updating method, apparatus, device, and medium based on natural language, aiming to improve the accuracy of configuration file updating.

[0043] The natural language-based configuration file updating method, apparatus, device, and medium provided in the embodiments of the present application are specifically described through the following embodiments. First, the natural language-based configuration file updating method in the embodiments of the present application is described.

[0044] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Artificial Intelligence (AI) is the theory, method, technology, and application system that uses digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use knowledge to achieve optimal results.

[0045] Fundamental AI technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, operating / interaction systems, and mechatronics. AI software technologies primarily encompass computer vision, robotics, biometrics, speech processing, natural language processing, and machine learning / deep learning.

[0046] A configuration file update method based on natural language provided in an embodiment of the present application relates to the field of equipment operation and maintenance technology. A configuration file update method based on natural language provided in an embodiment of the present application can be applied in a terminal, can also be applied in a server side, and can also be software running in a terminal or a server side. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, etc.; the server side can be configured as an independent physical server, or as a server cluster or distributed system composed of multiple physical servers, or as a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms; the software can be an application that implements a configuration file update method based on natural language, etc., but is not limited to the above forms.

[0047] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, and the like. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, and the like that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments in which tasks are performed by remote processing devices connected via a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media, including storage devices.

[0048] It should be noted that in each specific embodiment of the present application, when it comes to the need to perform relevant processing based on data related to user identity or characteristics such as user information, user behavior data, user historical data, and user location information, the user's permission or consent will be obtained first, and the collection, use, and processing of these data will comply with relevant laws, regulations, and standards. In addition, when the embodiment of the present application needs to obtain the user's sensitive personal information, the user's separate permission or consent will be obtained through a pop-up window or by jumping to a confirmation page. After clearly obtaining the user's separate permission or consent, the necessary user-related data for the normal operation of the embodiment of the present application will be obtained. The non-Company's software tools or components that appear in the embodiments of the present application are merely examples and do not represent actual use.

[0049] Figure 1This is an optional flowchart of the method provided in the embodiment of the present application. Figure 1 The method may include but is not limited to steps S101 to S107.

[0050] Step S101, obtaining a configuration file, wherein the configuration file stores a first parameter group, and the first parameter group stores a first parameter;

[0051] Step S102: constructing a target graph based on the configuration file; wherein the target graph includes a first node and a second node, wherein the first parameter group is used as the first node, the first parameter is used as the second node, and a first edge is configured between the first node and the second node, wherein the first edge indicates that the first parameter is stored in the first parameter group;

[0052] Step S103: Obtain a configuration update request; the configuration update request is a natural language-based request;

[0053] Step S104: based on the configuration update request, filter out the target node from the second node;

[0054] Step S105: Based on the target node, select associated nodes from the first node; wherein a first edge is connected between the associated node and the target node;

[0055] Step S106: Based on the associated nodes, code generation is performed using a language model to obtain a target code;

[0056] Step S107: Update the configuration file through the target code.

[0057] It's easy to understand that configuration parameters are grouped according to their functions in the configuration file. For example, in a fintech scenario, the payment system's configuration file might store a first parameter group, "Database," for storing database configuration parameters, and a first parameter group, "API," for storing gateway configuration parameter groups. The first parameter group, "Database," might store the following: a first parameter, "host:127.0.0.1," for storing the database server's network address; a first parameter, "port:3306," for storing the database server's listening port number; a first parameter, "timeout:5s," for limiting the database connection establishment wait time to a maximum of 5 seconds; and a first parameter group, "API," for limiting the gateway's request processing time to a maximum of 30 seconds.

[0058] For easy understanding, in the target graph, the first parameter group is the first node, the first parameter is the second node, and the first edge indicates that the first parameter is stored in the first parameter group. Thus, the target graph can represent the topological structure between the first parameter group and the first parameter in the configuration file. For easy understanding, the node attributes of the first node can include, but are not limited to, the parameter group name and function of the first parameter group. The node attributes of the second node can include, but are not limited to, the parameter name, function, and validation rules of the first parameter.

[0059] It is easy to understand that the target node is the second node related to the configuration update request, and the associated node is the first node connected to the target node through the first edge. For example, when the configuration update request is to modify the database server address, the target node can be host and the associated node can be Database. For another example, when the configuration update request is to adjust the interface timeout to 45 seconds, two similar second nodes timeout are retrieved in the target graph according to the configuration update request, which are connected to the first node Database and API respectively. The language model can perform reasoning based on the configuration update request, select API as the associated node and timeout as the target node, to generate the executable code config.set('API.timeout',45) for adjusting the interface timeout to 45 seconds.

[0060] In steps S101 to S107 shown in the embodiment of the present application, a target graph is constructed based on the configuration file. The target graph uses the first parameter group as the first node, the first parameter as the second node, and a first edge is configured between the first node and the second node. The first edge indicates that the first parameter is stored in the first parameter group. The obtained target graph reflects the topological relationship between the first parameter group and the first parameter; based on the configuration update request, the target node related to the configuration update request is filtered out from the second node; based on the target node, the associated node connected to the target node by the first edge is filtered out from the first node, and the first parameter group can be reversely located through the first edge; based on the associated node, code is generated through the language model to obtain the target code. The associated node provides the language model with the topological relationship between the first parameter and the first parameter group as a semantic constraint, thereby reducing the configuration parameter positioning error caused by the ambiguity of natural language and improving the accuracy of the configuration file update.

[0061] In step S101 of some embodiments, the configuration file of the software system may be obtained through a file path preset by the software system, or through a file path specified by the user, without limitation thereto.

[0062] In step S101 of some embodiments, the configuration file stores several first parameter groups. These first parameter groups may be in a parent-child relationship, i.e., a parent first parameter group stores at least one child first parameter group. A second edge may be constructed between second nodes, indicating the existence of a parent-child relationship between the first parameter groups. After step S105, a second node connected to the associated node via the second edge may be obtained as a connected node. The connected node and the associated node are input into a language model for code generation to obtain target code. The connected nodes, acting as semantic constraints, provide the language model with the topological relationships between different first parameter groups, further improving the accuracy of configuration file updates.

[0063] For example, the operating system's configuration file stores a parent first parameter group, network, for storing network-related configuration parameters; the parent first parameter group stores a child first parameter group, interfaces, and a child first parameter group, dns. The child first parameter group, interfaces, is used to store network interface configuration parameters, including the first parameter name:eth0, for specifying the interface name, the first parameter subnet_mask:255.255.255.0, for specifying the subnet mask, and the first parameter routing, for configuring routing rules. The child first parameter group dns is used to store DNS server configuration parameters, including the first parameter nameservers, for specifying the DNS server address list, and the first parameter search, for specifying the DNS search domain. Assuming the target node is nameservers, the associated node is dns, and the connected node is network. Nameservers-dns-network is input into the language model, and the generated target code is used to modify the DNS server address list.

[0064] In step S102 of some embodiments, the first node, the second node, and the first edge can be imported into a graph database to obtain a target graph; or the first node, the second node, and the first edge can be stored in an adjacency table to obtain a target graph; this is not limited to this.

[0065] See also Figure 2 In some embodiments, after step S102, the configuration file updating method based on natural language further includes but is not limited to steps S201 to S203:

[0066] Step S201: constructing a third node and a fourth node in the target graph based on the second parameter group; wherein the second parameter group is used as the third node and the second parameter is used as the fourth node;

[0067] Step S202: merging the first node and the third node to obtain an updated first node;

[0068] Step S203: Merge the second node and the fourth node to obtain an updated second node.

[0069] It is easy to understand that in the software development life cycle, independent environments are usually configured at different stages such as development, testing, and deployment, and configuration parameters are defined for each environment. The same configuration parameter has different parameter values ​​in different environments. When switching environments, the configuration parameter values ​​of the next environment are used to overwrite the configuration parameter values ​​of the current environment. In the embodiment of the present application, the first parameter and the second parameter are effective in different environments, with the same parameter name and different parameter values.

[0070] For example, in a fintech scenario, the first parameter group in an e-commerce system may be a development environment parameter group, storing a first parameter TRANSACTION_TIMEOUT_MS=200, which is used to limit the maximum allowable processing time of a single payment transaction to 200ms; the second parameter group may be a production environment parameter group, storing a second parameter RANSACTION_TIMEOUT_MS=3000, which is used to limit the maximum allowable processing time of a single payment transaction to 3000ms. For another example, in a medical technology scenario, the first parameter group in a medical information management system may be a test environment parameter group, storing a first parameter DICOM_IMAGE_QUALITY=LOW, which is used to control the compression quality level of medical images (DICOM) during storage or transmission to LOW; the second parameter group may be a deployment environment parameter group, storing a second parameter DICOM_IMAGE_QUALITY=HIGH, which is used to control the compression quality level of medical images (DICOM) during transmission to HIGH.

[0071] It is easy to understand that the node attributes of the third node may include, but are not limited to, the parameter group name of the second parameter group, the second parameter group effective environment, and the second parameter group function. The node attributes of the fourth node may include, but are not limited to, the parameter name of the second parameter, the second parameter effective environment, the second parameter function, and the verification rule.

[0072] In some embodiments, in step S202, the node attributes of the third node may be directly added to the node attributes of the first node to merge the first and third nodes to obtain an updated first node. Alternatively, after adding the node attributes of the third node, the node attributes with the same attribute values ​​may be overwritten, without limitation. The updated first node may include, without limitation, the parameter group name of the first parameter group, the first parameter group's effective environment, the parameter group name of the second parameter group, the second parameter group's effective environment, and the like.

[0073] In some embodiments, in step S203, the node attributes of the fourth node may be directly added to the node attributes of the second node to merge the second and fourth nodes to obtain an updated second node. Alternatively, after adding the node attributes of the fourth node, the node attributes with the same attribute values ​​may be overwritten, without limitation. The updated second node may include, without limitation, the parameter name of the first parameter, the first parameter's effective environment, the parameter name of the second parameter, the second parameter's effective environment, and the like.

[0074] In steps S201 to S203 shown in the embodiment of the present application, although the first parameter and the second parameter have different parameter values, the topological relationship between the parameters and the parameter group remains unchanged; by obtaining the second parameter group, the second parameter group is used as the third node, and the second parameter is used as the fourth node; the first node is updated using the third node, and the second node is updated using the fourth node, so that the target graph represents the topological relationship between the parameters and the parameter group under multiple environments, without the need to construct different graph data for different environments, thereby reducing the graph structure complexity of the target graph and reducing the computational complexity of the subsequent node screening steps.

[0075] See also Figure 3 In some embodiments, step S103 includes but is not limited to steps S301 to S302:

[0076] Step S301, obtaining voice data;

[0077] Step S302: Convert the speech data into text data through a speech-to-text model as a configuration update request.

[0078] In step S301 of some embodiments, voice data may be obtained by collecting voice signals in real time through a microphone, receiving a voice stream through a network interface, etc., but the present invention is not limited thereto.

[0079] In step S302 of some embodiments, the speech-to-text model may be a speech recognition model based on deep learning or a speech recognition model based on a hidden Markov model, but is not limited thereto.

[0080] For example, in a fintech scenario, receiving user voice data through a network interface involves setting the transaction timeout to 3000 milliseconds, converting it to text data using a speech-to-text model, and using it as a configuration update request. Another example is in a medical technology scenario, receiving user voice data through a microphone involves setting the DICOM image quality to high, converting it to text data using a speech-to-text model, and using it as a configuration update request.

[0081] In steps S301 to S302 shown in the embodiment of the present application, user voice data is obtained and converted into text data through a speech-to-text model as a configuration update request, so that the user can update the configuration file through voice, thereby improving the convenience of configuration file update.

[0082] In some embodiments, step S104 may employ a keyword matching approach, directly extracting keywords from the configuration update request, and then searching the second node for a node matching the keywords as the target node. Alternatively, slot prediction may be performed on the configuration update request to obtain target parameters, and then searching the second node for a node matching the target parameters as the target node. This is not limited to these. For example, when the configuration update request changes the database address from 192.168.1.1 to 192.168.1.2, the keyword extracted may be the database address, and the second node may be searched for a second node matching the database address as the target node.

[0083] See also Figure 4 In some embodiments, step S104 includes but is not limited to steps S401 to S402:

[0084] Step S401: predicting the configuration environment value based on the configuration update request to obtain the target environment value;

[0085] Step S402: Filter out a target node from the second nodes based on the target environment value; wherein the environment attribute of the target node includes the target environment value.

[0086] In step S401 of some embodiments, the configuration environment value can be predicted based on a machine learning model to obtain a target environment value; the configuration environment value can also be predicted by keyword matching to obtain a target environment value; but it is not limited thereto. For example, the configuration update request temporarily relaxes the timeout threshold of the payment interface, and the keyword "temporary" is extracted therefrom, and the configuration environment value is predicted to be a test environment based on a predefined matching relationship. For another example, a machine learning model (such as a classification model) is trained to predict the configuration environment value, and the input of the machine learning model can be the text features of the configuration update request and the user's historical behavior (such as the last three configuration file modification records), etc., but it is not limited thereto.

[0087] For example, in the FinTech scenario, a configuration update request is obtained to modify the user's payment limit and enable nighttime trading permissions. Based on the configuration update request and the user's historical behavior, the configuration environment value is predicted through a classification model, and the target environment value is obtained as the production environment.

[0088] In step S402 of some embodiments, a depth-first search algorithm can be used to search for a second node whose environmental attributes include a target environmental value in the target graph as the target node; a breadth-first search algorithm can also be used to search for a second node whose environmental attributes include a target environmental value as the target node; this is not limited to this.

[0089] Steps S401 to S402 shown in the embodiment of the present application predict the configuration environment value based on the configuration update request to obtain the target environment value, which can automatically identify the environment information in natural language; the target environment value is used as a screening condition for the target node to reduce errors caused by missing or incorrect environment information.

[0090] In step S105 of some embodiments, a depth-first search algorithm can be used to search for associated nodes connected to the target node through the first edge in the target graph; or a breadth-first search algorithm can be used to search layer by layer starting from the target node until all associated nodes connected to it are found; this is not limited to this.

[0091] In step S106 of some embodiments, the language model may be a model based on a Transformer architecture or a model based on a recurrent neural network (RNN); however, the language model may be input into the language model to generate target code, along with node attributes of associated nodes and predefined code templates. Alternatively, the language model may be input into the language model to generate target code, along with node attributes of associated nodes, target nodes, and connected nodes, along with code generation prompts; however, the language model may be input into the language model to generate target code; however, the language model may be input into the language model to generate target code.

[0092] In some embodiments, in step S107, the target code can be directly embedded in the configuration file's update script, and the configuration file can be updated by executing the update script. Alternatively, the target code can be sent to the server where the configuration file is located, where the server's internal update mechanism can execute the target code to update the configuration file. For example, the generated target code config.database.address="192.168.1.2" is used to set the database address to "192.168.1.2". This can be embedded in a Python script that reads the configuration file and then runs the target code to update the configuration file. Alternatively, the target code can be sent to the server, where the server's internal configuration management module, upon receiving the code, executes the code according to a predetermined update process to update the configuration file.

[0093] See also Figure 5 In some embodiments, step S107 includes but is not limited to steps S501 to S503:

[0094] Step S501, obtaining the verification rule of the target node to obtain the target rule;

[0095] Step S502: verify the target code based on the target rule to obtain verification data;

[0096] Step S503: Based on the verification data, the configuration file is updated through the target code.

[0097] In step S501 of some embodiments, the verification rules may include, but are not limited to, data type constraints, value range constraints, format constraints, and the like.

[0098] In step S502 of some embodiments, the target code may be verified by executing an automated script to obtain verification data; the target code may also be verified by calling a verification function library to obtain verification data; the present invention is not limited thereto.

[0099] In step S503 of some embodiments, if the verification data indicates that the target code passes the verification, the configuration file is updated through the target code; if the verification data indicates that the target code fails the verification, the verification data and the target code can be input into the language model to modify the target code; the target code can also be regenerated; this is not limited to this.

[0100] For example, in a fintech scenario, the target rule is that the transaction amount must be a positive number and within the transaction limit. Suppose the modified transaction amount in the target code is a negative number. The target code is verified, and the verification data includes failure verification and the error type is a negative amount. Another example is in a medical technology scenario, where the target rule is that the patient's age must be a positive integer and less than 150. Suppose the age of the newly added patient in the target code is 50. The target code is verified, and the verification data is passed.

[0101] In steps S501 to S503 shown in the embodiment of the present application, the target code is verified based on the verification rules of the target node to obtain verification data; based on the verification data, the configuration file is updated through the target code, which can reduce the risk of configuration errors caused by generating illegal code and improve the reliability of configuration updates.

[0102] See also Figure 6 In some embodiments, step S502 includes but is not limited to steps S601 to S602:

[0103] Step S601: Generate prompt words based on target rules to obtain verification prompt words;

[0104] Step S602: Based on the verification prompt word, the target code is verified by using a language model to obtain verification data.

[0105] In some embodiments, step S601 may utilize natural language generation technology, template matching, or keyword extraction to automatically generate verification prompts based on verification rules, but this is not limited to these methods. For example, if the verification rule requires a timeout parameter to be between 0 and 5000 milliseconds, the verification prompt may be "Please ensure the timeout parameter is between 0 and 5000 milliseconds." The verification prompt and target code are input into a language model, which then outputs verification data.

[0106] In steps S601 to S602 shown in the embodiment of the present application, prompt words are generated based on the target rules to obtain verification prompt words; based on the verification prompt words, the target code is verified through a language model to obtain verification data. The language model can learn the code semantics and context, improve the accuracy of code verification, and generate repair suggestions for users.

[0107] See also Figure 7 In some embodiments, after step S107, the configuration file updating method based on natural language further includes but is not limited to steps S701 to S702:

[0108] Step S701: Monitor the configuration file to obtain configuration change information;

[0109] Step S702: Update the target graph based on the changed configuration information.

[0110] It is easy to understand that changes in configuration files can be monitored in real time through event notifications, subscription mechanisms, hook functions, or polling detection to obtain changed configuration information; based on the changed configuration information, nodes in the target graph can be dynamically added or deleted or node properties can be modified to improve the data consistency between the target graph and the configuration file.

[0111] In steps S701 to S702 shown in the embodiment of the present application, the configuration file is monitored to obtain the changed configuration information, and the target map is updated based on the changed configuration information to ensure that the target map is consistent with the configuration file in real time, thereby improving the accuracy of the configuration file update.

[0112] The natural language-based configuration file updating method shown in the embodiment of the present application is based on the configuration file, constructing a target graph, in which the first parameter group is used as the first node, the first parameter is used as the second node, a first edge is configured between the first node and the second node, the first edge indicates that the first parameter is stored in the first parameter group, and the obtained target graph reflects the topological relationship between the first parameter group and the first parameter; obtains the second parameter group, uses the second parameter group as the third node, and the second parameter as the fourth node; uses the third node to update the first node, and uses the fourth node to update the second node, so that the target graph represents the topological relationship between the parameters and the parameter groups under various environments; obtains user voice data, and converts it into text data through a voice-to-text model as a configuration update request; predicts the configuration environment based on the configuration update request value, and obtain the target environment value; based on the target environment value, filter out the target node related to the configuration update request from the second node; based on the target node, filter out the associated node connected to the target node with a first edge from the first node, and reversely locate the first parameter group through the first edge; based on the associated node, generate code through the language model to obtain the target code, and the associated node provides the language model with a topological relationship between the first parameter and the first parameter group as a semantic constraint, thereby reducing the configuration parameter positioning error caused by the ambiguity of natural language and improving the accuracy of the configuration file update; based on the verification rule of the target node, verify the target code to obtain verification data; based on the verification data, update the configuration file through the target code, which can reduce the risk of configuration errors caused by generating illegal code and improve the reliability of the configuration update.

[0113] See also Figure 8 The embodiment of the present application further provides a configuration file updating device based on natural language, which can implement the above-mentioned configuration file updating method based on natural language, and the device includes:

[0114] A configuration file acquisition module is used to acquire a configuration file, wherein the configuration file stores a first parameter group, and the first parameter group stores a first parameter;

[0115] A target graph construction module is configured to construct a target graph based on the configuration file; wherein the target graph includes a first node and a second node, wherein the first parameter group is used as the first node, the first parameter is used as the second node, and a first edge is configured between the first node and the second node, wherein the first edge indicates that the first parameter is stored in the first parameter group;

[0116] A configuration update request acquisition module is used to obtain a configuration update request; the configuration update request is a request based on natural language;

[0117] A target node screening module, configured to screen a target node from the second node based on the configuration update request;

[0118] An associated node screening module, configured to screen associated nodes from the first node based on the target node; wherein a first edge is connected between the associated node and the target node;

[0119] A code generation module is used to generate code based on associated nodes using a language model to obtain target code;

[0120] The configuration file update module is used to update the configuration file through the target code.

[0121] The specific implementation of the device is basically the same as the specific embodiment of the above method, and will not be repeated here.

[0122] The present application also provides an electronic device comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the above method when executing the computer program. The electronic device can be any smart terminal including a tablet computer, an in-vehicle computer, or the like.

[0123] See also Figure 9 , Figure 9 The hardware structure of an electronic device according to another embodiment is shown. The electronic device includes:

[0124] The processor 901 can be implemented as a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application.

[0125] The memory 902 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 902 can store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 902 and is called by the processor 901 to execute the methods of the embodiments of this application.

[0126] Input / output interface 903, used to implement information input and output;

[0127] Communication interface 904, used to implement communication interaction between this device and other devices, which can be achieved through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WiFi, Bluetooth, etc.);

[0128] Bus 905 , which transmits information between various components of the device (e.g., processor 901 , memory 902 , input / output interface 903 , and communication interface 904 );

[0129] The processor 901 , the memory 902 , the input / output interface 903 and the communication interface 904 are connected to each other in communication within the device via a bus 905 .

[0130] An embodiment of the present application further provides a computer-readable storage medium, which stores a computer program, and the computer program implements the above method when executed by a processor.

[0131] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely arranged relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0132] The natural language-based configuration file updating method, apparatus, device, and medium provided in the embodiments of the present application construct a target graph based on the configuration file, wherein the first parameter group is used as the first node, the first parameter is used as the second node, a first edge is configured between the first node and the second node, the first edge indicates that the first parameter is stored in the first parameter group, and the obtained target graph reflects the topological relationship between the first parameter group and the first parameter; obtain the second parameter group, use the second parameter group as the third node, and the second parameter as the fourth node; use the third node to update the first node, and use the fourth node to update the second node, so that the target graph represents the topological relationship between the parameters and the parameter groups under various environments; obtain user voice data, convert it into text data through a voice-to-text model as a configuration update request; predict based on the configuration update request A configuration environment value is obtained to obtain a target environment value; based on the target environment value, a target node related to the configuration update request is filtered out from the second node; based on the target node, an associated node connected to the target node by a first edge is filtered out from the first node, and the first parameter group can be reversely located through the first edge; based on the associated node, code is generated through a language model to obtain a target code, and the associated node, as a semantic constraint, provides the language model with a topological relationship between the first parameter and the first parameter group, thereby reducing configuration parameter positioning errors caused by natural language ambiguity and improving the accuracy of configuration file updates; based on the verification rule of the target node, the target code is verified to obtain verification data; based on the verification data, the configuration file is updated through the target code, which can reduce the risk of configuration errors caused by generating illegal code and improving the reliability of configuration updates.

[0133] The embodiments described in the embodiments of this application are intended to more clearly illustrate the technical solutions of the embodiments of this application and do not constitute a limitation on the technical solutions provided by the embodiments of this application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of this application are also applicable to similar technical problems.

[0134] Those skilled in the art will understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.

[0135] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, i.e., they may be located in one place or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of this embodiment.

[0136] Those skilled in the art will appreciate that all or some of the steps in the methods, systems, and functional modules / units in the devices disclosed above may be implemented as software, firmware, hardware, or appropriate combinations thereof.

[0137] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0138] It should be understood that in this application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0139] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the above-mentioned units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0140] The units described above as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0141] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0142] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes multiple instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: various media that can store programs, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0143] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but are not intended to limit the scope of the present invention. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and essence of the present invention should be within the scope of the present invention.

Claims

1. A configuration file updating method based on natural language, characterized in that: The method comprises: Obtaining a configuration file, wherein the configuration file stores a first parameter group, and the first parameter group stores a first parameter; Constructing a target graph based on the configuration file; wherein the target graph includes a first node and a second node, the first parameter group is used as the first node, the first parameter is used as the second node, and a first edge is configured between the first node and the second node, the first edge indicating that the first parameter is stored in the first parameter group; Obtaining a configuration update request; the configuration update request is a request based on natural language; Based on the configuration update request, filtering out a target node from the second nodes; Based on the target node, selecting associated nodes from the first node; wherein the associated nodes are connected to the target node by the first edge; Based on the associated nodes, code generation is performed using a language model to obtain a target code; The configuration file is updated through the target code.

2. The method according to claim 1, characterized in that The configuration file further includes a second parameter group, wherein the second parameter group stores a second parameter, the parameter name of the second parameter is the same as the parameter name of the first parameter, and the parameter value of the second parameter is different from the parameter value of the first parameter; After constructing the target graph based on the configuration file, the method further includes updating the first node and the second node, specifically including: Based on the second parameter group, constructing a third node and a fourth node in the target graph; wherein the second parameter group is used as the third node, and the second parameter is used as the fourth node; Performing node merging on the first node and the third node to obtain an updated first node; Perform node merging on the second node and the fourth node to obtain an updated second node.

3. The method according to claim 2, characterized in that The second node is configured with an environment attribute; and filtering a target node from the second node based on the configuration update request includes: Based on the configuration update request, predict the configuration environment value to obtain the target environment value; Based on the target environment value, a target node is filtered out from the second nodes; wherein the environment attribute of the target node includes the target environment value.

4. The method according to claim 1, wherein The second node is configured with a verification rule; and updating the configuration file by the target code includes: Obtaining the verification rule of the target node to obtain the target rule; Based on the target rule, verify the target code to obtain verification data; Based on the verification data, the configuration file is updated through the target code.

5. The method according to claim 4, characterized in that The step of verifying the target code based on the target rule to obtain verification data includes: Based on the target rule, generating prompt words to obtain verification prompt words; Based on the verification prompt word, the target code is verified through the language model to obtain the verification data.

6. The method according to any one of claims 1 to 5, characterized in that After the configuration file is updated by the target code, the method further includes: Monitor the configuration file to obtain configuration change information; Based on the changed configuration information, the target graph is updated.

7. The method according to any one of claims 1 to 5, characterized in that The obtaining of the configuration update request includes: Get voice data; The voice data is converted into text data through a voice-to-text model as the configuration update request.

8. Configuration file update based on natural language, characterized by: The device comprises: A configuration file acquisition module, configured to acquire a configuration file, wherein the configuration file stores a first parameter group, and the first parameter group stores a first parameter; a target graph construction module, configured to construct a target graph based on the configuration file; wherein the target graph includes a first node and a second node, the first parameter group being used as the first node, the first parameter being used as the second node, and a first edge being configured between the first node and the second node, the first edge indicating that the first parameter is stored in the first parameter group; A configuration update request acquisition module, configured to acquire a configuration update request; the configuration update request is a request based on natural language; a target node screening module, configured to screen a target node from the second nodes based on the configuration update request; an associated node screening module, configured to screen associated nodes from the first node based on the target node; wherein the associated nodes are connected to the target node by the first edge; A code generation module, configured to generate code based on the associated nodes using a language model to obtain a target code; The configuration file updating module is used to update the configuration file through the target code.

9. An electronic device, characterized in that: The electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the natural language-based configuration file updating method according to any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the natural language-based configuration file updating method according to any one of claims 1 to 7 is implemented.