Patents
Literature
Patsnap Eureka AI that helps you search prior art, draft patents, and assess FTO risks, powered by patent and scientific literature data.

474 results about "Source code file" patented technology

The source code file is a text file on disk. It contains instructions for the computer that are written in the C programming language. You use a text editor to create the source code file.

Warehouse level code problem solving system based on large language model

The invention discloses a warehouse level code problem solving system based on a large language model, and relates to the technical field of software engineering, a source code file is extracted from a code warehouse, a static analysis tool is utilized to analyze codes, a warehouse level code graph is constructed, and then code entities and dependency relationships thereof are analyzed; based on the warehouse-level code graph, combining historical problem solving data, and constructing a dynamic evolution knowledge graph through continuous learning; through a context retrieval module, according to the context information of the current problem, dynamically retrieving related solution strategies and generating corresponding code patches, complementing or reviewing suggestions; the validity of the generated patch is verified through static analysis, unit testing and integration testing, and a problem solving strategy is optimized according to feedback of a developer. The problem solving efficiency and accuracy can be improved, the development cost is reduced, the solving process is gradually optimized through an intelligent feedback mechanism, a closed-loop feedback mechanism is formed, and therefore the increasingly complex software development requirements are met.
Owner:北京开放传神科技有限公司

Code retrieval method and device and related equipment

The invention provides a code retrieval method and device and related equipment, and relates to the technical field of retrieval. The method comprises the following steps: segmenting each source code file to obtain a plurality of code blocks of each source code file; determining description information of each code block, and determining an association relationship between any two code blocks; generating a multi-layer code knowledge graph based on the description information of each code block and the incidence relation between any two code blocks; obtaining query information of a user, and determining a first code block based on the query information; determining a second code block related to the first code block in the multi-layer code knowledge graph; and generating a retrieval result by using the first code block and the second code block. Through the technical means, the problem of low code retrieval accuracy in related technologies is solved.
Owner:CHINA TELECOM CORP LTD +1

Test case generation method and system based on multi-agent efficient collaboration

The invention relates to a test case generation method and system based on multi-agent efficient collaboration, belongs to the technical field of software testing, and solves the problems of incomplete scene coverage, logic disorder and the like when a single large model processes a complex task. The method comprises the following steps: constructing a multi-modal professional field knowledge base; the task planning agent module generates a test case generation task based on a project development document and a software source code file of a to-be-tested project and distributes the test case generation task to the test demand analysis agent module; based on the test case generation task, extracting a test demand point related to the tested software configuration item, describing the test demand point, and labeling a corresponding tracking relationship between a test demand point ID and a code snippet or a function in the software source code file to construct a test demand-code snippet / function set; and generating a test case and a test description document based on the test demand-code snippet / function set and the multi-modal professional domain knowledge base. And the ability of generating the test case of the large model is enhanced through organic and efficient cooperation of multiple agents.
Owner:BEIJING JINGHANG COMPUTING & COMM RES INST

Code file rewriting method and device based on large language model

The invention relates to a code file rewriting method and device based on a large language model, and the method comprises the steps: analyzing a source code file, obtaining the structure of a source code, and enabling the structure of the source code to comprise the definition of each function and the position of each function code in the source code file; respectively inputting each function code into a large language model, and respectively processing according to each cue word to complete rewriting of each function code; and combining each rewritten function code corresponding to each position in the source code file to form a rewritten code file. According to the invention, a scheme for optimizing and rewriting the codes based on the large language model and the file level can be provided.
Owner:KYLAND TECH CO LTD

Private intelligent code collaborative optimization method and system based on graph retrieval

The invention provides a private intelligent code collaborative optimization method and system based on graph retrieval, and relates to the technical field of software engineering intelligent auxiliary tools, and the method comprises the steps: obtaining a source code file and operation log data of a private project; the method comprises the following steps: performing syntax tree analysis on a source code file through a Tree-siter analyzer to generate a corresponding abstract syntax tree; constructing a code knowledge graph by analyzing a function call relationship, an inheritance relationship and a module dependency relationship; monitoring the change of a project file in the code knowledge graph through a code change event processor, and updating the code knowledge graph in real time when the file is changed; establishing an association relationship between the running log data and a corresponding function node in the code knowledge graph; the method comprises the following steps: analyzing a natural language problem of a developer into a Cypher query statement through an intelligent Agent; obtaining a query result from the graph database; and formatting the query result to generate a final result.
Owner:QINGTA TECH

