Machine Learning Code Parameter Verification for Missing Logic

Resolve Bottlenecks,
Find Innovative Solutions
Generate 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

VSEngineering 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

Engineering Contradiction:
Improveverification detection accuracyVSAvoidverification completion efficiency
Core Design Contradiction:
ReliabilityVSProductivity

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.

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

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.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Reliability

If manual code verification is performed, then verification accuracy can be maintained, but verification time and labor cost increase significantly

Engineering Contradiction:
Improveverification accuracyVSAvoidverification time
Core Design Contradiction:
ReliabilityVSLoss of time

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.

Inventive Principle:
Principle #25Self-service

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.

Inventive Principle:
Principle #10Preliminary action

3Object-affected harmful factors

If comprehensive code verification is implemented, then security vulnerabilities can be prevented, but system complexity increases

Engineering Contradiction:
Improvesecurity vulnerabilitiesVSAvoidverification system complexity
Core Design Contradiction:
Object-affected harmful factorsVSDevice complexity

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.

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

Data Source

PatentUS20240394171A1Method, device, apparatus and storage medium for code parameter verification
Publication Date: 2024.11.28 BEIJING VOLCANO ENGINE TECH CO LTD
  • US20240394171A1 patent drawing
  • US20240394171A1 patent drawing
  • US20240394171A1 patent drawing

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.