CN109213490B - Program processing method and device and related equipment - Google Patents

Program processing method and device and related equipment Download PDF

Info

Publication number
CN109213490B
CN109213490B CN201811033360.6A CN201811033360A CN109213490B CN 109213490 B CN109213490 B CN 109213490B CN 201811033360 A CN201811033360 A CN 201811033360A CN 109213490 B CN109213490 B CN 109213490B
Authority
CN
China
Prior art keywords
character string
character
detection
target
type
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.)
Active
Application number
CN201811033360.6A
Other languages
Chinese (zh)
Other versions
CN109213490A (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.)
Shenzhen Tencent Network Information Technology Co Ltd
Original Assignee
Shenzhen Tencent Network Information Technology 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 Shenzhen Tencent Network Information Technology Co Ltd filed Critical Shenzhen Tencent Network Information Technology Co Ltd
Priority to CN201811033360.6A priority Critical patent/CN109213490B/en
Publication of CN109213490A publication Critical patent/CN109213490A/en
Application granted granted Critical
Publication of CN109213490B publication Critical patent/CN109213490B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/43Checking; Contextual analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/44Encoding
    • G06F8/443Optimisation
    • G06F8/4434Reducing the memory space required by the program code

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Machine Translation (AREA)

Abstract

The embodiment of the invention discloses a program processing method, a device and related equipment, wherein the method comprises the following steps: acquiring target code text information, and acquiring a detection character string in the target code text information; if the detection character string belongs to the global variable type, identifying the spelling type of the detection character string according to the first set; the first set comprises all first character strings belonging to variable types in the target code text information; and if the detection character string belongs to the implicit function type, taking the class function name contained in the target subclass of the function corresponding to the detection character string and the class function name contained in the target parent corresponding to the target subclass as second character strings, adding the second character strings to the second set, and identifying the spelling type of the detection character string according to the second set. By adopting the invention, the efficiency of detecting the program code can be improved.

Description

