Target system module debugging method and device, storage medium and electronic device
By obtaining the information of the module to be debugged and obtaining the target configuration file from the configuration center, the system code is automatically modified for debugging, which solves the problem of low module debugging efficiency in system engineering and achieves a more efficient debugging process.
Patent Information
- Application Number
- CN202411353690.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-26
- Publication Date
- 2025-01-21
AI Technical Summary
In system engineering, when debugging a module, it is necessary to manually modify the code of multiple dependent modules, resulting in low modification efficiency and error-proneness.
By obtaining the module information of the module to be debugged, send the request instruction to the configuration center, obtain the target configuration file, and modify the system code according to the file to implement the module debugging.
It avoids the tedious process of manually modifying the code, improves the efficiency of module debugging, and reduces the occurrence of errors.
Smart Images

Figure CN119335890A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of smart home technology, and more specifically, to a debugging method and device for a target system module, a storage medium, and an electronic device. Background Art
[0002] There are multiple modules in system engineering, and there are hierarchical and dependent relationships between the modules. If one of the modules needs to be debugged, all the modules that depend on this module need to be manually changed from release mode to debug mode. That is, all the modules that depend on this module need to be modified, and they need to be manually reconfigured to debug mode after the baseline is adjusted.
[0003] Since manual modification operations are numerous and cumbersome, the modification efficiency is low and errors are prone to occur, resulting in low efficiency in debugging the module.
[0004] In the related art, when debugging a module in a system engineering, the code of the system engineering needs to be manually modified, resulting in a problem of low adjustment efficiency of the module. Currently, no effective solution has been proposed.
[0005] Therefore, it is necessary to improve the related technology to overcome the above-mentioned defects in the related technology. Summary of the invention
[0006] The embodiments of the present application provide a debugging method and device, a storage medium, and an electronic device for a target system module, so as to at least solve the problem that when debugging a module in a system project, the code of the system project needs to be manually modified, resulting in low adjustment efficiency of the module.
[0007] According to one aspect of an embodiment of the present application, a method for debugging a target system module is provided, comprising: obtaining module information of a module to be debugged, wherein the module to be debugged is a module in a target system; sending a request instruction to a configuration center, and obtaining a target configuration file determined by the configuration center according to the module information, wherein the request instruction is used to request the configuration center to obtain a configuration file corresponding to the module information, the target configuration file including configuration information of modules in the target system that have a dependency relationship with the module to be debugged, and the configuration files including the target configuration file; modifying the system code of the target system according to the target configuration file, and debugging the module to be debugged through the modified system code.
[0008] In an exemplary embodiment, modifying the system code of the target system according to the target configuration file includes: determining N modules in the target system according to the target configuration file, wherein the N modules all have a dependency relationship with the module to be debugged; replacing the configuration information of the i-th module among the N modules in the system code with the configuration information corresponding to the i-th module in the target configuration file, wherein i increases sequentially from 1 to N, and i is an integer.
[0009] In an exemplary embodiment, obtaining a target configuration file determined by the configuration center according to the module information includes: obtaining the target configuration file generated by the configuration center; wherein, after obtaining the module information, the configuration center determines N modules in the target system and obtains configuration information corresponding to the N modules; and modifies the configuration information corresponding to the N modules according to preset modification rules to obtain the target configuration file, wherein the preset modification rules are rules for modifying the configuration information of N modules in the system code, and the N modules all have a dependency relationship with the module to be debugged.
[0010] In an exemplary embodiment, obtaining the target configuration file determined by the configuration center according to the module information includes: obtaining the target configuration file found by the configuration center; wherein the configuration center has different configuration files corresponding to different module information pre-stored therein.
[0011] In an exemplary embodiment, sending a request instruction to a configuration center includes: sending a request instruction to the configuration center when there is no preset modification rule in the debugging program; wherein the preset modification rule is a rule for modifying the configuration information of N modules in the system code, and the N modules all have a dependency relationship with the module to be debugged.
[0012] In an exemplary embodiment, the method further includes: when the debugging program has the preset modification rule, modifying the configuration information of N modules in the system code according to the preset modification rule to obtain a modified system code; and debugging the module to be debugged through the modified system code.
[0013] In an exemplary embodiment, modifying the configuration information of N modules in the system code according to the preset modification rules includes: modifying the configuration information of the i-th module among the N modules in the following manner to modify the configuration information of the N modules in the system code: modifying the target code in the configuration information of the i-th module according to the preset modification rules, wherein the target code is used to indicate the dependency relationship between the i-th module and the module to be debugged.
[0014] According to another aspect of an embodiment of the present application, a debugging device for a target system module is provided, comprising: an acquisition module, used to acquire module information of a module to be debugged, wherein the module to be debugged is a module in a target system; a processing module, used to send a request instruction to a configuration center, and acquire a target configuration file determined by the configuration center according to the module information, wherein the request instruction is used to request the configuration center to acquire a configuration file corresponding to the module information, wherein the target configuration file includes configuration information of modules in the target system that have a dependency relationship with the module to be debugged, and the configuration file includes the target configuration file; a debugging module, used to modify the system code of the target system according to the target configuration file, and debug the module to be debugged through the modified system code.
[0015] According to another aspect of the embodiments of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium includes a stored program, wherein the computer program is configured to execute the above-mentioned debugging method of the target system module when running.
[0016] According to another aspect of the embodiments of the present application, there is also provided an electronic device, including a memory and a processor, wherein the memory stores a computer program, wherein the processor is configured to execute the above-mentioned debugging method of the target system module through the computer program.
[0017] According to another aspect of the embodiments of the present application, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the debugging method of the target system module is implemented.
[0018] In the present application, a target configuration file is obtained from a configuration center according to the module information of the module to be debugged, so as to modify the system code of the target system according to the target configuration file, and the module to be debugged is debugged through the modified system code, thereby avoiding manual modification of modules in the system engineering that depend on the module to be debugged, thereby improving the debugging efficiency of the module to be debugged, and solving the problem that when debugging a module in the system engineering, the code of the system engineering needs to be manually modified, resulting in low adjustment efficiency of the module. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0020] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0021] Figure 1 is a hardware environment schematic diagram of a method for debugging a target system module according to an embodiment of the present application;
[0022] Figure 2 is a flowchart of a method for debugging a target system module according to an embodiment of the present application;
[0023] Figure 3 is a schematic diagram of an overall architecture of modules in a target system according to an embodiment of the present application;
[0024] Figure 4 is a schematic diagram of an overall architecture of module debugging according to an embodiment of the present application;
[0025] Figure 5 is a flow chart of a configuration personnel uploading configuration information according to an embodiment of the present application;
[0026] Figure 6 is a flow chart of a developer performing module debugging according to an embodiment of the present application;
[0027] Figure 7 is a timing diagram of a target system module debugging according to an embodiment of the present application;
[0028] Figure 8 It is a structural block diagram of a debugging device for a target system module according to an embodiment of the present application. DETAILED DESCRIPTION
[0029] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0030] It should be noted that the terms "first", "second", etc. in the specification and claims 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 sequence. 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 of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising 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.
[0031] According to one aspect of an embodiment of the present application, a method for debugging a target system module is provided. The method for debugging a target system module is widely used in smart home, smart home, smart home device ecology, smart residential ecology and other whole-house intelligent digital control application scenarios. Optionally, in this embodiment, the method for debugging a target system module can be applied to Figure 1 In the hardware environment composed of the terminal device 102 and the server 104 shown in FIG. Figure 1 As shown, the server 104 is connected to the terminal device 102 via a network, and can be used to provide services (such as application services, etc.) for the terminal or a client installed on the terminal. A database can be set on the server or independently of the server to provide data storage services for the server 104. Cloud computing and / or edge computing services can be configured on the server or independently of the server to provide data computing services for the server 104.
[0032] The network may include but is not limited to at least one of the following: wired network, wireless network. The wired network may include but is not limited to at least one of the following: wide area network, metropolitan area network, local area network, and the wireless network may include but is not limited to at least one of the following: WIFI (Wireless Fidelity), Bluetooth. The terminal device 102 may be but is not limited to a PC, a mobile phone, a tablet computer, a smart air conditioner, a smart range hood, a smart refrigerator, a smart oven, a smart stove, a smart washing machine, a smart water heater, a smart washing device, a smart dishwasher, a smart projection device, a smart TV, a smart clothes drying rack, a smart curtain, a smart audio and video, a smart socket, a smart speaker, a smart fresh air device, a smart kitchen and bathroom device, a smart bathroom device, a smart sweeping robot, a smart window cleaning robot, a smart mopping robot, a smart air purification device, a smart steamer, a smart microwave oven, a smart kitchen treasure, a smart purifier, a smart water dispenser, a smart door lock, etc.
[0033] In order to solve the above problems, a debugging method for a target system module is provided in this embodiment, including but not limited to being applied in the field of smart home technology. Figure 2 : is a flowchart of a method for debugging a target system module according to an embodiment of the present application, the process includes the following steps S202-S206:
[0034] Step S202: Acquire module information of a module to be debugged, wherein the module to be debugged is a module in a target system;
[0035] Optionally, the module information includes but is not limited to: module name.
[0036] Optionally, the target system includes but is not limited to: Android, Apple operating system (iOS), and open source software development kit (Flutter).
[0037] Step S204: sending a request instruction to a configuration center, and obtaining a target configuration file determined by the configuration center according to the module information, wherein the request instruction is used to request the configuration center to obtain a configuration file corresponding to the module information, the target configuration file includes configuration information of a module in the target system that has a dependency relationship with the module to be debugged, and the configuration file includes the target configuration file;
[0038] It should be noted that the configuration file has configuration codes corresponding to different system modules, and the configuration codes are used to indicate the dependency relationship between the system module and the module to be debugged.
[0039] It should be noted that, when there are N modules that have dependencies on the module to be debugged, the target configuration file includes N sub-configuration files, wherein the N sub-configuration files have a one-to-one correspondence with the N modules, and each sub-configuration file contains configuration information of the corresponding module.
[0040] In an exemplary embodiment, sending a request instruction to a configuration center may be achieved through the following steps: sending a request instruction to a configuration center when there is no preset modification rule in the debugging program; wherein the preset modification rule is a rule for modifying the configuration information of N modules in the system code, and the N modules all have a dependency relationship with the module to be debugged.
[0041] Optionally, refer to Figure 4 and Figure 5 , the configuration personnel submit configuration setting information to the configuration center service system in advance, wherein the configuration setting information contains multiple target configuration files corresponding to different module information, or the preset modification rules.
[0042] It should be noted that when the configuration center receives a request instruction, it can quickly and accurately determine the target configuration files corresponding to the N modules based on the module information, and return the target configuration files to the requester, thereby improving the speed of the module debugging process and improving the efficiency of debugging the module.
[0043] In an exemplary embodiment, the method further comprises the following steps S11-S12:
[0044] Step S11: in the case where the preset modification rule is present in the debugging program, the configuration information of N modules in the system code is modified according to the preset modification rule to obtain a modified system code;
[0045] Step S12: Debugging the module to be debugged by using the modified system code.
[0046] It should be noted that when there are preset modification rules in the debugging program, it means that the configuration information of N modules in the system code can be modified directly according to the modification rules without sending request instructions to the configuration center, avoiding obtaining configuration files from the configuration center and simplifying the code debugging process.
[0047] Optionally, when a code error or configuration item mismatch occurs when modifying the configuration file according to the preset modification rule, a warning message is fed back, wherein the warning message is used to indicate that the configuration file of the module that depends on the module to be debugged cannot be actively modified.
[0048] It should be noted that sending warning information to the configuration center can help developers quickly locate and solve problems, thereby more efficiently tracking and debugging the operating status of the module.
[0049] Optionally, when a code error or a configuration item mismatch occurs when modifying the configuration file according to the preset modification rule, a request instruction is sent to the configuration center, and a target configuration file determined by the configuration center according to the module information is obtained.
[0050] In an exemplary embodiment, modifying the configuration information of N modules in the system code according to the preset modification rules can be achieved by the following steps: modifying the configuration information of the i-th module among the N modules in the following manner to modify the configuration information of the N modules in the system code: modifying the target code in the configuration information of the i-th module according to the preset modification rules, wherein the target code is used to indicate the dependency relationship between the i-th module and the module to be debugged.
[0051] In an exemplary embodiment, obtaining a target configuration file determined by the configuration center according to the module information can be achieved by the following steps: obtaining the target configuration file generated by the configuration center; wherein, after obtaining the module information, the configuration center determines N modules in the target system and obtains configuration information corresponding to the N modules; modifying the configuration information corresponding to the N modules according to preset modification rules to obtain the target configuration file, wherein the preset modification rules are rules for modifying the configuration information of N modules in the system code, and the N modules all have a dependency relationship with the module to be debugged.
[0052] Optionally, refer to Figure 7 After obtaining the request instruction, the configuration center modifies the configuration information corresponding to the N modules according to the preset modification rules (such as adding, deleting, modifying configuration items, etc.) (optionally, the configuration files corresponding to the N modules are modified), thereby generating a target configuration file (including N sub-configuration files corresponding to the N modules, wherein the sub-configuration files in the N sub-configuration files are files obtained by modifying the configuration files of the corresponding modules, and the configuration files of the corresponding modules include the configuration information of the corresponding modules).
[0053] In an exemplary embodiment, obtaining the target configuration file determined by the configuration center based on the module information can be achieved through the following steps: obtaining the target configuration file found by the configuration center; wherein the configuration center has different configuration files corresponding to different module information pre-stored therein.
[0054] Step S206: modifying the system code of the target system according to the target configuration file, and debugging the module to be debugged through the modified system code.
[0055] It should be noted that the above-mentioned target system is a system engineering.
[0056] In an exemplary embodiment, modifying the system code of the target system according to the target configuration file can be implemented by following the steps S21-S22:
[0057] Step S21: determining N modules in the target system according to the target configuration file, wherein the N modules all have a dependency relationship with the module to be debugged;
[0058] Step S22: Replace the configuration information of the i-th module among the N modules in the system code with the configuration information corresponding to the i-th module in the target configuration file, where i increases from 1 to N in sequence and i is an integer.
[0059] In the above steps, the target configuration file is obtained from the configuration center according to the module information of the module to be debugged, so as to modify the system code of the target system according to the target configuration file, and the module to be debugged is debugged through the modified system code, thereby avoiding manual modification of modules in the system engineering that depend on the module to be debugged, thereby improving the debugging efficiency of the module to be debugged, and solving the problem that when debugging a module in the system engineering, the code of the system engineering needs to be manually modified, resulting in low adjustment efficiency of the module.
[0060] Obviously, the embodiments described above are only some embodiments of the present application, not all embodiments. In order to better understand the above method, the above process is described below in conjunction with the embodiments, but it is not intended to limit the technical solutions of the embodiments of the present application, specifically:
[0061] In order to better understand this application, the following Figure 3 An optional engineering module architecture of the present application is introduced, wherein the module information is specifically the module name:
[0062] Figure 3 In the example, the upper-level module (such as the Android top-level module) depends on the lower-level module (such as Android module 1). Currently, the version control system used by engineering codes mostly adopts a distributed version control system (Git version control system). The locally debugged modules cannot be uploaded to the Git system. The pseudo code of the upper-level module's dependency on the lower-level module is similar to the following code:
[0063] implementation'module name:version number';
[0064] The above code represents a module that relies on a specified version of the distribution system. Relying on the distribution system can ensure compatibility between different modules and avoid problems caused by inconsistent versions.
[0065] It should be noted that dependency pseudocode is a pseudocode representation method that describes the dependency relationship between modules in a program or algorithm.
[0066] It should be noted that the distribution system is a service system that hosts the files of the published modules.
[0067] Under such a project architecture, when the team responsible for Flutter module 1 only needs to debug Flutter module 1 locally, they need to modify multiple projects, such as the Android top-level module project, the iOS top-level module project, and the total Flutter module project, which is multi-fold and cumbersome.
[0068] In addition, it may take a week for a new member to configure the system for the first time. After becoming proficient, it may still take half an hour to successfully configure it after updating according to the latest baseline. Moreover, there are some configuration skills that new members may not know, and old members may also forget.
[0069] In addition, modification methods are often updated as software development evolves. If other team members are not notified, the relevant departments may not be able to compile the system for debugging.
[0070] In order to solve the above problems, an optional embodiment of the present application is specifically introduced as follows:
[0071] like Figure 4 The middle part shows that the configuration personnel configure it through the configuration center service system, and then the configuration service center distributes it to the corresponding module developers. The module developers only need to update it.
[0072] Figure 5 The flowchart of the configuration personnel uploading the configuration setting information (steps S52-S56) is shown: first, the system is started and operated, and then the configuration setting information is submitted and uploaded to the configuration center service system, and the configuration center service system will record the configuration setting information.
[0073] Figure 6 The diagram illustrates the usage process for module developers (steps S62-S68): first, start and run the system, then input the module name of the module to be debugged, the configuration center service system will determine the corresponding configuration information (including the above-mentioned configuration file) according to the name of the module to be debugged, and then modify the local code to the local debugging mode according to the received configuration information, so that the developer can perform local development and debugging on the module he is responsible for.
[0074] The specific examples of the configuration center, application configuration files, and distribution configuration files are as follows:
[0075] Initially, all project dependencies depend on specific versions, such as the Android shell project depends on 1.0.1Android module 1, 1.0.2Android module 2, and so on.
[0076] Android's module dependencies are generally written in a text file named build.gradle. The specific code is as follows:
[0077] dependencies{
[0078] implementation'com.haier.uhome.uplus:flutter_release:1.1.1.2024031401';
[0079] implementation'com.haier.uhome.uplus:module1:1.1.0.2023112301';
[0080] implementation'com.haier.uhome.uplus:module2:1.2.0.2023112301';
[0081] implementation'com.haier.uhome.uplus:module3:1.3.0.2023112301'; ...; ...; ...;
[0085] };
[0086] And write the overall dependency of the Android shell project in the setting.gradle file. The code is as follows:
[0087] include':AndroidAppliationName';
[0088] The Android module that contains the Flutter module's dependency on Flutter is written in a text file named pubspec.yaml. The specific code is as follows:
[0089] dependencies:
[0090] flutterModule1:
[0091] version:1.0.1;
[0092] hosted:
[0093] name:flutterModule1;
[0094] url:pubcenterhost;
[0095] flutterModule2:
[0096] version:1.0.2;
[0097] hosted:
[0098] name:flutterModule2;
[0099] url:pubcenterhost;
[0100] After the developer pulls the code from the code repository and saves it in the local development environment, the configuration file is as above. When the developer needs to debug Flutter module 1 locally, the above configuration file needs to be modified.
[0101] Configurators can modify configuration files through the configuration center and specify which files will be modified when developers develop. Taking Android as an example, the configuration personnel configuration file is as follows:
[0102] The specific code in Setting.gradle is as follows:
[0103] include':AndroidAppliationName';
[0104] setBinding(new Binding([gradle:this]));
[0105] / / Here is the relative path of UplusModule relative to the shell project;
[0106] evaluate(new File(
[0107] settingsDir.parentFile,
[0108] 'flutter_Module / .android / include_flutter.groovy'));
[0109] include':Module';
[0110] project(':Module').projectDir=new File('.. / flutter_Module');
[0111] The Android dependency file is build.gralde, and the specific code is as follows:
[0112] dependencies{
[0113] / / implementation'com.haier.uhome.uplus:flutter_release:1.1.1.2024031401';
[0114] implementation project(":flutter");
[0115] implementation'com.haier.uhome.uplus:module1:1.1.0.2023112301';
[0116] implementation'com.haier.uhome.uplus:module2:1.2.0.2023112301';
[0117] implementation'com.haier.uhome.uplus:module3:1.3.0.2023112301'; ...; ...; ...;
[0121] };
[0122] It should be noted that by comparing the changes in the build.gralde file, it can be found that the flutter_release that originally depended on the specified version has been commented out, and a new configuration that depends on the local `:flutter` has been added.
[0123] Flutter's dependency file pubspec.yaml is dynamically modified. If the configuration center dynamically modifies the configuration file based on the received module name and receives `module1` sent by the developer, the code in the above pubspec.yaml will be modified to the following code:
[0124] dependencies:
[0125] flutterModule1:
[0126] path:'.. / flutter / flutterModule1';
[0127] flutterModule2:
[0128] version:1.0.2;
[0129] hosted:
[0130] name:flutterModule2;
[0131] url:pubcenterhost;
[0132] The path pointed to by the original flutter module 1 becomes the local path '... / flutter / flutterModule1'.
[0133] When developers download the code, they store it in the specified format. All paths configured in the configuration center match the code file directory in the developer's local environment. For detailed timing diagrams, refer to Figure 7 .
[0134] It should be noted that this application also has the following advantages: compared with informing other personnel to make modifications through presentation, only one person is required to configure and submit the configuration, thus eliminating the learning and usage costs for other collaborators.
[0135] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods of each embodiment of the present application.
[0136] In this embodiment, a debugging device for a target system module is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0137] Figure 8 : is a structural block diagram of a debugging device for a target system module according to an embodiment of the present application, the device comprising:
[0138] An acquisition module 82, used for acquiring module information of a module to be debugged, wherein the module to be debugged is a module in a target system;
[0139] A processing module 84 is used to send a request instruction to a configuration center, and obtain a target configuration file determined by the configuration center according to the module information, wherein the request instruction is used to request the configuration center to obtain a configuration file corresponding to the module information, the target configuration file includes configuration information of a module in the target system that has a dependency relationship with the module to be debugged, and the configuration file includes the target configuration file;
[0140] The debugging module 86 modifies the system code of the target system according to the target configuration file, and debugs the module to be debugged through the modified system code.
[0141] Through the above-mentioned device, a target configuration file is obtained from a configuration center according to the module information of the module to be debugged, so as to modify the system code of the target system according to the target configuration file, and the module to be debugged is debugged through the modified system code, thereby avoiding manual modification of modules in the system engineering that depend on the module to be debugged, thereby improving the debugging efficiency of the module to be debugged and solving the problem that when debugging a module in the system engineering, the code of the system engineering needs to be manually modified, resulting in low adjustment efficiency of the module.
[0142] In an exemplary embodiment, the debugging module 86 is also used to determine N modules in the target system according to the target configuration file, wherein the N modules all have a dependency relationship with the module to be debugged; and replace the configuration information of the i-th module among the N modules in the system code with the configuration information corresponding to the i-th module in the target configuration file, wherein i increases sequentially from 1 to N, and i is an integer.
[0143] In an exemplary embodiment, the processing module 84 includes: an acquisition unit, used to acquire the target configuration file generated by the configuration center; wherein, after acquiring the module information, the configuration center determines N modules in the target system and acquires configuration information corresponding to the N modules; modifies the configuration information corresponding to the N modules according to preset modification rules to obtain the target configuration file, wherein the preset modification rules are rules for modifying the configuration information of N modules in the system code, and the N modules all have a dependency relationship with the module to be debugged.
[0144] In an exemplary embodiment, the acquisition unit is further used to acquire the target configuration file found by the configuration center; wherein the configuration center has different configuration files corresponding to different module information pre-stored therein.
[0145] In an exemplary embodiment, the processing module 84 also includes: a sending unit, used to send a request instruction to the configuration center when there is no preset modification rule in the debugging program; wherein the preset modification rule is a rule for modifying the configuration information of N modules in the system code, and the N modules all have a dependency relationship with the module to be debugged.
[0146] In an exemplary embodiment, the debugging module 86 is also used to modify the configuration information of N modules in the system code according to the preset modification rules when the debugging program has the preset modification rules, so as to obtain the modified system code; and debug the module to be debugged through the modified system code.
[0147] In an exemplary embodiment, the debugging module 86 is also used to modify the configuration information of the i-th module among the N modules in the system code by modifying the target code in the configuration information of the i-th module according to the preset modification rule, wherein the target code is used to indicate the dependency relationship between the i-th module and the module to be debugged.
[0148] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium includes a stored program, wherein the computer program is configured to execute the above-mentioned debugging method of the target system module when running.
[0149] Optionally, in this embodiment, the storage medium may be configured to store a computer program for performing the following steps:
[0150] S1, obtaining module information of a module to be debugged, wherein the module to be debugged is a module in a target system;
[0151] S2, sending a request instruction to a configuration center, and obtaining a target configuration file determined by the configuration center according to the module information, wherein the request instruction is used to request the configuration center to obtain a configuration file corresponding to the module information, the target configuration file includes configuration information of a module in the target system that has a dependency relationship with the module to be debugged, and the configuration file includes the target configuration file;
[0152] S3, modifying the system code of the target system according to the target configuration file, and debugging the module to be debugged through the modified system code.
[0153] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.
[0154] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.
[0155] An embodiment of the present application further provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, wherein the processor is configured to execute the above-mentioned debugging method of the target system module through the computer program.
[0156] Optionally, in this embodiment, the electronic device may be configured to perform the following steps through a computer program:
[0157] S1, obtaining module information of a module to be debugged, wherein the module to be debugged is a module in a target system;
[0158] S2, sending a request instruction to a configuration center, and obtaining a target configuration file determined by the configuration center according to the module information, wherein the request instruction is used to request the configuration center to obtain a configuration file corresponding to the module information, the target configuration file includes configuration information of a module in the target system that has a dependency relationship with the module to be debugged, and the configuration file includes the target configuration file;
[0159] S3, modifying the system code of the target system according to the target configuration file, and debugging the module to be debugged through the modified system code.
[0160] In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0161] According to another aspect of the embodiments of the present application, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the debugging method of the target system module is implemented.
[0162] Optionally, in this embodiment, the computer program product may be configured to perform the following steps through a computer program:
[0163] S1, obtaining module information of a module to be debugged, wherein the module to be debugged is a module in a target system;
[0164] S2, sending a request instruction to a configuration center, and obtaining a target configuration file determined by the configuration center according to the module information, wherein the request instruction is used to request the configuration center to obtain a configuration file corresponding to the module information, the target configuration file includes configuration information of a module in the target system that has a dependency relationship with the module to be debugged, and the configuration file includes the target configuration file;
[0165] S3, modifying the system code of the target system according to the target configuration file, and debugging the module to be debugged through the modified system code.
[0166] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.
[0167] Obviously, those skilled in the art should understand that the above modules or steps of the present application can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from that herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.
[0168] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A method for debugging a target system module, characterized in that: include: Acquire module information of a module to be debugged, wherein the module to be debugged is a module in a target system; Send a request instruction to a configuration center, and obtain a target configuration file determined by the configuration center according to the module information, wherein the request instruction is used to request the configuration center to obtain a configuration file corresponding to the module information, the target configuration file includes configuration information of modules in the target system that have a dependency relationship with the module to be debugged, and the configuration files include the target configuration file; modify the system code of the target system according to the target configuration file, and debug the module to be debugged through the modified system code.
2. The method for debugging a target system module according to claim 1, characterized in that: Modifying the system code of the target system according to the target configuration file includes: Determining N modules in the target system according to the target configuration file, wherein the N modules all have a dependency relationship with the module to be debugged; The configuration information of the i-th module among the N modules in the system code is replaced with the configuration information corresponding to the i-th module in the target configuration file, wherein i is incremented from 1 to N in sequence and i is an integer.
3. The method for debugging a target system module according to claim 1, characterized in that: Obtaining a target configuration file determined by the configuration center according to the module information includes: Obtain the target configuration file generated by the configuration center; Among them, after obtaining the module information, the configuration center determines the N modules in the target system and obtains the configuration information corresponding to the N modules; modifies the configuration information corresponding to the N modules according to preset modification rules to obtain the target configuration file, and the preset modification rules are rules for modifying the configuration information of N modules in the system code, and the N modules all have a dependency relationship with the module to be debugged.
4. The method for debugging a target system module according to claim 1, characterized in that: Obtaining a target configuration file determined by the configuration center according to the module information includes: Obtaining the target configuration file found by the configuration center; The configuration center has different configuration files corresponding to different module information pre-stored therein.
5. The method for debugging a target system module according to claim 1, characterized in that: Send a request command to the configuration center, including: When there is no preset modification rule in the debugging program, a request instruction is sent to the configuration center; wherein the preset modification rule is a rule for modifying the configuration information of N modules in the system code, and the N modules all have a dependency relationship with the module to be debugged.
6. The method for debugging a target system module according to claim 5, characterized in that: The method further comprises: In the case where the preset modification rule is present in the debugging program, modifying the configuration information of the N modules in the system code according to the preset modification rule to obtain a modified system code; The module to be debugged is debugged using the modified system code.
7. The method according to claim 6, characterized in that Modifying the configuration information of N modules in the system code according to the preset modification rule includes: The configuration information of the i-th module among the N modules is modified in the following manner to modify the configuration information of the N modules in the system code: The target code in the configuration information of the i-th module is modified according to the preset modification rule, wherein the target code is used to indicate a dependency relationship between the i-th module and the module to be debugged.
8. A debugging device for a target system module, characterized in that: include: An acquisition module, used for acquiring module information of a module to be debugged, wherein the module to be debugged is a module in a target system; a processing module, configured to send a request instruction to a configuration center, and obtain a target configuration file determined by the configuration center according to the module information, wherein the request instruction is used to request the configuration center to obtain a configuration file corresponding to the module information, the target configuration file includes configuration information of a module in the target system that has a dependency relationship with the module to be debugged, and the configuration file includes the target configuration file; The debugging module is used to modify the system code of the target system according to the target configuration file, and debug the module to be debugged through the modified system code.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein the program executes the method according to any one of claims 1 to 7 when executed.
10. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to execute the method according to any one of claims 1 to 7 through the computer program.
Citation Information
Patent Citations
Software module management device
CN110688100A
Method, device and equipment for quickly updating codes and storage medium
CN112965714A
Fully declarative build system for build optimization
US20110239192A1