Grammar error detection method, device, equipment, storage medium and program product

By utilizing the detection plugin code generated in the browser using a large language model, browser-side static syntax detection of C++ code was achieved, solving the problem of high server resource consumption, realizing real-time detection with zero server overhead, and reducing development difficulty and cost.

CN122309368APending Publication Date: 2026-06-30SHENZHEN DIANMAO TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHENZHEN DIANMAO TECH CO LTD
Filing Date
2026-03-27
Publication Date
2026-06-30

AI Technical Summary

Technical Problem

Existing static syntax checking tools for C++ code cannot run directly in web browsers, resulting in high CPU resource consumption on servers. This significantly increases computing costs, especially in high-concurrency scenarios, and also makes development and maintenance difficult.

Method used

By directly detecting the code to be detected in the browser, and utilizing the detection plugin code generated by the large language model, static syntax detection is achieved locally in the browser, reducing the dependence on server resources. A fail-fast mechanism is used to identify parser-level syntax errors, and the detection plugin code is dynamically registered and uninstalled through a plugin architecture.

Benefits of technology

It achieves real-time, zero-server-overhead static syntax checking, reduces the latency from user input code to error flag display, shortens the development time of the detection plugin code, reduces manpower and time costs, and simplifies development difficulty.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122309368A_ABST
    Figure CN122309368A_ABST
Patent Text Reader

Abstract

This application relates to the field of computer technology and discloses a method, apparatus, device, storage medium, and program product for detecting syntax errors. The method involves determining the code to be detected input by a user in a browser, identifying the first syntax tree corresponding to the code, invoking a pre-deployed detection engine to determine if any syntax nodes are abnormal, and, if abnormalities are found, determining the exception information of the syntax nodes and marking the position of the syntax nodes in the code to be detected in the browser. The syntax error detection method provided in this application reduces detection latency by directly detecting the code to be detected in the browser, and does not rely on any server-side computing resources or network requests, achieving real-time, zero-server-overhead static syntax detection. Furthermore, by automatically generating detection plugin code through a large language model, the development time of each detection plugin code can be shortened, reducing manpower and time costs, shortening the development cycle, and reducing development difficulty.
Need to check novelty before this filing date? Find Prior Art