Supply chain cross-packet vulnerability detection method and device, equipment and storage medium

The invention relates to the technical field of information processing, in particular to a supply chain cross-packet vulnerability detection method, device and equipment and a storage medium. A vulnerability packet name, a sensitive API, a trigger parameter and vulnerability description are integrated into tetrad information; if so, performing cross-packet call chain analysis on the source code file by using a cross-packet chain reachability analysis algorithm, obtaining a function call sequence of the sensitive API based on a cross-packet call chain analysis result, realizing vulnerability detection on a cross-packet call chain, generating a vulnerability verification code based on tetrad information by using a preset large language model, and performing vulnerability verification on the vulnerability verification code. The method comprises the following steps: establishing a function call sequence of a bug verification code, verifying the accessibility of the bug verification code in the function call sequence, determining the bug confidence according to the energy consumption condition of a large language model, and generating bug alarm information when the accessibility verification result is that the bug is accessible and the bug confidence is high, thereby realizing double judgment of the bug, reducing the false alarm rate of the bug and improving the user satisfaction.
Owner:JIHUA LAB

Automated code activity graph generation system and method

The invention relates to an automatic code activity graph generation system and method, and the system comprises a plurality of modules. The source code analysis module extracts source codes from the code file and generates an abstract syntax tree corresponding to the source codes. The model conversion engine is based on query view conversion specification operation, analyzes a method calling relation and an execution sequence in the abstract syntax tree by utilizing a group of analysis rules, and converts the source code into a programming language abstract model. And the model warehouse is used for storing the abstract model, identifying the language type through the extension name of the source code file, and matching the corresponding programming language model. The activity graph generator then generates an activity graph according to the abstract model, including an activity graph reflecting code logic and an activity graph generated based on code annotations. The layout module determines the position, the size and the shape of each node in the activity graph through an analysis method calling relation and an execution path, and generates a connecting line between the nodes. The system can visually display the code process and improve the efficiency of developers.
Owner:HUNAN SANXIANG BANK CO LTD

Code vulnerability detection method, device and equipment

The invention discloses a code vulnerability detection method, a code vulnerability rule configuration method, a static single assignment SSA code acquisition method, devices corresponding to the methods, and electronic equipment. The code vulnerability detection method comprises the following steps: acquiring a plurality of source code files and code vulnerability rules of an application program; generating an abstract syntax tree of the source code file, and obtaining a function call relationship; and traversing the abstract syntax tree, and obtaining a cross-function risk propagation path according to the function call relationship and the code vulnerability rule. By the adoption of the processing mode, the function calling relation and the abstract syntax tree are fused to conduct cross-function code vulnerability detection, cross-function vulnerability detection of context sensitivity, flow sensitivity and domain sensitivity is achieved, and vulnerability false report and missing report are avoided; therefore, the accuracy and recall rate of vulnerability detection can be effectively improved.
Owner:ALIBABA (CHINA) CO LTD

Cross-product transplantation method and device for secondary development codes, computer equipment and medium

The invention relates to the technical field of electric digital data processing, and provides a secondary development code cross-product transplantation method and device, computer equipment and a medium. The method comprises the steps of loading a source project, screening a to-be-transplanted source code file, identifying an original API type, determining a mapping relation between the original API type and a target API type, and generating an adaptation layer code framework according to the mapping relation; copying the to-be-transplanted source code file into the target project; on the premise of keeping the project hierarchical structure of the source project, replacing the calling node of the original API type with the calling node of the adapter type, and replacing the namespace reference with the corresponding namespace in the target project to obtain a migrated source code file; and obtaining a secondary development project of the target project based on the second product API according to the adaptation layer code framework and the migrated source code file. According to the method and the device, the transplantation efficiency and accuracy of the transplantation of the cross-product secondary development codes are improved.
Owner:GLODON CO LTD

Multi-language dynamic switching system and method of embedded device

The invention discloses a multi-language dynamic switching system and method of embedded equipment, and relates to the technical field of human-machine interfaces and embedded systems.The method comprises the steps that source codes in an HMI program are traversed through a character extraction module to extract all character strings; eliminating repeated items, numbering the character strings, and outputting a database file and a replacement array; substituting the serial number into the source code file again by using the substitution array to replace the character string at the corresponding position; outputting the translated database file as a C language source code, compiling the C language source code into a dictionary generation module project, generating an executable file, and outputting the dictionary file to an HMI running directory after the device is started; after the HMI program is started, the dictionary is read into different dictionary arrays according to blocks, and character strings at corresponding positions in the dictionary arrays are extracted after a page sends a request. The method has the advantages of being lower in maintenance difficulty, more efficient in resource utilization, shorter in indexing time, better in system robustness and the like.
Owner:NANJING GUODIAN NANZI WEIMEIDE AUTOMATION CO LTD

