CN115292180A - Code analysis method, code analysis device, electronic device, and storage medium - Google Patents

Code analysis method, code analysis device, electronic device, and storage medium Download PDF

Info

Publication number
CN115292180A
CN115292180A CN202210951712.6A CN202210951712A CN115292180A CN 115292180 A CN115292180 A CN 115292180A CN 202210951712 A CN202210951712 A CN 202210951712A CN 115292180 A CN115292180 A CN 115292180A
Authority
CN
China
Prior art keywords
target
analysis
class
information
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210951712.6A
Other languages
Chinese (zh)
Inventor
纪海杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Life Insurance Company of China Ltd
Original Assignee
Ping An Life Insurance Company of China Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Life Insurance Company of China Ltd filed Critical Ping An Life Insurance Company of China Ltd
Priority to CN202210951712.6A priority Critical patent/CN115292180A/en
Publication of CN115292180A publication Critical patent/CN115292180A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3604Software analysis for verifying properties of programs
    • G06F11/3608Software analysis for verifying properties of programs using formal methods, e.g. model checking, abstract interpretation

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The application provides a code analysis method, a code analysis device, an electronic device and a storage medium, and belongs to the technical field of artificial intelligence. The method comprises the steps of obtaining a source code file of a source code; analyzing the source code file to obtain a target code file comprising a target syntax tree; analyzing the target syntax tree to obtain first analysis data; performing class method traversal on the target code file to obtain a current class method; if the current method is the target method, performing field analysis processing on the first analysis data to obtain second analysis data; the second analytic data comprises target method information of the target class method; extracting information of the target method to obtain target variable information; and analyzing the calling relationship of the target variable information according to the first analysis data and the second analysis data to obtain a target calling relationship. The method and the device can improve the accuracy of code analysis.

Description