Program processing method and device and related equipment
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a program processing method and apparatus, and a related device.
Background
With the continuous development of information technology, the application of computer technology in modern industries makes computer software play an important role in the process of improving the working efficiency of various industries. But from the application situation of software, the bug problem (program bug) has become an important problem affecting the actual application effect of software. It has been found that most of the bugs associated with software are caused by spelling errors introduced during the encoding phase (e.g., spelling "OnDestory" as "OnDestroy" for the reason of the adjacent character written backwards; or spelling "OnApplicationPause" as "OnApplicationPause" for the reason of one less character, etc.). Therefore, in order to find out spelling errors of the global variable and the function name of the implicit calling function in the software code in advance and eliminate bug in the software, the whole program code needs to be detected.
In the prior art, whether spelling errors exist in the global variable and the function name of the implicit calling function in the program code is mainly detected by a manual method, namely, the whole program code is read by a worker, and the spelling errors of the global variable and the function name of the implicit calling function in the code are found in the reading process.
Disclosure of Invention
The embodiment of the invention provides a program processing method, a program processing device and related equipment, which can improve the efficiency of program code detection.
An embodiment of the present invention provides a program processing method, including:
acquiring target code text information, and acquiring a detection character string in the target code text information;
if the detection character string belongs to the global variable type, identifying the spelling type of the detection character string according to a first set; the first set comprises all first character strings belonging to variable types in the target code text information;
if the detection character string belongs to the implicit function type, taking the class function name contained in a target subclass of the function corresponding to the detection character string and the class function name contained in a target parent class corresponding to the target subclass as second character strings, adding the second character strings to a second set, and identifying the spelling type of the detection character string according to the second set;
the spell check types include a spelling correct type and a spelling error type.
Wherein the acquiring of the detection character string in the target code text information includes:
traversing a target character sequence corresponding to the target code text information according to a target sequence;
dividing the target character sequence into a plurality of reference character strings according to a word formation rule, and detecting the function type of each reference character string;
and determining the reference character string with the function type being the global variable type and the reference character string with the function type being the implicit function type as the detection character string in the plurality of reference character strings.
Wherein said identifying a spelling type of said detected string from said first set comprises:
if a first character string exists in the first set and the detection character string meets a first similar condition, determining the spelling type of the detection character string as the spelling error type;
if the first character string does not exist in the first set and the detection character string meets the first similarity condition, determining the spelling type of the detection character string as the spelling correct type.
Wherein, still include:
selecting two adjacent characters from the first character string as a first character and a second character;
exchanging the positions of the first character and the second character in the first character string;
and if the character string obtained after position exchange is the same as the detection character string, the position coordinate of the first character string in the target character sequence is smaller than the position coordinate of the detection character string in the target character sequence, and the spelling type of the first character string is the spelling correct type, determining that the first character string and the detection character string meet the first similar condition.
Wherein, still include:
updating the first character string; the updated first character string is a character string obtained after characters are deleted from the first character string, or a character string obtained after characters are added to the first character string;
and if the updated first character string is the same as the detection character string, the position coordinate of the first character string in the target character sequence is smaller than the position coordinate of the detection character string in the target character sequence, and the spelling type of the first character string is the spelling correct type, determining that the first character string and the detection character string meet the first similarity condition.
Wherein, still include:
selecting a first character in the first character string, determining target position information of the first character in the first character string, and determining a character in the target position information in the detection character string as a second character;
if the character string obtained after deleting the first character in the first character string is the same as the character string obtained after deleting the second character in the detection character string, the position coordinate of the first character string in the target character sequence is smaller than the position coordinate of the detection character string in the target character sequence, and the spelling type of the first character string is the spelling correct type, it is determined that the first character string and the detection character string meet the first similar condition.
Wherein the determining the spelling type of the detected string as the spelling error type comprises:
determining a first character string meeting the first similar condition with the detection character string as a target character string in the first set;
and if the number of the target character strings is larger than a target number threshold value and the target character strings are adjacent in the first set, determining the spelling type of the detected character strings as the spelling error type.
Wherein said identifying a spelling type of said detected string from said second set comprises:
if a second character string exists in the second set and the detection character string meets a second similarity condition, determining the spelling type of the detection character string as the spelling error type;
if the second similarity condition is satisfied by the second character string and the detection character string which do not exist in the second set, determining the spelling type of the detection character string as the spelling correct type.
Wherein, still include:
selecting two adjacent characters from the second character string as a first character and a second character;
exchanging the positions of the first character and the second character in the second character string;
and if the character string obtained after the positions are exchanged is the same as the detection character string, determining that the second character string and the detection character string meet the second similarity condition.
Wherein, still include:
updating the second character string; the updated second character string is obtained after characters are deleted in the second character string, or is obtained after characters are newly added in the second character string;
and if the updated second character string is the same as the detection character string, determining that the second character string and the detection character string meet the second similarity condition.
Wherein, still include:
selecting a first character in the second character string, determining target position information of the first character in the second character string, and determining a character in the target position information in the detection character string as a second character;
and if the character string obtained after deleting the first character in the first character string is the same as the character string obtained after deleting the second character in the detection character string, determining that the second character string and the detection character string meet the second similarity condition.
An embodiment of the present invention provides a program processing apparatus, including:
the acquisition module is used for acquiring target code text information;
the identification module is used for acquiring a detection character string in the target code text information;
the first detection module is used for identifying the spelling type of the detection character string according to a first set if the detection character string belongs to a global variable type; the first set comprises all first character strings belonging to variable types in the target code text information;
the adding module is used for taking the class function name contained in a target subclass where the function corresponding to the detection character string is located and the class function name contained in a target parent class corresponding to the target subclass as second character strings if the detection character string belongs to an implicit function type, and adding the second character strings to a second set;
a second detection module for identifying a spelling type of the detection string according to the second set;
the spell check types include a spelling correct type and a spelling error type.
Wherein the identification module comprises:
the traversing unit is used for traversing a target character sequence corresponding to the target code text information according to a target sequence;
the dividing unit is used for dividing the target character sequence into a plurality of reference character strings according to a word formation rule and detecting the function type of each reference character string;
the dividing unit is further configured to determine, as the detection string, all of the reference strings whose function types are global variable types and reference strings whose function types are implicit function types, in the plurality of reference strings.
Wherein, the first detection module includes:
a first determining unit, configured to determine a spelling type of the detected character string as the spelling error type if a first character string exists in the first set and the detected character string satisfies a first similarity condition;
a second determining unit, configured to determine the spelling type of the detected character string as the spelling-correct type if there is no first character string in the first set and the detected character string satisfy the first similarity condition.
Wherein, still include:
the first exchange module is used for selecting two adjacent characters from the first character string as a first character and a second character;
the first exchanging module is further configured to exchange positions of the first character and the second character in the first character string;
the first exchanging module is further configured to determine that the first character string and the detection character string satisfy the first similarity condition if the character string obtained after exchanging the positions is identical to the detection character string, the position coordinate of the first character string in the target character sequence is smaller than the position coordinate of the detection character string in the target character sequence, and the spelling type of the first character string is a spelling-correct type.
Wherein, still include:
the first updating module is used for updating the first character string; the updated first character string is a character string obtained after characters are deleted from the first character string, or a character string obtained after characters are added to the first character string;
the first updating module is further configured to determine that the first character string and the detection character string satisfy the first similarity condition if the updated first character string and the detection character string are the same, the position coordinate of the first character string in the target character sequence is smaller than the position coordinate of the detection character string in the target character sequence, and the spelling type of the first character string is the spelling correct type.
Wherein, still include:
a first selection module, configured to select a first character in the first character string, determine target position information of the first character in the first character string, and determine a character in the detected character string that is in the target position information as a second character;
the first selection module is further configured to determine that the first character string and the detection character string satisfy the first similarity condition if a character string obtained after deleting a first character in the first character string is identical to a character string obtained after deleting a second character in the detection character string, a position coordinate of the first character string in the target character sequence is smaller than a position coordinate of the detection character string in the target character sequence, and a spelling type of the first character string is a spelling correct type.
Wherein the second determination unit includes:
a first determining subunit configured to determine, as a target character string, a first character string that satisfies the first similarity condition with the detected character string in the first set;
a second determining subunit, configured to determine, if the number of the target character strings is greater than a target number threshold and the target character strings are adjacent in the first set, the spelling type of the detected character string as the spelling error type.
Wherein the second detection module comprises:
a third determining unit, configured to determine a spelling type of the detected character string as the spelling error type if a second character string exists in the second set and the detected character string satisfies a second similarity condition;
a fourth determining unit, configured to determine the spelling type of the detected character string as the spelling-correct type if there is no second character string in the second set and the detected character string satisfy the second similarity condition.
Wherein, still include:
the second exchange module is used for selecting two adjacent characters from the second character string as a first character and a second character;
the second exchanging module is further configured to exchange positions of the first character and the second character in the second character string;
the second exchanging module is further configured to determine that the second character string and the detection character string satisfy the second similarity condition if the character string obtained after exchanging the positions is the same as the detection character string.
Wherein, still include:
the second updating module is used for updating the second character string; the updated second character string is obtained after characters are deleted in the second character string, or is obtained after characters are newly added in the second character string;
the second updating module is further configured to determine that the second character string and the detection character string satisfy the second similarity condition if the updated second character string is the same as the detection character string.
Wherein, still include:
a second selection module, configured to select a first character in the second character string, determine target position information of the first character in the second character string, and determine a character in the detected character string that is in the target position information as the second character;
the second selection module is further configured to determine that the second character string and the detection character string satisfy the second similarity condition if the character string obtained after deleting the first character in the first character string is the same as the character string obtained after deleting the second character in the detection character string.
An embodiment of the present invention provides an electronic device, including: a processor and a memory;
the processor is connected to a memory, wherein the memory is used for storing program codes and the processor is used for calling the program codes to execute the method in the embodiment of the invention.
An aspect of the embodiments of the present invention provides a computer storage medium storing a computer program comprising program instructions that, when executed by a processor, perform a method as in the embodiments of the present invention.
The method comprises the steps of acquiring target code text information, and acquiring a detection character string in the target code text information; if the detection character string belongs to the global variable type, identifying the spelling type of the detection character string according to the first set; the first set comprises all first character strings belonging to variable types in the target code text information; and if the detection character string belongs to the implicit function type, taking the class function name contained in the target subclass of the function corresponding to the detection character string and the class function name contained in the target parent class corresponding to the target subclass as second character strings, adding the second character strings to the second set, and identifying the spelling type of the detection character string according to the second set. According to the method, the global variable with the spelling error in the program code is automatically detected, and the function name of the implicit function with the spelling error in the program code is automatically detected, so that the whole program code is prevented from being manually detected, the time consumed for detecting the program code can be saved, and the detection efficiency is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a system architecture diagram of a program processing method according to an embodiment of the present invention;
fig. 2 is a schematic view of a scenario of a program processing method according to an embodiment of the present invention;
FIG. 3 is a flow chart illustrating a program processing method according to an embodiment of the present invention;
FIG. 4 is a schematic flow chart illustrating a process of determining a type of a detected string according to an embodiment of the present invention;
FIG. 5 is a schematic flow chart illustrating another method for determining a type of a detected string according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a program processing apparatus according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The system architecture diagram of the program processing method provided in the embodiment of the present invention is that a server 10a provides a service for a user terminal cluster, and the user terminal cluster may include: user terminal 10b, user terminal 10 c. When a global variable in a program code in a user terminal (which may be the user terminal 10b, the user terminal 10c, or the user terminal 10 d) and a function name of a function called in an implicit calling manner need to detect whether a spelling error exists, the user terminal may send the program code to be detected to the server 10a, and the server 10a detects the program code, where the function called in the implicit calling manner may be referred to as an implicit function. After the server 10a finishes detection, the detection result can be sent to the user terminal, and the user terminal displays the detection result so that the user can know the spelling error existing in the program code, and the subsequent server 10a can store the detection result and the corresponding program code to the database in an associated manner, thereby facilitating subsequent checking. Of course, if the user terminal itself can detect whether the global variable in the program code and the function name of the implicit function have a spelling error, the user terminal can also directly detect the program code to obtain a detection result, and only needs to send the detected program code and the detection result to the server 10a for storage. The following description will take the example of the user terminal directly detecting a segment of program code, and how to detect a spelling error in the program code.
The user terminal may include a mobile phone, a tablet computer, a notebook computer, a palm computer, a desktop computer, and other user terminal devices.
Fig. 2 is a schematic view of a scenario of a program processing method according to an embodiment of the present invention. Acquiring a program code 20a to be detected, wherein the type of the programming language corresponding to the program code 20a is not limited. In order to detect a global variable in the program code 20a and whether a spelling error exists in a function name of a function called in an implicit calling manner (implicit function), both a character string belonging to a variable type and a character string belonging to an implicit function type in the program code 20a are used as detection character strings. The specific process of identifying the character string belonging to the variable type and the character string belonging to the implicit function type in the program code 20a is as follows: the character sequence corresponding to program code 20a is traversed from top to bottom in the order from left to right, and the sequence formed by combining the traversed characters is referred to as the character sequence corresponding to program code 20a, so that it can be known that the character sequence not only includes characters, but also includes the sequential relationship between the characters. According to the word formation rule, the character sequence is divided into a plurality of character strings, and the function type corresponding to each character string is identified, namely the divided character strings have the function types corresponding to the divided character strings. Wherein the function types include: the variable type can be further subdivided into a local variable type and a global variable type.
It should be noted that, function names in function statements in program codes, or function types of function names corresponding to calling functions in an explicit calling manner are all variable types; and only when the function is called by adopting an implicit calling mode, the function type corresponding to the function name of the function is the implicit function type. Where explicit invocation calls function names directly as a statement, for example: a = max (2,3) (which value is greater for the value 2 and the value 3), where the function type of the function name "max" is a variable type, and the implicit call is a call to the function name as a constant string, for example: this is, luas, register function ("CSharpMethod", this is, gettype (), getMethod ("max")); the function type of the function name "max" in this case is an implicit function type. As shown in fig. 2, after the program code 20a is parsed, a plurality of character strings can be divided, and the function type corresponding to each character string can be identified. Among all the divided character strings, a character string (variable) whose function type is a global variable type and a character string (function name of an implicit function) whose function type is an implicit function type are both determined as detection character strings, and the detection character strings are combined into a detection character string set 20b.
Detecting each detection character string in the detection character string set 20b respectively, and dividing the detection modes into two types, namely character strings of global variable types of objects of one detection mode; the object of another detection mode is a string of implicit function type. The following describes two detection methods. When the function type of the detection character string is a global variable type, from the strings in the first set 20c, it is identified whether the detected string has a spelling error. The character strings in the first set 20c are all the character strings in the program code 20a belonging to the variable type, and since the character strings belonging to the global variable type are also the character strings belonging to the variable type, the detection character strings belonging to the global variable type are necessarily included in the first set 20 c. Searching whether a character string similar to the detection character string exists in the first set 20c, if so, further judging whether the spelling of the similar character string is correct, and whether the position of the similar character string in the character sequence is earlier than that of the detection character string, if so, determining that the detection character string is misspelled; otherwise, the detection character string is confirmed to be correctly spelled.
The manner of determining whether the two character strings are similar may be: if the positions of two adjacent characters in one string are exchanged and the two strings are the same as the other string, the two strings are similar, for example, onDestroy and OnDestorey. The manner of determining whether the two character strings are similar may also be: if a character in a string is deleted or added to be identical to another string, it indicates that the two strings are similar, for example, the on application pause and the on application pause. The manner of determining whether the two character strings are similar may also be: deleting the character in the same position in the two character strings, and if the two character strings after the character deletion are the same, indicating that the two character strings are similar, such as endstroy and endstroy.
As shown in fig. 2, for the pair of detection strings "a" in the detection string set 20b, since there is no string similar to the detection string "a" in the first set 20c, it is indicated that the detection string "a" is spelled correctly. In the same manner, it can be judged that the detection string "b" is also spelled correctly.
For the detection string "OnDestroy", since there is a string "OnDestroy" similar to it in the first set 20c, but the location of the string "OnDestroy" in the character sequence to which program code 20a corresponds is after the location of the detection string "OnDestroy" in the character sequence to which program code 20a corresponds, the spelling of the detection string "OnDestroy" is still correct, or it can be understood that the variable string declared for the first definition must be the correctly spelled string. Correspondingly, for the detected string "onDestroy", due to the similar symmetry, the detected string "onDestroy" is similar to the string "onDestroy" in the first set 20c, but the position of the string "onDestroy" in the character sequence corresponding to the program code 20a is before the position of the detected string "onDestroy" in the character sequence corresponding to the program code 20a, and the string "onDestroy" has already determined to be spelled correctly, so the detected string "onDestroy" is a misspelled character string. In the same manner, it can be obtained that the detected character string "abcde" is similar to the character string "abcde", but the position of the character string "abcde" in the character sequence is before the character string "abcde", so that the character string "abcde" is spelled correctly and the character string "abcde" is spelled incorrectly. For the character string "f1", although the character string "f1" is a function name, it is a function name in the function declaration here, and therefore the function type of the character string "f1" is a global variable type, and there is no character string similar to the detection character string "f1" in the first set 20c, and therefore the character string "f1" is spelled correctly.
The above is a detection method when the function type of the detection object is the global variable type, and the following is a detection method when the function type of the detection object is the implicit function type: the subclass where the detection character string is located is called a target subclass, and the parent class corresponding to the target subclass is called a target parent class. And combining the function-like names contained in the target subclasses and the function-like names contained in the target parent classes into a second set, and searching whether the character strings similar to the detected character strings exist or not in the second set. If the string found in the second set is similar to the detected string, then the detected string spelling error can be directly determined; conversely, if the string cannot be found in the second set to be similar to the detected string, then the detected string can be directly spelled correctly. The method for searching the class functions contained in the target subclass and the target parent class comprises the following steps: and searching the packet names of the import (import) packets corresponding to the target subclasses and the target parent classes in the program codes, and searching the class functions contained in the target subclasses and the target parent classes under the path of the packet names.
As shown in fig. 2, extracting a character string "sendmessage" with an implicit function type as a detection character string "sendmessage", and searching for a subclass of the detection character string "sendmessage" corresponding to the function, where the subclass is: message, the function names of the class functions included in the subclass "Message" and the corresponding parent "ME" are added to the second set, and thus the function names "f1", "SendMessage", "BroadcastMessage", "SendMessage updates", and "SendMessage downlinks" are all added to the second set 20d.
Searching the second set 20d for the presence of a string and detecting that the string "SendMessege" is similar, and determining whether the two strings are similar can be found in the process described in detail above. Since the presence of the string "SendMessage" in the second set 20d is similar to the detection string "SendMessage", the detection string "SendMessage" misspelling can be directly determined.
Comparing the two different detection modes, it can be known that, in the detection process, the first set 20c can be constructed in advance according to the program code 20b, and the character strings in the first set 20c do not need to be updated as long as the subsequent character strings are constructed; the second set 20d is generated in real time based on the detected strings, and the strings in the second set are constantly changing. For both detection objects, whether similar character strings exist in the corresponding set or not is compared, but for detecting the character strings of the global variable type, the positions in the character sequence and the like are further compared to determine whether spelling errors exist, and for detecting the character strings of the implicit function type, whether spelling errors exist or not can be directly determined only by comparing whether similar character strings exist in the second set or not.
Further, in order to prompt the user of the possible correct spelling of the misspelled character string in the program code, the character string determined to be similar to the detected character string during the detection process may be extracted as a reference correct character string, and the misspelled character string and the corresponding reference correct character string are displayed at the same time, so as to prompt the user, as shown in the set 20e in fig. 2, where the reference correct character string corresponding to the misspelled character string "abdce" is: abcde; the reference correct character string corresponding to the misspelled character string "onDestroy" is: onDestroy; the reference correct string corresponding to the misspelled string "SendMessege" is: sendMessage, so that the user can conveniently and quickly modify misspelled characters.
The method has the advantages that the global variable with spelling errors in the program code is automatically detected, the function name of the implicit function with spelling errors in the program code is automatically detected, manual detection of the whole program code is avoided, time consumption for detecting the program code can be saved, and detection efficiency is improved.
Specific processes for detecting a string of the global variable type and detecting a string of the implicit function type may refer to the following embodiments corresponding to fig. 3 to 5.
Further, please refer to fig. 3, which is a flowchart illustrating a program processing method according to an embodiment of the present invention. As shown in fig. 3, the program processing method may include:
step S101, acquiring target code text information, and acquiring a detection character string in the target code text information.
Specifically, the text information of the program code to be detected (the program code 20a in the embodiment of fig. 2 as described above) is obtained and is referred to as target code text information. In order to verify whether a spelling error exists between a character string belonging to the global variable type and a character string belonging to the implicit function type in the target code text information, the above two types of character strings are first identified from the target code text information as detection character strings (the above-described respective detection character strings in the detection character string set 20b in the embodiment of fig. 2). The specific process of identification is as follows: according to a preset target sequence, namely traversing all characters in the target code text information from top to bottom from left to right, a character sequence formed by combining all the traversed characters is called a target character sequence, it is to be noted that the object of the traversing operation is a character in the target code text information, and the traversing operation is not executed on a space, an annotation, a line feed character and the like in the target code text, namely the target character sequence does not include the space, the annotation, the line feed character and the like. Decomposing the target character sequence into a series of word symbols (the word symbols can be represented by English tokens) according to a word forming rule, respectively calling each decomposed word symbol as a reference character string, and detecting the function type of each reference character string, wherein the function types comprise: the variable type (the variable type can be further subdivided into a global variable type and a reference variable type), the keyword type, the indicator type, the operator type, the constant type, the implicit function type and the like, each reference character string has a corresponding function type, and it can be seen that each reference character string is a minimum unit with independent significance.
It should be noted that, function names in function statements in program codes, or function types of function names corresponding to calling functions in an explicit calling manner are all variable types; and only when the function is called by adopting an implicit calling mode, the function type corresponding to the function name of the function is the implicit function type. The explicit calling is to directly call the function name as a statement, and the implicit calling is to call the function name as a constant string.
After the function type corresponding to each reference character string is identified, in a plurality of reference character strings, the reference character string with the function type of the global variable type is used as a detection character string, and the reference character string with the function type of the implicit function type is also used as the detection character string.
Because the function types of the object to be detected are divided into two types (belonging to a global variable type and belonging to an implicit function type), the following steps S102-S103 are specific descriptions for executing different detection modes corresponding to the two types of objects, wherein the step S102 is a description of a detection character string belonging to the global variable type; step S103 is to explain one detection string belonging to the implicit function type. In order to ensure the continuity of the detection character strings, the spelling type of each detection character string can be detected sequentially according to the front-back sequence of the detection character string in the target character sequence.
Step S102, if the detection character string belongs to a global variable type, identifying the spelling type of the detection character string according to a first set; the first set comprises all first character strings belonging to variable types in the target code text information.
Specifically, when the function type of the detected character string is a global variable type, the spelling type of the detected character string is identified according to a first set (e.g., the first set 20c in the embodiment of fig. 2 described above), and the spelling type is divided into a spelling correct type and a spelling error type, and if the spelling type of the detected character string is the spelling correct type, it can be determined that the detected character string is spelled correctly; if the spelling type of the detected string is a misspell type, it can be determined that the detected string is misspelled. If the spelling type of the detected character string is the spelling error type, a prompt message can be subsequently sent to the user to prompt the user that the detected character string is the error character string. Wherein, the first set is constructed in advance according to the target code text information, and the construction process is as follows: in all the divided reference character strings, character strings with the function type of variable type are used as first character strings, and the determined first character strings are combined into a first set, namely the character strings in the first set are called first character strings, and if one character string belongs to the global variable type, the character string necessarily also belongs to the variable type, so that the detection character strings belonging to the global variable are necessarily also present in the first set.
The process of identifying and detecting whether the character string is misspelled according to the first set is as follows: searching whether a first character string exists in the first set and whether the detection character string is similar, if so, further comparing the position of the searched first character string with the position of the detection character string in the target character sequence, and if the position of the searched first character string is more advanced than the position of the detection character string in the target character sequence and the searched first character string is determined to be a character string with correct spelling, determining that the spelling type of the detection character string is a misspelling type, namely determining that the detection character string is misspelled; on the contrary, as long as any one of the above conditions is not satisfied, it can be determined that the spelling type of the detected character string is the spelling-correct type, that is, it is determined that the detected character string is spelled correctly. As can be seen from the above, as long as the first set is constructed, the first character string in the first set does not need to be deleted or added subsequently.
Step S103, if the detection character string belongs to the implicit function type, taking the class function name contained in the target subclass of the function corresponding to the detection character string and the class function name contained in the target parent class corresponding to the target subclass as second character strings, adding the second character strings to a second set, and identifying the spelling type of the detection character string according to the second set.
Specifically, when the function type of the detection character string is an implicit function type, a class in which the function corresponding to the detection character string is located is referred to as a target subclass, and a parent class corresponding to the target subclass is referred to as a target parent class. The function name of the class function included in the target sub-class is used as the second character string, and the function name of the class function included in the target parent class is also used as the second character string, and the second character strings are added to the second set (the second set 20d in the embodiment of fig. 2). And then detecting whether the character string has spelling errors according to the second set recognition.
The process of identifying and detecting whether the character string is misspelled according to the second set is as follows: searching whether the character strings exist in the second set and detecting whether the character strings are similar, if so, determining that the spelling type of the detected character strings is a spelling error type, namely determining that the spelling of the detected character strings is wrong; conversely, as long as the absence of a string in the second set is similar to the detected string, it can be determined that the spelling type of the detected string is a spelling-correct type, i.e., that the detected string is correctly spelled. As described above, the character strings in the second set are continuously updated, and if a detection character string is of an implicit function type, when the detection character string is detected, the class function names of the target subclass and the target parent of the function corresponding to the detection character string are added to the second set in real time.
Further, please refer to fig. 4, which is a schematic flowchart illustrating a process for determining a type of a detected character string according to an embodiment of the present invention, wherein when the detected character string belongs to a global variable type, three ways for determining that a spelling type of the detected character string is a spelling error type are included, wherein step S201 to step S203, and step S208 are a determination way; step S204-step S205, step S208 is a judgment method; step S206-step S208 are another judgment manner.
In step S201, two adjacent characters are selected from the first character string as a first character and a second character.
Specifically, how to determine whether the first character string and the detection character string satisfy the first similarity condition is described below with reference to a first character string. Two adjacent characters are arbitrarily selected from the first character string as a first character and a second character
Step S202, exchanging the positions of the first character and the second character in the first character string.
Specifically, the positions of the first character and the second character in the first character string are exchanged.
Step S203, if the character string obtained after exchanging the positions is the same as the detection character string, the position coordinate of the first character string in the target character sequence is smaller than the position coordinate of the detection character string in the target character sequence, and the spelling type of the first character string is the spelling correct type.
Specifically, if the character string obtained after exchanging the positions is the same as the detection character string, the position coordinate of the first character string in the target character sequence is smaller than the position coordinate of the detection character string in the target character sequence (that is, the first character string is in front of the detection character string, and the detection character string is behind the detection character string), and the spelling type of the first character string is the spelling correct type, it is determined that the first character string and the detection character string satisfy the first similar condition, and it may be determined that the first character string and the detection character string satisfy the first similar condition.
The above steps describe a first character and a second character, for a first character string there may be a plurality of corresponding first characters and second characters, and for each first character and second character the above-described manner may be used to determine the first character string and to detect whether the character string satisfies the first similarity condition. Conversely, the first string and the detection string do not satisfy the first similarity condition as long as one of the above-mentioned 3 conditions is not satisfied. If the character strings and the detection character strings obtained after the exchange positions of all the first characters and the second characters of the first character strings are the same, the first character strings and the detection character strings do not meet a first similar condition; or as long as the position coordinates of the first character string in the target character sequence are greater than or equal to the position coordinates of the detection character string in the target character sequence, the first character string and the detection character string do not satisfy the first similar condition; or the first string and the detection string do not satisfy the first similarity condition as long as the spelling type of the first string is the misspelling type.
In order to continuously determine the spelling type of the detection character string, the spelling type of each detection character string may be sequentially detected in the order of the detection character in the target character sequence. When a variable in the target code text information is declared and defined for the first time, the spelling of the variable must be correct. The reason why the spelling type of the first character string must be the spelling-correct type in the above judgment conditions is: because the judgment of the spelling type of the detected character string is to use the first character string as a reference object, if the reference object has no credibility, the detection result also has no credibility, namely, the judgment of whether the spelling type of the detected character string is the correct spelling type or the wrong spelling type can not be carried out.
For example, the first string is: onDestroy, the detection string is: onDestory, the position coordinate of the first character string 'OnDestroy' in the target character sequence is smaller than the position coordinate of the detection character string 'OnDestory' in the target character sequence, and the spelling type of the first character string 'OnDestroy' is the spelling correct type. The character "r" and the character "o" in the first character string "OnDestroy" are taken as a first character and a second character, respectively. Because the character string obtained after the first character and the second character are exchanged is the same as the detection character string 'OnDestorey', and the position coordinate of the first character string 'OnDestorey' in the target character sequence is smaller than the position coordinate of the detection character string 'OnDestorey' in the target character sequence, and the spelling type of the first character string 'OnDestorey' is the spelling correct type, the first character string 'OnDestorey' and the detection character string 'OnDestorey' can be determined to meet the first similar condition. And further can determine that the detection character string 'OnDestorey' is of the spelling error type.
Step S204, updating the first character string; the updated first character string is a character string obtained after characters are deleted from the first character string, or a character string obtained after characters are added to the first character string;
specifically, the following still describes how to determine whether the first character string and the detection character string satisfy the first similarity condition. Adding a character to an arbitrary position in the first character string, or deleting a character from an arbitrary position in the first character string, which is referred to as updating the first character string. The number of the added characters or the deleted characters may be one or more.
Step S205, if the updated first character string is the same as the detection character string, the position coordinate of the first character string in the target character sequence is smaller than the position coordinate of the detection character string in the target character sequence, and the spelling type of the first character string is the spelling correct type, it is determined that the first character string and the detection character string satisfy the first similar condition.
Specifically, if the updated first character string is the same as the detection character string, the position coordinate of the first character string in the target character sequence is smaller than the position coordinate of the detection character string in the target character sequence (that is, the first character string is in front of the detection character string), and the spelling type of the first character string is the spelling correct type, it can be determined that the first character string and the detection character string satisfy the first similar condition. Conversely, the first string and the detection string do not satisfy the first similarity condition as long as one of the above-mentioned 3 conditions is not satisfied. That is, after adding characters or deleting characters at any position in the first character string, the first character string and the detection character string are different, and the first character string and the detection character string do not meet the first similar condition; or as long as the position coordinate of the first character string in the target character sequence is greater than or equal to the position coordinate of the detection character string in the target character sequence, the first character string and the detection character string do not satisfy the first similar condition; or as long as the spelling type of the first character string is the misspelling type, the first character string and the detection character string do not satisfy the first similarity condition, it should be noted that, in order to continuously determine the spelling type of the detection character string, the spelling type of each detection character string may be sequentially detected according to the front-back order of the detection character in the target character sequence.
For example, the first string is: laterUpdate, the detection string is: lateUpdate, and the position coordinate of the first string "LateUpdate" in the target character sequence is smaller than the position coordinate of the detection string "LateUpdate" in the target character sequence, and the spelling type of the first string "LateUpdate" is spelling correct. Deleting the character "r" in the first string "Laterupdate" can result in the string "Lateupdate". Since the deleted string "late update" and the detected string "late update" are the same, and at the same time, the position coordinate of the first string "late update" in the target character sequence is smaller than the position coordinate of the detected string "late update" in the target character sequence, and the spelling type of the first string "late update" is the spelling-correct type, it can be determined that the first string "late update" and the detected string "late update" satisfy the first similarity condition. And then the detection string "late update" can be determined as the spelling error type.
Step S206, selecting a first character in the first character string, determining the target position information of the first character in the first character string, and determining the character in the target position information in the detection character string as a second character;
specifically, how to judge whether the first character string and the detection character string satisfy the first similarity condition is described below. One character is arbitrarily selected in the first character string as a first character, and position information of the first character in the first character string, called target position information, is determined. And taking the character in the target position information in the detection character string as a second character.
Step S207, if the character string obtained after deleting the first character in the first character string is the same as the character string obtained after deleting the second character in the detection character string, the position coordinate of the first character string in the target character sequence is smaller than the position coordinate of the detection character string in the target character sequence, and the spelling type of the first character string is the spelling correct type, it is determined that the first character string and the detection character string satisfy the first similar condition.
Specifically, if a character string obtained by deleting a first character from a first character string is the same as a character string obtained by deleting a second character string from a second character string (that is, if a character at the same position is deleted, the first character string is the same as the detection character string), and the spelling type of the first character string is the spelling correct type, it may be determined that the first character string and the detection character string satisfy the first similarity condition. The above description describes a first character and a second character, and for a first character string there may be a plurality of corresponding first characters, and for each first character the above-described manner may be used to determine the first character string and to detect whether the character string satisfies the first similarity condition. On the contrary, as long as one of the 3 conditions is not satisfied, that is, if all the first characters and the corresponding second characters are deleted from the first character string and the detection character string respectively, the two obtained character strings are different, the first character string and the detection character string do not satisfy the first similar condition; or as long as the position coordinates of the first character string in the target character sequence are greater than or equal to the position coordinates of the detection character string in the target character sequence, then the first string and the detection string do not satisfy a first similarity condition; or the first string and the detection string do not satisfy the first similarity condition as long as the spelling type of the first string is the misspelling type.
For example, the first string is: onPPreUpdate, the detection string is: onRreUpdate, and the position coordinate of the first string "OnPreUpdate" in the target character sequence is smaller than the position coordinate of the detection string "OnRreUpdate" in the target character sequence, and the spelling type of the first string "OnPreUpdate" is spelling-correct type. Taking the character 'P' in the first character string 'OnPPreUpdate' as a first character string, wherein the character is positioned at the third position of the first character string; the character "R" located at the third position in the detection character string is taken as the second character. Deleting the first character "P" in the first character string "OnPReUpdate" to obtain a character string "OnPReUpdate"; deleting the second character string 'R' in the second character string 'OnRreUpdate' to obtain a character string 'OnReUpdate', wherein the two character strings obtained after deletion are identical and simultaneously meet the condition that the position coordinate of the first character string 'OnPreUpdate' in the target character sequence is less than the position coordinate of the detection character string 'OnRreUpdate' in the target character sequence, and the spelling type of the first character string 'OnPreUpdate' is the spelling correct type, so that the first character string 'OnPreUpdate' and the detection character string 'OnRreUpdate' can be determined to meet the first similar condition, and the detection character string 'OnRreUpdate' can be determined to be the spelling error type.
The above lists three ways to determine whether any one of the first character string and the detection character string in the first set satisfies the first similar condition, and as long as any one of the ways can be used to determine that one of the first character string and the detection character string satisfies the first similar condition, it can be determined that the first character string and the detection character string in the first set satisfy the first similar condition.
Step S208, if there is a first character string in the first set and the detected character string satisfy a first similarity condition, determining the spelling type of the detected character string as the spelling error type.
Specifically, if it can be determined that the first character string and the detection character string in the first set satisfy the first similar condition by using any one of the three determination manners, the spelling type of the detection character string may be determined as the spelling error type, that is, the detection character string spelling error is determined.
Further, if at least one first character string exists in the first set and the detection character string satisfies a first similarity condition, extracting those first character strings satisfying the first similarity condition as the target character string. If the number of the target character strings is greater than the preset target number threshold and the positions of the target character strings in the first set are adjacent, it is determined that the spelling type of the detected character strings is a spelling error type, and it should be noted that, here, each first character string in the first set is arranged according to the front and rear positions of the first character string in the target character sequence. The further detection mode is that the accuracy of the judgment result can be improved according to the context information of the first character string which meets the first similar condition with the detection character string.
Optionally, if none of the three manners described above determines that the first character string and the detection character string in the first set satisfy the first similar condition, that is, the first character string does not exist in the first set and the detection character string satisfies the first similar condition, it indicates that the detection character string is verified to be passed, that is, it is determined that the spelling type of the detection character string is the spelling correct type.
Further, please refer to fig. 5, which is another schematic flow diagram for determining a type of a detected character string according to an embodiment of the present invention, wherein when the detected character string belongs to an implicit function type, three ways for determining that a spelling type of the detected character string is a spelling error type are included, wherein step S301 to step S303, and step S308 are a determination way; step S304-step S305, step S308 are a judgment method; step S306-step S308 are another judgment method.
Step S301, selecting two adjacent characters from the second character string as a first character and a second character.
Specifically, how to judge whether the second character string and the detection character string satisfy the second similarity condition is explained below with reference to a second character string. Two adjacent characters are arbitrarily selected from the second character string as the first character and the second character, respectively.
Step S302, specifically, exchanging the positions of the first character and the second character in the second character string, and exchanging the positions of the first character and the second character in the second character string.
Step S303, if the character string obtained after exchanging the positions is the same as the detection character string, determining that the second character string and the detection character string satisfy the second similarity condition.
Specifically, if the character string obtained after exchanging the positions is the same as the detection character string, it may be determined that the second character string and the detection character string satisfy the second similarity condition. The above description describes a first character and a second character, for a second string there may be a plurality of corresponding first characters and second characters, for each of which the above-described manner may be used to determine the second string and to detect whether the string satisfies the second similarity condition. On the contrary, if the character string and the detection character obtained after the exchange positions of all the first characters of the second character string and the second characters corresponding to the first characters are different, the second character string and the detection character string do not satisfy the second similarity condition.
Step S304, updating the second character string; the updated second character string is a character string obtained after characters are deleted in the second character string, or a character string obtained after characters are newly added in the second character string.
Specifically, the following still describes how to determine whether the second character string and the detection character string satisfy the second similarity condition. Adding a character to an arbitrary position in the second character string, or deleting a character from an arbitrary position in the second character string, which is referred to as updating the second character string. The number of the added characters or the deleted characters may be one or more.
Step S305, if the updated second character string is the same as the detection character string, determining that the second character string and the detection character string satisfy the second similarity condition.
Specifically, if the updated second character string is the same as the detection character string, it may be determined that the second character string and the detection character string satisfy the second similarity condition. On the contrary, if the second string is different from the detection string in any position after the character is added or deleted, the second string and the detection string do not satisfy the second similarity condition.
Step S306, selecting a first character from the second character string, determining the target position information of the first character in the second character string, and determining the character in the target position information in the detected character string as the second character.
Specifically, how to judge whether the second character string and the detection character string satisfy the second similarity condition is described below with reference to a second character string. One character is arbitrarily selected in the second character string as a first character, and position information of the first character in the second character string, called target position information, is determined. And taking the character in the target position information in the detection character string as a second character.
Step S307, if the character string obtained after deleting the first character in the first character string is the same as the character string obtained after deleting the second character in the detection character string, determining that the second character string and the detection character string satisfy the second similarity condition.
Specifically, if the character string obtained by deleting the first character from the second character string is the same as the character string obtained by deleting the second character from the second character string (that is, if the character at the same position is deleted, the second character string is the same as the detection character string), and the spelling type of the second character string is the spelling correct type, it may be determined that the second character string and the detection character string satisfy the second similarity condition. The above description describes a first character and a second character, and for a second character string there may be a plurality of corresponding first characters, and for each first character the above described method may be used to determine the second character string and to detect whether the character string satisfies the first similarity condition. Conversely, if the two character strings obtained after all the first characters and the corresponding second characters are deleted from the second character string and the detection character string respectively are different, the second character string and the detection character string do not satisfy the second similarity condition.
As can be seen from the above, the judgment basis of the first similar condition is more strict than that of the second similar condition, because for the string of the global variable type, the string of the same misspelling may repeatedly appear in the target code text information, or the string of the target code text information that starts misspelling but is correctly spelled later may have multiple situations, resulting in multiple situations of the reference object (the first string in the first set), and therefore, more conditions are required for the judgment, and the detection order also needs to be limited; however, for the implicit function type character string, since the reference object is mainly the function name of a function other than the target code text, it can be determined that the reference object for comparison (the second character string in the second set) is necessarily correct and reliable, so the judgment condition is relatively relaxed, and the detection order is not necessarily limited.
The above three ways are also listed to determine whether any one of the second character string and the detection character string in the second set satisfies the second similarity condition, and as long as any one of the ways can be used to determine that one of the second character string and the detection character string satisfies the second similarity condition, it can be determined that the second character string exists in the second set and the detection character string satisfies the second similarity condition.
Step S308, if a second string exists in the second set and the detected string satisfies a second similarity condition, determining the spelling type of the detected string as the spelling error type.
Specifically, if it can be determined that the second character string exists in the second set and the detected character string satisfies the second similarity condition by using any one of the three determination manners, the spelling type of the detected character string may be determined as the spelling error type, that is, the detected character string is determined as a spelling error.
Optionally, if none of the three manners described above determines that the second character string and the detection character string in the second set satisfy the second similarity condition, that is, the second character string does not exist in the second set and the detection character string satisfies the second similarity condition, it indicates that the detection character string passes verification, that is, it is determined that the spelling type of the detection character string is the spelling correct type.
According to the method, the global variable with the spelling error in the program code is automatically detected, and the function name of the implicit function with the spelling error in the program code is automatically detected, so that the whole program code is prevented from being manually detected, the time consumption for detecting the program code can be saved, and the detection efficiency is improved.
Further, please refer to fig. 6, which is a schematic structural diagram of a program processing apparatus according to an embodiment of the present invention. As shown in fig. 6, the program processing apparatus 1 may include: the device comprises an acquisition module 11, an identification module 12, a first detection module 13, an adding module 14 and a second detection module 15.
And the obtaining module 11 is used for obtaining the target code text information.
Specifically, the obtaining module 11 obtains text information of a program code to be detected (such as the program code 20a in the embodiment of fig. 2 described above), which is called target code text information.
And the identification module 12 is used for acquiring the detection character string in the target code text information.
Specifically, in order to verify whether a spelling error exists in a character string belonging to the global variable type and a character string belonging to the implicit function type in the target code text information, the recognition module 12 first recognizes the two types of character strings from the target code text information as detection character strings. The specific process of identification by the identification module 12 is as follows: according to a preset target sequence, namely traversing all characters in the target code text information from top to bottom from left to right, a character sequence formed by combining all the traversed characters is called a target character sequence, it is to be noted that the object of the traversing operation is a character in the target code text information, and the traversing operation is not executed on a space, an annotation, a line feed character and the like in the target code text, namely the target character sequence does not include the space, the annotation, the line feed character and the like. The recognition module 12 decomposes the target character sequence into a series of word symbols (the word symbols can be represented by english tokens) according to the word formation rule, each decomposed word symbol is respectively called a reference character string, and the recognition module 12 detects the function type of each reference character string, wherein the function types include: the variable type (the variable type can be further subdivided into a global variable type and a reference variable type), the keyword type, the indicator type, the operator type, the constant type, the implicit function type and the like, each reference character string has a corresponding function type, and it can be seen that each reference character string is a minimum unit with independent significance.
After the identification module 12 identifies the function type corresponding to each reference character string, in the plurality of reference character strings, the identification module 12 uses the reference character string whose function type is the global variable type as the detection character string, and uses the reference character string whose function type is the implicit function type as the detection character string.
A first detection module 13, configured to identify a spelling type of the detection character string according to a first set if the detection character string belongs to a global variable type; the first set comprises all first character strings belonging to variable types in the target code text information.
Specifically, when the function type of the detection character string is a global variable type, the first detection module 13 identifies a spelling type of the detection character string according to the first set, the spelling type is divided into a spelling correct type and a spelling error type, and if the spelling type of the detection character string is the spelling correct type, it can be determined that the detection character string is correctly spelled; if the spelling type of the detected string is a misspelling type, then it can be determined that the detected string is misspelled. If the spelling type of the detected character string is the spelling error type, a prompt message can be subsequently sent to the user to prompt the user that the detected character string is the error character string. Wherein, the first set is constructed in advance according to the target code text information, and the construction process is as follows: among all the divided reference character strings, the first detection module 13 takes the character string whose function type is variable type as the first character string, and combines the determined first character strings into the first set, i.e. the character strings in the first set are called the first character string, and if a character string belongs to the global variable type, it is necessary that it also belongs to the variable type, so that it can be inferred that the detection character strings belonging to the global variable are also necessary to exist in the first set.
The first detection module 13 detects whether the character string is misspelled according to the first set identification by: the first detection module 13 searches whether the first character string and the detection character string in the first set are similar, if so, further compares the position of the found first character string and the detection character string in the target character sequence, and if the position of the found first character string is more advanced than the position of the detection character string in the target character sequence and the found first character string is determined to be a character string with correct spelling, it can be determined that the spelling type of the detection character string is a spelling error type, that is, it is determined that the detection character string is a spelling error; conversely, as long as any one of the above conditions is not satisfied, the first detection module 13 may determine that the spelling type of the detected character string is a spelling-correct type, i.e., determine that the detected character string is spelled correctly. As can be seen from the above, as long as the first set is constructed, the first character string in the first set does not need to be deleted or added subsequently.
An adding module 14, configured to, if the detected character string belongs to an implicit function type, take both a class function name included in a target sub-class where a function corresponding to the detected character string is located and a class function name included in a target parent class corresponding to the target sub-class as a second character string, and add the second character string to a second set;
a second detection module 15, configured to identify a spelling type of the detected character string according to the second set;
the spell check types include a spelling correct type and a spelling error type.
For specific functional implementation manners of the obtaining module 11, the identifying module 12, the first detecting module 13, the adding module 14, and the second detecting module 15, reference may be made to steps S101 to S103 in the embodiment corresponding to fig. 3, which is not described herein again.
Referring to fig. 6, the identification module 12 may include: traversal unit 121 and dividing unit 122.
A traversing unit 121, configured to traverse a target character sequence corresponding to the target code text information according to a target sequence;
a dividing unit 122, configured to divide the target character sequence into multiple reference character strings according to a word formation rule, and detect a function type of each reference character string;
the dividing unit 122 is further configured to determine, as the detection string, a reference string whose function type is a global variable type and a reference string whose function type is an implicit function type from among the plurality of reference strings.
For specific functional implementation manners of the traversal unit 121 and the dividing unit 122, reference may be made to step S101 in the embodiment corresponding to fig. 3, which is not described herein again.
Referring to fig. 6, the first detection module 13 may include: a first determining unit 131 and a second determining unit 132.
A first determining unit 131, configured to determine a spelling type of the detected character string as the spelling error type if a first character string exists in the first set and the detected character string satisfies a first similarity condition;
a second determining unit 132, configured to determine the spelling type of the detected character string as the spelling-correct type if the first character string does not exist in the first set and the detected character string satisfy the first similarity condition.
For specific functional implementation manners of the first determining unit 131 and the second determining unit 132, reference may be made to step S102 in the embodiment corresponding to fig. 3, which is not described herein again.
Referring to fig. 6, the program processing apparatus 1 may include: the system comprises an acquisition module 11, an identification module 12, a first detection module 13, an adding module 14 and a second detection module 15; the method can also comprise the following steps: a first switching module 16.
A first exchanging module 16 for selecting two adjacent characters from the first character string as a first character and a second character;
the first exchanging module 16 is further configured to exchange positions of the first character and the second character in the first character string;
the first exchanging module 16 is further configured to determine that the first character string and the detection character string satisfy the first similar condition if the character string obtained after exchanging the positions is the same as the detection character string, the position coordinate of the first character string in the target character sequence is smaller than the position coordinate of the detection character string in the target character sequence, and the spelling type of the first character string is the spelling correct type.
For a specific implementation manner of the function of the first switching module 16, refer to steps S201 to S203 in the embodiment corresponding to fig. 4, which is not described herein again.
Referring to fig. 6, the program processing apparatus 1 may include: the system comprises an acquisition module 11, an identification module 12, a first detection module 13, an adding module 14, a second detection module 15 and a first exchange module 16; the method can also comprise the following steps: a first update module 17.
A first updating module 17, configured to update the first character string; the updated first character string is a character string obtained after characters are deleted from the first character string, or a character string obtained after characters are added to the first character string;
the first updating module 17 is further configured to determine that the first character string and the detection character string satisfy the first similar condition if the updated first character string and the detection character string are the same, the position coordinate of the first character string in the target character sequence is smaller than the position coordinate of the detection character string in the target character sequence, and the spelling type of the first character string is the spelling correct type.
The specific functional implementation manner of the first updating module 17 may refer to step S204 to step S205 in the embodiment corresponding to fig. 4, which is not described herein again.
Referring to fig. 6, the program processing apparatus 1 may include: the system comprises an acquisition module 11, an identification module 12, a first detection module 13, an addition module 14, a second detection module 15, a first exchange module 16 and a first updating module 17; the method can also comprise the following steps: a first selection module 18.
A first selection module 18, configured to select a first character in the first character string, determine target position information of the first character in the first character string, and determine a character in the detected character string that is in the target position information as a second character;
the first selecting module 18 is further configured to determine that the first character string and the detected character string satisfy the first similarity condition if a character string obtained after deleting a first character in the first character string is the same as a character string obtained after deleting a second character in the detected character string, a position coordinate of the first character string in the target character sequence is smaller than a position coordinate of the detected character string in the target character sequence, and a spelling type of the first character string is a spelling correct type.
The specific functional implementation manner of the first selecting module 18 may refer to step S206-step S207 in the embodiment corresponding to fig. 4, which is not described herein again.
Referring to fig. 6, the second determining unit 132 may include: a first determining subunit 1321 and a second determining subunit 1322.
A first determining subunit 1321, configured to determine, as the target character string, a first character string that satisfies the first similarity condition with the detected character string in the first set;
a second determining subunit 1322 is configured to determine, if the number of the target character strings is greater than a target number threshold and the target character strings are adjacent in the first set, the spelling type of the detected character string as the spelling error type.
The specific functional implementation manners of the first determining subunit 1321 and the second determining subunit 1322 may refer to step S208 in the embodiment corresponding to fig. 4, which is not described herein again.
Referring to fig. 6, the second detection module 15 may include: a third determining unit 151 and a fourth determining unit 152.
A third determining unit 151, configured to determine a spelling type of the detected character string as the spelling error type if a second character string exists in the second set and the detected character string satisfies a second similarity condition;
a fourth determining unit 152, configured to determine the spelling type of the detected character string as the spelling-correct type if there is no second character string in the second set and the detected character string satisfies the second similarity condition.
For specific functional implementation manners of the third determining unit 151 and the fourth determining unit 152, reference may be made to step S103 in the embodiment corresponding to fig. 3, which is not described herein again.
Referring to fig. 6, the program processing apparatus 1 may include: the system comprises an acquisition module 11, an identification module 12, a first detection module 13, an addition module 14, a second detection module 15, a first exchange module 16, a first updating module 17 and a first selection module 18; the method can also comprise the following steps: a second switching module 19.
A second exchanging module 19 for selecting two adjacent characters from the second character string as a first character and a second character;
the second exchanging module 19 is further configured to exchange positions of the first character and the second character in the second character string;
the second exchanging module 19 is further configured to determine that the second character string and the detection character string satisfy the second similarity condition if the character string obtained after exchanging the positions is the same as the detection character string.
The specific functional implementation manner of the second switching module 19 may refer to steps S301 to S303 in the embodiment corresponding to fig. 5, which is not described herein again.
Referring to fig. 6, the program processing apparatus 1 may include: the system comprises an acquisition module 11, an identification module 12, a first detection module 13, an addition module 14, a second detection module 15, a first exchange module 16, a first updating module 17, a first selection module 18 and a second exchange module 19; the method can also comprise the following steps: a second update module 20.
A second updating module 20, configured to update the second character string; the updated second character string is obtained after characters are deleted in the second character string, or is obtained after characters are newly added in the second character string;
the second updating module 20 is further configured to determine that the second character string and the detection character string satisfy the second similarity condition if the updated second character string is the same as the detection character string.
The specific functional implementation manner of the second updating module 20 may refer to steps S304 to S305 in the embodiment corresponding to fig. 5, which is not described herein again.
Referring to fig. 6, the program processing apparatus 1 may include: the system comprises an acquisition module 11, an identification module 12, a first detection module 13, an addition module 14, a second detection module 15, a first exchange module 16, a first update module 17, a first selection module 18, a second exchange module 19 and a second update module 20; the method can also comprise the following steps: a second selection module 21.
A second selecting module 21, configured to select a first character in the second character string, determine target position information of the first character in the second character string, and determine a character in the detected character string that is in the target position information as the second character;
the second selecting module 21 is further configured to determine that the second character string and the detection character string satisfy the second similarity condition if the character string obtained after deleting the first character in the first character string is the same as the character string obtained after deleting the second character in the detection character string.
The specific functional implementation manner of the second selecting module 21 may refer to steps S306 to S307 in the embodiment corresponding to fig. 5, which is not described herein again.
According to the method, the global variable with the spelling error in the program code is automatically detected, and the function name of the implicit function with the spelling error in the program code is automatically detected, so that the whole program code is prevented from being manually detected, the time consumed for detecting the program code can be saved, and the detection efficiency is improved.
Further, please refer to fig. 7, which is a schematic structural diagram of an electronic device according to an embodiment of the present invention. As shown in fig. 7, the program processing apparatus 1 in fig. 7 may be applied to the electronic device 1000, and the electronic device 1000 may include: the processor 1001, the network interface 1004, and the memory 1005, and the electronic device 1000 may further include: a user interface 1003, and at least one communication bus 1002. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display) and a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a standard wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory (non-volatile memory), such as at least one disk memory. The memory 1005 may optionally be at least one memory device located remotely from the processor 1001. As shown in fig. 7, a memory 1005, which is a kind of computer storage medium, may include therein an operating system, a network communication module, a user interface module, and a device control application program.
In the electronic device 1000 shown in fig. 7, the network interface 1004 may provide a network communication function; the user interface 1003 is an interface for providing input to a user; and the processor 1001 may be configured to invoke the device control application stored in the memory 1005 to implement:
acquiring target code text information, and acquiring a detection character string in the target code text information;
if the detection character string belongs to the global variable type, identifying the spelling type of the detection character string according to a first set; the first set comprises all first character strings belonging to variable types in the target code text information;
if the detection character string belongs to the implicit function type, taking the class function name contained in a target subclass of the function corresponding to the detection character string and the class function name contained in a target parent class corresponding to the target subclass as second character strings, adding the second character strings to a second set, and identifying the spelling type of the detection character string according to the second set;
the spell check types include a spelling correct type and a spelling error type.
In one embodiment, when the processor 1001 acquires the detection character string from the target code text information, the following steps are specifically performed:
traversing a target character sequence corresponding to the target code text information according to a target sequence;
dividing the target character sequence into a plurality of reference character strings according to a word formation rule, and detecting the function type of each reference character string;
and determining the reference character string with the function type being the global variable type and the reference character string with the function type being the implicit function type as the detection character string in the plurality of reference character strings.
In one embodiment, the processor 1001, when performing the identifying the spelling type of the detected character string according to the first set, specifically performs the following steps:
if a first character string exists in the first set and the detection character string meets a first similar condition, determining the spelling type of the detection character string as the spelling error type;
if the first character string does not exist in the first set and the detection character string meets the first similarity condition, determining the spelling type of the detection character string as the spelling correct type.
In one embodiment, the processor 1001 further performs the steps of:
selecting two adjacent characters from the first character string as a first character and a second character;
exchanging the positions of the first character and the second character in the first character string;
and if the character string obtained after position exchange is the same as the detection character string, the position coordinate of the first character string in the target character sequence is smaller than the position coordinate of the detection character string in the target character sequence, and the spelling type of the first character string is the spelling correct type, determining that the first character string and the detection character string meet the first similar condition.
In one embodiment, the processor 1001 further performs the steps of:
updating the first character string; the updated first character string is a character string obtained after characters are deleted from the first character string, or a character string obtained after characters are added to the first character string;
and if the updated first character string is the same as the detection character string, the position coordinate of the first character string in the target character sequence is smaller than the position coordinate of the detection character string in the target character sequence, and the spelling type of the first character string is the spelling correct type, determining that the first character string and the detection character string meet the first similarity condition.
In one embodiment, the processor 1001 further performs the steps of:
selecting a first character in the first character string, determining target position information of the first character in the first character string, and determining a character in the target position information in the detection character string as a second character;
and if the character string obtained after deleting the first character in the first character string is the same as the character string obtained after deleting the second character in the detection character string, the position coordinate of the first character string in the target character sequence is smaller than the position coordinate of the detection character string in the target character sequence, and the spelling type of the first character string is the spelling correct type, determining that the first character string and the detection character string meet the first similar condition.
In one embodiment, when determining the spelling type of the detected character string as the spelling error type, the processor 1001 specifically performs the following steps:
determining a first character string meeting the first similar condition with the detection character string as a target character string in the first set;
and if the number of the target character strings is larger than a target number threshold value and the target character strings are adjacent in the first set, determining the spelling type of the detected character strings as the spelling error type.
In one embodiment, when the processor 1001 identifies the spelling type of the detected character string according to the second set, the following steps are specifically performed:
if a second character string exists in the second set and the detection character string meets a second similarity condition, determining the spelling type of the detection character string as the spelling error type;
if the second similarity condition is satisfied by the second character string and the detection character string which do not exist in the second set, determining the spelling type of the detection character string as the spelling correct type.
In one embodiment, the processor 1001 further performs the steps of:
selecting two adjacent characters from the second character string as a first character and a second character;
exchanging the positions of the first character and the second character in the second character string;
and if the character string obtained after the positions are exchanged is the same as the detection character string, determining that the second character string and the detection character string meet the second similarity condition.
In one embodiment, the processor 1001 further performs the steps of:
updating the second character string; the updated second character string is obtained after characters are deleted in the second character string, or is obtained after characters are newly added in the second character string;
and if the updated second character string is the same as the detection character string, determining that the second character string and the detection character string meet the second similarity condition.
In one embodiment, the processor 1001 further performs the steps of:
selecting a first character in the second character string, determining target position information of the first character in the second character string, and determining a character in the target position information in the detection character string as a second character;
and if the character string obtained after deleting the first character in the first character string is the same as the character string obtained after deleting the second character in the detection character string, determining that the second character string and the detection character string meet the second similarity condition.
According to the method, the global variable with the spelling error in the program code is automatically detected, and the function name of the implicit function with the spelling error in the program code is automatically detected, so that the whole program code is prevented from being manually detected, the time consumption for detecting the program code can be saved, and the detection efficiency is improved.
It should be understood that the electronic device 1000 described in the embodiment of the present invention may perform the description of the program processing method in the embodiment corresponding to fig. 3 to fig. 5, and may also perform the description of the program processing apparatus 1 in the embodiment corresponding to fig. 6, which is not described herein again. In addition, the beneficial effects of the same method are not described in detail.
Further, here, it is to be noted that: an embodiment of the present invention further provides a computer storage medium, and the computer storage medium stores the aforementioned computer program executed by the program processing apparatus 1, and the computer program includes program instructions, and when the processor executes the program instructions, the description of the program processing method in the embodiment corresponding to fig. 3 to fig. 5 can be performed, so that details are not repeated here. In addition, the beneficial effects of the same method are not described in detail. For technical details not disclosed in the embodiments of the computer storage medium to which the present invention relates, reference is made to the description of the method embodiments of the present invention.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above may be implemented by a computer program, which may be stored in a computer readable storage medium and executed by a computer to implement the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
While the invention has been described in connection with what is presently considered to be the most practical and preferred embodiment, it is to be understood that the invention is not to be limited to the disclosed embodiment, but on the contrary, is intended to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims.

Claims (12)

1. A program processing method, comprising:
traversing a target character sequence corresponding to the target code text information according to a target sequence;
dividing the target character sequence into a plurality of reference character strings according to a word formation rule, and detecting the function type of each reference character string;
combining reference character strings with the function type being a global variable type and reference character strings with the function type being an implicit function type into a detection character string set in the plurality of reference character strings;
if a detection character string belonging to a global variable type is obtained from the detection character string set, and a first character string and the detection character string in a first set meet a first similar condition, determining the first character string meeting the first similar condition with the detection character string in the first set as a target character string; the first similar condition refers to a condition that the first character string is similar to the detection character, the position coordinate of the target character string in the target character sequence is smaller than the position coordinate of the detection character string in the target character sequence, and the spelling type of the target character string is the spelling correct type; the target character sequence is obtained by traversing the target code text information based on a target sequence; the first set comprises all first character strings belonging to variable types in the target code text information;
if the number of the target character strings is larger than a target number threshold value and the target character strings are adjacent in the first set, determining the spelling type of the detected character strings as the spelling error type;
if a detection character string belonging to an implicit function type is obtained from the detection character string set, taking a class function name contained in a target subclass of a function corresponding to the detection character string and a class function name contained in a target parent class corresponding to the target subclass as second character strings, and adding the second character strings to a second set; the implicit function type refers to a function type corresponding to a function name of a function when the function is called in an implicit calling mode; the implicit calling refers to calling a function name as a constant character string;
if a second character string exists in the second set and the detection character string meets a second similarity condition, determining the spelling type of the detection character string as the spelling error type; the second similarity condition refers to a condition that the second character string is similar to the detection character;
the spelling types include a spelling correct type and a spelling error type.
2. The method of claim 1, further comprising:
if the first character string does not exist in the first set and the detection character string meets the first similarity condition, determining the spelling type of the detection character string as the spelling correct type.
3. The method of claim 1, further comprising:
selecting two adjacent characters from the first character string as a first character and a second character;
exchanging the positions of the first character and the second character in the first character string;
and if the character string obtained after position exchange is the same as the detection character string, the position coordinate of the first character string in the target character sequence is smaller than the position coordinate of the detection character string in the target character sequence, and the spelling type of the first character string is the spelling correct type, determining that the first character string and the detection character string meet the first similar condition.
4. The method of claim 1, further comprising:
updating the first character string; the updated first character string is a character string obtained after characters are deleted from the first character string, or a character string obtained after characters are added to the first character string;
and if the updated first character string is the same as the detection character string, the position coordinate of the first character string in the target character sequence is smaller than the position coordinate of the detection character string in the target character sequence, and the spelling type of the first character string is the spelling correct type, determining that the first character string and the detection character string meet the first similarity condition.
5. The method of claim 1, further comprising:
selecting a first character in the first character string, determining target position information of the first character in the first character string, and determining a character in the target position information in the detection character string as a second character;
and if the character string obtained after deleting the first character in the first character string is the same as the character string obtained after deleting the second character in the detection character string, the position coordinate of the first character string in the target character sequence is smaller than the position coordinate of the detection character string in the target character sequence, and the spelling type of the first character string is the spelling correct type, determining that the first character string and the detection character string meet the first similar condition.
6. The method of claim 1, further comprising:
if the second similarity condition is satisfied by the second character string and the detection character string which do not exist in the second set, determining the spelling type of the detection character string as the spelling correct type.
7. The method of claim 1, further comprising:
selecting two adjacent characters from the second character string as a first character and a second character;
exchanging the positions of the first character and the second character in the second character string;
and if the character string obtained after the positions are exchanged is the same as the detection character string, determining that the second character string and the detection character string meet the second similarity condition.
8. The method of claim 1, further comprising:
updating the second character string; the updated second character string is obtained after characters are deleted in the second character string, or is obtained after characters are newly added in the second character string;
and if the updated second character string is the same as the detection character string, determining that the second character string and the detection character string meet the second similarity condition.
9. The method of claim 1, further comprising:
selecting a first character in the second character string, determining target position information of the first character in the second character string, and determining a character in the target position information in the detection character string as a second character;
and if the character string obtained after deleting the first character in the second character string is the same as the character string obtained after deleting the second character in the detection character string, determining that the second character string and the detection character string meet the second similarity condition.
10. A program processing apparatus characterized by comprising:
the acquisition module is used for traversing a target character sequence corresponding to the target code text information according to a target sequence;
the recognition module is used for dividing the target character sequence into a plurality of reference character strings according to a word formation rule, detecting the function type of each reference character string, and combining the reference character strings with the function type being a global variable type and the reference character strings with the function type being an implicit function type into a detection character string set in the plurality of reference character strings;
the first detection module is used for determining a first character string meeting a first similar condition with the detection character string as a target character string in a first set if the detection character string belonging to the global variable type is obtained from the detection character string set and the first character string and the detection character string meet the first similar condition exist in the first set; the first similar condition refers to a condition that the first character string is similar to the detection character, the position coordinate of the target character string in the target character sequence is smaller than the position coordinate of the detection character string in the target character sequence, and the spelling type of the target character string is the spelling correct type; the target character sequence is obtained by traversing the target code text information based on a target sequence; the first set comprises all first character strings belonging to variable types in the target code text information;
the first detection module is further configured to determine a spelling type of the detected character string as the spelling error type if the number of the target character strings is greater than a target number threshold and the target character strings are adjacent in the first set;
the adding module is used for taking the class function name contained in the target subclass of the function corresponding to the detection character string and the class function name contained in the target parent class corresponding to the target subclass as second character strings and adding the second character strings to a second set if the detection character strings belonging to the implicit function type are obtained from the detection character string set; the implicit function type refers to a function type corresponding to a function name of a function when the function is called in an implicit calling mode; the implicit calling refers to calling a function name as a constant character string;
a second detection module, configured to determine, if a second string exists in the second set and the detected string satisfies a second similarity condition, a spelling type of the detected string as the spelling error type; the second similarity condition refers to a condition that the second character string is similar to the detection character;
the spelling types include a spelling correct type and a spelling error type.
11. An electronic device, comprising: a processor and a memory;
the processor is coupled to a memory, wherein the memory is configured to store program code and the processor is configured to invoke the program code to perform the method of any of claims 1-9.
12. A computer storage medium, characterized in that the computer storage medium stores a computer program comprising program instructions which, when executed by a processor, perform the method according to any one of claims 1-9.
CN201811033360.6A 2018-09-05 2018-09-05 Program processing method and device and related equipment Active CN109213490B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811033360.6A CN109213490B (en) 2018-09-05 2018-09-05 Program processing method and device and related equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811033360.6A CN109213490B (en) 2018-09-05 2018-09-05 Program processing method and device and related equipment