Systems and methods for providing interactive software-development links via user interfaces

ActiveUS20250028524A1Version controlSoftware reuseInteractive softwareSource code file
Providing interactive software-development links via user interfaces, based on remotely retrieved information from remote computer networks without requiring users to transition between websites within the user interfaces may be facilitated. In some embodiments, an Application Programming Interface (API) may be provided that is configured to receive one or more commands from a first server and a second server. The system may receive via a monitoring-function installed on a client device, a first message from the first server to update a source code file stored in a software-version controlled repository. The system may determine from the first message, a source code file identifier. The system may then receive, via the monitoring-function, a second message from the second server indicating an update associated with a software-development automation service platform. The system may determine, from the second message, a feature update characteristic and may display a message comprising the source code file identifier and the feature update characteristic.
Owner:CAPITAL ONE SERVICES LLC

Distributed compiling method and device, electronic equipment and storage medium

The invention provides a distributed compiling method and device, electronic equipment and a storage medium, and belongs to the technical field of data processing.The method comprises the steps that a source code file is sent to a server side to be compiled and assembled, a compiling result returned by the server side is obtained, and the compiling result comprises information of a compiled target file; based on the compiling result, a corresponding pseudo file is created, and the pseudo file comprises a rebuilding method of the compiling result file; after pseudo files corresponding to all the compiling results are obtained, a link command is sent to a server side, and the link command indicates the server side to conduct file link operation on all the target files; and receiving the executable file returned by the server. According to the method and the device, the intermediate file is prevented from being copied for multiple times between the client and the server, so that the network load required by file transmission is reduced, and the distributed compiling efficiency is improved.
Owner:INST OF SOFTWARE - CHINESE ACAD OF SCI

Test case generation method based on multi-modal knowledge base and self-adaptive cue words

The invention relates to a test case generation method based on a multi-modal knowledge base and self-adaptive cue words, belongs to the technical field of software testing, and solves the problems of insufficient reuse of historical project data and expert knowledge, lack of knowledge in a large model professional field, prominent illusion problem, low adoption rate of generated test cases, low practicability and the like. The method comprises the steps of generating an original test demand set of a to-be-tested item; forming a test demand-code snippet / function set based on the software source code file and the original test demand set; generating a first-stage test tree graph based on each test demand point and the corresponding code snippet / function; forming a software test outline based on the test items, the test subitems and the corresponding test demand points and code snippets / functions; forming a second-stage test tree graph based on the first-stage test tree graph and the software test outline; and generating a test case based on the second-stage test tree graph and the software test outline. And the specialty, the accuracy and the interpretability of the test case are enhanced.
Owner:BEIJING JINGHANG COMPUTING & COMM RES INST

Automatic hard disk testing method and device and readable storage medium

The invention relates to an automatic hard disk testing method and device and a readable storage medium, and the method comprises the steps: importing configuration information which comprises preset BIOS (Basic Input / Output System) configuration parameters; obtaining current BIOS configuration information of the remote server, and judging the consistency of the BIOS configuration information and the BIOS configuration parameters; if the BIOS configuration information and the BIOS configuration parameters do not meet the consistency requirement, updating the BIOS configuration information, and restarting the remote server to enable the updated BIOS configuration information to take effect; the FIO source code file is connected to a remote server through an SSH, the FIO source code file is transmitted to the remote server through an SFTP protocol, and compiling is carried out on the remote server to generate an FIO command; in response to the FIO command, performing performance test on the to-be-tested hard disk; and uploading the performance test content and the test progress of the to-be-tested hard disk to an upper computer to generate a visual test result. According to the embodiment of the invention, the automation degree and the testing efficiency of hard disk testing are improved, and meanwhile, the visualization degree of the testing result is improved.
Owner:POWERLEADER COMPUTER SYST CO LTD

Positioning method and device for signal in circuit design file, equipment and medium

