CN112987653A - Method and device for converting Chinese program into G code - Google Patents

Method and device for converting Chinese program into G code Download PDF

Info

Publication number
CN112987653A
CN112987653A CN201911304606.3A CN201911304606A CN112987653A CN 112987653 A CN112987653 A CN 112987653A CN 201911304606 A CN201911304606 A CN 201911304606A CN 112987653 A CN112987653 A CN 112987653A
Authority
CN
China
Prior art keywords
chinese
text
code
program
numerical
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201911304606.3A
Other languages
Chinese (zh)
Other versions
CN112987653B (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 Hengkong Technology Co ltd
Original Assignee
Shenzhen Hengkong 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 Hengkong Technology Co ltd filed Critical Shenzhen Hengkong Technology Co ltd
Priority to CN201911304606.3A priority Critical patent/CN112987653B/en
Publication of CN112987653A publication Critical patent/CN112987653A/en
Application granted granted Critical
Publication of CN112987653B publication Critical patent/CN112987653B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/18Numerical control [NC], i.e. automatically operating machines, in particular machine tools, e.g. in a manufacturing environment, so as to execute positioning, movement or co-ordinated operations by means of programme data in numerical form
    • G05B19/408Numerical control [NC], i.e. automatically operating machines, in particular machine tools, e.g. in a manufacturing environment, so as to execute positioning, movement or co-ordinated operations by means of programme data in numerical form characterised by data handling or data format, e.g. reading, buffering or conversion of data
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/30Nc systems
    • G05B2219/32Operator till task planning
    • G05B2219/32059Send code, data for workpiece to each workstation to be used, update data

Landscapes

  • Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Manufacturing & Machinery (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Automation & Control Theory (AREA)
  • Document Processing Apparatus (AREA)

Abstract

The application discloses a method and a device for converting a Chinese program into a G code, which belong to the technical field of digital control, wherein the method comprises the following steps: acquiring a Chinese program input from a user terminal; performing word segmentation processing on the Chinese program to obtain a Chinese text and a numerical text; inputting the Chinese text into a preset code conversion model, and inquiring G code instruction characters corresponding to the Chinese text; and obtaining G code instruction characters corresponding to the Chinese text, and combining the G code instruction characters corresponding to the Chinese text with the numerical value text to form G codes corresponding to the Chinese program. The method for converting the Chinese program into the G code, disclosed by the application, realizes automatic conversion between the Chinese program and the G code, improves the programming speed in the field of numerical control machines, and simultaneously reduces the threshold of entry of programming operation of the numerical control machines, so that operators without the G code base can operate or program the numerical control machines.

Description

Method and device for converting Chinese program into G code
Technical Field
The application belongs to the technical field of digital control, and particularly relates to a method and a device for converting a Chinese program into a G code.
Background
The numerical control machine tool comprises numerical control equipment such as a numerical control lathe, a numerical control milling machine, a turning and milling compound machine, a numerical control machining center and the like, is high-precision and high-efficiency machining equipment, is provided with a multi-station tool turret or a tool rest, and can machine various types of products according to machining programs. At present, Numerical Control machines widely use NC programs (NC programs, Numerical Control programs) as machining programs, the NC programs are also called G codes (G-codes, also called RS-274), which are Numerical Control programming languages composed of combinations of command characters and Numerical texts, and are also the most widely used Numerical Control (Numerical Control) programming languages. The G code comprises numerical control program instructions generally called G instructions, and can control the numerical control machine tool to realize operations such as rapid positioning, inverse circle interpolation, circle-in-line interpolation, intermediate point arc interpolation, radius programming, skip machining and the like.
With the further development of numerical control machine tool technology, the machinable range of numerical control machine tools is continuously widened, corresponding G code programming is also more and more complicated, and because the G codes exist in multiple versions at present, some G instructions in the G codes of the versions have the same name but different or even opposite meanings, confusion often occurs when operators program the G codes, in order to avoid the confusion, enterprises need to continuously train and update the G code knowledge of the operators, and the training cost is brought to the enterprises. Meanwhile, for an operator just contacting the numerical control machine tool, an enterprise needs to train the operator with a systematic G code to master G code programming capability, so that the operator can operate the numerical control machine tool, and the problem of high entrance threshold exists in the G code programming.
Disclosure of Invention
In order to solve the problems that the door entry threshold is high when a numerical control machine tool is operated at present, an operator needs to master G code programming capability due to the fact that G code programming is adopted, and the numerical control machine tool is difficult to operate for the operator without the G code programming capability, according to a first aspect, the embodiment of the application discloses a method for converting a Chinese program into a G code, and the method comprises the following steps:
acquiring a Chinese program input from a user terminal;
performing word segmentation processing on the Chinese program to obtain a Chinese text and a numerical text;
inputting the Chinese text into a preset code conversion model, and inquiring G code instruction characters corresponding to the Chinese text;
acquiring a Chinese program input from a user terminal;
performing word segmentation processing on the Chinese program to obtain a Chinese text and a numerical text;
inputting the Chinese text into a preset code conversion model, and inquiring G code instruction characters corresponding to the Chinese text;
and obtaining G code instruction characters corresponding to the Chinese text, and combining the G code instruction characters corresponding to the Chinese text with the numerical value text to form G codes corresponding to the Chinese program.
Further, before performing word segmentation processing on the chinese program to obtain a chinese text and a numeric text, the method further includes:
identifying the Chinese program, and judging whether the Chinese program has separators or not, wherein the separators are used for separating subprograms of the Chinese program;
if the Chinese subprogram exists, dividing the Chinese program into a plurality of Chinese subprograms according to the separators;
the method for performing word segmentation processing on the Chinese program to obtain the Chinese text and the numerical text comprises the following steps:
and performing word segmentation processing on the Chinese subprograms respectively to obtain the Chinese text and the numerical text of each Chinese subprogram.
Further, the word segmentation processing of the Chinese program to obtain the Chinese text and the numerical text comprises:
judging whether the numerical text is a null value;
if the numerical text is not a null value, establishing a matching identifier between the Chinese text and the numerical text;
and associating the Chinese text with the numerical text according to the matching identification.
Further, inputting the chinese text into a preset code conversion model, and querying a G code instruction character corresponding to the chinese text specifically includes:
extracting Chinese keywords in a Chinese text;
carrying out standardization processing on the extracted Chinese keywords;
and inputting the standardized Chinese keywords into a preset code conversion model, and inquiring G code instruction characters corresponding to the standardized Chinese keywords.
Further, inputting the standardized chinese keyword into a preset code conversion model, and querying the G code command character corresponding to the standardized chinese keyword specifically includes:
judging whether a code conversion template corresponding to the Chinese keyword after the standardized processing exists in a preset code conversion model or not;
if the keyword exists, inquiring G code instruction characters corresponding to the Chinese keywords after the standardized processing according to the code conversion template;
if the code conversion fails, generating prompt information of code conversion failure;
and outputting prompt information of code conversion failure to a display interface of the user terminal.
Further, acquiring a G code instruction character corresponding to the chinese text, and combining the G code instruction character corresponding to the chinese text with the numeric text to form a G code corresponding to the chinese program specifically includes:
acquiring G code instruction characters corresponding to Chinese keywords;
searching a numerical text corresponding to the G code instruction character according to the matching identifier;
combining the G code instruction character and the numerical text corresponding to the G code instruction character to form a G code corresponding to the Chinese subprogram;
and acquiring G codes corresponding to a plurality of Chinese subprograms, and combining the G codes corresponding to the Chinese subprograms to form the G codes corresponding to the Chinese programs.
Further, after the G codes corresponding to a plurality of chinese subprograms are obtained and combined to form G codes corresponding to a chinese program, the method for converting a chinese program into G codes further includes:
judging whether a G code corresponding to the Chinese program has a grammar error;
if so, generating prompt information that the code has grammar error;
and if the code does not exist, loading the G code corresponding to the Chinese program into the internal memory, and generating prompt information of code conversion success.
According to a second aspect, an embodiment of the present application provides an apparatus for converting a chinese program into a G code, including:
the acquisition module is used for acquiring a Chinese program input from a user terminal;
the word segmentation module is used for carrying out word segmentation processing on the Chinese program to obtain a Chinese text and a numerical text;
the query module is used for inputting the Chinese text into a preset code conversion model and querying a G code instruction character corresponding to the Chinese text;
and the combination module is used for acquiring the G code instruction characters corresponding to the Chinese text, and combining the G code instruction characters corresponding to the Chinese text with the numerical value text to form the G codes corresponding to the Chinese program.
According to a third aspect, in order to solve the above technical problem, an embodiment of the present application further provides a computer device, which adopts the following technical solutions:
a computer apparatus comprising a memory in which a computer program is stored and a processor which, when executing the computer program, carries out the steps of the method of converting a chinese program into G-code as claimed in any one of the above first aspects.
According to a fourth aspect, in order to solve the above technical problem, an embodiment of the present application further provides a computer-readable storage medium, which adopts the following technical solutions:
a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, carries out the steps of the method of converting a chinese program into G-code as claimed in any one of the above first aspects.
The beneficial effect of this application lies in:
the application discloses a method and a device for converting a Chinese program into a G code, which belong to the technical field of digital control, wherein the method comprises the following steps: acquiring a Chinese program input from a user terminal; performing word segmentation processing on the Chinese program to obtain a Chinese text and a numerical text; inputting the Chinese text into a preset code conversion model, and inquiring G code instruction characters corresponding to the Chinese text; and obtaining G code instruction characters corresponding to the Chinese text, and combining the G code instruction characters corresponding to the Chinese text with the numerical value text to form G codes corresponding to the Chinese program. The method comprises the steps of obtaining a Chinese text and a numerical text by performing word segmentation processing on a Chinese program, inputting the Chinese text into a preset code conversion model for searching to obtain a G code instruction character corresponding to the Chinese text, and forming a G code corresponding to the Chinese program by combining the G code instruction character and the numerical text, so that automatic conversion between the Chinese program and the G code is realized, the programming speed in the field of numerical control machines is improved, and meanwhile, the entry threshold of programming operation of the numerical control machines is reduced, and an operator without the G code base can operate or program the numerical control machines.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative efforts.
FIG. 1 is a flowchart illustrating an implementation of a method for converting a Chinese program into a G code according to an embodiment of the present application;
FIG. 2 is a flowchart illustrating an implementation of associating between a Chinese text and a numeric text in the method according to an embodiment of the present disclosure;
FIG. 3 is a flowchart illustrating an implementation of step S103 shown in FIG. 1;
FIG. 4 is a schematic structural diagram of an apparatus for converting a Chinese program into a G code according to an embodiment of the present application;
FIG. 5 is a schematic block diagram of one embodiment of a computer device according to the present application.
Detailed Description
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs; the terminology used in the description of the application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application; the terms "including" and "having," and any variations thereof, in the description and claims of this application and the description of the above figures are intended to cover non-exclusive inclusions. The terms "first," "second," and the like in the description and claims of this application or in the above-described drawings are used for distinguishing between different objects and not for describing a particular order.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings.
The application discloses a method and a device for converting a Chinese program into a G code, which belong to the technical field of digital control, wherein the method comprises the following steps: acquiring a Chinese program input from a user terminal; performing word segmentation processing on the Chinese program to obtain a Chinese text and a numerical text; inputting the Chinese text into a preset code conversion model, and inquiring G code instruction characters corresponding to the Chinese text; and obtaining G code instruction characters corresponding to the Chinese text, and combining the G code instruction characters corresponding to the Chinese text with the numerical value text to form G codes corresponding to the Chinese program. The method for converting the Chinese program into the G code, disclosed by the application, realizes automatic conversion between the Chinese program and the G code, improves the programming speed in the field of numerical control machines, and simultaneously reduces the threshold of entry of programming operation of the numerical control machines, so that operators without the G code base can operate or program the numerical control machines. Examples of the present application are further described below:
example one
The embodiment of the present application discloses a method for converting a chinese program into a G code, please refer to fig. 1, and fig. 1 shows an implementation flowchart of a method for converting a chinese program into a G code according to the embodiment of the present application, where the method for converting a chinese program into a G code includes:
s101, acquiring a Chinese program input from a user terminal;
specifically, after the user passes through the Chinese program input by the user terminal, the Chinese program input by the user is directly obtained from the user terminal.
S102, performing word segmentation processing on the Chinese program to obtain a Chinese text and a numerical text;
the Chinese program comprises a Chinese text and a numerical text part, word segmentation processing needs to be carried out on the Chinese program before the Chinese program is converted into a G code, the Chinese text obtained by the word segmentation processing is converted into G code instruction characters, and the numerical text does not need to be converted. The G code is a numerical control programming language which is formed in a form of combination of an instruction character and a numerical text, the instruction character of the G code generally refers to an alphabetical character part in the G code instruction, and the numerical text is to be taken as a numerical character part.
Specifically, the Chinese program in step S101 is subjected to word segmentation processing to obtain a Chinese text and a numerical text.
S103, inputting the Chinese text into a preset code conversion model, and inquiring G code instruction characters corresponding to the Chinese text;
the preset code conversion model refers to a code conversion model which is already set by a developer when a system is developed, the code conversion model comprises a plurality of code conversion templates, the code conversion templates are used for connecting Chinese texts and G code instruction characters corresponding to the Chinese texts, and the code conversion templates are also set by the developer according to the actual requirements of machining of the numerical control machine tool. In the code conversion model, a code conversion template is directly utilized to quickly query G code instruction characters corresponding to the Chinese text.
It should be noted that each specific chinese text in the transcoding model corresponds to a G-code instruction character, and each specific chinese text and its corresponding G-code instruction character together form a transcoding template. For example, in a specific embodiment of the present application, the characters of the G code command corresponding to the "positioning and positioning point" of the chinese program are in the form of "G00X numeric characters, Y numeric characters, and Z numeric characters", where "G00" indicates that the command is a positioning, "X numeric characters, Y numeric characters, and Z numeric characters" indicate specific coordinates of the positioning point, and the positioning point are separated by a space character to form a standard G code command, and the numeric character part can directly fill in the numeric text obtained in step S102 to finally form a complete G code command.
Specifically, the chinese text obtained in step S102 is input into a preset code conversion model, and a G code command character corresponding to the chinese text is queried using a code conversion template.
And S104, acquiring G code instruction characters corresponding to the Chinese text, and combining the G code instruction characters corresponding to the Chinese text with the numerical text to form G codes corresponding to the Chinese program.
Specifically, after the G code command character corresponding to the chinese text is queried by using the code conversion template in step S103, the G code command character corresponding to the chinese text is obtained, and the G code command character corresponding to the chinese text and the numeric text obtained in step S102 are combined to form the G code corresponding to the chinese program.
The application discloses a method for converting a Chinese program into a G code, which comprises the steps of carrying out word segmentation processing on the Chinese program to obtain a Chinese text and a numerical text, inputting the Chinese text into a preset code conversion model for searching to obtain a G code instruction character corresponding to the Chinese text, and combining the G code instruction character with the numerical text to form the G code corresponding to the Chinese program, so that automatic conversion between the Chinese program and the G code is realized, the programming speed in the field of numerical control machines is improved, the entry threshold of programming operation of the numerical control machines is reduced, and operators without the G code base can operate or program the numerical control machines.
In some optional implementation manners of this embodiment, before performing word segmentation processing on the chinese program to obtain the chinese text and the numerical text in step S102, the method for converting the chinese program into the G code further includes:
identifying the Chinese program, and judging whether the Chinese program has separators or not, wherein the separators are used for separating subprograms of the Chinese program;
if the Chinese subprogram exists, dividing the Chinese program into a plurality of Chinese subprograms according to the separators;
the method for performing word segmentation processing on the Chinese program to obtain the Chinese text and the numerical text comprises the following steps:
and performing word segmentation processing on the Chinese subprograms respectively to obtain the Chinese text and the numerical text of each Chinese subprogram.
The Chinese program input by the user can be formed by combining a plurality of Chinese subprograms, the Chinese subprograms are separated by separators, and the separators can be input according to requirements when the Chinese program is input by the user.
Specifically, a Chinese program input by a user is identified, whether the Chinese program has separators or not is judged, and if the Chinese program has separators, the Chinese program is divided into a plurality of Chinese subprograms according to the separators; if no separator exists in the Chinese program, the Chinese program is determined to only contain one Chinese subprogram.
In the embodiment, the Chinese program is identified, and whether the Chinese program has separators is judged, wherein the separators are used for separating subprograms of the Chinese program; if so, dividing the Chinese program into a plurality of Chinese subprograms according to the separators. The Chinese program is divided into a plurality of Chinese subprograms by the separators, and then the divided Chinese subprograms are processed respectively, so that the processing operation is simplified, and the efficiency of code conversion processing can be improved.
In some optional implementation manners of this embodiment, please refer to fig. 2, fig. 2 shows a specific implementation flowchart of associating between a chinese text and a numerical text in the method according to the embodiment of the present application, and after performing a word segmentation process on a chinese program to obtain the chinese text and the numerical text in step S102, the method further includes:
s121, judging whether the numerical text is a null value;
s122, if the numerical text is not a null value, establishing a matching identifier between the Chinese text and the numerical text;
and S123, associating the Chinese text with the numerical text according to the matching identifier.
The matching identification is used for associating the Chinese text with the numerical text, and the Chinese text and the numerical text which are associated by the matching identification are utilized. After the Chinese text and the numerical text are associated, the numerical text corresponding to the Chinese text can be searched by using the matching identifier, after the Chinese text is converted into the corresponding G code instruction character, the G code instruction character and the numerical text are also associated by using the matching identifier, and the numerical text corresponding to the G code instruction character is searched by using the matching identifier.
Specifically, in step S102, after the word segmentation processing is performed on the chinese program to obtain the chinese text and the numeric text, it is determined whether the obtained numeric text is a null value, if the obtained numeric text is not a null value, a matching identifier is established between the chinese text and the numeric text, and the chinese text and the numeric text are associated according to the matching identifier. If the obtained numerical text is a null value, a matching identifier does not need to be established between the Chinese text and the numerical text.
In a specific embodiment of the present application, the Chinese program "positioning and positioning points (100,10, 10)" is "separators of Chinese text", and the Chinese program "positioning and positioning points (100,10, 10)" are divided according to the separators to obtain the first Chinese subroutine "positioning" and the second Chinese subroutine "positioning points (100,10, 10)". Performing word segmentation on the first Chinese subprogram to obtain a first Chinese text 'positioning' and a first numerical text, performing word segmentation on the second Chinese subprogram to obtain a second Chinese text 'positioning point' and a second numerical text '(100, 10, 10)', and judging whether the numerical text is a null value, wherein the first numerical text is a null value, so that a matching identifier does not need to be established between the first Chinese text and the first numerical text; the second numeric text is not null, so a match identifier is established between the second Chinese text "anchor point" and the numeric text "(100, 10, 10)", and the numeric text "(100, 10, 10)" is associated with the second Chinese text "anchor point" by the match identifier.
In the embodiment, whether the obtained numerical text is a null value is judged to determine whether a matching identifier is established between the Chinese text and the numerical text, so that the load of a processor is effectively reduced, and the efficiency of code conversion is improved. By establishing the matching identification between the Chinese text and the numerical text, the Chinese text and the numerical text are associated, so that data loss does not occur in the process of converting the Chinese text into the G code instruction character, the numerical text corresponding to the G code instruction character is searched after the conversion of the Chinese text into the G code instruction character is completed, and the combination accuracy and the combination efficiency of the G code instruction character and the numerical text corresponding to the G code instruction character are improved.
In some optional implementation manners of this embodiment, the step S103 inputs the chinese text into a preset code conversion model, and querying the G code instruction character corresponding to the chinese text specifically includes:
extracting Chinese keywords in a Chinese text;
the preset code conversion model comprises a Chinese keyword extraction unit, and Chinese keywords in the Chinese text are extracted by directly inputting the Chinese text into the Chinese keyword extraction unit.
Specifically, after the Chinese text is input into a preset code conversion model, the Chinese keyword is extracted from the Chinese text by the Chinese keyword extraction unit.
In a specific embodiment of the present application, the chinese keyword extraction unit may be preset, and the chinese keyword extraction unit includes an extraction template, and extracts a chinese keyword from a chinese text according to the preset extraction template. For example, a Chinese keyword extraction template "forward + turn" is used to extract Chinese keywords, the keywords "forward" and "turn" in a Chinese text are both extracted, and other keywords are ignored, if the extraction template is used to extract Chinese keywords in a Chinese program "forward turn" and a Chinese program "forward turn", the final results are that the Chinese keywords are both "forward turn".
Carrying out standardization processing on the extracted Chinese keywords;
the preset code conversion model comprises a standardization processing unit, and the extracted Chinese keywords are directly input into the standardization processing unit to obtain the standardized Chinese keywords.
Specifically, the extracted Chinese keywords are input to a normalization processing unit for normalization processing.
And inputting the standardized Chinese keywords into a preset code conversion model, and inquiring G code instruction characters corresponding to the standardized Chinese keywords.
In the above embodiment, the Chinese keywords in the Chinese text are extracted; carrying out standardization processing on the extracted Chinese keywords; the standardized Chinese keywords are input into a preset code conversion model, G code instruction characters corresponding to the standardized Chinese keywords are inquired, the keywords in the Chinese program can be extracted according to the Chinese program input by a user, and the G code instruction characters are searched according to the keywords, so that the problem that program conversion fails due to different habits of the user in writing the Chinese program is avoided.
In some optional implementation manners of this embodiment, referring to fig. 3, fig. 3 shows a flowchart of an implementation of step S103 in fig. 1, where inputting the normalized chinese keyword into a preset code conversion model, and querying a G code instruction character corresponding to the normalized chinese keyword specifically includes:
s131, judging whether a code conversion template corresponding to the Chinese keyword after the standardized processing exists in a preset code conversion model;
the code conversion model comprises a plurality of preset code conversion templates, the code conversion templates are used for realizing the one-to-one correspondence of the Chinese keywords and the G code instruction characters corresponding to the Chinese keywords, the code conversion templates are developed and set by developers according to the actual requirements of numerical control machine tool machining, and the G code instruction characters corresponding to the Chinese keywords can be quickly inquired by using the code conversion templates in the code conversion model. It should be noted that the code conversion template includes target keywords and G code instruction characters corresponding to the target keywords, and each target keyword corresponds to one G code instruction character.
Specifically, after the standardized chinese keyword is input to the preset code conversion model, the standardized chinese keyword is compared with the target keywords of all the code conversion templates one by one, and according to the features of the standardized chinese keyword and the features of the target keywords of all the code conversion templates, it is determined whether the code conversion template corresponding to the standardized chinese keyword exists in the preset code conversion model.
S132, if the Chinese keyword exists, inquiring a G code instruction character corresponding to the Chinese keyword after the standardized processing according to the code conversion template;
s133, if the code conversion fails, generating prompt information of code conversion failure;
specifically, the standardized Chinese keywords are compared with the target keywords of all the code conversion templates one by one, if the characteristics of the target keywords of the code conversion templates are consistent with the characteristics of the standardized Chinese keywords, the code conversion templates corresponding to the standardized Chinese keywords in the preset code conversion models are judged to exist, and the G code instruction characters corresponding to the standardized Chinese keywords are inquired according to the code conversion templates; if the characteristics of the target keyword of the code conversion template consistent with the characteristics of the Chinese keyword after the standardization processing do not exist, judging that the code conversion template corresponding to the Chinese keyword after the standardization processing does not exist in the preset code conversion model, and generating prompt information of code conversion failure.
And S134, outputting prompt information of code conversion failure to a display interface of the user terminal.
Specifically, after the prompt information of the code conversion failure is generated in step S133, the prompt information of the code conversion failure is output to the display interface of the user terminal for the user to view.
In the embodiment, whether a code conversion template corresponding to the standardized Chinese keyword exists in a preset code conversion model is judged; if the keyword exists, inquiring G code instruction characters corresponding to the Chinese keywords after the standardized processing according to the code conversion template; if the code conversion fails, generating prompt information of code conversion failure; and outputting prompt information of code conversion failure to a display interface of the user terminal. Through the steps, the accuracy rate of converting the Chinese text into the G code instruction character is improved.
In some optional implementation manners of this embodiment, the step S104 obtaining a G code instruction character corresponding to a chinese text, and combining the G code instruction character corresponding to the chinese text with a numeric text to form a G code corresponding to a chinese program specifically includes:
acquiring G code instruction characters corresponding to Chinese keywords;
specifically, after the G code instruction character corresponding to the standardized chinese keyword is queried, the G code instruction character corresponding to the standardized chinese keyword is obtained.
Searching a numerical text corresponding to the G code instruction character according to the matching identifier;
specifically, according to the established matching identifier, a numerical text corresponding to the G code instruction character corresponding to the standardized chinese keyword is searched. It should be noted that, after the matching identifier is used to associate the chinese text with the numeric text, the chinese keyword extracted from the chinese text also carries the matching identifier, the chinese keyword with the matching identifier is converted into a G code instruction character, the corresponding G code instruction character is also associated with the numeric text by the matching identifier, and the numeric text corresponding to the G code instruction character can be searched by using the matching identifier.
Combining the G code instruction character and the numerical text corresponding to the G code instruction character to form a G code corresponding to the Chinese subprogram;
specifically, the G code instruction character corresponding to the standardized chinese keyword is combined with the found numeric text to form a G code corresponding to the chinese subprogram.
And acquiring G codes corresponding to a plurality of Chinese subprograms, and combining the G codes corresponding to the Chinese subprograms to form the G codes corresponding to the Chinese programs.
In the embodiment, the G code instruction character corresponding to the Chinese keyword is obtained, and the numerical text corresponding to the G code instruction character is searched according to the matching identifier; combining the G code instruction character and the numerical text corresponding to the G code instruction character to form a G code corresponding to the Chinese subprogram; and acquiring G codes corresponding to a plurality of Chinese subprograms, and combining the G codes corresponding to the Chinese subprograms to form the G codes corresponding to the Chinese programs. The G code instruction characters and the numerical value texts corresponding to the G code instruction characters are combined through the scheme, so that G codes corresponding to the Chinese program are formed.
In some optional implementation manners of this embodiment, after obtaining G codes corresponding to a plurality of chinese subroutines and combining the G codes corresponding to the plurality of chinese subroutines to form G codes corresponding to a chinese program in step S104, the method for converting a chinese program into G codes further includes:
judging whether a G code corresponding to the Chinese program has a grammar error;
the preset code conversion model comprises a G code grammar checking unit, the G code grammar checking unit stores standard coding rules of G codes, and the grammar of the input G codes can be detected by using the standard coding rules of the G codes.
Specifically, the G code corresponding to the chinese program is directly input to the G code syntax checking unit, and whether a syntax error exists in the encoding of the G code corresponding to the input chinese program is detected.
If so, generating prompt information that the code has grammar error;
specifically, if the G code syntax checking unit detects that there is a syntax error in the coding of the G code corresponding to the input chinese program, it generates a prompt message that there is a syntax error in the code, outputs the prompt message of the syntax error to the display interface of the user terminal, and prompts the user that there is an error in the input chinese program to ask the user to re-input.
And if the code does not exist, loading the G code corresponding to the Chinese program into the internal memory, and generating prompt information of code conversion success.
Specifically, if the G code syntax checking unit detects that there is no syntax error in the encoding of the G code corresponding to the input chinese program, the G code corresponding to the chinese program is loaded into the internal memory, and then prompt information indicating that the code conversion is successful is generated.
And outputting prompt information of successful code conversion to a display interface of the user terminal.
Specifically, after the prompt message of successful code conversion is generated, the prompt message of successful code conversion is sent to the display interface of the user terminal.
In the above embodiment, whether a syntax error exists in a code of a G code corresponding to an input chinese program is detected to determine whether the user has an input error when inputting the chinese program, and if the input error occurs, the user is prompted to re-input, the G code without the syntax error is loaded into the internal memory, which is convenient for subsequent call of the system, and after the G code is loaded into the internal memory, prompt information of successful code conversion is generated, and the prompt information of successful code conversion is output to a display interface of the user terminal for the user to view.
In some optional implementation manners of this embodiment, before obtaining G codes corresponding to a plurality of chinese subprograms and combining the G codes corresponding to the plurality of chinese subprograms to form G codes corresponding to a chinese program, the method for converting a chinese program into G codes further includes:
judging whether a G code corresponding to the Chinese subprogram has a grammar error;
specifically, before judging whether the G code corresponding to the chinese program has a syntax error, the G code corresponding to the chinese subprogram is input to a G code syntax checking unit in a preset code conversion model to perform syntax detection, and whether the G code corresponding to the chinese subprogram has a syntax error is detected according to a standard coding rule of the G code in the G code syntax checking unit.
If so, generating prompt information of the grammar error of the subprogram;
specifically, before the G code combination corresponding to the Chinese subprogram is performed, grammar detection is performed on G codes corresponding to the Chinese subprogram to be combined, the G codes corresponding to the Chinese subprogram to be combined are input into a G code grammar checking unit one by one to perform grammar detection, if a grammar error occurs in the G codes corresponding to the Chinese subprogram, prompt information of the grammar error of the subprogram is generated, the prompt information of the grammar error of the subprogram is output to a display interface of a user terminal, and a user is prompted to input that the Chinese program input by the user has an error and is requested to input again.
And if the Chinese subprograms do not exist, the G codes corresponding to the Chinese subprograms are obtained, and the G codes corresponding to the Chinese subprograms are combined.
In the embodiment, whether the grammar error exists after the Chinese subprogram is converted into the corresponding G code is detected by judging whether the grammar error exists in the G code corresponding to the Chinese subprogram, if the grammar error exists after the Chinese subprogram is converted into the corresponding G code, the prompt information of the grammar error of the subprogram is directly generated, a user is prompted, the judgment of the G code corresponding to the combined Chinese program is not required, and the code conversion efficiency is improved.
In other specific embodiments of the present application, the chinese program is shown in table 1 below:
TABLE 1 Chinese program
Serial number Chinese program
1 Main shaft rotating clockwise at 800 deg.C
2 Cutter, cutter number 01
3 Location and positioning point (0,10,10)
4 Straight cut, starting point (40, 10,10), speed 100
5 Straight cut, intermediate points (60, 10,10), speed 100
6 Straight cut, end point (80, 10,10), speed 100
7 Location and positioning point (100,10,10)
8 Spindle stop
9 End up
The Chinese program in the table 1 is separated according to the separators in the Chinese program to obtain the Chinese program separation result, wherein the Chinese program separation result includes a first Chinese subprogram, a second Chinese subprogram and a third Chinese subprogram, and the Chinese program separation result is shown in the following table 2:
TABLE 2 Chinese program separation results
Serial number First Chinese subprogram Second Chinese subprogram Third Chinese subprogram
1 Main shaft positive rotation Rotating speed of 800
2 Cutting knife Knife number 01
3 Positioning Positioning point (0,10,10)
4 Straight line cutting Starting point (40, 10,10) Speed 100
5 Straight line cutting Intermediate points (60, 10,10) Speed 100
6 Straight line cutting End point (80, 10,10) Speed 100
7 Positioning Positioning point (100,10,10)
8 Spindle stop
9 End up
The Chinese subprogram in the table 2 is respectively subjected to word segmentation processing to obtain Chinese text results, wherein the Chinese text results comprise a first Chinese text, a second Chinese text and a third Chinese text, and the Chinese text results are shown in the following table 3:
TABLE 3 Chinese text results
Figure BDA0002322741760000141
Figure BDA0002322741760000151
Inputting the Chinese texts obtained in the table 3 into a preset code conversion model, converting the Chinese texts into G code instruction characters, combining the G code instruction characters and numerical texts corresponding to the G code instruction characters to obtain G codes, and completing the conversion of Chinese programs into the G codes, wherein the code conversion result is shown in the following table 4:
TABLE 4G transcoding results
Serial number G code
1 M03 S800
2 T01 01
3 G00 X0,Y10,Z10
4 G01 X40,Y10,Z10 F100
5 G01 X60,Y10,Z10 F100
6 G01 X80,Y10,Z10 F100
7 G00 X100,Y10,Z10
8 M05
9 M30
In the above example, the conversion process of the specific method for converting the chinese program into the G code is as follows:
for example, a Chinese program "main shaft forward rotation, rotation speed 800" with a serial number 1 is divided into a first Chinese subprogram "main shaft forward rotation" and a second Chinese subprogram "rotation speed 800" by a separator, and word segmentation processing is performed on the Chinese subprograms respectively to obtain a Chinese text and a numerical text, wherein the first Chinese text is "main shaft forward rotation" and the second Chinese text "rotation speed", the first numerical text is a null value, the second numerical text is "800", and the second Chinese text is "rotation speed" and the second numerical text "800" are linked by establishing a matching identifier.
Inputting the first Chinese text 'main shaft forward rotation' into a preset code conversion model, converting the 'main shaft forward rotation' into a G code command character 'M03', and obtaining a G code 'M03' corresponding to the 'main shaft forward rotation' of the first Chinese subprogram. Inputting the second Chinese text 'rotating speed' into a preset code conversion model, converting the 'rotating speed' into a G code instruction character 'S', searching a second numerical value text '800' corresponding to the G code instruction character 'S' according to the matching identifier, and combining the G code instruction character 'S' with the corresponding second numerical value text '800' to obtain the G code 'S800' corresponding to the second Chinese subprogram 'rotating speed 800'.
The G code corresponding to the first Chinese subprogram "main shaft positive rotation" is M03 ", and the G code corresponding to the second Chinese subprogram" rotation speed 800 "is S800", so as to form the G code "M03S 800" corresponding to the Chinese program "main shaft positive rotation, rotation speed 800" with serial number 1.
The application discloses a method for converting a Chinese program into a G code, which belongs to the technical field of digital control and comprises the following steps: acquiring a Chinese program input from a user terminal; performing word segmentation processing on the Chinese program to obtain a Chinese text and a numerical text; inputting the Chinese text into a preset code conversion model, and inquiring G code instruction characters corresponding to the Chinese text; and obtaining G code instruction characters corresponding to the Chinese text, and combining the G code instruction characters corresponding to the Chinese text with the numerical value text to form G codes corresponding to the Chinese program. The method comprises the steps of obtaining a Chinese text and a numerical text by performing word segmentation processing on a Chinese program, inputting the Chinese text into a preset code conversion model for searching to obtain a G code instruction character corresponding to the Chinese text, and forming a G code corresponding to the Chinese program by combining the G code instruction character and the numerical text, so that automatic conversion between the Chinese program and the G code is realized, the programming speed in the field of numerical control machines is improved, and meanwhile, the entry threshold of programming operation of the numerical control machines is reduced, and an operator without the G code base can operate or program the numerical control machines.
Example two
As an implementation of the method shown in fig. 1, an embodiment of the present application further discloses a device for converting a chinese program into a G code, please refer to fig. 4, and fig. 4 shows a schematic structural diagram of a device for converting a chinese program into a G code according to an embodiment of the present application, where the embodiment of the device corresponds to the embodiment of the method shown in fig. 1, and the device for converting a chinese program into a G code includes an obtaining module 401, a participle module 402, a query module 403, and a combination module 404, where:
an obtaining module 401, configured to obtain a chinese program input from a user terminal;
a word segmentation module 402, configured to perform word segmentation processing on the chinese program to obtain a chinese text and a numeric text;
a query module 403, configured to input the chinese text into a preset code conversion model, and query a G code instruction character corresponding to the chinese text;
and the combination module 404 is configured to obtain G code instruction characters corresponding to the chinese text, and combine the G code instruction characters corresponding to the chinese text with the numeric text to form G codes corresponding to the chinese program.
Further, the apparatus for converting the chinese program into the G code further includes:
the first judgment module is used for identifying the Chinese program and judging whether the Chinese program has separators or not, wherein the separators are used for separating subprograms of the Chinese program;
the first judgment result module is used for dividing the Chinese program into a plurality of Chinese subprograms according to the separators when the separators exist.
Further, the apparatus for converting the chinese program into the G code further includes:
the second judgment module is used for judging whether the numerical text is a null value;
the second judgment result module is used for establishing a matching identifier between the Chinese text and the numerical text if the numerical text is not a null value;
and the association module is used for associating the Chinese text with the numerical text according to the matching identifier.
Further, the query module 403 specifically includes:
the extraction unit is used for extracting Chinese keywords in the Chinese text;
the standardization processing unit is used for carrying out standardization processing on the extracted Chinese keywords;
and the query unit is used for inputting the standardized Chinese keywords into a preset code conversion model and querying the G code instruction characters corresponding to the standardized Chinese keywords.
Further, the query unit specifically includes:
the first judging subunit is used for judging whether a code conversion template corresponding to the Chinese keyword after the standardized processing exists in a preset code conversion model or not;
the query subunit is used for querying the G code instruction character corresponding to the Chinese keyword after the standardized processing according to the code conversion template when the corresponding code conversion template exists;
a conversion failure subunit, configured to generate a prompt message indicating that the code conversion fails when no corresponding code conversion template exists;
and the failure information output subunit is used for outputting prompt information of code conversion failure to a display interface of the user terminal.
Further, the combining module 404 specifically includes:
the acquisition unit is used for acquiring G code instruction characters corresponding to the Chinese keywords;
the searching unit is used for searching a numerical text corresponding to the G code instruction character according to the matching identifier;
the first combination unit is used for combining the G code instruction character and the numerical text corresponding to the G code instruction character to form a G code corresponding to the Chinese subprogram;
and the second combination unit is used for acquiring the G codes corresponding to the Chinese subprograms and combining the G codes corresponding to the Chinese subprograms to form the G codes corresponding to the Chinese program.
Further, the apparatus for converting the chinese program into the G code further includes:
the grammar judging module is used for judging whether a G code corresponding to the Chinese program has grammar errors;
the first grammar judgment result module is used for generating prompt information that the code has grammar errors when the grammar errors exist;
and the second grammar judgment result module is used for loading the G code corresponding to the Chinese program into the internal memory and generating prompt information of code conversion success when no grammar error exists.
The application discloses device with chinese program transformation G code belongs to digital control technical field, the device includes: an obtaining module 401, configured to obtain a chinese program input from a user terminal; a word segmentation module 402, configured to perform word segmentation processing on the chinese program to obtain a chinese text and a numeric text; a query module 403, configured to input the chinese text into a preset code conversion model, and query a G code instruction character corresponding to the chinese text; and the combination module 404 is configured to obtain G code instruction characters corresponding to the chinese text, and combine the G code instruction characters corresponding to the chinese text with the numeric text to form G codes corresponding to the chinese program. The method comprises the steps of obtaining a Chinese text and a numerical text by performing word segmentation processing on a Chinese program, inputting the Chinese text into a preset code conversion model for searching to obtain a G code instruction character corresponding to the Chinese text, and forming a G code corresponding to the Chinese program by combining the G code instruction character and the numerical text, so that automatic conversion between the Chinese program and the G code is realized, the programming speed in the field of numerical control machines is improved, and meanwhile, the entry threshold of programming operation of the numerical control machines is reduced, and an operator without the G code base can operate or program the numerical control machines.
EXAMPLE III
In order to solve the technical problem, an embodiment of the present application further provides a computer device. Referring to fig. 5, fig. 5 is a block diagram of a basic structure of a computer device according to the present embodiment.
The computer device 6 comprises a memory 61, a processor 62, a network interface 63 communicatively connected to each other via a system bus. It is noted that only a computer device 6 having components 61-63 is shown, but it is understood that not all of the shown components are required to be implemented, and that more or fewer components may be implemented instead. As will be understood by those skilled in the art, the computer device is a device capable of automatically performing numerical calculation and/or information processing according to a preset or stored instruction, and the hardware includes, but is not limited to, a microprocessor, an Application Specific Integrated Circuit (ASIC), a Programmable Gate Array (FPGA), a Digital Signal Processor (DSP), an embedded device, and the like.
The computer device can be a desktop computer, a notebook, a palm computer, a cloud server and other computing devices. The computer equipment can carry out man-machine interaction with a user through a keyboard, a mouse, a remote controller, a touch panel or voice control equipment and the like.
The memory 61 includes at least one type of readable storage medium including a flash memory, a hard disk, a multimedia card, a card type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Read Only Memory (ROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a Programmable Read Only Memory (PROM), a magnetic memory, a magnetic disk, an optical disk, etc. In some embodiments, the memory 61 may be an internal storage unit of the computer device 6, such as a hard disk or a memory of the computer device 6. In other embodiments, the memory 61 may also be an external storage device of the computer device 6, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the computer device 6. Of course, the memory 61 may also comprise both an internal storage unit of the computer device 6 and an external storage device thereof. In this embodiment, the memory 61 is generally used for storing an operating system installed in the computer device 6 and various types of application software, such as a program code of a method for converting a chinese program into a G code. Further, the memory 61 may also be used to temporarily store various types of data that have been output or are to be output.
The processor 62 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor, or other data Processing chip in some embodiments. The processor 62 is typically used to control the overall operation of the computer device 6. In this embodiment, the processor 62 is configured to run the program code stored in the memory 61 or process data, for example, the program code of the method for converting a chinese program into a G code.
The network interface 63 may comprise a wireless network interface or a wired network interface, and the network interface 63 is typically used for establishing a communication connection between the computer device 6 and other electronic devices.
The present application provides another embodiment, which provides a computer readable storage medium storing a program of a method of converting a chinese program into a G code, the program of the method of converting a chinese program into a G code being executable by at least one processor to cause the at least one processor to perform the steps of a method of converting a chinese program into a G code as described above.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present application.
It is to be understood that the above-described embodiments are merely illustrative of some, but not restrictive, of the broad invention, and that the appended drawings illustrate preferred embodiments of the invention and do not limit the scope of the invention. This application is capable of embodiments in many different forms and is provided for the purpose of enabling a thorough understanding of the disclosure of the application. Although the present application has been described in detail with reference to the foregoing embodiments, it will be apparent to one skilled in the art that the present application may be practiced without modification or with equivalents of some of the features described in the foregoing embodiments. All equivalent structures made by using the contents of the specification and the drawings of the present application are directly or indirectly applied to other related technical fields and are within the protection scope of the present application.

Claims (10)

1. A method for converting a Chinese program into G code, comprising:
acquiring a Chinese program input from a user terminal;
performing word segmentation processing on the Chinese program to obtain a Chinese text and a numerical text;
inputting the Chinese text into a preset code conversion model, and inquiring G code instruction characters corresponding to the Chinese text;
and obtaining G code instruction characters corresponding to the Chinese text, and combining the G code instruction characters corresponding to the Chinese text with the numerical value text to form G codes corresponding to the Chinese program.
2. The method of claim 1, wherein before the performing the word segmentation process on the chinese program to obtain the chinese text and the numeric text, further comprising:
identifying the Chinese program, and judging whether the Chinese program has a separator, wherein the separator is used for separating subprograms of the Chinese program;
if the Chinese program is existed, dividing the Chinese program into a plurality of Chinese subprograms according to the separators;
the step of performing word segmentation processing on the Chinese program to obtain a Chinese text and a numerical text is as follows:
and performing word segmentation processing on the Chinese subprograms respectively to obtain the Chinese text and the numerical text of each Chinese subprogram.
3. The method of converting a chinese program into a G code as claimed in claim 2, wherein said performing a word segmentation process on the chinese program to obtain a chinese text and a numeric text further comprises:
judging whether the numerical text is a null value;
if the numerical text is not a null value, establishing a matching identifier between the Chinese text and the numerical text;
and associating the Chinese text with the numerical text according to the matching identification.
4. The method as claimed in claim 3, wherein the inputting the chinese text into a preset code conversion model, and the querying the G code command character corresponding to the chinese text specifically comprises:
extracting Chinese keywords in the Chinese text;
standardizing the extracted Chinese keywords;
inputting the standardized Chinese keywords into a preset code conversion model, and inquiring G code instruction characters corresponding to the standardized Chinese keywords.
5. The method as claimed in claim 4, wherein the step of inputting the normalized chinese keyword into a pre-defined code conversion model, and the step of querying the G-code command character corresponding to the normalized chinese keyword specifically comprises:
judging whether a code conversion template corresponding to the Chinese keyword after standardized processing exists in the preset code conversion model or not;
if the keyword exists, inquiring a G code instruction character corresponding to the Chinese keyword after the standardized processing according to the code conversion template;
if the code conversion fails, generating prompt information of code conversion failure;
and outputting the prompt information of the code conversion failure to a display interface of the user terminal.
6. The method of claim 4, wherein the obtaining of the G code instruction character corresponding to the chinese text, and combining the G code instruction character corresponding to the chinese text with the numeric text to form the G code corresponding to the chinese program specifically comprise:
acquiring G code instruction characters corresponding to the Chinese keywords;
searching a numerical text corresponding to the G code instruction character according to the matching identifier;
combining the G code instruction character and the numerical text corresponding to the G code instruction character to form a G code corresponding to the Chinese subprogram;
and acquiring G codes corresponding to a plurality of Chinese subprograms, and combining the G codes corresponding to the Chinese subprograms to form the G codes corresponding to the Chinese subprograms.
7. The method of claim 6, wherein after the obtaining G codes corresponding to a plurality of the chinese subroutines and combining the G codes corresponding to a plurality of the chinese subroutines to form G codes corresponding to the chinese program, the method of converting the chinese program into G codes further comprises:
judging whether a G code corresponding to the Chinese program has a grammar error;
if so, generating prompt information that the code has grammar error;
and if the code does not exist, loading the G code corresponding to the Chinese program into an internal memory, and generating prompt information of code conversion success.
8. An apparatus for converting a chinese program into a G code, comprising:
the acquisition module is used for acquiring a Chinese program input from a user terminal;
the word segmentation module is used for carrying out word segmentation processing on the Chinese program to obtain a Chinese text and a numerical text;
the query module is used for inputting the Chinese text into a preset code conversion model and querying a G code instruction character corresponding to the Chinese text;
and the combination module is used for acquiring the G code instruction character corresponding to the Chinese text, and combining the G code instruction character corresponding to the Chinese text with the numerical text to form the G code corresponding to the Chinese program.
9. A computer device comprising a memory and a processor, characterized in that the memory has stored therein a computer program which, when executed by the processor, carries out the steps of the method of converting a chinese program into a G-code according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, which computer program, when being executed by a processor, carries out the steps of the method of converting a chinese program into G-code according to any one of claims 1 to 7.
CN201911304606.3A 2019-12-17 2019-12-17 Method and device for converting Chinese program into G code Active CN112987653B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911304606.3A CN112987653B (en) 2019-12-17 2019-12-17 Method and device for converting Chinese program into G code

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911304606.3A CN112987653B (en) 2019-12-17 2019-12-17 Method and device for converting Chinese program into G code

Publications (2)

Publication Number Publication Date
CN112987653A true CN112987653A (en) 2021-06-18
CN112987653B CN112987653B (en) 2022-04-15

Family

ID=76343619

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911304606.3A Active CN112987653B (en) 2019-12-17 2019-12-17 Method and device for converting Chinese program into G code

Country Status (1)

Country Link
CN (1) CN112987653B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114880059A (en) * 2022-05-19 2022-08-09 中国银行股份有限公司 Software environment installation method and device, storage medium and electronic equipment

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101206467A (en) * 2006-12-22 2008-06-25 南京理工大学 Universal numerical control code analysis method
CN102081378A (en) * 2010-11-01 2011-06-01 北京数码大方科技有限公司 Method and device for converting universal code based on macroprogram
US20130077855A1 (en) * 2011-05-16 2013-03-28 ISYS Search Software Pty Ltd. Systems and methods for processing documents of unknown or unspecified format
CN106647635A (en) * 2016-12-22 2017-05-10 广州数控设备有限公司 Numerical control system milling machine dialog mode graph programming system and method based on Minigui
CN107943481A (en) * 2017-05-23 2018-04-20 清华大学 C programmer code specification building method based on multi-model
US20190005345A1 (en) * 2017-07-03 2019-01-03 Fanuc Corporation Nc-program conversion device
CN109144493A (en) * 2018-07-18 2019-01-04 平安科技(深圳)有限公司 Generation method, electronic device and the readable storage medium storing program for executing of business rule
CN109408049A (en) * 2018-10-13 2019-03-01 彭熹 A kind of method and system from natural language automatically generating program code
CN109614111A (en) * 2018-12-28 2019-04-12 北京百度网讯科技有限公司 Method and apparatus for generating code
CN110489102A (en) * 2019-07-29 2019-11-22 东北大学 A method of Python code is automatically generated from natural language

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101206467A (en) * 2006-12-22 2008-06-25 南京理工大学 Universal numerical control code analysis method
CN102081378A (en) * 2010-11-01 2011-06-01 北京数码大方科技有限公司 Method and device for converting universal code based on macroprogram
US20130077855A1 (en) * 2011-05-16 2013-03-28 ISYS Search Software Pty Ltd. Systems and methods for processing documents of unknown or unspecified format
CN106647635A (en) * 2016-12-22 2017-05-10 广州数控设备有限公司 Numerical control system milling machine dialog mode graph programming system and method based on Minigui
CN107943481A (en) * 2017-05-23 2018-04-20 清华大学 C programmer code specification building method based on multi-model
US20190005345A1 (en) * 2017-07-03 2019-01-03 Fanuc Corporation Nc-program conversion device
CN109144493A (en) * 2018-07-18 2019-01-04 平安科技(深圳)有限公司 Generation method, electronic device and the readable storage medium storing program for executing of business rule
CN109408049A (en) * 2018-10-13 2019-03-01 彭熹 A kind of method and system from natural language automatically generating program code
CN109614111A (en) * 2018-12-28 2019-04-12 北京百度网讯科技有限公司 Method and apparatus for generating code
CN110489102A (en) * 2019-07-29 2019-11-22 东北大学 A method of Python code is automatically generated from natural language

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
汪畅等: "《基于动词属性的模板化自动代码生成》", 《计算机技术与发展》 *
陈云等: "《基于受限自然语言和模块组合的代码自动生成》", 《计算机工程》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114880059A (en) * 2022-05-19 2022-08-09 中国银行股份有限公司 Software environment installation method and device, storage medium and electronic equipment

Also Published As

Publication number Publication date
CN112987653B (en) 2022-04-15

Similar Documents

Publication Publication Date Title
CN108847241B (en) Method for recognizing conference voice as text, electronic device and storage medium
WO2021174717A1 (en) Text intent recognition method and apparatus, computer device and storage medium
CN110060674B (en) Table management method, device, terminal and storage medium
CN107330471A (en) The problem of feedback content localization method and device, computer equipment, storage medium
WO2020155740A1 (en) Information query method and apparatus, and computer device and storage medium
CN107832035B (en) Voice input method of intelligent terminal
CN111159982B (en) Document editing method, device, electronic equipment and computer readable storage medium
CN109947924B (en) Dialogue system training data construction method and device, electronic equipment and storage medium
CN112579466B (en) Method and device for generating test cases and computer readable storage medium
CN110647318B (en) Method, device, equipment and medium for creating instance of stateful application
CN110765342A (en) Information query method and device, storage medium and intelligent terminal
CN112445775A (en) Fault analysis method, device, equipment and storage medium of photoetching machine
CN111045916B (en) Automated software defect verification
CN112328489A (en) Test case generation method and device, terminal equipment and storage medium
CN111079408A (en) Language identification method, device, equipment and storage medium
CN112987653B (en) Method and device for converting Chinese program into G code
CN112988873A (en) Data processing method and device
CN112149419A (en) Method, device and system for normalized automatic naming of fields
CN110211576B (en) Voice recognition method, device and system
CN111367890A (en) Data migration method and device, computer equipment and readable storage medium
CN111708867A (en) Question and answer query method, device and equipment applied to electric power operation and inspection
CN111292721A (en) Code compiling method and device and computer equipment
CN111400435A (en) Mail alarm convergence method, device, computer equipment and storage medium
CN117785723A (en) Dynamic interface parameter association method and device and electronic equipment
CN110442843B (en) Character replacement method, system, computer device and computer readable storage medium

Legal Events

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