Publications (2)

Publication Number Publication Date
CN109213490A CN109213490A (en) 2019-01-15
CN109213490B true CN109213490B (en) 2022-10-25

Family

ID=64987048

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811033360.6A Active CN109213490B (en) 2018-09-05 2018-09-05 Program processing method and device and related equipment

Country Status (1)

Country Link
CN (1) CN109213490B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110765003B (en) * 2019-09-24 2023-06-02 贝壳技术有限公司 Code detection method, device and equipment and storage medium

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5822589A (en) * 1996-12-06 1998-10-13 Hewlett-Packard Company Method for locating errors in a computer program
KR101051600B1 (en) * 2010-03-29 2011-07-22 주식회사 소프트 포 소프트 Systems for performing code inspection on abap source code
US9111035B2 (en) * 2010-10-11 2015-08-18 At&T Intellectual Property I, L.P. Methods, systems, and computer program products for analyzing an occurrence of an error in a computer program by restricting access to data identified as being sensitive information
CN103257919B (en) * 2012-02-21 2015-05-13 腾讯科技(深圳)有限公司 Inspection method and device for script programs
US9195555B2 (en) * 2013-05-24 2015-11-24 International Business Machines Corporation Error injection into the leaf functions of call graphs
CN107168872B (en) * 2017-05-11 2020-09-11 网易(杭州)网络有限公司 Code checking method, device, storage medium and processor