The invention provides a signal positioning method and device in a circuit design file, electronic equipment and a readable storage medium, and the method comprises the steps: obtaining a signal name of a to-be-debugged signal, and according to a first corresponding relation among a source code module, a compiled code module and the signal name of the signal, obtaining a to-be-debugged signal; determining a target source code module and a target compilation code module matched with the signal name of the to-be-debugged signal, and according to a second corresponding relation between the source code file and the source code module and a third corresponding relation between the compilation code file and the compilation code module, compiling the to-be-debugged signal. Determining a target source code file and a target compilation code file matched with the target source code module, and performing grammar analysis to obtain a first line number corresponding to the to-be-debugged signal in the target source code file and a second line number corresponding to the to-be-debugged signal in the target compilation code file, the signal name, the first line number and the second line number of the to-be-debugged signal are displayed in the display area for waveform debugging of the to-be-debugged signal, and the waveform debugging efficiency can be improved.
Owner:BEIJING INSTITUTE OF OPEN SOURCE CHIP

Automated Identification Of Vulnerable Software Components

An automated identification of vulnerable software components is presented. The objective to find a method for the automatic identification of CVE affected software components through source-code parsing and text analysis. The method shall reduce manual work to a minimum and ensure a high level of data quality. The objective is solved by the computer-implemented method for identifying vulnerable software, comprising: receiving a software package; unpacking source code files for multiple versions of the software package; retrieving an entry for the software package from a vulnerability database; retrieving a patch for the software package; determining changes made by the patch to source code files of the software package; and determining whether the changes were made to a given version of software and reporting the given version of software as vulnerable in response to a determination the changes were absent from the given version of software.
Owner:DYNATRACE LLC

Method for realizing java source code file security encryption based on C + + dynamic library

The invention provides a method for realizing secure encryption of a java source code file based on a C + + dynamic library, which relates to the technical field of secure encryption, and comprises the following steps of: partitioning the java source code file, and processing by adopting a dual encryption mechanism through an encryption module in the C + + dynamic library: firstly, generating a dynamic key and a static key XOR to obtain a mixed key, performing AES encryption by utilizing the mixed key, and then, performing encryption by utilizing the mixed key; carrying out secondary encryption by adopting an elliptic curve cryptographic algorithm; the environment is monitored in real time during decryption, and debugging protection is prevented; and if the environment is normal, executing reverse decryption to recover the source code. According to the method, the source code protection intensity is improved, and reverse engineering and debugging attacks are effectively prevented.
Owner:ZHEJIANG SHUXIN NETWORK CO LTD

Small program privacy leakage detection method based on abstract syntax tree

The invention belongs to the technical field of applet privacy leakage detection methods, and discloses an applet privacy leakage detection method and system based on an abstract syntax tree. Decompiling the packaged file of the applet to obtain a source code file; all the logic layer JavaScript files are converted into AST by using an expression analysis library; obtaining a calling dependency graph between a page logic layer file and a tool file layer according to the file reference relationship, obtaining a field-level binding dependency graph of the page logic layer file and the tool file layer according to a data and event binding relationship of the page rendering layer and the page logic layer, and merging the two layers to obtain a global dependency graph; finally, combining the dependency graphs to generate a global dependency relationship graph; dividing the JavaSript code into a plurality of basic blocks according to the dividing rule of the boundary of the control flow, determining the type of the edge according to the information of the boundary, and obtaining a GCFG by combining the dependency graph; and inputting the GCFG into a taint-pointer analysis module, and obtaining a privacy disclosure path according to predefined sink and source libraries and a data flow propagation rule.
Owner:XIDIAN UNIV

Systems and methods for identifying software fault vulnerabilities and inserting fault countermeasures

PendingUS20250181724A1Platform integrity maintainanceSource code fileSoftware fault
A method for automatically generating a compiled binary file with fault countermeasures includes compiling, by a compiler, a source code file to a first binary file; analyzing the first binary file to identify one or more fault vulnerabilities in the first binary file, wherein analyzing the first binary file to identify the one or more fault vulnerabilities includes: injecting a set of faults into the first binary file during a symbolic execution of the first binary file to generate a set of faulted states of the first binary file; and identifying the one or more fault vulnerabilities from the set of faulted states, wherein the one or more fault vulnerabilities are fault vulnerabilities that cause the first binary file to violate at least one security requirement; and compiling, by the compiler, the source code file to a second binary file, wherein the compiler inserts a set of fault countermeasures into the second binary file based on the identified one or more fault vulnerabilities, wherein the set of fault countermeasures protect the second binary file against the one or more fault vulnerabilities.
Owner:THE MITRE CORPORATION

Webpage project construction and access control method and device

The invention relates to the technical field of computer networks, in particular to a webpage project construction and access control method, which comprises the following steps: acquiring a Web project source code file, packaging the Web project source code file, configuring a root directory to correspond to the action of a rendering page, and generating a packaged resource file; uploading the packaged resource file to a code warehouse for code hosting, triggering an assembly line execution process, and storing the packaged resource file in a workpiece generated in the assembly line execution process; receiving an access request of a user, and determining item positioning information through a unique identifier in the access request; verifying the user access authority; if the user permission state indicates that the user permission verification is passed, requesting a corresponding resource file from a workpiece, and generating rendering page information containing API basic address information; and sending the rendering page information to a browser for page rendering.
Owner:BEIJING ETERNAL CREATIVE TECH CO LTD

String analysis in a code scanning engine

A method for string analysis in a code scanning engine comprises a string analysis rule definition, the string analysis rule definition including a search pattern and a test criterion. At least a portion of a string in a source code file is determined to be a match to the search pattern. The test criterion is evaluated against at least a portion of the string. An indication of a result of the evaluation of the first test criterion is provided.
Owner:AMAZON TECH INC

Systems and methods for maintaining rights management while labeling data for artificial intelligence model development

Systems and methods are described for maintaining bifurcated data management while labeling data for artificial intelligence model development. For example, the system may receive a first label for a first sample from a first dataset, wherein the first dataset is accessible to a first subset of a plurality of users, and wherein the first subset comprises a first attribute. The system may receive first version metadata of the first label, wherein the first version metadata comprises a proposed label for the first sample assigned by a first user. The system may determine, based on a first user input from the first user, a first grouping of source code files for storing the first version metadata, wherein the first grouping of source code files is accessible to a second subset of the plurality of users, and wherein the second subset comprises a second attribute.
Owner:CAPITAL ONE SERVICES LLC

Predicting likely-vulnerable code changes using machine learning

PendingUS20250348594A1Version controlPlatform integrity maintainanceSnapshot (computer storage)Source code file
Methods, systems, and apparatus, including computer programs encoded on a computer storage medium, for analyzing computer software source code. One of the methods includes receiving an updated snapshot of a source code file that comprises a change to an existing snapshot of the source code file maintained at a code repository for a software project; obtaining feature data; processing the feature data using a machine learning model to generate a classification output that classifies the updated snapshot into one of a plurality of categories; and performing, based on the classification output, an action with respect to the updated snapshot.
Owner:GOOGLE LLC

Method and system for detecting login request forgery vulnerability after third-party verification based on data flow analysis

The invention provides a method and a system for detecting a login request forgery vulnerability after third-party verification based on data flow analysis, and belongs to the technical field of network security vulnerability detection. And performing large-scale collection on the applets, constructing a to-be-tested applet data set, performing automatic decryption and unpacking on the wxapkg encrypted packet at the front end of the to-be-tested applet by using an applet front-end code decompilation tool, and obtaining a front-end source code file of the to-be-tested applet. The method comprises the following steps: performing data flow analysis on a front-end source code of each to-be-tested applet by adopting an AST-based data flow analysis method, identifying an API parameter used in a third-party verification login process as a data source, analyzing data flow, modeling client-server interaction to obtain an applet client-server interaction process diagram, and performing data flow analysis on the applet client-server interaction process diagram. And finally, after third-party verification, the login request forgery vulnerability is carried out. According to the method, the login request counterfeiting vulnerability after third-party verification in the applet ecology can be effectively detected.
Owner:NAT UNIV OF DEFENSE TECH

Code conversion method and device, page display method and device, medium and equipment

The invention discloses a code conversion method and device, a page display method and device, a medium and equipment. The method comprises the steps that code conversion demand information is acquired, and cue words are constructed based on the code conversion demand information; inputting the cue word into a code generation model to enable the code generation model to generate a source code file of the initial conversion tool; performing transcoding processing on the test case through the initial conversion tool, and deploying a converted code to the environment of the target platform to run to obtain a code running result; constructing a repair prompt word based on the code operation result, and inputting the repair prompt word into a code generation model, so that the code generation model corrects a source code file of the initial conversion tool; a code conversion tool is obtained through testing and correction of multiple iterations; and transcoding the project source code file of the source code platform through the code conversion tool to obtain a code file of the target platform. According to the method, the cross-platform code conversion efficiency can be improved.
Owner:RAJAX NETWORK &TECHNOLOGY (SHANGHAI) CO LTD

Semantic verification method and device based on large model

The invention relates to the technical field of software engineering and information processing, in particular to a semantic verification method and device based on a large model.The method comprises the steps that a source code file and a corresponding software requirement and design document are obtained, code semantic representation is generated based on grammar analysis and static program analysis, and a semantic verification result is obtained; based on text analysis and business flow chart structure identification, generating a design demand semantic representation; respectively inputting the code semantic representation and the design demand semantic representation into a pre-training language large model to generate a code implementation logic description and a design demand logic description; and performing semantic consistency verification on the two types of logic descriptions to obtain a semantic inconsistency result, determining a code position in the source code file based on the semantic inconsistency result, and outputting a scanning report. According to the invention, the automation degree and the rechecking performance of consistency checking of requirements can be improved, and the leak detection and reworking cost can be reduced.
Owner:HENGRUI (CHONGQING) ARTIFICIAL INTELLIGENCE TECH RES INST CO LTD

Software architecture recovery method and system based on structural dependence and semantic similarity

The invention discloses a software architecture recovery method and system based on structural dependence and semantic similarity, and the method comprises the steps: carrying out the coding and embedding of source code files of software through a code pre-training model, extracting the semantic information of the source code files, and calculating the semantic similarity between the source code files; using a code statistical analysis tool to extract a structure dependency relationship between the source code files; in combination with the semantic similarity and the structure dependency relationship, calculating a connection weight between the source code files, and constructing a weighted graph; and dividing the weighted graph into communities representing the software modules by adopting a community detection algorithm, and recovering the software architecture. According to the method provided by the invention, the weighted graph is constructed by combining semantic similarity and structural dependency, and software modular segmentation is carried out by adopting a community detection algorithm, so that the efficiency, accuracy and expandability of software architecture recovery are improved.
Owner:HUAZHONG NORMAL UNIV

Software defect positioning method and device based on multiple views

The invention relates to the technical field of software engineering, in particular to a software defect positioning method and device based on multiple views, and the method comprises the steps: extracting various relational data between a defect report and a source code file in a software project, carrying out characterization learning on a multi-source relationship between the defect report and the source code file based on a graph neural network and a contrast learning technology to obtain characterization of the defect report and the source code file; calculating feature similarity between the defect reports and the source code files, and generating a similarity sequence of the source code files for the corresponding defect reports according to the similarity; and based on the similarity sequence, selecting the source code files with the similarity greater than a preset similarity, and determining defect positioning information in the software project by utilizing the selected source code files. Therefore, the problems that in the prior art, multi-source information cannot be fully mined and utilized, so that a key path with low positioning precision is caused, the influence of analyzing the multi-source information on the positioning performance is not generated, and an effective strategy is lacked are solved.
Owner:WUHAN UNIV

Providing resolutions to unknown computational errors via context-based historically derived resolutions to known errors systems and methods

Reducing utilization of computational resources associated with providing predictions of resolutions to unknown computational errors via context-based historically derived resolutions to known errors may be facilitated. In some embodiments, update-information associated with an automation pipeline feature indicating an error may be received by a system. Based on the update-information, the system determines a context associated with the automation pipeline feature. The system may then determine that the error is associated with an update to a third-party software-development platform. The system may receive a set of messages from the third-party software-development platform indicating source code file-related information. The system may provide the context and the set of messages indicating source code file-related information to a machine learning model to generate a prediction indicating a resolution to the error. The system may then transmit the prediction indicating the resolution to the error to a software-module application installed on a remote device.
Owner:CAPITAL ONE SERVICES LLC

Cross-platform Web front-end source code positioning method and system based on AST analysis

The invention relates to the field of web local development and debugging, and discloses a cross-platform Web front-end source code positioning method and system based on AST parse.The method comprises the steps that plug-ins are integrated in a development environment, and source code file paths, DOM element information and file mapping relations are automatically collected in the source code compiling stage; the method comprises the following steps: analyzing DOM elements in a source code by using an AST analysis technology, automatically extracting source code position information corresponding to each DOM element, and injecting the information into self-defined attributes of the DOM elements; starting a local HTTP service, and receiving a source code positioning request from a browser end; when the page is loaded, an interaction logic code is injected, and the source code position information of the DOM element is sent to a local HTTP service; after the server side receives a request sent by the browser side, position information in the request is analyzed, a local IDE is started and controlled by utilizing childProcess.spread, a specified source code file is automatically opened, and a specified row number and a specified column number are positioned. The method has the advantages of automation, rapidness and accuracy.
Owner:SHENZHEN HAIGUI NETWORK TECH CO LTD