Method and system for preventing function degradation

By conducting automated construction and interface testing in an independent environment, and combining model analysis to determine whether code fallback is needed, the problem of performance degradation in iterative development is solved, ensuring iteration quality and performance, and promoting rapid iterative development of functions.

CN119292905APending Publication Date: 2025-01-10FUJIAN FUNO MOBILE COMM TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411342170.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-25
Publication Date
2025-01-10

AI Technical Summary

Technical Problem

During the iteration of system functions, iterative development leads to a rapid decline in system performance, making it difficult to ensure the quality and performance of iteration while promoting rapid iterative development of functions.

Method used

Obtain and deploy the latest code of the current iterative function in an independent environment, perform automated construction and interface testing, determine whether it is an abnormal iteration through response delay time, and use model analysis to determine whether code fallback is required to ensure iteration quality and performance.

Benefits of technology

Through automated construction and testing, it is ensured that iteration does not affect the operation of the original system, improve the accuracy and objectivity of abnormal iteration, handle exceptions in a timely manner, alleviate performance degradation, and promote rapid iterative development of functions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119292905A_ABST
    Figure CN119292905A_ABST
Patent Text Reader

Abstract

The invention relates to a method and system for preventing function degradation, and the method comprises the steps: packaging and deploying the latest code of a current iteration function in an independent environment, completing the automatic construction of the current iteration function, and carrying out the automatic testing of an interface of the current iteration function. The method comprises the steps of calculating response delay time according to current response time of an interface and historical response time of last iteration, judging whether the iteration is abnormal or not according to the response delay time, judging whether code rollback needs to be carried out or not through a first model for the abnormal iteration, and directly carrying out code rollback if the code rollback needs to be carried out. Therefore, the current iteration function is automatically constructed in the independent environment, it is ensured that follow-up automatic testing does not affect operation of an original system, whether code rollback needs to be carried out or not can be further analyzed for abnormal iteration, code rollback can be directly carried out for required iteration, and the efficiency of code rollback is improved. The problem of rapid performance reduction is relieved while the iteration quality is ensured, and rapid iteration development of functions is promoted.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a method and system for preventing functional degradation. Background Art

[0002] Most of the current systems have various iterative development of functions. Each iteration, whether it is to fix historical problems or add new required functions, will have an impact on the performance of historical functions and may cause the performance of historical functions to decline. Therefore, usually when the function of the system project has been iterated to a certain extent, the performance has rapidly declined to a certain extent due to multiple iterations. In this way, project personnel are required to spend time to optimize and improve the performance of the entire project. The iteration quality and system performance cannot be guaranteed during the iteration process, which is not conducive to the rapid iterative development of functions. Summary of the invention

[0003] The technical problem to be solved by the present invention is: the present invention provides a method and system for preventing functional degradation, ensuring iteration quality while ensuring system performance during the iteration process, and promoting rapid iterative development of functions.

[0004] In order to solve the above technical problems, the technical solution adopted by the present invention is:

[0005] In a first aspect, the present invention provides a method for preventing functional degradation, comprising:

[0006] Obtain the latest code of the current iteration function, package and deploy the latest code in an independent environment, and complete the automated construction of the current iteration function;

[0007] Perform automated interface testing on the automatically constructed current iteration function, obtain the current response time of the interface and the historical response time of the interface in the previous iteration, calculate the response delay time based on the current response time and the historical response time, and determine whether the response delay time exceeds a first threshold. If so, mark the current iteration function corresponding to the latest code as an abnormal iteration, and use the first model to analyze the abnormal iteration to determine whether code rollback is required. If necessary, perform code rollback on the current iteration function.

[0008] The beneficial effects of the present invention are as follows: by packaging and deploying the latest code of the current iterative function in an independent environment, the automatic construction of the current iterative function is realized, ensuring that the subsequent automated testing does not affect the operation of the original system, and judging whether the current iterative function is an abnormal iteration by the response delay time of the interface through automated testing, thereby ensuring the accuracy and objectivity of the abnormal iteration, and for the abnormal iteration, judging whether code rollback is required through the first model analysis, and directly performing code rollback for those that need it, thereby ensuring the iteration quality while alleviating the problem of rapid performance degradation, ensuring system performance, and promoting the rapid iterative development of functions.