Also Published As

Publication number Publication date
CN109213490A (en) 2019-01-15

Similar Documents

Publication Publication Date Title
CN108388599B (en) Electronic device, data migration and calling method and storage medium
CN108399072B (en) Application page updating method and device
CN110389941B (en) Database checking method, device, equipment and storage medium
US8898649B2 (en) Application program analysis method, analysis system and recording medium for identifying a contributing factor for an invalid operation of an application program
CN113157854A (en) Sensitive data leakage detection method and system of API
CN109213490B (en) Program processing method and device and related equipment
CN116560683A (en) Software updating method, device, equipment and storage medium
CN110990346A (en) File data processing method, device, equipment and storage medium based on block chain
CN106358220B (en) The detection method of abnormal contact information, apparatus and system
CN111708681B (en) Log processing method, device, equipment and storage medium
CN110688305B (en) Test environment synchronization method, device, medium and electronic equipment
WO2020258652A1 (en) Character replacement method and system, computer apparatus, and computer readable storage medium
CN111752958A (en) Intelligent associated label method, device, computer equipment and storage medium
JP2016057715A (en) Graphic type program analyzer
CN115421831A (en) Method, device, equipment and storage medium for generating calling relation of activity component
CN111736848B (en) Packet conflict positioning method, device, electronic equipment and readable storage medium
CN112003837B (en) Intelligent equipment adaptation method and device based on Modbus protocol and storage medium
CN109241742B (en) Malicious program identification method and electronic device
CN112887328A (en) Sample detection method, device, equipment and computer readable storage medium
CN113805861A (en) Code generation method based on machine learning, code editing system and storage medium
CN111753548A (en) Information acquisition method and device, computer storage medium and electronic equipment
CN114579113A (en) Table insertion method, device, equipment and storage medium
CN113590225B (en) Mapping detection method and device, electronic equipment and storage medium
US20230266967A1 (en) Method and system for mapping intermediate representation objects for facilitating incremental analysis
US11947958B2 (en) Method, device, and program product for managing object in software development project

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