Development data detection method and device based on low-code platform and medium
By implementing automated development data detection methods on low-code platforms, the complexity and efficiency problems of manual analysis when the test fails after software code changes are solved, and more efficient and accurate testing and problem repair are achieved.
Patent Information
- Application Number
- CN202510405755.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-02
- Publication Date
- 2025-05-02
- Estimated Expiration
- 2045-04-02
AI Technical Summary
In the prior art, when the test fails after the software code changes, developers need to manually sort out the code, logs and documents, resulting in reduced development efficiency and low accuracy in problem repair.
Using a development data detection method based on a low-code platform, by matching the test suite in the preset test suite, using the association rule mining algorithm to build the item set association relationship of the modified data, and using the preset failure data analysis model group to output the test failure reasons and repair suggestions, and automatically fill the code update meta-word to fix the problem.
Improve the accuracy and comprehensiveness of the test, reduce the complexity and human errors of manual analysis, and improve the efficiency of software development and the accuracy of problem repair.
Smart Images

Figure CN119917419A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of software development technology, and in particular to a development data detection method, device and medium based on a low-code platform. Background Art
[0002] In the process of software development, as the scale and complexity of software systems continue to rise, errors in software development and maintenance have become the norm. In order to ensure the quality and stability of the software after modification, it is usually necessary to conduct comprehensive testing on the modified data.
[0003] In the prior art, when software code is changed and causes test failures, developers need to manually comb through a large amount of code, logs, and related documents. Especially in large software systems, code, logs, and documents are usually distributed in different modules and files. Developers need to integrate information across multiple files, which increases the complexity of analysis. In addition, existing testing tools mainly focus on the execution of test cases and result feedback. Developers usually need to rely on experience to locate problems and fix them through manual coding. This process not only reduces development efficiency, but also reduces the accuracy of problem fixing. Summary of the invention
[0004] The embodiments of the present application provide a development data detection method, device and medium based on a low-code platform, which are used to solve the following technical problems: In the prior art, when the software code is changed and causes a test failure, developers usually need to rely on experience to locate the problem and fix the problem through manual coding. This process not only reduces development efficiency, but also reduces the accuracy of problem repair.
[0005] The present application embodiment adopts the following technical solutions: The embodiment of the present application provides a development data detection method based on a low-code platform. It includes, based on the amount of development data changes, matching a test suite containing a corresponding number of test cases in a preset test suite set, so as to test the changed data through the test suite; wherein the preset test suite set is composed of multiple test suites containing different numbers of test cases; in the case of test failure, frequent item set queries are performed in the historical database through an association rule mining algorithm, and the item set association relationship corresponding to the changed data is constructed according to the frequent item set; the changed data and the item set association relationship corresponding to the changed data are input into a preset failure data analysis model group, so as to output the test failure cause and repair suggestions through the preset failure data analysis model group; based on the test failure cause and repair suggestions, the preset code update primitive is filled, so as to repair the changed data through the filled update primitive.
[0006] The embodiment of the present application uses an automated mechanism to quickly and accurately find an adapted test suite from a preset test suite set, ensuring that the number of test cases matches the changed data. Not only does it improve the utilization rate of test resources, it can also more comprehensively cover scenarios that may cause problems due to data changes, thereby improving the accuracy and comprehensiveness of the test. Secondly, the embodiment of the present application uses an association rule mining algorithm to query frequent item sets in a historical database and construct item set association relationships, and integrates a variety of code structures, data types, and different test environment factors to mine more realistic frequent item sets and association relationships. In addition, the embodiment of the present application outputs test failure reasons and repair suggestions through the analysis capabilities of the model, fills in preset code update primitives based on test failure reasons and repair suggestions, and uses an intelligent and adaptive filling mechanism to generate accurate and feasible code update instructions, which not only improves software development efficiency, but also improves the accuracy of problem repair.
[0007] In one implementation of the present application, based on the amount of change in development data, a test suite containing a corresponding number of test cases is matched in a preset test suite set, specifically including: determining a change error range based on the amount of change in development data, and screening out a first reference test suite set that meets the change amount condition based on the change error range; determining the corresponding functional module based on the change data, matching the corresponding functional module with the applicable functional module information in the metadata corresponding to each test suite, and screening the first reference test suite set based on the matching result to obtain a second reference test suite set; determining the code multidimensional change data corresponding to the change data, and obtaining a test case quantity interval based on the code multidimensional change data and preset weights; wherein the code multidimensional change data includes at least one of the change type, data complexity change, and dependency change information; based on the test case quantity interval, matching the test suite containing the corresponding number of test cases in the second reference test suite set.
[0008] In one implementation of the present application, a frequent item set query is performed in a historical database through an association rule mining algorithm, and an item set association relationship corresponding to the modified data is constructed based on the frequent item sets, specifically including: in the historical database, determining a reference item whose occurrence frequency is greater than a preset frequency threshold; wherein the historical database includes relevant data corresponding to historical test failures; based on the time series characteristics corresponding to the relevant data, updating the time decay coefficient of the reference item, and screening the reference item based on the updated time decay coefficient value to obtain a frequent item set; determining the confidence between different frequent items, and constructing an association relationship graph based on the confidence; based on the similarity between the modified data and the frequent items, determining the target frequent item in the association relationship graph; in the association relationship graph, extracting the connection nodes corresponding to the target frequent items to determine the item set association relationship through the connection nodes.
[0009] In one implementation of the present application, in the association relationship graph, the connection nodes corresponding to the target frequent items are extracted to determine the item set association relationship through the connection nodes, specifically including: in the association relationship graph, the direct connection nodes and the indirect connection nodes corresponding to the target frequent items are extracted; based on the connection mode, the connection coefficient between the target frequent items and each node is determined; based on the function: ; Determine the correlation between the target frequent item and each node, so as to determine the item set correlation relationship through the correlation; T is the target frequent item; N is a node; is the correlation between the target frequent item and each node; is the structural similarity weight; is the combined weight of connection strength and time decay; is the structural similarity measure between the target frequent item and the node; is the connection strength measure between the target frequent item and the node; is the maximum value of the structural similarity between the target frequent item and all related nodes; is the maximum value of the connection strength between the target frequent item and all related nodes; is the time attenuation coefficient; It is the time interval between the time when the target frequent item is most recently associated with the node and the current time.
[0010] In one implementation of the present application, the changed data and the item set association relationship corresponding to the changed data are input into a preset failure data analysis model group to output the test failure cause and repair suggestions through the preset failure data analysis model group, specifically including: inputting the changed data and the item set association relationship corresponding to the changed data into a preset cause detection model, and outputting the test failure cause through the preset cause detection model; when the test failure cause belongs to the automatic repair type, querying in the preset knowledge graph based on the failure cause to obtain historical related repair solution information; wherein the knowledge graph includes multiple different test failure causes, and also includes repair solutions corresponding to multiple test failure causes; inputting the test failure cause and the historical related repair solution into the preset suggestion analysis model, and outputting the repair suggestion through the preset suggestion analysis model.
[0011] In one implementation of the present application, after outputting the cause of the test failure through a preset cause detection model, the method also includes: when the cause of the test failure belongs to a repair type to be confirmed, sending a repair suggestion to the human-computer collaboration interface, so as to receive the user's modification information on the repair suggestion through the human-computer collaboration interface; based on the modification information, real-time simulation of code running in the human-computer collaboration interface, and outputting the repair suggestion when the simulation running results meet the requirements.
[0012] In one implementation of the present application, the preset code update primitive is filled based on the test failure cause and the repair suggestion, specifically including: determining the repair type based on the test failure cause and the repair suggestion, and determining the corresponding preset code update primitive template based on the repair type; wherein the repair type includes at least one of data addition, data deletion and data modification; determining the modification location information based on the error occurrence file name and the error code starting line corresponding to the modified data; determining the repair content based on the repair suggestion; and filling the modification location information and the repair content into the corresponding preset code update primitive template.
[0013] In one implementation of the present application, the modified data is repaired through the filled update primitives, specifically including: performing a full backup of the modified data; parsing the filled update primitives through a preset code update engine, and executing corresponding code update operations; after a preset time period, comparing the updated data with the updated data corresponding to the previous preset time period, determining the updated data corresponding to the current preset time period, and building an incremental backup based on the updated data; testing the repaired modified data, and if the test fails, matching the corresponding incremental backup based on the erroneous data location, so as to re-repair the erroneous data through the incremental backup.
[0014] An embodiment of the present application provides a development data detection device based on a low-code platform, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can: match a test suite containing a corresponding number of test cases in a preset test suite set based on the amount of development data change, so as to test the changed data through the test suite; wherein the preset test suite set is composed of multiple test suites containing different numbers of test cases; in the event of a test failure, perform a frequent item set query in a historical database through an association rule mining algorithm, and construct an item set association relationship corresponding to the changed data based on the frequent item set; input the changed data and the item set association relationship corresponding to the changed data into a preset failure data analysis model group, so as to output the test failure cause and repair suggestion through the preset failure data analysis model group; based on the test failure cause and the repair suggestion, fill in the preset code update primitives, so as to repair the changed data through the filled update primitives.
[0015] A non-volatile computer storage medium provided by an embodiment of the present application stores computer executable instructions, wherein the computer executable instructions are configured to: based on the amount of development data change, match a test suite containing a corresponding number of test cases in a preset test suite set, so as to test the changed data through the test suite; wherein the preset test suite set is composed of multiple test suites containing different numbers of test cases; in the event of a test failure, perform a frequent item set query in a historical database through an association rule mining algorithm, and construct an item set association relationship corresponding to the changed data based on the frequent item set; input the changed data and the item set association relationship corresponding to the changed data into a preset failure data analysis model group, so as to output the test failure cause and repair suggestions through the preset failure data analysis model group; based on the test failure cause and the repair suggestions, fill in the preset code update primitives, so as to repair the changed data through the filled update primitives.
[0016] At least one of the above technical solutions adopted in the embodiments of the present application can achieve the following beneficial effects: the embodiments of the present application use an automated mechanism to quickly and accurately find an adapted test suite from a preset test suite set, ensuring that the number of test cases matches the changed data. It not only improves the utilization rate of test resources, but also more comprehensively covers scenarios where problems may arise due to data changes, thereby improving the accuracy and comprehensiveness of the test. Secondly, the embodiments of the present application use an association rule mining algorithm to query frequent item sets in a historical database and construct item set association relationships, and integrate a variety of code structures, data types, and different test environment factors to mine more practical frequent item sets and association relationships. In addition, the embodiments of the present application output test failure reasons and repair suggestions through the analysis capabilities of the model, fill in the preset code update primitives based on the test failure reasons and repair suggestions, and use an intelligent and adaptive filling mechanism to generate accurate and feasible code update instructions, which not only improves software development efficiency, but also improves the accuracy of problem repair. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative labor. In the drawings: Figure 1 A flow chart of a development data detection method based on a low-code platform provided in an embodiment of the present application; Figure 2 A schematic diagram of code development monitoring for a low-code platform provided in an embodiment of the present application; Figure 3A schematic diagram of a low-code platform code intelligent repair module provided in an embodiment of the present application; Figure 4 A schematic diagram of an automatic code correction process of a low-code platform provided in an embodiment of the present application; Figure 5 A structural diagram of a development data detection device based on a low-code platform provided in an embodiment of the present application.
[0018] Reference numerals: 200: Development data detection device based on low-code platform, 201: processor, 202: memory. DETAILED DESCRIPTION
[0019] The embodiments of the present application provide a development data detection method, device and medium based on a low-code platform.
[0020] In order to enable those skilled in the art to better understand the technical solutions in this application, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are only part of the embodiments of this application, not all of them. Based on the embodiments of this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this application.
[0021] The low-code platform in the embodiment of this application provides a powerful drag-and-drop component system that covers a wealth of UI components and business logic modules. Users can quickly build complex applications with simple drag-and-drop operations. Whether it is common UI elements such as buttons, forms, and charts, or business logic modules such as data processing and API calls, they can be easily integrated into the application. During the construction process, the platform supports real-time preview function, and users can view the running effects of the application interface and logic at any time, which is convenient for immediate adjustment and optimization to ensure that the final effect meets expectations.
[0022] To be able to detect potential problems in the code in real time, including code duplication, unused variables, security vulnerabilities, etc., to help developers find and fix problems in the early stages. The embodiment of the present application integrates advanced code quality analysis tools such as SonarQube, FindBugs, and Alibaba Java Coding Guidelines in the development tool. Use the integrated tool Jenkins to support CICD, and Git as a code version management control tool. After completing the code writing and static inspection locally, submit it to the Gerrit Review system. Gerrit Review is a web-based code review tool built on Git, which is also integrated in Jenkins. In addition, the platform can also integrate APM (Application Performance Monitoring) tools such as New Relic and Prometheus, which can monitor the performance indicators of the application in real time, including key data such as response time, memory usage, and error rate, to ensure that the application still runs stably under high load. When the performance indicator exceeds the preset threshold, the system will automatically trigger a real-time alarm and notify the developer through channels such as email, SMS or Slack to help the team respond and solve problems quickly, thereby ensuring the high availability and performance of the application.
[0023] The technical solution proposed in the embodiment of the present invention is described in detail below with reference to the accompanying drawings.
[0024] Figure 1 A flow chart of a development data detection method based on a low-code platform provided in an embodiment of the present application is as follows: Figure 1 As shown in the figure, the development data detection method based on the low-code platform includes the following steps: Step 101 : Based on the amount of development data change, match a test suite containing a corresponding number of test cases in a preset test suite set, so as to test the changed data through the test suite.
[0025] In one implementation of the present application, a change error range is determined according to the amount of development data change, so as to screen out a first reference test suite set that meets the change amount condition based on the change error range. Determine the function module to which it belongs according to the change data, match the function module to which it belongs with the applicable function module information in the metadata corresponding to each test suite, and screen the first reference test suite set based on the matching result to obtain a second reference test suite set. Determine the multidimensional code change data corresponding to the change data, and obtain a test case quantity interval based on the multidimensional code change data and preset weights; wherein the multidimensional code change data includes at least one of the change type, data complexity change, and dependency change information. Based on the test case quantity interval, match the test suite containing the corresponding number of test cases in the second reference test suite set. Wherein, the preset test suite set consists of multiple test suites containing different numbers of test cases.
[0026] Specifically, in terms of automated test execution, the platform integrates a variety of mainstream test frameworks, supports automated execution of test cases, can run test tasks in parallel, significantly shortens test time, and improves efficiency. In order to improve efficiency, the embodiment of the present application divides different module use cases into different Suites according to the modules. Among them, Suite defines a test suite, which can contain multiple test cases or test groups. When performing automated testing, code personnel can choose to run the full amount or a subset of use cases according to the amount of code changes to run the use case test, speed up the use case running time, and improve development efficiency while ensuring that the code can be covered by the use case. After the test is completed, the platform will automatically generate a detailed test report covering key data such as pass rate, failed use cases, performance indicators, etc., to help the team quickly locate problems. In addition, the platform also provides a comparison function for historical test results. By analyzing test data from different time periods, it helps the team understand quality trends and continuously optimize test strategies and product quality.
[0027] Specifically, when determining the amount of data change in development data, the embodiment of the present application can count the number of lines of code and the number of functions, etc. For example, taking the number of lines of code as an example, it is necessary to count the total number of lines of the code file before and after the change. Based on the determined amount of data change, the corresponding error range is determined, assuming that in the current project, an error range of 15% is more appropriate. If the calculated amount of change in the number of lines of code is 30 lines, then the lower limit is 30×(1 - 15%) = 25.5, which is rounded up to 26 lines; the upper limit is 30×(1 + 15%) = 34.5, which is rounded down to 34 lines. The embodiment of the present application prepares a test suite library in advance, and each test suite records the applicable range of development data changes. After determining the upper and lower limits of the change, the test suite library is traversed. If the range of changes applicable to the test suite is contained within the upper and lower limits, it is included in the first reference test suite set.
[0028] Furthermore, different test suites are applicable to different functional modules. By determining the functional module to which the changed data belongs and matching it with the applicable functional module information in the metadata of each test suite, the selection range of the test suite can be further narrowed to obtain the second reference test suite set. The multi-dimensional code change data in the embodiment of the present application comprehensively considers the types of changes, such as adding new functions, modifying logic, fixing vulnerabilities, etc.; changes in data complexity, such as the code structure becoming more complex, the algorithm complexity increasing, etc.; and dependency change information, such as adding a new dependency library, modifying dependencies, etc. Different change situations have different requirements for testing. By assigning preset weights to these dimensions, a reasonable range of test case quantities can be calculated.
[0029] Furthermore, based on the obtained second reference test suite set, a test suite containing a corresponding number of test cases is selected according to the calculated test case number interval. The final test suite matches the current development data changes in terms of the change amount range, functional module applicability, and test case number, and can test the changed data more effectively.
[0030] Step 102: In case of test failure, frequent item set query is performed in the historical database through the association rule mining algorithm, and the item set association relationship corresponding to the changed data is constructed according to the frequent item sets.
[0031] In one implementation of the present application, in a historical database, reference items whose occurrence frequency is greater than a preset frequency threshold are determined; wherein the historical database includes relevant data corresponding to historical test failures. Based on the time series characteristics corresponding to the relevant data, the time decay coefficient of the reference item is updated, and the reference item is screened based on the updated time decay coefficient value to obtain a frequent item set. The confidence between different frequent items is determined, and an association relationship graph is constructed based on the confidence. Based on the similarity between the modified data and the frequent items, the target frequent items are determined in the association relationship graph. In the association relationship graph, the connection nodes corresponding to the target frequent items are extracted to determine the item set association relationship through the connection nodes.
[0032] Specifically, the historical database in the embodiment of the present application stores relevant data of past test failures, which includes code change records, test environment information, error logs and other information. By setting a preset frequency threshold, all data items in the database are counted to find items with a frequency greater than the threshold, and these items are reference items. For each reference item, the time decay coefficient is calculated and updated according to the position of its related data in the time series. For example, the closer the data is to the current time, the larger its corresponding time decay coefficient; conversely, the smaller the time decay coefficient. Based on the updated time decay coefficient value, the reference items are screened, and items with a time decay coefficient within a certain range and a higher frequency of occurrence are retained, thereby obtaining a frequent item set.
[0033] Further, for different frequent items in the frequent item set, the confidence between them is calculated. The confidence in the embodiment of the present application is used to measure the correlation strength index between two frequent items, indicating the probability of another frequent item appearing when one frequent item appears. Based on these confidence values, an association relationship graph is constructed. In the association relationship graph, each frequent item is used as a node, and the lines between the nodes indicate that there is a correlation between the frequent items, and the numbers marked on the lines are the confidence values.
[0034] Furthermore, by calculating the similarity between the modified data and each frequent item in the frequent item set, the frequent item with the highest similarity is found and determined as the target frequent item. In the association graph, the target frequent item is connected to other frequent items by lines, and these connected frequent items are the connection nodes of the target frequent item. By analyzing the relationship between these connection nodes and the target frequent item, as well as the confidence between them, the item set association relationship can be determined.
[0035] In an implementation of the present application, in the association relationship graph, directly connected nodes and indirectly connected nodes corresponding to the target frequent item are extracted; and the connection coefficient between the target frequent item and each node is determined based on the connection mode.
[0036] Function-based: ; Determine the correlation between the target frequent item and each node, and determine the item set correlation relationship through the correlation. T is the target frequent item; N is a node; is the correlation between the target frequent item and each node; is the structural similarity weight; is the combined weight of connection strength and time decay; is the structural similarity measure between the target frequent item and the node; is the connection strength measure between the target frequent item and the node; is the maximum value of the structural similarity between the target frequent item and all related nodes; is the maximum value of the connection strength between the target frequent item and all related nodes; is the time attenuation coefficient; It is the time interval between the time when the target frequent item is most recently associated with the node and the current time.
[0037] Step 103: input the modified data and the item set association relationship corresponding to the modified data into the preset failure data analysis model group, so as to output the test failure cause and repair suggestion through the preset failure data analysis model group.
[0038] In one implementation of the present application, the modified data and the item set association relationship corresponding to the modified data are input into a preset cause detection model, and the cause of the test failure is output through the preset cause detection model. In the case where the cause of the test failure is of the automatic repair type, a query is performed in the preset knowledge graph based on the failure cause to obtain historical related repair solution information; wherein the knowledge graph includes multiple different test failure causes, and also includes repair solutions corresponding to multiple test failure causes. The test failure cause and the historical related repair solution are input into a preset suggestion analysis model, and the repair suggestion is output through the preset suggestion analysis model.
[0039] Specifically, the preset cause detection model in the embodiment of the present application can be a Transformer model. The preset suggestion analysis model can be a Copilot plug-in. Furthermore, the training process of the preset cause detection model is: obtain historical test failure data, and divide the data into a training set, a validation set, and a test set. The training set is used to update and learn model parameters; the validation set is used to monitor the performance of the model during the training process, adjust hyperparameters, and prevent overfitting; the test set is used to evaluate the performance of the trained model on unseen data. During the training process, the training set data is input into the Transformer model in batches. The model predicts the cause of the test failure based on the input data, and calculates the loss value between the predicted result and the true annotation. Through the back-propagation algorithm, the gradient of the loss value to the model parameters is calculated, and the optimizer is used to update the model parameters so that the loss value gradually decreases until it meets the usage requirements.
[0040] Furthermore, when the preset cause detection model receives the change data and item set associations, the model will perform feature extraction and pattern matching on the data. For example, it will analyze the grammatical structure changes of the code changes, the adjustment of functional logic, and the data interaction mode between related modules. By comparing with the various test failure cause patterns stored in the model, it can determine the most likely cause of the test failure in the current situation.
[0041] Furthermore, after the preset cause detection model outputs the cause of the test failure, it is determined whether the cause belongs to the automatic repair type. Among them, the automatic repair type usually has accumulated problems with clear and automated repair solutions. For example, some common code syntax errors, simple configuration errors, etc. can be automatically repaired through pre-set rules and algorithms. If the cause of the test failure belongs to the automatic repair type, the system will query in the preset knowledge graph. The preset knowledge graph in the embodiment of the present application contains multiple different causes of test failure and the repair solutions corresponding to each cause. According to the detected cause of the test failure, find the node that matches it in the knowledge graph, and obtain the repair solution information corresponding to the node.
[0042] Furthermore, the reasons for the test failure and the historical relevant repair solution information obtained from the knowledge graph are input into the preset suggestion analysis model. The preset suggestion analysis model will conduct a comprehensive analysis of the input test failure reasons and repair solutions. Through the analysis, the model generates one or more specific and actionable repair suggestions.
[0043] In one implementation of the present application, when the cause of the test failure belongs to the type of repair to be confirmed, the repair suggestion is sent to the human-computer collaboration interface to receive the user's modification information on the repair suggestion through the human-computer collaboration interface. Based on the modification information, the code operation is simulated in real time on the human-computer collaboration interface, and the repair suggestion is output when the simulation operation result meets the requirements.
[0044] Specifically, after determining that the cause of the test failure belongs to the type of repair to be confirmed, the repair suggestions generated by the preset suggestion analysis model are sent to the human-computer collaboration interface. After viewing the repair suggestions on the human-computer collaboration interface, the developer evaluates and modifies the repair suggestions. After receiving the modification information entered by the developer on the human-computer collaboration interface, the built-in code simulation running environment is used to simulate the code running process in real time according to these modified repair suggestions. During the simulation run, various possible input situations are simulated, including browsing behavior data of different users, the operating status of the system, and possible abnormal situations. When the simulation run results meet the requirements, the repair suggestions modified by the human-computer collaboration interface and verified by the simulation will be output.
[0045] Step 104: based on the test failure reason and the repair suggestion, fill in the preset code update primitives to repair the modified data through the filled update primitives.
[0046] In one implementation of the present application, the repair type is determined based on the test failure cause and the repair suggestion, and the corresponding preset code update primitive template is determined based on the repair type; wherein the repair type includes at least one of data addition, data deletion, and data modification. The modification location information is determined based on the error occurrence file name and the error code start line corresponding to the modified data. The repair content is determined based on the repair suggestion, and the modification location information and the repair content are filled into the corresponding preset code update primitive template.
[0047] Specifically, when the test failure is due to the lack of certain necessary data that causes the function to not operate normally, and the repair suggestion is to add specific data, the repair type is "data addition". If the test failure is due to the existence of redundant data that affects system performance, and the repair suggestion is to delete these unnecessary data, then the repair type is "data deletion". When the test fails because of incorrect data format or incorrect data content, and the repair suggestion is to modify the data content or format, the repair type is "data modification". After clarifying the cause of the test failure, the name of the file where the error occurred and the starting line of the error code are important bases for accurately locating the modification location. The name of the file where the error occurred can determine the specific file where the code is located, and the starting line of the error code clarifies the starting position of the problem code in the file. With these two pieces of information, you can quickly find the code snippets that need to be repaired in the code file.
[0048] For example, if the repair suggestion is "change the data type of the product price field from string to floating point number", then the repair content is to execute the specific code operation of converting the data type, which may include modifying the data type definition of the field in the database table structure, and making corresponding adjustments to the part involving data processing of the field in the relevant code to ensure that the program can run correctly after the data type conversion.
[0049] Furthermore, after determining the repair type, modification location information, and repair content, this information needs to be filled into the corresponding preset code update primitive template to generate specific code update instructions. Different repair types correspond to different code update primitive templates. For example, for the "data addition" repair type, the template can be "add {repair content} at {file name}:{starting line}"; for the "data deletion" repair type, the template can be "delete {repair content} at {file name}:{starting line}"; for the "data modification" repair type, the template can be "modify {original content} to {repair content} at {file name}:{starting line}".
[0050] Specifically, the embodiment of the present application is based on the cloud-native environment Docker + Kubernetes, and the front-end uses VUE + Element UI to provide a visual development interface, a test case designer, and a quality monitoring dashboard. Back-end technology stack: Node.js + Python + Flask, used to process business logic, code generation, test execution, and model reasoning. The AI model can use PyTorch + Hugging Face Transformers to infer the cause of failed cases, recommend solutions, and suggest code repairs. The database uses MySQL + MongoDB to store test cases, code quality data, model reasoning results, and code correction records. Custom code update primitives, the style is as follows: Add XX.java 63 "log.error("File Disk Full")".
[0051] In one implementation of the present application, a full backup is performed on the modified data. The filled update primitives are parsed through a preset code update engine, and the corresponding code update operation is performed. After a preset time period, the updated data is compared with the updated data corresponding to the previous preset time period, the updated data corresponding to the current preset time period is determined, and an incremental backup is constructed based on the updated data. The repaired modified data is tested, and if the test fails, the corresponding incremental backup is matched based on the location of the erroneous data, so that the erroneous data can be repaired again through the incremental backup.
[0052] Specifically, when it is determined that the software needs to be modified, all these files and data are copied to the backup storage device. When the filled update primitives are generated, the code update engine will parse them. The update primitives contain detailed code update instructions, such as modification location information, repair content, and repair type. The code update engine will perform accurate code update operations in the corresponding code files based on these instructions.
[0053] Further, in order to perform data backup and management more efficiently, the embodiment of the present application sets preset time periods, such as every hour, every day, etc. After each preset time period ends, the currently updated data will be compared with the updated data corresponding to the previous preset time period. Through the data comparison algorithm, the data that has changed in the current time period is found, and these changed data are the updated data. Based on the updated data, an incremental backup is constructed. The incremental backup only stores the data that has changed in the current time period. Compared with the full backup, the amount of backup data is reduced, and the backup efficiency and storage utilization are improved. After completing the code update operation, the repaired modified data is tested. If the test fails, the corresponding incremental backup is matched according to the location of the erroneous data. Since the incremental backup records the changes in the data in each time period, by analyzing the location and time of the error, the incremental backup data related to the error in the time period can be found. Then, the erroneous data is repaired again through these incremental backup data.
[0054] Figure 2 A low-code platform code development monitoring schematic diagram provided for an embodiment of the present application, such as Figure 2 As shown, the code development monitoring of the low-code platform includes local code development, Jenkins system, and Git code repository. In the CI / CD process, if the local code is pushed to Gerrit, the code static review fails, or the Selinium summary test case fails to run, the code will be judged to have problems and the developer will be required to modify and submit it again. Sometimes the code may fail because the log output is modified and inconsistent with the judgment file. Or a base class file is modified, and the logic is modified in one of its call files, and the test case fails. These behaviors require developers to spend extra time to correct them.
[0055] Figure 3 A schematic diagram of a low-code platform code intelligent repair module provided in an embodiment of the present application, such as Figure 3As shown, the low-code platform code intelligent repair module includes: when a test case fails, the platform automatically collects relevant logs, stack information and context data, and uses the pre-trained AI model to infer the cause of failure. The model infers possible causes of failure, such as logical errors, data anomalies, or environmental problems, by combining historical data and current context. Based on these inferences, the platform will call the corresponding intelligent repair engine module, and recommend corresponding code correction solutions such as modifying code logic, adjusting system configuration, or repairing data problems by calling the AI model reasoning and analysis module. Then, according to the custom update primitives (including adding Add, modifying Modify, and deleting Delete), the code is updated through the code update engine (such as Shell script). At the same time, the modification records are stored in the database, and the content includes fields (update type, file name, modification start line number, and modification content).
[0056] Figure 4 A schematic diagram of an automatic code correction process of a low-code platform provided in an embodiment of the present application is as follows: Figure 4 As shown in the figure, the automatic code correction process of the low-code platform includes: For simple errors (such as syntax errors and null pointer exceptions), the platform can automatically generate repair code and submit it to the code base. For complex problems, it can provide repair suggestions and wait for developers to confirm. At the same time, by configuring the message function in the Jenkins system, developers are notified to check the problem in time and confirm the repair. In addition, the platform will record the analysis results and solutions of each failure to form a knowledge base to provide reference for similar problems in the future, thereby realizing continuous optimization and intelligent testing and development processes.
[0057] It should be noted that the CI / CD tool used in the embodiments of this application is Jenkins, and other mainstream CI / CD tools (such as GitLab CI, GitHub Actions, etc.) can also be seamlessly integrated to achieve full process automation from code submission to building, testing and deployment. Through integration, developers can automatically trigger the build and test process after the code is changed to ensure code quality. At the same time, the platform provides a one-click deployment function that supports rapid deployment of applications to multiple environments (such as development, testing, and production), and has a built-in rollback mechanism that can quickly restore to the previous stable version when problems occur in the deployment, thereby ensuring the security and reliability of the deployment. This highly automated process not only improves development efficiency, but also reduces the risks brought by human operations.
[0058] Figure 5 A schematic diagram of a development data detection device based on a low-code platform provided in an embodiment of the present application. Figure 5As shown, a development data detection device 200 based on a low-code platform includes: at least one processor 201; and a memory 202 communicatively connected to the at least one processor 201; wherein the memory 202 stores instructions that can be executed by the at least one processor 201, and the instructions are executed by the at least one processor 201 so that the at least one processor 201 can: match a test suite containing a corresponding number of test cases in a preset test suite set based on the amount of development data change, so as to test the changed data through the test suite; wherein the preset test suite set is composed of multiple test suites containing different numbers of test cases; in the case of test failure, a frequent item set query is performed in a historical database through an association rule mining algorithm, and an item set association relationship corresponding to the changed data is constructed according to the frequent item set; the changed data and the item set association relationship corresponding to the changed data are input into a preset failure data analysis model group, so as to output the test failure cause and repair suggestion through the preset failure data analysis model group; based on the test failure cause and the repair suggestion, the preset code update primitive is filled in, so as to repair the changed data through the filled update primitive.
[0059] A non-volatile computer storage medium provided by an embodiment of the present application stores computer executable instructions, wherein the computer executable instructions are configured to: based on the amount of development data change, match a test suite containing a corresponding number of test cases in a preset test suite set, so as to test the changed data through the test suite; wherein the preset test suite set is composed of multiple test suites containing different numbers of test cases; in the event of a test failure, perform a frequent item set query in a historical database through an association rule mining algorithm, and construct an item set association relationship corresponding to the changed data based on the frequent item set; input the changed data and the item set association relationship corresponding to the changed data into a preset failure data analysis model group, so as to output the test failure cause and repair suggestions through the preset failure data analysis model group; based on the test failure cause and the repair suggestions, fill in the preset code update primitives, so as to repair the changed data through the filled update primitives.
[0060] Each embodiment in this application is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device, equipment, and non-volatile computer storage medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0061] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the embodiments of the present application may have various changes and variations. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present application.
Claims
1. A development data detection method based on a low-code platform, characterized in that: The method comprises: Based on the amount of development data changes, a test suite containing a corresponding number of test cases is matched in a preset test suite set, so as to test the changed data through the test suite; wherein the preset test suite set is composed of a plurality of test suites containing different numbers of test cases; In case of test failure, frequent item set query is performed in the historical database through the association rule mining algorithm, and the item set association relationship corresponding to the changed data is constructed according to the frequent item sets; Input the modified data and the item set association relationship corresponding to the modified data into a preset failure data analysis model group, so as to output the test failure cause and repair suggestion through the preset failure data analysis model group; Based on the test failure reason and the repair suggestion, the preset code update primitive is filled in, so as to repair the changed data through the filled update primitive.
2. According to a development data detection method based on a low-code platform according to claim 1, it is characterized in that: The matching of the test suites containing the corresponding number of test cases in the preset test suite set based on the amount of development data changes specifically includes: Determining a change error range according to the development data change amount, so as to screen out a first reference test suite set that meets the change amount condition based on the change error range; Determine the function module according to the modified data, match the function module with the applicable function module information in the metadata corresponding to each of the test suites, and screen the first reference test suite set based on the matching result to obtain a second reference test suite set; Determine the code multi-dimensional change data corresponding to the change data, and obtain the test case quantity interval based on the code multi-dimensional change data and the preset weight; wherein the code multi-dimensional change data includes at least one of the change type, data complexity change, and dependency change information; Based on the test case quantity range, a test suite containing a corresponding number of test cases is matched in the second reference test suite set.
3. According to a development data detection method based on a low-code platform according to claim 1, it is characterized in that: The method of performing frequent item set query in the historical database by using the association rule mining algorithm and constructing the item set association relationship corresponding to the modified data according to the frequent item sets specifically includes: Determining, in a historical database, reference items whose occurrence frequency is greater than a preset frequency threshold; wherein the historical database includes relevant data corresponding to historical test failures; Based on the time series characteristics corresponding to the relevant data, the time decay coefficient of the reference item is updated, and the reference item is screened based on the updated time decay coefficient value to obtain the frequent item set; Determine the confidence between different frequent items, and construct an association relationship graph based on the confidence; Based on the similarity between the modified data and the frequent items, determining a target frequent item in the association relationship graph; In the association relationship graph, the connection nodes corresponding to the target frequent items are extracted to determine the item set association relationship through the connection nodes.
4. According to a development data detection method based on a low-code platform according to claim 3, it is characterized in that: The step of extracting the connection nodes corresponding to the target frequent items in the association relationship graph to determine the item set association relationship through the connection nodes specifically includes: In the association relationship graph, extracting directly connected nodes and indirectly connected nodes corresponding to the target frequent item; Determine the connection coefficient between the target frequent item and each node based on the connection mode; Function-based: ; Determine the association degree between the target frequent item and each node, so as to determine the item set association relationship through the association degree; in, T is the target frequent item; N is a node; is the correlation between the target frequent item and each node; is the structural similarity weight; is the combined weight of connection strength and time decay; is the structural similarity measure between the target frequent item and the node; is the connection strength measure between the target frequent item and the node; is the maximum value of the structural similarity between the target frequent item and all related nodes; is the maximum value of the connection strength between the target frequent item and all related nodes; is the time attenuation coefficient; It is the time interval between the time when the target frequent item is most recently associated with the node and the current time.
5. According to a development data detection method based on a low-code platform according to claim 1, it is characterized in that: The step of inputting the modified data and the item set association relationship corresponding to the modified data into a preset failure data analysis model group, so as to output the test failure cause and repair suggestion through the preset failure data analysis model group, specifically includes: Input the modified data and the item set association relationship corresponding to the modified data into a preset cause detection model, and output the test failure reason through the preset cause detection model; In the case where the test failure cause belongs to the automatic repair type, a query is performed in a preset knowledge graph based on the failure cause to obtain historical related repair solution information; wherein the knowledge graph includes multiple different test failure causes, and also includes multiple repair solutions corresponding to the test failure causes respectively; The test failure cause and the historically relevant repair solution are input into a preset suggestion analysis model, and the repair suggestion is output through the preset suggestion analysis model.
6. According to a development data detection method based on a low-code platform according to claim 5, it is characterized in that: After outputting the test failure reason through the preset reason detection model, the method further includes: In the case where the cause of the test failure belongs to a repair type to be confirmed, sending the repair suggestion to the human-machine collaboration interface to receive the user's modification information on the repair suggestion through the human-machine collaboration interface; The code operation is simulated in real time on the human-machine collaborative interface based on the modification information, and repair suggestions are output when the simulation operation results meet the requirements.
7. According to a low-code platform-based development data detection method according to claim 1, it is characterized in that: The filling of the preset code update primitive based on the test failure reason and the repair suggestion specifically includes: Based on the test failure reason and the repair suggestion, a repair type is determined, and a corresponding preset code update primitive template is determined based on the repair type; wherein the repair type includes at least one of data addition, data deletion, and data modification; Determine the modification location information according to the error occurrence file name and the error code starting line corresponding to the modified data; Determine the repair content according to the repair suggestion; Fill the modification position information and the repair content into the corresponding preset code update primitive template.
8. According to a low-code platform-based development data detection method according to claim 1, it is characterized in that: The repairing of the modified data by the filled update primitive specifically includes: Performing a full backup of the modified data; Parsing the filled update primitives through a preset code update engine and executing corresponding code update operations; After a preset time period, the updated data is compared with the updated data corresponding to the previous preset time period, the updated data corresponding to the current preset time period is determined, and an incremental backup is constructed based on the updated data; The modified data after repair is tested, and if the test fails, the corresponding incremental backup is matched based on the position of the erroneous data, so as to repair the erroneous data again through the incremental backup.
9. A development data detection device based on a low-code platform, characterized in that: The device comprises a memory for storing computer program instructions and a processor for executing the program instructions, wherein when the computer program instructions are executed by the processor, the device is triggered to execute the method according to any one of claims 1 to 8.
10. A non-volatile computer storage medium storing computer executable instructions, characterized in that: The computer executable instructions can execute the method according to any one of claims 1 to 8.
Citation Information
Patent Citations
A continuous integration automated test method
CN109542769A
Test case screening method and device, computer equipment and storage medium
CN110489321A
Test case repairing method and device, computer equipment and storage medium
CN112363920A
Electric power information system security protection method and device based on code semantic analysis
CN113297580A
Intelligent operation and maintenance method and device, electronic equipment and storage medium
CN113516244A
Cited By
Code repair method and device based on test case, equipment and storage medium
CN121349839A