[0009] Optionally, the obtaining of the latest code of the current iteration function includes:

[0010] Automatically pull the latest code from the git address of the current iteration function.

[0011] According to the above description, the latest code is obtained from the git address of the current iteration function to ensure the accuracy and effectiveness of the latest code.

[0012] Optionally, marking the current iteration function corresponding to the latest code as an abnormal iteration includes:

[0013] An abnormal alarm is issued for the abnormal iteration.

[0014] According to the above description, abnormal alarms will be issued for abnormal iterations. The timeliness of the alarm ensures that abnormal iterations are handled in a timely manner, reducing the impact on the rapid iterative development of functions.

[0015] Optionally, analyzing the abnormal iteration through the first model to determine whether code rollback is required includes:

[0016] Obtain the historical code of the previous iteration of the current iteration function, and input the preset exception rule, the historical code, the latest code, the current response time, the historical response time and the response delay time into the first model for analysis to determine whether code rollback is required.

[0017] According to the above description, when analyzing whether to perform code rollback for an abnormal iteration, the historical code of the previous iteration of the current iteration function, the latest code, the preset exception rules, the current response time, the historical response time and the response delay time are combined to make a comprehensive judgment to improve the accuracy and objectivity of the judgment.

[0018] Optionally, if necessary, performing code rollback on the current iteration function includes:

[0019] It is determined whether the code rollback meets the expected effect. If not, the code rollback is marked as an error rollback, and the first model is corrected according to the error rollback to obtain a corrected first model.

[0020] According to the above description, when the code rollback does not meet the preset effect, that is, when there is a misjudgment in the code rollback, the first model will be corrected to improve the accuracy of the first model.

[0021] In a second aspect, the present invention provides a system for preventing functional degradation, comprising:

[0022] The automated construction module is used to obtain the latest code of the current iteration function, package and deploy the latest code in an independent environment, and complete the automated construction of the current iteration function;

[0023] An automated testing module is used to perform automated testing of the interface of the current iteration function of the automated construction, obtain the current response time of the interface and the historical response time of the interface in the previous iteration, calculate the response delay time based on the current response time and the historical response time, and determine whether the response delay time exceeds a first threshold. If it exceeds the first threshold, the current iteration function corresponding to the latest code is marked as an abnormal iteration, and the abnormal iteration is analyzed through the first model to determine whether code rollback is required. If necessary, the current iteration function is code rolled back.

[0024] The beneficial effects of the present invention are as follows: by packaging and deploying the latest code of the current iterative function in an independent environment, the automatic construction of the current iterative function is realized, ensuring that the subsequent automated testing does not affect the operation of the original system, and judging whether the current iterative function is an abnormal iteration by the response delay time of the interface through automated testing, thereby ensuring the accuracy and objectivity of the abnormal iteration, and for the abnormal iteration, judging whether code rollback is required through the first model analysis, and directly performing code rollback for those that need it, thereby ensuring the iteration quality while alleviating the problem of rapid performance degradation, ensuring system performance, and promoting the rapid iterative development of functions.

[0025] Optionally, the automation construction module is specifically:

[0026] Automatically pull the latest code from the git address of the current iteration function.

[0027] According to the above description, the latest code is obtained from the git address of the current iteration function to ensure the accuracy and effectiveness of the latest code.

[0028] Optionally, the automated testing module includes:

[0029] The alarm module is used to issue an abnormal alarm for the abnormal iteration.

[0030] According to the above description, abnormal alarms will be issued for abnormal iterations. The timeliness of the alarm ensures that abnormal iterations are handled in a timely manner, reducing the impact on the rapid iterative development of functions.

[0031] Optionally, the automated testing module is specifically:

[0032] Obtain the historical code of the previous iteration of the current iteration function, and input the preset exception rule, the historical code, the latest code, the current response time, the historical response time and the response delay time into the first model for analysis to determine whether code rollback is required.

[0033] According to the above description, when analyzing whether to perform code rollback for an abnormal iteration, the historical code of the previous iteration of the current iteration function, the latest code, the preset exception rules, the current response time, the historical response time and the response delay time are combined to make a comprehensive judgment to improve the accuracy and objectivity of the judgment.

[0034] Optionally, the automated testing module includes:

[0035] The correction module is used to determine whether the code rollback meets the expected effect. If not, the code rollback is marked as an error rollback, and the first model is corrected according to the error rollback to obtain a corrected first model.

[0036] According to the above description, when the code rollback does not meet the preset effect, that is, when there is a misjudgment in the code rollback, the first model will be corrected to improve the accuracy of the first model. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 A flow chart of a method for preventing functional degradation provided by an embodiment of the present invention;

[0038] Figure 2 A schematic diagram of the overall flow of a method for preventing functional degradation provided by an embodiment of the present invention;

[0039] Figure 3 A schematic diagram of the structure of a system for preventing functional degradation provided by an embodiment of the present invention.

[0040] [Description of Reference Numerals]

[0041] 1. A system to prevent functional degradation;

[0042] 2. Automated building blocks;

[0043] 3. Automated testing module; 31. Alarm module; 32. Correction module. DETAILED DESCRIPTION

[0044] In order to better understand the above technical solution, exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided to enable a clearer and more thorough understanding of the present invention and to fully convey the scope of the present invention to those skilled in the art.

[0045] Embodiment 1

[0046] Please refer to Figure 1 to Figure 2 The present invention provides a method for preventing functional degradation, comprising the steps of:

[0047] S1. Obtain the latest code of the current iteration function, package and deploy the latest code in an independent environment, and complete the automated construction of the current iteration function;

[0048] At this time, in step S1, the latest code of the current iteration function is obtained including:

[0049] S11. Automatically pull the latest code from the git address of the current iteration function.

[0050] In this embodiment, if Figure 2 As shown in the figure, after each iteration function is submitted, the latest code of the current iteration function will be automatically pulled from the git address of the current iteration function, so that the latest code can be packaged and deployed in an independent environment. That is, the entire set of code is integrated, packaged and deployed in an independent environment using the same environmental conditions as the original system to achieve automated construction of the current iteration function.

[0051] S2. Perform automated interface testing on the automatically constructed current iteration function, obtain the current response time of the interface and the historical response time of the interface in the previous iteration, calculate the response delay time according to the current response time and the historical response time, and determine whether the response delay time exceeds a first threshold. If so, mark the current iteration function corresponding to the latest code as an abnormal iteration, and analyze the abnormal iteration through the first model to determine whether code rollback is required. If necessary, perform code rollback on the current iteration function.

[0052] In this embodiment, if Figure 2As shown, after step S1 completes the automated construction of the current iteration function, it will perform automated testing on its interface. When performing automated testing on the interface, if there are multiple interfaces, each interface will be automatically tested separately. If the interface has changed compared with the previous iteration, the interface will be redeployed and then automatically tested according to the process of step S1. The response delay time is calculated by obtaining the current response time of the interface and the historical response time of the interface in the previous iteration, and it is determined whether the response delay time exceeds the first threshold. If the response delay time exceeds the first threshold, it means that there is an abnormality in the current iteration, that is, there is an abnormality in the current iteration function corresponding to the latest code, and it is marked as an abnormal iteration. For the abnormal iteration, the first model will be used to analyze and determine whether code rollback is required. If necessary, the code rollback will be performed on the current iteration function.

[0053] In a specific embodiment, if the first threshold is 10% of the historical response time of the interface in the last iteration, and the historical response time of the interface in the last iteration is 100ms, then the first threshold is 100ms*10%=10ms, and the current response time is 150ms, then the response delay time is 150ms-100ms=50ms, 50ms is greater than the first threshold, then there is an abnormality in the current iteration, that is, there is an abnormality in the current iteration function corresponding to the latest code, and it is marked as an abnormal iteration; conversely, if the current response time is 105ms, then the response delay time is 105ms-100ms=5ms, 5ms is less than the first threshold, then there is no abnormality in the current iteration, that is, there is no abnormality in the current iteration function corresponding to the latest code, and the specific first threshold can be adjusted according to actual conditions.

