CN110502227A - The method and device of code completion, storage medium, electronic equipment - Google Patents

The method and device of code completion, storage medium, electronic equipment Download PDF

Info

Publication number
CN110502227A
CN110502227A CN201910802690.5A CN201910802690A CN110502227A CN 110502227 A CN110502227 A CN 110502227A CN 201910802690 A CN201910802690 A CN 201910802690A CN 110502227 A CN110502227 A CN 110502227A
Authority
CN
China
Prior art keywords
name
attribute
node
dictionary data
code
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.)
Granted
Application number
CN201910802690.5A
Other languages
Chinese (zh)
Other versions
CN110502227B (en
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.)
Netease Hangzhou Network Co Ltd
Original Assignee
Netease Hangzhou Network Co 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 Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Priority to CN201910802690.5A priority Critical patent/CN110502227B/en
Publication of CN110502227A publication Critical patent/CN110502227A/en
Application granted granted Critical
Publication of CN110502227B publication Critical patent/CN110502227B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/33Intelligent editors
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/3331Query processing
    • G06F16/334Query execution
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the present invention is the method and device about a kind of code completion, computer readable storage medium and electronic equipment, it is related to source code processing technology field, this method comprises: parsed to obtain to completion character string to current typing code, and obtained with described according to the current typing code to the corresponding function name set of completion character string and attribute-name set;From in preset dictionary data structure inquire with the function name set in the matched target type object of function name, and with the matched target type object of attribute-name in the attribute-name set;The corresponding objective attribute target attribute name of the target type object and objective function name are obtained according to the dictionary data structure;Completion list is formed according to the objective function name and the objective attribute target attribute name, and the completion list is shown.Disclosure example embodiment improves the accuracy rate of code completion.

Description