Code analysis method, code analysis device, electronic device, and storage medium
Technical Field
The present application relates to the field of artificial intelligence technologies, and in particular, to a code analysis method, a code analysis apparatus, an electronic device, and a storage medium.
Background
At present, code analysis is often performed by counting the coverage condition of a code in the process of code testing, and this method often has the problem of low analysis accuracy, so how to improve the accuracy of code analysis becomes a technical problem to be solved urgently.
Disclosure of Invention
A main objective of embodiments of the present application is to provide a code analysis method, a code analysis apparatus, an electronic device, and a storage medium, which are intended to improve accuracy of code analysis.
In order to achieve the above object, a first aspect of an embodiment of the present application provides a code analysis method, where the method includes:
acquiring a source code file of a source code;
analyzing the source code file to obtain a target code file; wherein the object code file comprises an object syntax tree;
analyzing the target syntax tree to obtain first analysis data;
performing class method traversal on the target code file to obtain a current class method;
if the current class method is a target class method, performing field analysis processing on the first analysis data to obtain second analysis data; wherein the second parsed data includes target method information for the target class method;
extracting information of the target method information to obtain target variable information;
and analyzing the calling relationship of the target variable information according to the first analysis data and the second analysis data to obtain a target calling relationship.
In some embodiments, the step of analyzing the source code file to obtain the target code file includes:
performing code analysis on the source code file through a preset code analysis tool to obtain preliminary code data;
and carrying out syntax analysis processing on the preliminary code data according to a preset syntax rule to obtain the target syntax tree.
In some embodiments, the step of parsing the target syntax tree to obtain the first parsing data includes:
extracting a target class name and a class path from the target syntax tree, and acquiring a mapping relation between the target class name and the class path to obtain class path mapping information;
analyzing the input field of the target code file according to the class path mapping information to obtain target class information of the target code file;
extracting a first variable parameter of the target code file, and analyzing the first variable parameter to obtain a first mapping relation, wherein the first mapping relation is used for representing the mapping relation between the first variable parameter and a first class name;
extracting annotation information of the target method from the target syntax tree, and analyzing the annotation information to obtain a method type of the target method;
and obtaining the first analysis data according to the target class information, the first mapping relation and the method class.
In some embodiments, the second analysis data includes a second mapping relationship and a third mapping relationship, and if the current class method is the target class method, the field analysis processing is performed on the first analysis data to obtain the second analysis data, including:
if the current method is the target method, performing field analysis processing on the first analysis data to obtain a second variable parameter and a third variable parameter of the target method;
analyzing the second variable parameter to obtain a second mapping relation, wherein the second mapping relation is used for representing the mapping relation between the second variable parameter and a second class name;
analyzing the third variable parameter to obtain a third mapping relation, wherein the third mapping relation is used for representing the mapping relation between the third variable parameter and a third class name;
and obtaining the second analysis data according to the second mapping relation and the third mapping relation.
In some embodiments, the analyzing the target variable information according to the first analysis data includes a first mapping relationship and a second mapping relationship, and the analyzing the target variable information according to the first analysis data and the second analysis data includes a step of analyzing a calling relationship to obtain a target calling relationship, including:
acquiring the variable type of the target variable information;
screening the target type information, the first mapping relation, the second mapping relation and the third mapping relation according to a preset priority order and the target variable information to obtain a target mapping relation;
and obtaining the target calling relationship according to the target mapping relationship and the target variable information.
In some embodiments, the step of obtaining the target invocation relationship according to the target mapping relationship and the target variable information includes:
obtaining at least one candidate class name according to the target mapping relation;
filtering the candidate class name according to a preset filtering condition to obtain a target class name;
and constructing the target calling relationship according to the target class name and the target variable information.
In some embodiments, after the step of performing call relationship analysis on the target variable information according to the first analysis data and the second analysis data to obtain a target call relationship, the method further includes:
acquiring a preset graph database;
and storing the target calling relationship, the pre-acquired method node information and the interface data to a target storage position of the graph database to obtain target calling data, wherein the target calling data is used for representing the calling relationship of the source code.
To achieve the above object, a second aspect of embodiments of the present application proposes a code analysis apparatus, the apparatus including:
the source code file acquisition module is used for acquiring a source code file of a source code;
the first analysis module is used for analyzing the source code file to obtain a target code file; wherein the object code file comprises an object syntax tree;
the second analysis module is used for analyzing the target syntax tree to obtain first analysis data;
the traversal module is used for carrying out class method traversal on the target code file to obtain a current class method;
the third analysis module is used for carrying out field analysis processing on the first analysis data to obtain second analysis data if the current class method is the target class method; wherein the second parsing data includes target method information of the target class method;
the information extraction module is used for extracting the information of the target method to obtain target variable information;
and the relation analysis module is used for carrying out calling relation analysis on the target variable information according to the first analysis data and the second analysis data to obtain a target calling relation.
In order to achieve the above object, a third aspect of the embodiments of the present application provides an electronic device, which includes a memory, a processor, a program stored in the memory and executable on the processor, and a data bus for implementing connection communication between the processor and the memory, where the program implements the method of the first aspect when executed by the processor.
To achieve the above object, a fourth aspect of the embodiments of the present application proposes a storage medium, which is a computer-readable storage medium for computer-readable storage, and stores one or more programs, which are executable by one or more processors to implement the method of the first aspect.
The code analysis method, the code analysis device, the electronic equipment and the storage medium provided by the application are used for obtaining a source code file of a source code; analyzing the source code file to obtain a target code file; the object code file comprises an object syntax tree, and the code content of the source code file can be obtained conveniently. Further, analyzing the target syntax tree to obtain first analysis data; and traversing the class method of the target code file to obtain the current class method, and conveniently obtaining the characteristic contents of each class of object and class method in the target code file. If the current method is the target method, performing field analysis processing on the first analysis data to obtain second analysis data; the second analysis data comprises target method information of the target method, and the related data of each target method can be accurately acquired through the method. Furthermore, information extraction is carried out on the target method information to obtain target variable information, so that calling relation analysis is carried out on the target variable information according to the first analysis data and the second analysis data to obtain a target calling relation, the calling relation existing among source codes can be clearly reflected through the target calling relation, and accuracy of code analysis in a code testing process can be improved.
Drawings
FIG. 1 is a flow chart of a code analysis method provided by an embodiment of the present application;
fig. 2 is a flowchart of step S102 in fig. 1;
FIG. 3 is a flowchart of step S103 in FIG. 1;
fig. 4 is a flowchart of step S105 in fig. 1;
fig. 5 is a flowchart of step S107 in fig. 1;
fig. 6 is a flowchart of step S503 in fig. 5;
FIG. 7 is a flowchart of a code analysis method provided by an embodiment of the present application;
FIG. 8 is a schematic structural diagram of a code analysis apparatus provided in an embodiment of the present application;
fig. 9 is a schematic hardware structure diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more clearly understood, the present application is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of and not restrictive on the broad application.
It should be noted that although functional blocks are partitioned in a schematic diagram of an apparatus and a logical order is shown in a flowchart, in some cases, the steps shown or described may be performed in a different order than the partitioning of blocks in the apparatus or the order in the flowchart. The terms first, second and the like in the description and in the claims, as well as in the drawings described above, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of the present application only and is not intended to be limiting of the application.
First, several terms referred to in the present application are resolved:
artificial Intelligence (AI): the method is a new technical science for researching and developing theories, methods, technologies and application systems for simulating, extending and expanding human intelligence; artificial intelligence is a branch of computer science, which attempts to understand the essence of intelligence and produce a new intelligent machine that can react in a manner similar to human intelligence, and research in this field includes robotics, language recognition, image recognition, natural language processing, expert systems, and the like. The artificial intelligence can simulate the information process of human consciousness and thinking. Artificial intelligence is also a theory, method, technique and application system that uses a digital computer or a machine controlled by a digital computer to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use the knowledge to obtain the best results.
Natural Language Processing (NLP): NLP uses computer to process, understand and use human language (such as chinese, english, etc.), and belongs to a branch of artificial intelligence, which is a cross discipline between computer science and linguistics, also commonly called computational linguistics. Natural language processing includes parsing, semantic analysis, chapter understanding, and the like. Natural language processing is commonly used in the technical fields of machine translation, character recognition of handwriting and print, speech recognition and text-to-speech conversion, information intention recognition, information extraction and filtering, text classification and clustering, public opinion analysis and viewpoint mining, and relates to data mining, machine learning, knowledge acquisition, knowledge engineering, artificial intelligence research, linguistic research related to language calculation and the like related to language processing.
Information Extraction (NER): and extracting the fact information of entities, relations, events and the like of specified types from the natural language text, and forming a text processing technology for outputting structured data. Information extraction is a technique for extracting specific information from text data. The text data is composed of specific units, such as sentences, paragraphs and chapters, and the text information is composed of small specific units, such as words, phrases, sentences and paragraphs or combinations of these specific units. The extraction of noun phrases, names of people, names of places, etc. in the text data is text information extraction, and of course, the information extracted by the text information extraction technology can be various types of information.
Syntax Tree (Syntax Tree): also known as Abstract Syntax Tree (AST), is a tree representation of the abstract syntax structure of the source code, and is referred to herein specifically as the source code of the programming language. Each node on the tree represents a structure in the source code. The syntax is abstract because the syntax does not represent every detail that appears in the real syntax.
And (3) source code: also called a source program, is an uncompiled text file written according to a certain programming language specification, and is a series of human-readable computer language instructions. In modern programming languages, the source code may be in the form of a book or tape, but the most common format is a text file, the typical format being intended for compiling a computer program. The ultimate goal of computer source code is to translate human-readable text into binary instructions that the computer can execute, a process called compilation, which is done by a compiler.
Class (c): a class is a collection of entities with some common characteristics, and is an abstract concept, and things like "cars" are a class.
Class variables: in java, class variables (also called static variables) are variables in the class that are independent of the method, decorated with static. (static stands for "global", "static", used to modify member variables and member methods, or static code blocks (static code blocks are independent of class members, jvm, when loading a class, executes static code blocks, each code block only once, in sequence.
The method comprises the following steps: the method may be said to be some function that the object has, e.g. people may work, cars may drive, etc.
Object: an object is an instantiation of a class, which is an abstract description of something. In terms of a person, a person is a specific object and is an instantiation of the class of a human, and each instantiated object encapsulates attributes and methods, for example, the attributes in an object are: name, age, sex, height, etc. by which you can walk, speak, etc.
Interface: an interface is a declaration of a series of methods and can also be viewed as a collection of functions. This also embodies the encapsulation of java, such as defining a class whose properties are private and inaccessible to the outside world, which can be accessed by public methods. We say that the common method of a class is the external interface of the class. But simply encapsulate these properties and methods first and we can access some functions through the interface.
Calling the relationship: is the association between codes. They are often used to model call or communication dependencies between code (i.e., services that one code calls or uses another code).
At present, code analysis is often performed by counting the coverage condition of a code in a code testing process, and this method often has a problem of low analysis accuracy, so how to improve the accuracy of code analysis becomes a technical problem to be solved urgently.
Based on this, embodiments of the present application provide a code analysis method, a code analysis apparatus, an electronic device, and a storage medium, aiming to improve the accuracy of code analysis.
The code analysis method, the code analysis apparatus, the electronic device, and the storage medium provided in the embodiments of the present application are specifically described in the following embodiments, and first, the code analysis method in the embodiments of the present application is described.
The embodiment of the application can acquire and process related data based on an artificial intelligence technology. Among them, artificial Intelligence (AI) is a theory, method, technique and application system that simulates, extends and expands human Intelligence using a digital computer or a machine controlled by a digital computer, senses the environment, acquires knowledge and uses the knowledge to obtain the best result.
The artificial intelligence infrastructure generally includes technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technologies, operation/interaction systems, mechatronics, and the like. The artificial intelligence software technology mainly comprises a computer vision technology, a robot technology, a biological recognition technology, a voice processing technology, a natural language processing technology, machine learning/deep learning and the like.
The embodiment of the application provides a code analysis method, and relates to the technical field of artificial intelligence. The code analysis method provided by the embodiment of the application can be applied to a terminal, a server side and software running in the terminal or the server side. In some embodiments, the terminal may be a smartphone, tablet, laptop, desktop computer, or the like; the server side can be configured into an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, and cloud servers for providing basic cloud computing services such as cloud service, a cloud database, cloud computing, cloud functions, cloud storage, network service, cloud communication, middleware service, domain name service, security service, CDN (content delivery network) and big data and artificial intelligence platforms; the software may be an application or the like that implements a code analysis method, but is not limited to the above form.
The application is operational with numerous general purpose or special purpose computing system environments or configurations. For example: personal computers, server computers, hand-held or portable devices, tablet-type devices, multiprocessor systems, microprocessor-based systems, set top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments that include any of the above systems or devices, and the like. The application may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The application may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
Fig. 1 is an alternative flowchart of a code analysis method provided in an embodiment of the present application, and the method in fig. 1 may include, but is not limited to, steps S101 to S107.
Step S101, acquiring a source code file of a source code;
step S102, analyzing the source code file to obtain a target code file; wherein the object code file includes an object syntax tree;
step S103, analyzing the target syntax tree to obtain first analysis data;
step S104, performing class method traversal on the target code file to obtain a current class method;
step S105, if the current class method is the target class method, performing field analysis processing on the first analysis data to obtain second analysis data; the second analysis data comprises target method information of the target class method;
step S106, extracting information of the target method to obtain target variable information;
and S107, carrying out calling relation analysis on the target variable information according to the first analysis data and the second analysis data to obtain a target calling relation.
In steps S101 to S107 illustrated in the embodiment of the present application, a source code file of a source code is obtained; analyzing the source code file to obtain a target code file; the target code file comprises a target syntax tree, and the code content of the source code file can be obtained conveniently. Further, analyzing the target syntax tree to obtain first analysis data; and traversing the class method of the target code file to obtain the current class method, and conveniently obtaining the characteristic contents of each class of object and class method in the target code file. If the current method is the target method, performing field analysis processing on the first analysis data to obtain second analysis data; the second analysis data comprises target method information of the target method, and the related data of each target method can be accurately acquired through the method. Furthermore, information extraction is carried out on the target method information to obtain target variable information, so that calling relation analysis is carried out on the target variable information according to the first analysis data and the second analysis data to obtain a target calling relation, the calling relation existing among source codes can be clearly reflected through the target calling relation, and the accuracy of code analysis in the code testing process can be improved.
In step S101 of some embodiments, a web crawler may be written, and a data source is set and then data is crawled in a targeted manner, so as to obtain a source code file of a source code. The source code file of the source code may also be obtained by performing data extraction on a preset text library and other manners, which is not limited to this. The source code file comprises a text file designed according to actual business requirements, and the text file is not compiled and also conforms to the writing specification of a programming language.
Referring to fig. 2, in some embodiments, step S102 may include, but is not limited to, step S201 to step S202:
step S201, performing code analysis on a source code file through a preset code analysis tool to obtain preliminary code data;
and S202, carrying out grammar analysis processing on the preliminary code data according to a preset grammar rule to obtain a target grammar tree.
In step S201 of some embodiments, the preset code parsing tool may be a static code parsing tool javaParser. And carrying out code analysis on the source code file through the javaParser to obtain a compiling unit of the source code file, and carrying out instantiation processing on the compiling unit through the javaParser to obtain all node information of each type in the compiling unit to obtain preliminary code data.
In step S202 of some embodiments, the preset syntax rule may be a common java syntax, and the preliminary code data is analyzed through the java syntax to obtain an object code file, where the object code file includes an abstract object syntax tree that includes field information corresponding to the source code. For example, an import field, a class variable definition field, and the like, where a variable is the most basic storage unit in a program and is composed of a variable type, a variable name, and a stored value, and the variable is a stored area in a memory, where data in the area may change continuously in the same data type. A class variable is a static variable that can be shared by all objects of the same class.
Referring to fig. 3, in some embodiments, the first parsing data includes target class information, a first mapping relationship, and a method class, and step S103 may include, but is not limited to, step S301 to step S305:
step S301, extracting a target class name and a class path from a target syntax tree, and acquiring a mapping relation between the target class name and the class path to obtain class path mapping information;
step S302, analyzing the input field of the target code file according to the class path mapping information to obtain the target class information of the target code file;
step S303, extracting a first variable parameter of the target code file, and analyzing the first variable parameter to obtain a first mapping relation, wherein the first mapping relation is used for representing the mapping relation between the first variable parameter and the first class name;
step S304, extracting annotation information of the target method from the target syntax tree, and analyzing the annotation information to obtain the method type of the target method;
step S305, obtaining first analysis data according to the target class information, the first mapping relation and the method class.
In step S301 of some embodiments, a preset script program is used to extract a target class name and a class path from a target syntax tree, and obtain a mapping relationship between the target class name and the class path to obtain class path mapping information, and a target code file is analyzed through the class path mapping information to conveniently obtain encapsulation data of a target class method.
In step S302 of some embodiments, since the input field of each type of the object code file includes other java type information, the input field (i.e., the import field) may be analyzed according to the obtained class path mapping information, and the input field is analyzed into map-form data, so as to obtain all java type information of the object code file, where the java type information includes the object type information.
In step S303 of some embodiments, a first variable parameter in an object code file is extracted through a preset script program and the like, where the first variable parameter is a class variable of an object class, the class variable is a static variable, the class variable mainly refers to a class-level variable, for example, in a certain object code file, a remove service is a class variable, a corresponding relationship between the class variable and a class name is obtained by extracting a corresponding field in the class variable, the corresponding relationship is used as a first mapping relationship, and a mapping relationship between a first variable parameter (i.e., the class variable) and the first class name is represented through the first mapping relationship, where a specific data structure of the first mapping relationship is in a map form.
In step S304 of some embodiments, annotation information of a target class method is extracted from a target syntax tree through a preset script program, where the annotation information includes a first annotation content of the target class and a second annotation content of the target class method, the first annotation content is parsed, interface data of the target class is extracted, so as to determine an interface type of the target class according to the interface data, and if the target class is an interface class, an interface path of the target class is extracted, where the interface path is a URL path. Further, the second annotation content is parsed, interface mapping data of the target class method is extracted, if the target class method has the interface mapping data, an interface node is created according to the interface mapping data, the interface node includes an interface service name, interface url information and the like, and the interface node can be represented by an API. For example, if the annotation information of the target class method in a certain target code file includes first annotation content "@ RestController" and second annotation content "@ GetMapping", it is determined that the target class where the target class method is located is an interface class according to the first annotation content "@ RestController", and the extracted url path is the value of annotation in annotation mark "@". Further, determining that the interface mapping exists in the target class method according to the second annotation content "@ GetMapping".
In step S305 of some embodiments, the target class information, the first mapping relationship, and the method class are integrated to obtain first analysis data.
Through the steps S301 to S305, the java class of the object code file can be analyzed more conveniently, including analyzing the input field, class variable and annotation information of each object class, so as to obtain the corresponding relationship between the class variable and the class name of the object class, the corresponding relationship between the object class information and the class name, and the packaging data of the object class method in the object class, thereby improving the comprehensiveness of code analysis.
In step S104 of some embodiments, a class method traversal is performed on the object code file, and a class method of each java class of the object code file is analyzed to obtain a current class method, where the class method is a static method, and in an actual application scenario, the class method may be called by a class name or a class method name.
Referring to fig. 4, in some embodiments, the second parsing data includes a second mapping relationship and a third mapping relationship, and step S105 may include, but is not limited to, step S401 to step S404:
step S401, if the current method is the target method, field analysis processing is carried out on the first analysis data to obtain a second variable parameter and a third variable parameter of the target method;
step S402, analyzing the second variable parameter to obtain a second mapping relation, wherein the second mapping relation is used for representing the mapping relation between the second variable parameter and the second class name;
step S403, analyzing the third variable parameter to obtain a third mapping relation, where the third mapping relation is used to represent a mapping relation between the third variable parameter and a third class name;
and S404, obtaining second analysis data according to the second mapping relation and the third mapping relation.
In step S401 in some embodiments, if the current class method is a target class method, the specific code information of the target class method needs to be analyzed, that is, the first analysis data is field analyzed by a script program to obtain second analysis data, where the second analysis data includes target method information of the target class method, the target method information includes a second variable parameter, a third variable parameter, and method node information of the target class method, the second variable parameter may be an entry parameter of the target class method, the third variable parameter may be a method local variable defined inside the target class method, the method node information includes a method name, a method attribute, and other contents, and the method name may be a character string including letters, numbers, and the like, or may be in other forms, and is not limited; the method attribute may include the class to which the target class method belongs, and so on.
In step S402 of some embodiments, a second variable parameter is analyzed through a preset script program, where the second variable parameter may be an input parameter of a target class method, a corresponding relationship between the input parameter and a class name is obtained by extracting a corresponding field in the input parameter, the corresponding relationship is used as a second mapping relationship, and a mapping relationship between a second variable parameter (i.e., the input parameter) and the second class name is represented through the second mapping relationship, where a specific data structure of the second mapping relationship is in a map form.
In step S403 of some embodiments, a third variable parameter is analyzed through a preset script program, where the third variable parameter is a method local variable defined inside the target class method, a corresponding relationship between the method local variable and the class name is obtained by extracting a corresponding field in the method local variable, the corresponding relationship is used as a third mapping relationship, and a mapping relationship between the third variable parameter (i.e., the method local variable) and the third class name is represented through the third mapping relationship, where a specific data structure of the third mapping relationship is in a map form.
In step S404 of some embodiments, the second mapping relationship and the third mapping relationship are integrated to obtain second analysis data.
Through the steps S401 to S404, the relevant data of each target class method can be accurately acquired, so that code analysis is performed according to the target class method and the data content of the target class, and the accuracy of code analysis is improved.
In step S106 of some embodiments, information extraction is performed on target method information of a target method through a preset script degree, so as to obtain target variable information and method node information, where the target variable information includes a variable type, a variable value, and the like of the target method, and the method node information includes information such as a method name of the target method.
Referring to fig. 5, in some embodiments, the first parsing data includes the target class information and the first mapping relationship, the second parsing data includes the second mapping relationship and the third mapping relationship, and step S107 may include, but is not limited to, steps S501 to S503:
step S501, acquiring the variable type of target variable information;
step S502, screening the target type information, the first mapping relation, the second mapping relation and the third mapping relation according to a preset priority order and target variable information to obtain a target mapping relation;
and step S503, obtaining a target calling relationship according to the target mapping relationship and the target variable information.
In step S501 of some embodiments, a script program is written to obtain a variable type of target variable information, where the variable type includes a member variable and a local variable, where the member variable includes a class variable, target class information, and so on, i.e., the member variable generally refers to a class-level variable; local variables include form arguments (i.e., method arguments, etc.), method local variables (i.e., variables defined within a method), and code block local variables (i.e., variables defined within a code block).
In step S502 of some embodiments, the preset priority order may be set according to the actual service requirement. For example, in a specific application scenario, the priority order is to determine a target class name according to a local variable of the method, determine the target class name according to a form parameter, determine the target class name according to a class variable, and determine the target class name according to the target class information, that is, when the target class name corresponding to the target variable information is searched, the target class information, the first mapping relationship, the second mapping relationship, and the third mapping relationship are screened according to the priority order and a variable type of the target variable information, and data information corresponding to the variable type of the target variable information is selected to obtain the target mapping relationship. For example, the variable type of the target variable information includes a second variable parameter (i.e., an input variable) and a third variable parameter (i.e., a method local variable), and then the second mapping relationship and the third mapping relationship are used as the target mapping relationship.
In step S503 of some embodiments, when a target call relationship is obtained according to a target mapping relationship and target variable information, first determining a candidate class name according to the target mapping relationship, further filtering the candidate class name according to a preset filtering condition to obtain the target class name, finally obtaining call method node information according to the target class name and the target variable information, where the call method node information includes a call method name and a target class name, and finally constructing a target call relationship between a target class method and a call method according to the call method node information obtained by the target class name and the target variable information, that is, constructing a node association between the call method node and the target class method according to the method name of the target class method and the method name of the call method, so as to obtain the target call relationship.
Referring to fig. 6, in some embodiments, step S503 includes, but is not limited to, steps S601 to S603:
step S601, obtaining at least one candidate class name according to the target mapping relation;
step S602, filtering the candidate class name according to a preset filtering condition to obtain a target class name;
and step S603, constructing a target calling relationship according to the target class name and the target variable information.
In step S601 in some embodiments, according to the target mapping relationship, the class name information included in the target mapping relationship is extracted to obtain at least one candidate class name. For example, when the target mapping relationship includes the second mapping relationship and the third mapping relationship, the candidate class name may include the second class name and the third class name.
In step S602 in some embodiments, the preset filtering condition may be set according to an actual situation, for example, the preset filtering condition mainly filters the java built-in class and the introduced third-party library class, and retains the java class defined by the current service requirement. Specifically, the preset filtering condition may be filtering based on a java-like path, that is, a fixed character string is added to prefixes of the java-like paths of the current service requirement, such as om. Reserving the java class of which the candidate class name contains the prefix, and filtering the java class not containing the prefix to obtain the target class and the target class name which meet the requirements.
In step S603 of some embodiments, calling method node information is obtained according to the target class name and the target variable information, where the calling method node information includes the calling method name and the target class name, and finally, a target calling relationship between the target class method and the calling method is constructed according to the calling method node information obtained by the target class name and the target variable information, that is, a node association between the calling method node and the target class method is constructed according to the method name of the target class method and the method name of the calling method, so as to obtain the target calling relationship.
Referring to fig. 7, after step S107 in some embodiments, the code analysis method may further include, but is not limited to, steps S701 to S702:
step S701, acquiring a preset graph database;
step S702, storing the target calling relationship, the pre-acquired method node information and the interface data to a target storage position of a graph database to obtain target calling data, wherein the target calling data is used for representing the calling relationship of the source code.
In step S701 of some embodiments, the preset map database may be a neo4j map database or the like, and the map database may be pre-constructed by a script program or other means.
In step S702 of some embodiments, a target call relationship, method node information, and interface data are input into a graph database, the graph database is queried through a preset script MERGE, if there is interface data meeting requirements in the graph database, a new interface is not created, and the target call relationship and the method node information are imported to a target storage location of the graph database through an interface in the graph database, where the target storage location may be determined according to a suffix name of a source code file; if interface data meeting requirements do not exist in the graph database, a new interface is created according to preset interface data, a target calling relationship and method node information are imported to a target storage position of the graph database through the new interface, wherein the target calling data can be used for representing the calling relationship between source codes, the target calling data comprises the calling relationship between a target class method and a class method of the same class in the source codes, method node information of the target class method, calling method node information and the like, and the calling relationship among the codes can provide effective support for code analysis in the code testing process and provide code analysis accuracy.
According to the code analysis method, a source code file of a source code is obtained; analyzing the source code file to obtain a target code file; the target code file comprises a target syntax tree, and the code content of the source code file can be obtained conveniently. Further, analyzing the target syntax tree to obtain first analysis data; and traversing the class method of the target code file to obtain the current class method, and conveniently obtaining the characteristic contents of each class of object and class method in the target code file. If the current method is the target method, performing field analysis processing on the first analysis data to obtain second analysis data; the second analysis data comprises target method information of the target method, and the related data of each target method can be accurately acquired through the method. Furthermore, information extraction is carried out on the target method information to obtain target variable information, so that calling relation analysis is carried out on the target variable information according to the first analysis data and the second analysis data to obtain a target calling relation, the calling relation existing among source codes can be clearly reflected through the target calling relation, and the accuracy of code analysis in the code testing process can be improved.
Referring to fig. 8, an embodiment of the present application further provides a code analysis apparatus, which can implement the code analysis method, and the apparatus includes:
a source code file obtaining module 801, configured to obtain a source code file of a source code;
a first parsing module 802, configured to parse the source code file to obtain a target code file; wherein the object code file includes an object syntax tree;
a second parsing module 803, configured to parse the target syntax tree to obtain first parsing data;
the traversing module 804 is used for performing class method traversal on the target code file to obtain a current class method;
a third parsing module 805, configured to, if the current class method is the target class method, perform field parsing on the first parsed data to obtain second parsed data; the second analysis data comprises target method information of the target class method;
an information extraction module 806, configured to perform information extraction on the target method information to obtain target variable information;
the relationship analysis module 807 is configured to perform call relationship analysis on the target variable information according to the first analysis data and the second analysis data to obtain a target call relationship.
In some embodiments, the first parsing module 802 includes:
the code analysis unit is used for carrying out code analysis on the source code file through a preset code analysis tool to obtain preliminary code data;
and the grammar parsing unit is used for carrying out grammar parsing processing on the preliminary code data according to a preset grammar rule to obtain a target grammar tree.
In some embodiments, the first parsing data includes target class information, a first mapping relationship, and a method category, and the second parsing module 803 includes:
the relation extraction unit is used for extracting a target class name and a class path from the target syntax tree, acquiring a mapping relation between the target class name and the class path and obtaining class path mapping information;
the first field analysis unit is used for analyzing the input field of the target code file according to the class path mapping information to obtain target class information of the target code file;
the first parameter analysis unit is used for extracting a first variable parameter of the target code file and analyzing the first variable parameter to obtain a first mapping relation, wherein the first mapping relation is used for representing the mapping relation between the first variable parameter and the first class name;
the information analysis unit is used for extracting annotation information of the target method from the target syntax tree and analyzing the annotation information to obtain the method type of the target method;
and the first integration unit is used for obtaining first analysis data according to the target class information, the first mapping relation and the method class.
In some embodiments, the second parsing data includes a second mapping relationship, a third mapping relationship, and the third parsing module 805 includes:
the second field analysis unit is used for carrying out field analysis processing on the first analysis data if the current class method is the target class method to obtain a second variable parameter and a third variable parameter of the target class method;
the second parameter analysis unit is used for analyzing the second variable parameter to obtain a second mapping relation, and the second mapping relation is used for representing the mapping relation between the second variable parameter and the second class name;
the third parameter analysis unit is used for analyzing the third variable parameter to obtain a third mapping relation, and the third mapping relation is used for representing the mapping relation between the third variable parameter and the third class name;
and the second integration unit is used for obtaining second analysis data according to the second mapping relation and the third mapping relation.
In some embodiments, the first parsing data includes the target class information and the first mapping relationship, the second parsing data includes the second mapping relationship and the third mapping relationship, and the relationship parsing module 807 includes:
the type acquisition unit is used for acquiring the variable type of the target variable information;
the screening unit is used for screening the target type information, the first mapping relation, the second mapping relation and the third mapping relation according to a preset priority order and the target variable information to obtain a target mapping relation;
and the relationship construction unit is used for obtaining a target calling relationship according to the target mapping relationship and the target variable information.
In some embodiments, the relationship building unit comprises:
the class name acquisition subunit is used for acquiring at least one candidate class name according to the target mapping relation;
the filtering subunit is configured to filter the candidate class name according to a preset filtering condition to obtain a target class name;
and the relationship construction subunit is used for constructing a target calling relationship according to the target class name and the target variable information.
In some embodiments, the code analysis apparatus further includes a data integration module, which specifically includes:
a database acquisition unit for acquiring a preset database;
and the storage unit is used for storing the target calling relationship, the pre-acquired method node information and the interface data to a target storage position of the graph database to obtain target calling data, wherein the target calling data is used for expressing the calling relationship of the source code.
The specific implementation of the code analysis apparatus is substantially the same as the specific implementation of the code analysis method, and is not described herein again.
An embodiment of the present application further provides an electronic device, where the electronic device includes: the code analysis method comprises a memory, a processor, a program stored on the memory and capable of running on the processor, and a data bus for realizing connection communication between the processor and the memory, wherein the program realizes the code analysis method when being executed by the processor. The electronic equipment can be any intelligent terminal including a tablet computer, a vehicle-mounted computer and the like.
Referring to fig. 9, fig. 9 illustrates a hardware structure of an electronic device according to another embodiment, where the electronic device includes:
the processor 901 may be implemented by a general-purpose CPU (central processing unit), a microprocessor, an Application Specific Integrated Circuit (ASIC), or one or more integrated circuits, and is configured to execute a relevant program to implement the technical solution provided in the embodiment of the present application;
the memory 902 may be implemented in the form of a Read Only Memory (ROM), a static storage device, a dynamic storage device, or a Random Access Memory (RAM). The memory 902 may store an operating system and other application programs, and when the technical solution provided in the embodiments of the present specification is implemented by software or firmware, related program codes are stored in the memory 902 and called by the processor 901 to execute the code analysis method of the embodiments of the present application;
an input/output interface 903 for inputting and outputting information;
a communication interface 904, configured to implement communication interaction between the device and another device, where communication may be implemented in a wired manner (e.g., USB, network cable, etc.), or in a wireless manner (e.g., mobile network, WIFI, bluetooth, etc.);
a bus 905 that transfers information between various components of the device (e.g., the processor 901, the memory 902, the input/output interface 903, and the communication interface 904);
wherein the processor 901, the memory 902, the input/output interface 903 and the communication interface 904 enable a communication connection within the device with each other through a bus 905.
Embodiments of the present application further provide a storage medium, which is a computer-readable storage medium for computer-readable storage, and the storage medium stores one or more programs, where the one or more programs are executable by one or more processors to implement the code analysis method.
The memory, which is a non-transitory computer readable storage medium, may be used to store non-transitory software programs as well as non-transitory computer executable programs. Further, the memory may include high speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, the memory optionally includes memory located remotely from the processor, and these remote memories may be connected to the processor through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
According to the code analysis method, the code analysis device, the electronic equipment and the storage medium provided by the embodiment of the application, the source code file of the source code is obtained; analyzing the source code file to obtain a target code file; the target code file comprises a target syntax tree, and the code content of the source code file can be obtained conveniently. Further, analyzing the target syntax tree to obtain first analysis data; the first analysis data comprises encapsulation data of a target class method; and class method traversal is carried out on the target code file to obtain the current class method, and the characteristic contents of each class of object and class method in the target code file can be conveniently obtained. If the current class method is the target class method, performing field analysis processing on the first analysis data to obtain second analysis data; the second analysis data comprises target method information of the target method, and the related data of each target method can be accurately acquired through the method. Furthermore, information of the target method is extracted to obtain target variable information and method node information, so that calling relation analysis is performed on the target variable information according to the first analysis data and the second analysis data to obtain a target calling relation, the calling relation existing among source codes can be clearly reflected through the target calling relation, and accuracy of code analysis in a code testing process can be improved.
The embodiments described in the embodiments of the present application are for more clearly illustrating the technical solutions of the embodiments of the present application, and do not constitute limitations on the technical solutions provided in the embodiments of the present application, and it is obvious to those skilled in the art that the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems with the evolution of technologies and the emergence of new application scenarios.
It will be appreciated by those skilled in the art that the embodiments shown in fig. 1-7 are not limiting of the embodiments of the present application and may include more or fewer steps than those shown, or some of the steps may be combined, or different steps may be included.
The above described embodiments of the apparatus are merely illustrative, wherein the units illustrated as separate components may or may not be physically separate, may be located in one place, or may be distributed over a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
One of ordinary skill in the art will appreciate that all or some of the steps of the methods, systems, functional modules/units in the devices disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof.
The terms "first," "second," "third," "fourth," and the like in the description of the application and the above-described figures, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It should be understood that the data so used may be interchanged under appropriate circumstances such that embodiments of the application described herein may be implemented in sequences other than those illustrated or described herein. Moreover, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be understood that in the present application, "at least one" means one or more, "a plurality" means two or more. "and/or" for describing an association relationship of associated objects, indicating that there may be three relationships, e.g., "a and/or B" may indicate: only A, only B and both A and B are present, wherein A and B may be singular or plural. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship. "at least one of the following" or similar expressions refer to any combination of these items, including any combination of single item(s) or plural items. For example, at least one (one) of a, b, or c, may represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", wherein a, b, c may be single or plural.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the above-described division of units is only one type of division of logical functions, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit may be implemented in the form of hardware, or may also be implemented in the form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application, which are essential or part of the technical solutions contributing to the prior art, or all or part of the technical solutions, may be embodied in the form of a software product stored in a storage medium, which includes multiple instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the methods of the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing programs, such as a usb disk, a portable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The preferred embodiments of the present application have been described above with reference to the accompanying drawings, and the scope of the claims of the embodiments of the present application is not limited thereto. Any modifications, equivalents and improvements that may occur to those skilled in the art without departing from the scope and spirit of the embodiments of the present application are intended to be within the scope of the claims of the embodiments of the present application.

Claims (10)

1. A method of code analysis, the method comprising:
acquiring a source code file of a source code;
analyzing the source code file to obtain a target code file; wherein the object code file comprises an object syntax tree;
analyzing the target syntax tree to obtain first analysis data;
performing class method traversal on the target code file to obtain a current class method;
if the current class method is a target class method, performing field analysis processing on the first analysis data to obtain second analysis data; wherein the second parsed data includes target method information for the target class method;
extracting the target method information to obtain target variable information;
and analyzing the calling relationship of the target variable information according to the first analysis data and the second analysis data to obtain a target calling relationship.
2. The code analysis method according to claim 1, wherein the step of parsing the source code file to obtain the target code file comprises:
performing code analysis on the source code file through a preset code analysis tool to obtain preliminary code data;
and carrying out syntax analysis processing on the preliminary code data according to a preset syntax rule to obtain the target syntax tree.
3. The code analysis method according to claim 1, wherein the first parsing data includes target class information, a first mapping relationship, and a method type, and the step of parsing the target syntax tree to obtain the first parsing data includes:
extracting a target class name and a class path from the target syntax tree, and acquiring a mapping relation between the target class name and the class path to obtain class path mapping information;
analyzing the input field of the target code file according to the class path mapping information to obtain target class information of the target code file;
extracting a first variable parameter of the target code file, and analyzing the first variable parameter to obtain a first mapping relation, wherein the first mapping relation is used for representing the mapping relation between the first variable parameter and a first class name;
extracting annotation information of the target method from the target syntax tree, and analyzing the annotation information to obtain a method type of the target method;
and obtaining the first analytical data according to the target class information, the first mapping relation and the method class.
4. The code analysis method according to claim 1, wherein the second analysis data includes a second mapping relationship and a third mapping relationship, and the step of performing field analysis processing on the first analysis data to obtain the second analysis data if the current class method is the target class method includes:
if the current method is the target method, performing field analysis processing on the first analysis data to obtain a second variable parameter and a third variable parameter of the target method;
analyzing the second variable parameter to obtain a second mapping relation, wherein the second mapping relation is used for representing the mapping relation between the second variable parameter and a second class name;
analyzing the third variable parameter to obtain a third mapping relation, wherein the third mapping relation is used for representing the mapping relation between the third variable parameter and a third class name;
and obtaining the second analysis data according to the second mapping relation and the third mapping relation.
5. The code analysis method according to claim 1, wherein the first analysis data includes target class information and a first mapping relationship, the second analysis data includes a second mapping relationship and a third mapping relationship, and the step of performing call relation analysis on the target variable information according to the first analysis data and the second analysis data to obtain a target call relation includes:
acquiring the variable type of the target variable information;
screening the target type information, the first mapping relation, the second mapping relation and the third mapping relation according to a preset priority order and the target variable information to obtain a target mapping relation;
and obtaining the target calling relationship according to the target mapping relationship and the target variable information.
6. The code analysis method according to claim 5, wherein the step of obtaining the target invocation relationship according to the target mapping relationship and the target variable information comprises:
obtaining at least one candidate class name according to the target mapping relation;
filtering the candidate class name according to a preset filtering condition to obtain a target class name;
and constructing the target calling relationship according to the target class name and the target variable information.
7. The code analysis method according to any one of claims 1 to 6, wherein after the step of performing call relation analysis on the target variable information according to the first analysis data and the second analysis data to obtain a target call relation, the method further comprises:
acquiring a preset graph database;
and storing the target calling relationship, the pre-acquired method node information and the interface data to a target storage position of the graph database to obtain target calling data, wherein the target calling data is used for representing the calling relationship of the source code.
8. A code analysis apparatus, characterized in that the apparatus comprises:
the source code file acquisition module is used for acquiring a source code file of a source code;
the first analysis module is used for analyzing the source code file to obtain a target code file; wherein the object code file comprises an object syntax tree;
the second analysis module is used for analyzing the target syntax tree to obtain first analysis data;
the traversal module is used for carrying out class method traversal on the target code file to obtain a current class method;
the third analysis module is used for carrying out field analysis processing on the first analysis data to obtain second analysis data if the current class method is a target class method; wherein the second parsed data includes target method information for the target class method;
the information extraction module is used for extracting the information of the target method to obtain target variable information;
and the relation analysis module is used for carrying out calling relation analysis on the target variable information according to the first analysis data and the second analysis data to obtain a target calling relation.
9. An electronic device, characterized in that it comprises a memory, a processor, a program stored on said memory and executable on said processor, and a data bus for implementing a connection communication between said processor and said memory, said program, when executed by said processor, implementing the steps of the code analysis method according to any one of claims 1 to 7.
10. A storage medium, which is a computer-readable storage medium, for computer-readable storage, characterized in that the storage medium stores one or more programs, which are executable by one or more processors, to implement the steps of the code analysis method of any one of claims 1 to 7.
CN202210951712.6A 2022-08-09 2022-08-09 Code analysis method, code analysis device, electronic device, and storage medium Pending CN115292180A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210951712.6A CN115292180A (en) 2022-08-09 2022-08-09 Code analysis method, code analysis device, electronic device, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210951712.6A CN115292180A (en) 2022-08-09 2022-08-09 Code analysis method, code analysis device, electronic device, and storage medium

Publications (1)

Publication Number Publication Date
CN115292180A true CN115292180A (en) 2022-11-04

Family

ID=83828018

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210951712.6A Pending CN115292180A (en) 2022-08-09 2022-08-09 Code analysis method, code analysis device, electronic device, and storage medium

Country Status (1)

Country Link
CN (1) CN115292180A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115576603A (en) * 2022-11-23 2023-01-06 云账户技术(天津)有限公司 Method and device for acquiring variable values in code segments

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115576603A (en) * 2022-11-23 2023-01-06 云账户技术(天津)有限公司 Method and device for acquiring variable values in code segments
CN115576603B (en) * 2022-11-23 2023-03-10 云账户技术(天津)有限公司 Method and device for acquiring variable values in code segment

Similar Documents

Publication Publication Date Title
US10275713B2 (en) Automatic data interpretation and answering analytical questions with tables and charts
CN110795697B (en) Method and device for acquiring logic expression, storage medium and electronic device
CN115016793A (en) Code generation method and device based on syntax tree, electronic equipment and storage medium
CN114625844B (en) Code searching method, device and equipment
CN115292180A (en) Code analysis method, code analysis device, electronic device, and storage medium
CN114398138A (en) Interface generation method and device, computer equipment and storage medium
CN116701604A (en) Question and answer corpus construction method and device, question and answer method, equipment and medium
CN115543339A (en) Code conversion method and device, computer equipment and storage medium
CN114625658A (en) APP stability test method, device, equipment and computer readable storage medium
CN114816422A (en) Method, device, electronic equipment and storage medium for converting PLSQL code
CN115033643A (en) Data synchronization method, electronic device and computer-readable storage medium
CN115291931A (en) Version change processing method and device, electronic equipment and storage medium
CN111539200B (en) Method, device, medium and electronic equipment for generating rich text
US11605006B2 (en) Deep-learning model catalog creation
CN114661809A (en) Packaging method, logical operation method, device, equipment and medium
CN116643814A (en) Model library construction method, model calling method based on model library and related equipment
CN111625749B (en) Method, device, equipment and medium for extracting website detail page information of participant company
CN118227119A (en) Expression calculation logic management method and device, electronic equipment and storage medium
CN115033234A (en) Method, device, equipment and medium for re-insurance new product configuration based on template engine
CN117290314A (en) Binary package-based resource extraction method, system, equipment and storage medium
CN116880855A (en) Redundant code cleaning method and device, electronic equipment and storage medium
CN115203307A (en) Data export method, data export device, electronic equipment and storage medium
CN116996557A (en) Interface registration method and device, electronic equipment and storage medium
CN117436052A (en) Rights management method, rights management device, electronic device, and storage medium
CN115034187A (en) Annotating method, annotating device, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination