Machine Learning Code Parameter Verification for Missing Logic
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current Automated Program Repair techniques are inadequate for addressing 'verification missing' issues in code, which can lead to security vulnerabilities and data breaches, as they fail to understand and identify business logic requirements effectively.
Innovation Solution
A machine learning model is trained on a sample code set and sample verification statements to generate verification statements for code parameters, enabling automatic recognition and repair of verification missing issues, thereby enhancing code parameter verification.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If traditional Automated Program Repair techniques are used, then code repair functionality is provided, but verification missing issues cannot be effectively detected and repaired
Solution Approach 1:
The patent replaces traditional mechanical/code-based verification methods with a machine learning-based system. The ML model analyzes code semantics and business logic to automatically generate verification statements, enabling effective detection and repair of verification missing issues that traditional automated repair techniques cannot handle.
Solution Approach 2:
The patent introduces a machine learning model as an intermediary between code analysis and verification statement generation. This intermediary component understands business logic requirements and translates them into appropriate verification statements, bridging the gap between code repair functionality and verification completeness.
2Reliability
If manual code verification is performed, then verification accuracy can be maintained, but verification time and labor cost increase significantly
Solution Approach 1:
The patent enables the system to perform self-verification by automatically generating verification statements based on code analysis. The machine learning model independently analyzes code segments, understands business logic, and produces verification statements without requiring manual intervention, thus maintaining high verification accuracy while significantly reducing verification time.
Solution Approach 2:
The patent performs preliminary code analysis and verification statement generation before potential security issues arise. By proactively identifying verification missing issues and generating appropriate verification statements in advance, the system prevents security vulnerabilities before they can cause harm, eliminating the need for time-consuming manual verification processes.
3Object-affected harmful factors
If comprehensive code verification is implemented, then security vulnerabilities can be prevented, but system complexity increases
Solution Approach 1:
The patent replaces complex manual verification processes with a machine learning-based automated system. The ML model handles the complexity of understanding business logic and generating verification statements, simplifying the overall verification process while effectively preventing security vulnerabilities through comprehensive code analysis.
Data Source
AI summary
According to embodiments of the present disclosure, there are provided a method, an apparatus, a device and a storage medium for code parameter verification. In a method, a parameter verification request for target code is detected; in response to detecting a parameter verification statement, at least one code segment is extracted from the target code that matches at least one predetermined statement type of a plurality of predetermined statement types; and a verification statement for at least one parameter of the target code is generated, with a trained machine learning model, based on the at least one code segment, the verification statement being configured to verify validation of the at least one parameter, where the machine learning model is trained based on a sample code set and sample verification statement for parameters of sample code in the sample code set.