The method and device of code completion, storage medium, electronic equipment
Technical field
The present embodiments relate to software source code processing technology fields, in particular to a kind of side of code completion Method, the device of code completion, computer readable storage medium and electronic equipment.
Background technique
Integrated Development Environment (Integrated Development Environment, IDE) is opened for providing program The application program in hair ring border.Software engineer is when writing program, input code using Integrated Development Environment, Integrated Development Environment Can be according to the small part character that software engineer has inputted, automatic search matching one group of user of output may think the generation of input Code Keyword List reduces character inputs actually required for user's selection, the remaining character of quick completion, improves exploitation The efficiency of typing code when software.This function is referred to as code completion (Code Completion).
In the prior art, the realization of code completion function is typically based on type inference technology, and type inference needs are accomplished The concrete type of each variable in code text is analyzed, then in user's input code, identifies user's input unit The type for dividing code, provides code completion Keyword List again according to type for user.Programming language is according in code text Whether types of variables is known when no containing type mark, compiling, can divide into two kinds of static types, regime type.For dynamic The programming language of state type, in the case where the type for lacking variable marks, type inference generally passes through abstract interpretation (Abstract Interpretation) is implemented.
But the above-mentioned type derivation has following defects that on the one hand, some legal written in code scenes can not pass through pumping As the type of interpretation technique identification wherein variable, therefore lead to not carry out completion to the code of the type;On the other hand, it is abstracted Interpretation technique implement effect quality highly dependent upon analyzed code correctness, therefore develop during code correctness not The accuracy rate of height, code completion also will be greatly reduced.
It should be noted that the information in the invention of above-mentioned background technology part is only used for reinforcing the reason to background of the invention Solution, therefore may include the information not constituted to the prior art known to persons of ordinary skill in the art.
Summary of the invention
The purpose of the present invention is to provide a kind of methods of code completion, the device of code completion, computer-readable storage Medium and electronic equipment, and then can not caused by overcoming the limitation and defect due to the relevant technologies at least to a certain extent The lower problem of the accuracy rate of progress code completion and code completion.
According to one aspect of the disclosure, a kind of method of code completion is provided, comprising:
Current typing code is parsed to obtain to completion character string, and is obtained according to the current typing code and institute It states to the corresponding function name set of completion character string and attribute-name set;
From inquiry in preset dictionary data structure and the matched target type pair of function name in the function name set As, and with the matched target type object of attribute-name in the attribute-name set;Wherein, the dictionary data structure according to History source code building, and include multiple type objects and attribute-name corresponding with each type object and function name;
The corresponding objective attribute target attribute name of the target type object and objective function name are obtained according to the dictionary data structure;
Completion list is formed according to the objective function name and the objective attribute target attribute name, and the completion list is carried out Display.
In a kind of exemplary embodiment of the disclosure, the method also includes:
Obtain history source code, and the dictionary data structure according to the history source code establishing;
Wherein, the keyword of the dictionary data structure is function name and attribute-name, the pre-set dictionary data structure Value be type object corresponding with the function name and the attribute-name.
In a kind of exemplary embodiment of the disclosure, the dictionary data knot according to the history source code establishing Structure includes:
The history source code is converted into abstract syntax tree;Wherein, each node of the abstract syntax tree is gone through with described Each syntactic structure in history source code corresponds, and the syntactic structure includes modular structure, pack arrangement, type structure, letter Table structure, valuation structure;
All nodes of the abstract syntax tree are traversed, and according to the father and son between each node in the abstract syntax tree Relationship is and the corresponding node of the modular structure and the corresponding node of the pack arrangement, section corresponding with the type structure Point generates dictionary data structure respectively.
Father in a kind of exemplary embodiment of the disclosure, between each node according in the abstract syntax tree Subrelation is and the corresponding node of the modular structure and corresponding node of the pack arrangement, corresponding with the type structure Node generates dictionary data structure respectively, comprising:
When determining the corresponding function of the corresponding node of the function structure is the overall situation function of module level, by the module The dictionary of corresponding modular structure or the corresponding node of pack arrangement is added in the corresponding function name of overall situation function and function object of grade In data structure;
Wherein, the modular structure or the corresponding node of pack arrangement are the father node of the corresponding node of the function structure.
Father in a kind of exemplary embodiment of the disclosure, between each node according in the abstract syntax tree Subrelation is and the corresponding node of the modular structure and corresponding node of the pack arrangement, corresponding with the type structure Node generates dictionary data structure respectively, comprising:
When in determining the corresponding node of the valuation structure comprising having the node of the assignment statement of global namespace, from packet Global object is extracted in node containing the assignment statement with global namespace;
Corresponding modular structure is added in the global object and corresponding attribute-name and function name or pack arrangement is corresponding In the dictionary data structure of node;
Wherein, the modular structure or the corresponding node of pack arrangement are the father node of the corresponding node of the valuation structure.
In a kind of exemplary embodiment of the disclosure, the inquiry from preset dictionary data structure and the function Name set in the matched target type object of function name, and with the matched target class of attribute-name in the attribute-name set Type object, comprising:
From inquiry in the dictionary data structure of node corresponding with the modular structure and the letter in the function name set Several matched target type objects and with the matched target type object of attribute-name in the attribute-name set, obtain One target type object;
From inquiry in the dictionary data structure of node corresponding with the pack arrangement and the function in the function name set The matched target type object of name and with the matched target type object of attribute-name in the attribute-name set, obtain second Target type object;
From inquiry in the dictionary data structure of node corresponding with the type structure and the letter in the function name set Several matched target type objects and with the matched target type object of attribute-name in the attribute-name set, obtain Three target type objects;
Wherein, the preset dictionary data structure includes the dictionary data knot of node corresponding with the modular structure Dictionary data structure, the dictionary data structure corresponding with the type structure of structure and the corresponding node of the pack arrangement, it is described Target type object includes the first object type object, the second target type object and the third target type Object.
In a kind of exemplary embodiment of the disclosure, the method also includes:
In response to user to the selection operation of the completion list, obtains in the dictionary data structure and grasped with the selection Make corresponding objective function name and objective attribute target attribute name;
Using the objective function name and objective attribute target attribute name of acquisition, completion is carried out to completion character string to described.
According to one aspect of the disclosure, a kind of device of code completion is provided, comprising:
Code analysis module for being parsed to obtain to completion character string to current typing code, and is worked as according to described Preceding typing code is obtained with described to the corresponding function name set of completion character string and attribute-name set;
Enquiry module, for being matched from inquiry in preset dictionary data structure with the function name in the function name set Target type object, and with the matched target type object of attribute-name in the attribute-name set;Wherein, the dictionary Data structure includes multiple type objects and attribute-name corresponding with each type object according to history source code building And function name;
First processing module, for obtaining the corresponding target category of the target type object according to the dictionary data structure Property name and objective function name;
Second processing module, for forming completion list according to the objective function name and the objective attribute target attribute name, and The completion list is shown.
According to one aspect of the disclosure, a kind of computer readable storage medium is provided, computer program is stored thereon with, The computer program realizes code completion described in above-mentioned any one method when being executed by processor.
According to one aspect of the disclosure, a kind of electronic equipment is provided, comprising:
Processor;And
Memory, for storing the executable instruction of the processor;
Wherein, the processor is configured to execute generation described in above-mentioned any one via the executable instruction is executed The method of code completion.
The method and device of a kind of code completion provided in an embodiment of the present invention, on the one hand, by current typing code Parsed to obtain to completion character string, and according to current typing code obtain with to the corresponding function name set of completion character string And attribute-name set;Then from the matched target of function name inquired in preset dictionary data structure in and function name set Type object, and with the matched target type object of attribute-name in attribute-name set;Further according to the matched mesh of and function name Mark type object obtains objective function name, and obtains objective attribute target attribute name according to the matched target type object of attribute-name;Finally Completion list is formed according to objective function name and objective attribute target attribute name, and completion list is shown, so that code typing people Member can according in completion list objective function name and objective attribute target attribute name carry out selection and according to selection result carry out completion, No longer need to identify the type of variable solve in the prior art due to that can not identify that the type of variable in turn can not be right The code of the type carries out the problem of completion;On the other hand, allow code typing personnel according to the target in completion list Function name and objective attribute target attribute name carry out selection and carry out completion according to selection result, solve in the prior art due to development period Between code correctness it is not high caused by code completion the lower problem of accuracy rate, improve the accuracy rate of code completion.
It should be understood that above general description and following detailed description be only it is exemplary and explanatory, not It can the limitation present invention.
Detailed description of the invention
The drawings herein are incorporated into the specification and forms part of this specification, and shows and meets implementation of the invention Example, and be used to explain the principle of the present invention together with specification.It should be evident that the accompanying drawings in the following description is only the present invention Some embodiments for those of ordinary skill in the art without creative efforts, can also basis These attached drawings obtain other attached drawings.
Fig. 1 schematically shows example code figure of one of the example embodiment based on abstract interpretation according to the present invention;
Fig. 2 schematically shows the flow chart of the method for one of example embodiment code completion according to the present invention;
Fig. 3 schematically show according to the present invention one of example embodiment according to history source code establishing dictionary data knot The method flow diagram of structure;
Fig. 4 schematically show the block diagram of device according to the present invention one of example embodiment from preset dictionary data In structure inquire with the function name set in the matched target type object of function name, and in the attribute-name set The matched target type object of attribute-name method flow diagram;
Fig. 5 schematically shows the block diagram of the device of one of example embodiment code completion according to the present invention;
Fig. 6 schematically shows one of example embodiment according to the present invention for realizing the method for above-mentioned code completion Electronic equipment.
Specific embodiment
Example embodiment is described more fully with reference to the drawings.However, example embodiment can be with a variety of shapes Formula is implemented, and is not understood as limited to example set forth herein;On the contrary, thesing embodiments are provided so that the present invention will more Fully and completely, and by the design of example embodiment comprehensively it is communicated to those skilled in the art.Described feature, knot Structure or characteristic can be incorporated in any suitable manner in one or more embodiments.In the following description, it provides perhaps More details fully understand embodiments of the present invention to provide.It will be appreciated, however, by one skilled in the art that can It is omitted with practicing technical solution of the present invention one or more in the specific detail, or others side can be used Method, constituent element, device, step etc..In other cases, be not shown in detail or describe known solution to avoid a presumptuous guest usurps the role of the host and So that each aspect of the present invention thickens.
In addition, attached drawing is only schematic illustrations of the invention, it is not necessarily drawn to scale.Identical attached drawing mark in figure Note indicates same or similar part, thus will omit repetition thereof.Some block diagrams shown in the drawings are function Energy entity, not necessarily must be corresponding with physically or logically independent entity.These function can be realized using software form Energy entity, or these functional entitys are realized in one or more hardware modules or integrated circuit, or at heterogeneous networks and place These functional entitys are realized in reason device device and microcontroller device.
In a kind of type inference technology realized based on abstract interpretation, each variable tool when program code operation can be ignored The value of body, then pay close attention to each specific type of variable.Python is a kind of regime type programming language being widely used, under Face illustrates the principle and disadvantage of abstract interpretation technology with the Python simple code in Fig. 1.
Refering to what is shown in Fig. 1, Python code first defines the type of an entitled Something, Something has two A method, entitled f1, f2, then define two functions, name is respectively g1, g2 respectively.Next code " a= The example of Something type is assigned to variable a by Something () ", and abstract interpretation technology is obtained according to this assignment statement The type of variable a may be Something type out.Variable a is called function by next code " g1 (a) " G1, abstract interpretation technology is according to this function call sentence it can be concluded that the possible type of parameter x of function g1 is Something Type.For function g2, because can not find any call statement for calling function g2, abstract interpretation technology also can not just be derived The possible type of parameter y.It is different according to the habit of software engineer, it is likely that when writing function g1, not yet for function g1 The function call sentence for calling function g1 is write out, at this moment in the process for writing function g1, abstract interpretation technology also can not just be pushed away Export the type of parameters.
A kind of method that code completion is provided firstly in this example embodiment, this method can run on server, Server cluster or Cloud Server etc. can also run on device end;Certainly, those skilled in the art can also be according to demand Method of the invention is run in other platforms, and particular determination is not done to this in the present exemplary embodiment.Refering to what is shown in Fig. 2, the generation The method of code completion may comprise steps of:
Step S210. is parsed to obtain to completion character string to current typing code, and according to the current typing generation Code is obtained with described to the corresponding function name set of completion character string and attribute-name set.
Step S220. from preset dictionary data structure inquire with the function name set in the matched mesh of function name Mark type object, and with the matched target type object of attribute-name in the attribute-name set;Wherein, the dictionary data Structure includes multiple type objects and attribute-name corresponding with each type object and letter according to history source code building It is several.
Step S230. obtains the corresponding objective attribute target attribute name of the target type object and mesh according to the dictionary data structure The offer of tender is several.
Step S240. forms completion list according to the objective function name and the objective attribute target attribute name, and to the benefit Full list is shown.
In the method for above-mentioned code completion, on the one hand, by being parsed to obtain to completion character to current typing code String, and according to current typing code obtain with to the corresponding function name set of completion character string and attribute-name set;Then from The matched target type object of function name in and function name set, and and attribute-name are inquired in preset dictionary data structure The matched target type object of attribute-name in set;Objective function is obtained further according to the matched target type object of and function name Name, and objective attribute target attribute name is obtained according to the matched target type object of attribute-name;Finally according to objective function name and target Attribute-name forms completion list, and shows to completion list, allows code typing personnel according in completion list Objective function name and objective attribute target attribute name carry out selection and carry out completion according to selection result, it is no longer necessary to the type of variable into Row identification solves in the prior art due to that can not identify the type of variable and then can not carry out completion to the code of the type Problem;On the other hand, allow code typing personnel according in completion list objective function name and objective attribute target attribute name into Row selection simultaneously carries out completion according to selection result, and solve causes since the code correctness during exploitation is not high in the prior art Code completion the lower problem of accuracy rate, improve the accuracy rate of code completion.
In the following, will be carried out in conjunction with attached drawing to each step in the method for code completion above-mentioned in this example embodiment detailed Explanation and explanation.
In step S210, current typing code is parsed to obtain to completion character string, and according to the current record Enter code to obtain with described to the corresponding function name set of completion character string and attribute-name set.
It should be noted that referring to the currently typing by user to completion character string described in the embodiment of the present invention Partial character string in code is determined as needing the character string of completion.In this exemplary embodiment, it needs according to current typing generation Syntax rule the coming out to completion string analysis by current typing code line of the programming language of code.Typically for needing to mend Complete attribute access, method call code, have the form of " A.B " or " A:B ", wherein A is a complete expression formula name, B As the attribute-name or method name of a part, B may also be null character string.
Further, it is obtaining after completion character string, it can be according to the context to completion character string in code Analyze all attribute access (attribute-name set) or method call (function name set) being related to completion character string.Example Such as, attribute-name and function name set that expression formula A needs to possess can be counted.
In step S230, matched from inquiry in preset dictionary data structure with the function name in the function name set Target type object, and with the matched target type object of attribute-name in the attribute-name set;Wherein, the dictionary Data structure includes multiple type objects and attribute-name corresponding with each type object according to history source code building And function name.
It in this exemplary embodiment, can after obtaining the attribute-name and function name set that above-mentioned expression formula A needs to possess To use the attribute-name set and function name collection query pre-set dictionary data structure, and then it is possible right to obtain expression formula A As set (the matched target type object of function name in and function name set, and with the attribute-name in attribute-name set The target type object matched).It should be added that, in order to improve matching speed, it can need to possess from expression formula A herein Attribute-name and function name set in, selecting can be with the attribute-name and function name of completion, that is, pre-set dictionary number It is filtered out according to the attribute-name and function name that may be not present in structure.Specifically, a prefix data tree structure can be prepared, For each possible object of expression formula A, the attribute name that object is possessed is inserted into the prefix data tree structure.
In step S230, the corresponding objective attribute target attribute name of the target type object is obtained according to the dictionary data structure With objective function name.
In this exemplary embodiment, when obtaining the matched target type object of the function name in above-mentioned and function name set, And with after the matched target type object of attribute-name in attribute-name set, further according to dictionary data structure and each target class Type object obtains corresponding objective function name and objective attribute target attribute name.By this way, the objective function name of acquisition can be improved With the accuracy of objective attribute target attribute name, and then improve the accuracy of code completion.
In step S240, completion list is formed according to the objective function name and the objective attribute target attribute name, and to institute Completion list is stated to be shown.
In this exemplary embodiment, code completion graphical interfaces display interface can be called, and passes through code completion figure Interface display interface shows completion list.Specifically, preamble matching can be done to prefix data tree structure according to word string It obtains final completion list, then the corresponding code completion graphical interfaces display interface of Integrated Development Environment is called finally to show To user.
Further, it completes to carry out in current typing code to the part of completion according to completion list for the ease of user Completion, the method for the code completion can also include: the selection operation in response to user to the completion list, obtain the word Objective function name corresponding with the selection operation and objective attribute target attribute name in allusion quotation data structure;Utilize the objective function of acquisition Name and objective attribute target attribute name carry out completion to completion character string to described.
For example, after completion list is shown to user by above-mentioned code completion graphical interfaces display interface, user can be with According to the actual needs of current typing code, the attribute-name and function name that provide in completion list are selected;Then root Obtained from pre-set dictionary data structure according to selection result objective function name corresponding with selection operation and with objective attribute target attribute name It is corresponding, completion is then carried out again.In this way, the accuracy rate of code completion can be improved further;It avoids due to straight It connected completion list and carries out the case where function caused by completion or attribute codes are not inconsistent with current typing code.
Further, for the ease of from pre-set dictionary data structure to objective function name and to completion attribute-name carry out Matching, the method for the code completion can also include: to obtain history source code, and the word according to the history source code establishing Allusion quotation data structure;Wherein, the keyword of the dictionary data structure is function name and attribute-name, the pre-set dictionary data knot The value of structure is type object corresponding with the function name and the attribute-name.Specifically, refering to what is shown in Fig. 3, according to Dictionary data structure described in history source code establishing may include step S310- step S320, be described in detail below.
In step s310, the history source code is converted into abstract syntax tree;Wherein, the abstract syntax tree is each Each syntactic structure in node and the history source code corresponds, the syntactic structure include modular structure, pack arrangement, Type structure, function structure, valuation structure.
In this exemplary embodiment, it is possible, firstly, to which code library, which is had code (history source code), is converted into abstract syntax Set (Abstract Syntax Tree), it should be noted that history source code can refer to project in hard disk it is all effectively Code, current typing code refer to the code just in the file of editor.Specifically, can be led to according to the syntax rule of programming language It crosses and writes syntax analyzer (Parser) source code text conversion is built into the syntactic structure of tree-shaped form performance, on tree Each node illustrate one of source code syntactic structure.Wherein, existing source code is in addition to projects to be included All source code texts used can also include user write, incomplete, even grammer incorrect source generation Code, for the incorrect code of the possible grammer in this part, syntax analyzer needs to do fault-tolerant processing, as far as possible by wherein most source Code is converted into abstract syntax tree.
In step s 320, all nodes of the abstract syntax tree are traversed, and according to each in the abstract syntax tree Set membership between node is and the corresponding node of the modular structure, node corresponding with the pack arrangement and the class The corresponding node of type structure generates dictionary data structure respectively.
In this exemplary embodiment, firstly, all nodes of whole abstract syntax tree of traversal, obtain module definition node (Module), package definition node (Package) and class definition node.Specifically, from the root node of abstract syntax tree, time All nodes for going through whole abstract syntax tree encounter subsequent step definition node to be treated (module definition node, package definition Node and class definition node) when, corresponding analysis, which is done, using subsequent step handles.Then, according in the abstract syntax tree Each node between set membership be node corresponding with the modular structure (i.e. module definition node), with the pack arrangement Corresponding node (i.e. package definition node), node corresponding with the type structure (i.e. class definition node) generate dictionary number respectively According to structure.Specifically:
For the grammar object (packet, module, class) of support attribute access, need respectively to prepare a dictionary data structure, The name of the key record syntax object of dictionary data structure, value record syntax object.For example, each package definition node includes Following information need to record and save: all global objects in dictionary data structure record package definition node, this The key of a dictionary data structure is the name of global object, and value is global object.According to the syntax rule of programming language, really Fixed packet and the subordinate relation between attached bag, packet and submodule, attached bag or submodule are also one kind of Bao Nei global object pair.Again Save for example, the following information that each class definition node includes needs to record: a dictionary structure records the definition of this class The all properties and function of node, the key of this dictionary data structure are the name of attribute and function, and value is corresponding Attribute codes or function.
It further, is corresponding with the modular structure according to the set membership between each node in abstract syntax tree Node and the corresponding node of the pack arrangement, node corresponding with the type structure generate dictionary data structure respectively and may be used also To include the following two kinds type:
One is, will when determining the corresponding function of the corresponding node of the function structure is the overall situation function of module level Corresponding modular structure or the corresponding section of pack arrangement is added in the corresponding function name of the overall situation function of the module level and function object In the dictionary data structure of point;Wherein, the modular structure or the corresponding node of pack arrangement are the corresponding section of the function structure The father node of point.For example, when the function name for including in determining the class definition node and its corresponding function are overall situation function, Based on the subordinate relation, the function name and its corresponding function are added to module definition section corresponding with such definition node In the pre-set dictionary data structure of point.For example, can according to function define where context, find out module level overall situation function or The method function of class.For the overall situation function of module level, function name is extracted, which is recorded corresponding module (packet) In global object's dictionary.
Another kind is the section comprising the assignment statement with global namespace in determining the corresponding node of the valuation structure When point, global object is extracted from the node comprising the assignment statement with global namespace;By the global object and corresponding Attribute-name and function name are added in the dictionary data structure of corresponding modular structure or the corresponding node of pack arrangement;Wherein, described Modular structure or the corresponding node of pack arrangement are the father node of the corresponding node of the valuation structure.For example, according to assignment statement Place context finds out the assignment statement in the assignment statement or class method function of all global namespaces.For global namespace Assignment statement extracts the name of global object, in global object's dictionary object record to corresponding module (packet).For Assignment statement in class method function judges that Evaluation node can or can not increase attribute or be set a property for such example, if Meeting extracts attribute-name, in the attribute dictionary attribute record to respective type.
Fig. 4 schematically shows a kind of from inquiry in preset dictionary data structure and the function name in the function name set Matched target type object, and the method flow with the matched target type object of attribute-name in the attribute-name set Figure.Refering to what is shown in Fig. 4, from being inquired in preset dictionary data structure and the matched target of function name in the function name set Type object, and with the matched target type object of attribute-name in the attribute-name set may include step S410- step Rapid S430, is described in detail below.
In step S410, inquiry and the function from the dictionary data structure of node corresponding with the modular structure Name set in the matched target type object of function name and with the matched target class of attribute-name in the attribute-name set Type object obtains first object type object.
In the step s 420, inquiry and the function name from the dictionary data structure of node corresponding with the pack arrangement The matched target type object of function name in set and with the matched target type of attribute-name in the attribute-name set Object obtains the second target type object.
In step S430, inquiry and the function from the dictionary data structure of node corresponding with the type structure Name set in the matched target type object of function name and with the matched target class of attribute-name in the attribute-name set Type object obtains third target type object;Wherein, the preset dictionary data structure includes corresponding with the modular structure The dictionary data structure of node, node corresponding with the pack arrangement dictionary data structure, corresponding with the type structure Dictionary data structure, the target type object includes the first object type object, the second target type object And the third target type object.
Hereinafter, remarking additionally to step S410- step S430.Firstly, using module definition node as root node, because This needs is matched since the pre-set dictionary tree construction of module definition node, obtains above-mentioned first object type object;So Subordinate relation based on module definition node Yu package definition node afterwards, then from package definition node corresponding with the module definition node Pre-set dictionary data structure in matched, obtain above-mentioned second target type object;Finally again based on package definition node with The subordinate relation of class definition node, then from the pre-set dictionary data structure of class definition node corresponding with the package definition node into Row matching, obtains above-mentioned third target type object.In this way, available more comprehensive completion list, and then make The objective function name and objective attribute target attribute name that need can be selected according to the completion list by obtaining user, and then to current typing code To completion part carry out completion, further improve the infull accuracy of code, while reducing the time of developer, Improve development efficiency.
The disclosure additionally provides a kind of device of code completion.Refering to what is shown in Fig. 5, the device of the code completion may include Code analysis module 510, enquiry module 520, the first module 530 and Second processing module 540.Wherein:
Code analysis module 510 can be used for being parsed to obtain to completion character string to current typing code, and according to The current typing code is obtained with described to the corresponding function name set of completion character string and attribute-name set.
Enquiry module 520 can be used for from inquiry in preset dictionary data structure and the function in the function name set The matched target type object of name, and with the matched target type object of attribute-name in the attribute-name set;Wherein, institute Dictionary data structure is stated according to history source code building, and includes multiple type objects and corresponding with each type object Attribute-name and function name.
First processing module 530 can be used for obtaining objective function according to the matched target type object of the function name Name, and objective attribute target attribute name is obtained according to the matched target type object of the attribute-name.
Second processing module 540 can be used for forming completion column according to the objective function name and the objective attribute target attribute name Table, and the completion list is shown.
In a kind of exemplary embodiment of the disclosure, described device further include:
Dictionary data structure creation module can be used for obtaining history source code, and according to the history source code establishing The dictionary data structure;
Wherein, the keyword of the dictionary data structure is function name and attribute-name, the pre-set dictionary data structure Value be type object corresponding with the function name and the attribute-name.
In a kind of exemplary embodiment of the disclosure, the dictionary data knot according to the history source code establishing Structure includes:
The history source code is converted into abstract syntax tree;Wherein, each node of the abstract syntax tree is gone through with described Each syntactic structure in history source code corresponds, and the syntactic structure includes modular structure, pack arrangement, type structure, letter Table structure, valuation structure;
All nodes of the abstract syntax tree are traversed, and according to the father and son between each node in the abstract syntax tree It is relationship and and the corresponding node of the modular structure and corresponding node of the pack arrangement, corresponding with the type structure Node generates dictionary data structure respectively.
Father in a kind of exemplary embodiment of the disclosure, between each node according in the abstract syntax tree Subrelation and and the corresponding node of the modular structure, node corresponding with the pack arrangement, corresponding with the type structure Node generate dictionary data structure respectively, comprising:
When determining the corresponding function of the corresponding node of the function structure is the overall situation function of module level, by the module The dictionary of corresponding modular structure or the corresponding node of pack arrangement is added in the corresponding function name of overall situation function and function object of grade In data structure;
Wherein, the modular structure or the corresponding node of pack arrangement are the father node of the corresponding node of the function structure.
Father in a kind of exemplary embodiment of the disclosure, between each node according in the abstract syntax tree Subrelation and and the corresponding node of the modular structure, node corresponding with the pack arrangement, corresponding with the type structure Node generate dictionary data structure respectively, comprising:
When in determining the corresponding node of the valuation structure comprising having the node of the assignment statement of global namespace, from packet Global object is extracted in node containing the assignment statement with global namespace;
Corresponding modular structure is added in the global object and corresponding attribute-name and function name or pack arrangement is corresponding In the dictionary data structure of node;
Wherein, the modular structure or the corresponding node of pack arrangement are the father node of the corresponding node of the valuation structure.
In a kind of exemplary embodiment of the disclosure, the inquiry from preset dictionary data structure and the function Name set in the matched target type object of function name, and with the matched target class of attribute-name in the attribute-name set Type object, comprising:
From inquiry in the dictionary data structure of node corresponding with the modular structure and the letter in the function name set Several matched target type objects and with the matched target type object of attribute-name in the attribute-name set, obtain One target type object;
From inquiry in the dictionary data structure of node corresponding with the pack arrangement and the function in the function name set The matched target type object of name and with the matched target type object of attribute-name in the attribute-name set, obtain second Target type object;
From inquiry in the dictionary data structure of node corresponding with the type structure and the letter in the function name set Several matched target type objects and with the matched target type object of attribute-name in the attribute-name set, obtain Three target type objects;
Wherein, the preset dictionary data structure includes the dictionary data knot of node corresponding with the modular structure Dictionary data structure, the dictionary data structure corresponding with the type structure of structure and the corresponding node of the pack arrangement, it is described Target type object includes the first object type object, the second target type object and the third target type Object.
In a kind of exemplary embodiment of the disclosure, described device further include:
It obtains module and obtains the dictionary data structure for the selection operation in response to user to the completion list In objective function name corresponding with the selection operation and objective attribute target attribute name;
Completion module, for the objective function name and objective attribute target attribute name using acquisition, to described to completion character string Carry out completion.
The detail of each module carries out in the method for corresponding code completion in the device of above-mentioned code completion Detailed description, therefore details are not described herein again.
It should be noted that although being referred to several modules or list for acting the equipment executed in the above detailed description Member, but this division is not enforceable.In fact, embodiment according to the present invention, it is above-described two or more Module or the feature and function of unit can embody in a module or unit.Conversely, an above-described mould The feature and function of block or unit can be to be embodied by multiple modules or unit with further division.
In addition, although describing each step of method in the present invention in the accompanying drawings with particular order, this does not really want These steps must be executed in this particular order by asking or implying, or having to carry out step shown in whole could realize Desired result.Additional or alternative, it is convenient to omit multiple steps are merged into a step and executed by certain steps, and/ Or a step is decomposed into execution of multiple steps etc..
Through the above description of the embodiments, those skilled in the art is it can be readily appreciated that example described herein is implemented Mode can also be realized by software realization in such a way that software is in conjunction with necessary hardware.Therefore, according to the present invention The technical solution of embodiment can be embodied in the form of software products, which can store non-volatile at one Property storage medium (can be CD-ROM, USB flash disk, mobile hard disk etc.) in or network on, including some instructions are so that a calculating Equipment (can be personal computer, server, mobile terminal or network equipment etc.) executes embodiment according to the present invention Method.
In an exemplary embodiment of the present invention, a kind of electronic equipment that can be realized the above method is additionally provided.
Person of ordinary skill in the field it is understood that various aspects of the invention can be implemented as system, method or Program product.Therefore, various aspects of the invention can be embodied in the following forms, it may be assumed that complete hardware embodiment, complete The embodiment combined in terms of full Software Implementation (including firmware, microcode etc.) or hardware and software, can unite here Referred to as circuit, " module " or " system ".
The electronic equipment 600 of this embodiment according to the present invention is described referring to Fig. 6.The electronics that Fig. 6 is shown Equipment 600 is only an example, should not function to the embodiment of the present invention and use scope bring any restrictions.
As shown in fig. 6, electronic equipment 600 is showed in the form of universal computing device.The component of electronic equipment 600 can wrap It includes but is not limited to: at least one above-mentioned processing unit 610, at least one above-mentioned storage unit 620, the different system components of connection The bus 630 of (including storage unit 620 and processing unit 610).
Wherein, the storage unit is stored with program code, and said program code can be held by the processing unit 610 Row, so that various according to the present invention described in the execution of the processing unit 610 above-mentioned " illustrative methods " part of this specification The step of illustrative embodiments.For example, the processing unit 610 can execute step S210 as shown in Figure 2: to current Typing code is parsed to obtain to completion character string, and is obtained with described according to the current typing code to completion character string Corresponding function name set and attribute-name set;Step S220: inquiry and the function from preset dictionary data structure Name set in the matched target type object of function name, and with the matched target class of attribute-name in the attribute-name set Type object;Wherein, the dictionary data structure is according to history source code building, and include multiple type objects and with it is each described The corresponding attribute-name of type object and function name;Step S230: it is obtained according to the matched target type object of the function name Objective function name, and objective attribute target attribute name is obtained according to the matched target type object of the attribute-name;Step S240: according to institute It states objective function name and the objective attribute target attribute name forms completion list, and the completion list is shown.
Storage unit 620 may include the readable medium of volatile memory cell form, such as Random Access Storage Unit (RAM) 6201 and/or cache memory unit 6202, it can further include read-only memory unit (ROM) 6203.
Storage unit 620 can also include program/utility with one group of (at least one) program module 6205 6204, such program module 6205 includes but is not limited to: operating system, one or more application program, other program moulds It may include the realization of network environment in block and program data, each of these examples or certain combination.
Bus 630 can be to indicate one of a few class bus structures or a variety of, including storage unit bus or storage Cell controller, peripheral bus, graphics acceleration port, processing unit use any bus structures in a variety of bus structures Local bus.
Electronic equipment 600 can also be with one or more external equipments 700 (such as keyboard, sensing equipment, bluetooth equipment Deng) communication, can also be enabled a user to one or more equipment interact with the electronic equipment 600 communicate, and/or with make Any equipment (such as the router, modulation /demodulation that the electronic equipment 600 can be communicated with one or more of the other calculating equipment Device etc.) communication.This communication can be carried out by input/output (I/O) interface 650.Also, electronic equipment 600 can be with By network adapter 660 and one or more network (such as local area network (LAN), wide area network (WAN) and/or public network, Such as internet) communication.As shown, network adapter 660 is communicated by bus 630 with other modules of electronic equipment 600. It should be understood that although not shown in the drawings, other hardware and/or software module can not used in conjunction with electronic equipment 600, including but not Be limited to: microcode, device driver, redundant processing unit, external disk drive array, RAID system, tape drive and Data backup storage system etc..
Through the above description of the embodiments, those skilled in the art is it can be readily appreciated that example described herein is implemented Mode can also be realized by software realization in such a way that software is in conjunction with necessary hardware.Therefore, according to the present invention The technical solution of embodiment can be embodied in the form of software products, which can store non-volatile at one Property storage medium (can be CD-ROM, USB flash disk, mobile hard disk etc.) in or network on, including some instructions are so that a calculating Equipment (can be personal computer, server, terminal installation or network equipment etc.) executes embodiment according to the present invention Method.
In an exemplary embodiment of the present invention, a kind of computer readable storage medium is additionally provided, energy is stored thereon with Enough realize the program product of this specification above method.In some possible embodiments, various aspects of the invention may be used also In the form of being embodied as a kind of program product comprising program code, when described program product is run on the terminal device, institute Program code is stated for executing the terminal device described in above-mentioned " illustrative methods " part of this specification according to this hair The step of bright various illustrative embodiments.
The program product for realizing the above method of embodiment according to the present invention can use Portable, compact Disk read-only memory (CD-ROM) and including program code, and can be run on terminal device, such as PC.However, Program product of the invention is without being limited thereto, and in this document, readable storage medium storing program for executing, which can be, any includes or storage program has Shape medium, the program can be commanded execution system, device or device use or in connection.
Described program product can be using any combination of one or more readable mediums.Readable medium can be readable letter Number medium or readable storage medium storing program for executing.Readable storage medium storing program for executing for example can be but be not limited to electricity, magnetic, optical, electromagnetic, infrared ray or System, device or the device of semiconductor, or any above combination.The more specific example of readable storage medium storing program for executing is (non exhaustive List) include: electrical connection with one or more conducting wires, portable disc, hard disk, random access memory (RAM), read-only Memory (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, portable compact disc read only memory (CD-ROM), light storage device, magnetic memory device or above-mentioned any appropriate combination.
Computer-readable signal media may include in a base band or as carrier wave a part propagate data-signal, In carry readable program code.The data-signal of this propagation can take various forms, including but not limited to electromagnetic signal, Optical signal or above-mentioned any appropriate combination.Readable signal medium can also be any readable Jie other than readable storage medium storing program for executing Matter, the readable medium can send, propagate or transmit for by instruction execution system, device or device use or and its The program of combined use.
The program code for including on readable medium can transmit with any suitable medium, including but not limited to wirelessly, have Line, optical cable, RF etc. or above-mentioned any appropriate combination.
The program for executing operation of the present invention can be write with any combination of one or more programming languages Code, described program design language include object oriented program language-Java, C++ etc., further include conventional Procedural programming language-such as " C " language or similar programming language.Program code can be fully in user It calculates and executes in equipment, partly executes on a user device, being executed as an independent software package, partially in user's calculating Upper side point is executed on a remote computing or is executed in remote computing device or server completely.It is being related to far Journey calculates in the situation of equipment, and remote computing device can pass through the network of any kind, including local area network (LAN) or wide area network (WAN), it is connected to user calculating equipment, or, it may be connected to external computing device (such as utilize ISP To be connected by internet).
In addition, above-mentioned attached drawing is only the schematic theory of processing included by method according to an exemplary embodiment of the present invention It is bright, rather than limit purpose.It can be readily appreciated that the time that above-mentioned processing shown in the drawings did not indicated or limited these processing is suitable Sequence.In addition, be also easy to understand, these processing, which can be, for example either synchronously or asynchronously to be executed in multiple modules.
Those skilled in the art will readily occur to of the invention its after considering specification and the invention invented here of practice His embodiment.This application is intended to cover any variations, uses, or adaptations of the invention, these modifications, purposes or Adaptive change follow general principle of the invention and the common knowledge in the art do not invented including the present invention or Conventional techniques.The description and examples are only to be considered as illustrative, and true scope and spirit of the invention are by claim It points out.

Claims (10)

1. a kind of method of code completion characterized by comprising
Current typing code is parsed to obtain to completion character string, and according to the current typing code obtain with it is described to The corresponding function name set of completion character string and attribute-name set;
From in preset dictionary data structure inquire with the function name set in the matched target type object of function name, with And with the matched target type object of attribute-name in the attribute-name set;Wherein, the dictionary data structure is according to history Source code generates, and includes multiple type objects and attribute-name corresponding with each type object and function name;
The corresponding objective attribute target attribute name of the target type object and objective function name are obtained according to the dictionary data structure;
Completion list is formed according to the objective function name and the objective attribute target attribute name, and the completion list is shown Show.
2. the method according to claim 1, wherein the method also includes:
Obtain history source code, and the dictionary data structure according to the history source code establishing;
Wherein, the keyword of the dictionary data structure is function name and attribute-name, the value of the pre-set dictionary data structure For type object corresponding with the function name and the attribute-name.
3. according to the method described in claim 2, it is characterized in that, the dictionary number according to the history source code establishing Include: according to structure
The history source code is converted into abstract syntax tree;Wherein, each node of the abstract syntax tree and the history source Each syntactic structure in code corresponds, and the syntactic structure includes modular structure, pack arrangement, type structure, function knot Structure, valuation structure;
All nodes of the abstract syntax tree are traversed, and according to the set membership between each node in the abstract syntax tree For and the corresponding node of the modular structure and the corresponding node of the pack arrangement, node corresponding with the type structure point It Sheng Cheng not dictionary data structure.
4. according to the method described in claim 3, it is characterized in that, between each node according in the abstract syntax tree Set membership be and the corresponding node of the modular structure, node corresponding with the pack arrangement and the type structure pair The node answered generates dictionary data structure respectively, comprising:
When determining the corresponding function of the corresponding node of the function structure is the overall situation function of module level, by the module level The dictionary data of corresponding modular structure or the corresponding node of pack arrangement is added in the corresponding function name of overall situation function and function object In structure;
Wherein, the modular structure or the corresponding node of pack arrangement are the father node of the corresponding node of the function structure.
5. according to the method described in claim 3, it is characterized in that, between each node according in the abstract syntax tree Set membership be and the corresponding node of the modular structure, node corresponding with the pack arrangement and the type structure pair The node answered generates dictionary data structure respectively, comprising:
In determining the corresponding node of the valuation structure comprising with global namespace assignment statement node when, from include tool Global object is extracted in the node for having the assignment statement of global namespace;
Corresponding modular structure or the corresponding node of pack arrangement is added in the global object and corresponding attribute-name and function name Dictionary data structure in;
Wherein, the modular structure or the corresponding node of pack arrangement are the father node of the corresponding node of the valuation structure.
6. according to the method described in claim 3, it is characterized in that, it is described from preset dictionary data structure inquiry with it is described The matched target type object of function name in function name set, and with the matched mesh of attribute-name in the attribute-name set Mark type object, comprising:
From inquiry in the dictionary data structure of node corresponding with the modular structure and the function name in the function name set Matched target type object and with the matched target type object of attribute-name in the attribute-name set, obtain the first mesh Mark type object;
From inquiry in the dictionary data structure of node corresponding with the pack arrangement and the function name in the function name set The target type object matched and with the matched target type object of attribute-name in the attribute-name set, obtain the second target Type object;
From inquiry in the dictionary data structure of node corresponding with the type structure and the function name in the function name set Matched target type object and with the matched target type object of attribute-name in the attribute-name set, obtain third mesh Mark type object;
Wherein, the preset dictionary data structure include node corresponding with the modular structure dictionary data structure, with Dictionary data structure, the dictionary data structure corresponding with the type structure of the corresponding node of the pack arrangement, the target Type object includes the first object type object, the second target type object and the third target type pair As.
7. the method according to claim 1, wherein the method also includes:
In response to user to the selection operation of the completion list, obtain in the dictionary data structure with the selection operation pair The objective function name and objective attribute target attribute name answered;
Using the objective function name and objective attribute target attribute name of acquisition, completion is carried out to completion character string to described.
8. a kind of device of code completion characterized by comprising
Code analysis module, for being parsed to obtain to completion character string to current typing code, and according to the current record Enter code to obtain with described to the corresponding function name set of completion character string and attribute-name set;
Enquiry module, for from preset dictionary data structure inquire with the function name set in the matched mesh of function name Mark type object, and with the matched target type object of attribute-name in the attribute-name set;Wherein, the dictionary data Structure includes multiple type objects and attribute-name corresponding with each type object and letter according to history source code building It is several;
First processing module, for obtaining the corresponding objective attribute target attribute name of the target type object according to the dictionary data structure With objective function name;
Second processing module, for forming completion list according to the objective function name and the objective attribute target attribute name, and to institute Completion list is stated to be shown.
9. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the computer program quilt The method of the described in any item code completions of claim 1-7 is realized when processor executes.
10. a kind of electronic equipment characterized by comprising
Processor;And
Memory, for storing the executable instruction of the processor;
Wherein, the processor is configured to require 1-7 described in any item via executing the executable instruction and carry out perform claim The method of code completion.
CN201910802690.5A 2019-08-28 2019-08-28 Code complement method and device, storage medium and electronic equipment Active CN110502227B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910802690.5A CN110502227B (en) 2019-08-28 2019-08-28 Code complement method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910802690.5A CN110502227B (en) 2019-08-28 2019-08-28 Code complement method and device, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN110502227A true CN110502227A (en) 2019-11-26
CN110502227B CN110502227B (en) 2023-07-14

Family

ID=68588644

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910802690.5A Active CN110502227B (en) 2019-08-28 2019-08-28 Code complement method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN110502227B (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111176629A (en) * 2019-12-24 2020-05-19 中国建设银行股份有限公司 Application development method and device
CN111679747A (en) * 2020-06-09 2020-09-18 腾讯科技(深圳)有限公司 Code input method, device, electronic equipment and storage medium
CN112256266A (en) * 2020-11-11 2021-01-22 平安普惠企业管理有限公司 Grammar prompting method, grammar prompting device, computer equipment and storage medium
CN112328232A (en) * 2020-11-26 2021-02-05 杭州安恒信息安全技术有限公司 Code prompting method and related device
CN112579064A (en) * 2020-12-04 2021-03-30 深圳市大富网络技术有限公司 Code prompting method, system, device and readable storage medium
CN113312057A (en) * 2021-06-17 2021-08-27 上海小熊星教育科技有限公司 Code processing method, programming assisting method, medium and electronic equipment
CN113378517A (en) * 2021-06-17 2021-09-10 中国工商银行股份有限公司 Data dictionary generation method and device, electronic equipment and storage medium
WO2022089188A1 (en) * 2020-11-02 2022-05-05 华为云计算技术有限公司 Code processing method, apparatus, device, and medium
CN117632106A (en) * 2023-11-21 2024-03-01 广州致远电子股份有限公司 Code complement method, device, equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102880468A (en) * 2012-09-12 2013-01-16 浙江大学 Code intelligent prompting method and system for electronic control unit (ECU) program development
CN105739981A (en) * 2016-01-28 2016-07-06 厦门飞信网络科技有限公司 Code completion implementation method and device, and computing device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102880468A (en) * 2012-09-12 2013-01-16 浙江大学 Code intelligent prompting method and system for electronic control unit (ECU) program development
CN105739981A (en) * 2016-01-28 2016-07-06 厦门飞信网络科技有限公司 Code completion implementation method and device, and computing device

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111176629A (en) * 2019-12-24 2020-05-19 中国建设银行股份有限公司 Application development method and device
CN111679747A (en) * 2020-06-09 2020-09-18 腾讯科技(深圳)有限公司 Code input method, device, electronic equipment and storage medium
WO2022089188A1 (en) * 2020-11-02 2022-05-05 华为云计算技术有限公司 Code processing method, apparatus, device, and medium
CN112256266A (en) * 2020-11-11 2021-01-22 平安普惠企业管理有限公司 Grammar prompting method, grammar prompting device, computer equipment and storage medium
CN112328232A (en) * 2020-11-26 2021-02-05 杭州安恒信息安全技术有限公司 Code prompting method and related device
CN112579064A (en) * 2020-12-04 2021-03-30 深圳市大富网络技术有限公司 Code prompting method, system, device and readable storage medium
CN113312057A (en) * 2021-06-17 2021-08-27 上海小熊星教育科技有限公司 Code processing method, programming assisting method, medium and electronic equipment
CN113378517A (en) * 2021-06-17 2021-09-10 中国工商银行股份有限公司 Data dictionary generation method and device, electronic equipment and storage medium
CN113312057B (en) * 2021-06-17 2023-10-03 上海小熊星教育科技有限公司 Code processing method, programming auxiliary method, medium and electronic equipment
CN117632106A (en) * 2023-11-21 2024-03-01 广州致远电子股份有限公司 Code complement method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN110502227B (en) 2023-07-14

Similar Documents

Publication Publication Date Title
CN110502227A (en) The method and device of code completion, storage medium, electronic equipment
CN109240901B (en) Performance analysis method, performance analysis device, storage medium, and electronic apparatus
US20170337261A1 (en) Decision Making and Planning/Prediction System for Human Intention Resolution
CN112106056A (en) Constructing fictitious utterance trees to improve the ability to answer convergent questions
CN111708869B (en) Processing method and device for man-machine conversation
CN107203468B (en) AST-based software version evolution comparative analysis method
US20150286943A1 (en) Decision Making and Planning/Prediction System for Human Intention Resolution
WO2022237253A1 (en) Test case generation method, apparatus and device
CN110147544B (en) Instruction generation method and device based on natural language and related equipment
CN110019753B (en) Method and device for outputting back question aiming at user question
CN104584013A (en) Semantic query language
US9460081B1 (en) Transcription correction using multi-token structures
US20220414463A1 (en) Automated troubleshooter
CN109308254A (en) A kind of test method, device and test equipment
CN113254507B (en) Intelligent construction and inventory method for data asset directory
US20200233624A1 (en) Method, device and computer program product for updating user interface
CN111930912A (en) Dialogue management method, system, device and storage medium
US8768969B2 (en) Method and system for efficient representation, manipulation, communication, and search of hierarchical composite named entities
CN117389541B (en) Configuration system and device for generating template based on dialogue retrieval
Sun A natural language interface for querying graph databases
CN117932022A (en) Intelligent question-answering method and device, electronic equipment and storage medium
CN108959454A (en) A kind of prompt clause designation method, device, equipment and storage medium
CN116974554A (en) Code data processing method, apparatus, computer device and storage medium
CN110362688A (en) Examination question mask method, device, equipment and computer readable storage medium
CN112988986B (en) Man-machine interaction method, device and equipment

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
GR01 Patent grant
GR01 Patent grant