[0054] At this time, in step S2, marking the current iteration function corresponding to the latest code as an abnormal iteration includes:

[0055] S21. Issue an abnormal warning for the abnormal iteration.

[0056] In this embodiment, if Figure 2 As shown, an abnormal alarm will be issued for abnormal iterations, and the notification message of the abnormal alarm will be sent to the operation and maintenance personnel in the form of text messages, emails, etc.

[0057] At this time, the analysis of the abnormal iteration by the first model in step S2 to determine whether code rollback is required includes:

[0058] S22. Obtain the historical code of the previous iteration of the current iteration function, and input the preset exception rule, the historical code, the latest code, the current response time, the historical response time and the response delay time into the first model for analysis to determine whether code rollback is required.

[0059] In this embodiment, if Figure 2 As shown, when the first model is used to analyze the abnormal iteration to determine whether code rollback is needed, the historical code of the previous iteration of the current iteration function, the latest code, the current response time, the historical response time, the response delay time and the preset abnormal rules are combined for judgment, wherein the first model is obtained by pre-training the large model with historical data, and the historical data includes the historical response time and corresponding code before the iteration of the historical iteration function, the historical response time and corresponding code after the iteration, the historical response delay time, the preset abnormal rules and the historical judgment of whether rollback is needed.

[0060] At this time, if necessary, the code rollback of the current iteration function in step S2 includes:

[0061] S23. Determine whether the code rollback meets the expected effect. If not, mark the code rollback as an error rollback, and correct the first model according to the error rollback to obtain a corrected first model.

[0062] In this embodiment, if Figure 2 As shown, when the first model determines that the current iterative function needs to be code rolled back, it will be further determined whether the code rollback meets the expected effect. At this time, a new automatic test is performed manually or on the iterative function after the code rollback. If it is manually determined that no code rollback is needed, or the test result obtained after the new automatic test of the iterative function after the code rollback is worse than the test result before the code rollback, it means that the code rollback does not meet the expected effect. Therefore, the code rollback is marked as an error rollback, and the first model is corrected for the error rollback to obtain the corrected first model.

[0063] Embodiment 2

[0064] Please refer to Figure 3 The present invention provides a system 1 for preventing functional degradation, comprising: an automated construction module 2, an automated testing module 3, an alarm module 31 and a correction module 32.

[0065] The automated construction module 2 is used to obtain the latest code of the current iteration function, package and deploy the latest code in an independent environment, and complete the automated construction of the current iteration function;

[0066] The automated testing module 3 is used to perform automated testing on the interface of the current iteration function of the automated construction, obtain the current response time of the interface and the historical response time of the interface in the previous iteration, calculate the response delay time based on the current response time and the historical response time, and determine whether the response delay time exceeds a first threshold. If it exceeds the first threshold, the current iteration function corresponding to the latest code is marked as an abnormal iteration, and the abnormal iteration is analyzed through the first model to determine whether code rollback is required. If necessary, the current iteration function is code rolled back.

[0067] Specifically, the automated construction module 2 is specifically:

[0068] Automatically pull the latest code from the git address of the current iteration function.

[0069] Specifically, the automated testing module 3 includes:

[0070] The alarm module 31 is used to issue an abnormal alarm for the abnormal iteration.

[0071] Specifically, the automated testing module 3 is:

[0072] Obtain the historical code of the previous iteration of the current iteration function, and input the preset exception rule, the historical code, the latest code, the current response time, the historical response time and the response delay time into the first model for analysis to determine whether code rollback is required.

[0073] Specifically, the automated testing module 3 includes:

[0074] The correction module 32 is used to determine whether the code rollback meets the expected effect. If not, the code rollback is marked as an error rollback, and the first model is corrected according to the error rollback to obtain a corrected first model.

[0075] Since the system / device described in the above embodiments of the present invention is a system / device used to implement the method of the above embodiments of the present invention, a person skilled in the art can understand the specific structure and deformation of the system / device based on the method described in the above embodiments of the present invention, and thus will not be described in detail here. All systems / devices used in the method of the above embodiments of the present invention belong to the scope of protection of the present invention.

[0076] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0077] The present invention is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present invention. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions.

[0078] It should be noted that in the claims, any reference numerals placed between brackets shall not be construed as limiting the claims. The word "comprising" does not exclude the presence of components or steps not listed in the claims. The word "a" or "an" preceding a component does not exclude the presence of a plurality of such components. The invention may be implemented by means of hardware comprising several different components and by means of a suitably programmed computer. In the claims enumerating several means, several of these means may be embodied by the same hardware. The use of the words first, second, third, etc., is for convenience of expression only and does not indicate any order. These words may be understood as part of the component name.

[0079] In addition, it should be noted that, in the description of this specification, the description of the terms "one embodiment", "some embodiments", "embodiment", "example", "specific example" or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, unless they are contradictory.

[0080] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments after knowing the basic creative concept. Therefore, the claims should be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present invention.

[0081] Obviously, those skilled in the art can make various modifications and variations to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention should also include these modifications and variations.

Claims

1. A method for preventing functional degradation, characterized in that: include: Obtain the latest code of the current iteration function, package and deploy the latest code in an independent environment, and complete the automated construction of the current iteration function; Perform automated interface testing on the automatically constructed current iteration function, obtain the current response time of the interface and the historical response time of the interface in the previous iteration, calculate the response delay time based on the current response time and the historical response time, and determine whether the response delay time exceeds a first threshold. If so, mark the current iteration function corresponding to the latest code as an abnormal iteration, and use the first model to analyze the abnormal iteration to determine whether code rollback is required. If necessary, perform code rollback on the current iteration function.

2. A method for preventing functional degradation according to claim 1, characterized in that: The latest code for getting the current iteration function includes: Automatically pull the latest code from the git address of the current iteration function.

3. A method for preventing functional degradation according to claim 1, characterized in that: The step of marking the current iteration function corresponding to the latest code as an abnormal iteration includes: An abnormal alarm is issued for the abnormal iteration.

4. A method for preventing functional degradation according to claim 1, characterized in that: The analyzing and determining whether code rollback is required by the abnormal iteration through the first model includes: Obtain the historical code of the previous iteration of the current iteration function, and input the preset exception rule, the historical code, the latest code, the current response time, the historical response time and the response delay time into the first model for analysis to determine whether code rollback is required.

5. A method for preventing functional degradation as claimed in claim 1, characterized in that: If necessary, performing code rollback on the current iteration function includes: It is determined whether the code rollback meets the expected effect. If not, the code rollback is marked as an error rollback, and the first model is corrected according to the error rollback to obtain a corrected first model.

6. A system for preventing functional degradation, characterized in that: include: The automated construction module is used to obtain the latest code of the current iteration function, package and deploy the latest code in an independent environment, and complete the automated construction of the current iteration function; An automated testing module is used to perform automated testing of the interface of the current iteration function of the automated construction, obtain the current response time of the interface and the historical response time of the interface in the previous iteration, calculate the response delay time based on the current response time and the historical response time, and determine whether the response delay time exceeds a first threshold. If it exceeds the first threshold, the current iteration function corresponding to the latest code is marked as an abnormal iteration, and the abnormal iteration is analyzed through the first model to determine whether code rollback is required. If necessary, the current iteration function is code rolled back.

7. A system for preventing functional degradation as claimed in claim 6, characterized in that: The automation building modules are specifically: Automatically pull the latest code from the git address of the current iteration function.

8. A system for preventing functional degradation as claimed in claim 6, characterized in that: The automated testing module includes: The alarm module is used to issue an abnormal alarm for the abnormal iteration.

9. A system for preventing functional degradation as claimed in claim 6, characterized in that: The automated testing module is specifically: Obtain the historical code of the previous iteration of the current iteration function, and input the preset exception rule, the historical code, the latest code, the current response time, the historical response time and the response delay time into the first model for analysis to determine whether code rollback is required.

10. The system for preventing functional degradation according to claim 6, characterized in that: The automated testing module includes: The correction module is used to determine whether the code rollback meets the expected effect. If not, the code rollback is marked as an error rollback, and the first model is corrected according to the error rollback to obtain a corrected first model.