CN108345453A - Code generating method, code generator and readable storage medium storing program for executing - Google Patents
Code generating method, code generator and readable storage medium storing program for executing Download PDFInfo
- Publication number
- CN108345453A CN108345453A CN201710656395.4A CN201710656395A CN108345453A CN 108345453 A CN108345453 A CN 108345453A CN 201710656395 A CN201710656395 A CN 201710656395A CN 108345453 A CN108345453 A CN 108345453A
- Authority
- CN
- China
- Prior art keywords
- code
- template
- repetition
- preset value
- user
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3684—Test management for test design, e.g. generating new test cases
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3688—Test management for test execution, e.g. scheduling of test suites
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3692—Test management for test results analysis
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
- G06F8/36—Software reuse
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Stored Programmes (AREA)
Abstract
The invention discloses a kind of code generating method, the method includes:The code that number of repetition in code development system is greater than or equal to preset value is captured, and the code by the number of repetition more than or equal to preset value is entered into template system, forms Code Template;Code Template path input by user is received, according to the Code Template path, extracts corresponding Code Template, receives the code that number of repetition in development system input by user is less than preset value;The number of repetition is less than in the Code copying to the Code Template extracted of preset value and generates code.The invention also discloses a kind of code generator and computer readable storage mediums.The present invention can save the input of written in code manpower and promote the efficiency of code building.
Description
Technical field
It can the present invention relates to a kind of code building field more particularly to code generating method, code generator and computer
Read storage medium.
Background technology
Currently, programmer during developing software project, has the program code much repeated needs to write, the prior art
In, it carries out repeating to write generally by programmer, or generation code is carried out by existing code generator.
It carries out repeating to write by programmer, the software project development period can be caused longer, aggravate the volume of programmer
Journey is born, and carries out code building by existing code generator, be can be only generated simple code, is needed to generate relative complex
Code when, the operation for generating code is more complicated, and malfunction is unfavorable for user's operation.
Invention content
It is a primary object of the present invention to propose a kind of code generating method, code generator and computer-readable storage medium
Matter, it is intended to solve the technical issues of development cycle is longer, and the operation for generating code is more complicated, malfunction.
To achieve the above object, the present invention provides a kind of code generating method, the method includes:
It captures number of repetition in code development system and is greater than or equal to the code of preset value, and the number of repetition is more than
Or be entered into template system equal to the code of preset value, form Code Template;
Code Template path input by user is received, according to the Code Template path, corresponding Code Template is extracted, connects
Receive the code that number of repetition in development system input by user is less than preset value;
The number of repetition is less than in the Code copying to the Code Template extracted of preset value and generates code.
Optionally, the code for capturing number of repetition in code development system and being greater than or equal to preset value, and will be described
Further include after the step of code that number of repetition is greater than or equal to preset value is entered into system, formation Code Template:
Receive the code specification that user inputs in the Code Template of formation, wherein the code specification includes code leakage
Hole and system vulnerability;
The code for avoiding the code vulnerabilities and system vulnerability is automatically generated according to the code specification.
Optionally, the number of repetition is less than in the Code copying to the Code Template extracted of preset value and generates code
The step of after further include:
The code of generation is tested automatically, and generates test report;
Code Template is adjusted according to the test report, and the Code Template after adjustment is updated;
The access times of Code Template are counted according to the preset period, are generated using report, and by the use
Report the reference generated as Code Template.
Optionally, the code for capturing number of repetition in code development system and being greater than or equal to preset value, and will be described
Further include after the step of code that number of repetition is greater than or equal to preset value is entered into system, formation Code Template:
Keyword input by user is received, Code Template is pushed to user according to the keyword;
Sequencing of the user using the Code Template of push is monitored, the sequencing point of Code Template is used according to user
The relationship between each Code Template is analysed, associated Code Template is pushed to user.
Optionally, it is described by the number of repetition be less than preset value Code copying to the Code Template extracted in generate
The step of code includes:
It obtains the number of repetition and is less than corresponding position of the code of preset value in Code Template;
The corresponding position number of repetition being less than in the Code copying to Code Template of preset value generates code.
In addition, to achieve the above object, the present invention also provides a kind of code generator, the code generator includes processing
Device and memory are stored with code generator in the memory;The processor is used to execute the code generator,
To realize following steps:
It captures number of repetition in code development system and is greater than or equal to the code of preset value, and the number of repetition is more than
Or be entered into template system equal to the code of preset value, form Code Template;
Code Template path input by user is received, according to the Code Template path, corresponding Code Template is extracted, connects
Receive the code that number of repetition in development system input by user is less than preset value;
The number of repetition is less than in the Code copying to the Code Template extracted of preset value and generates code.
Optionally, the processor is additionally operable to execute the code generator, to realize following steps:
Receive the code specification that user inputs in the Code Template of formation, wherein the code specification includes code leakage
Hole and system vulnerability;
The code for avoiding the code vulnerabilities and system vulnerability is automatically generated according to the code specification.
Optionally, the processor is additionally operable to execute the code generator, to realize following steps:
The code of generation is tested automatically, and generates test report;
Code Template is adjusted according to the test report, and the Code Template after adjustment is updated;
The access times of Code Template are counted according to the preset period, are generated using report, and by the use
Report the reference generated as Code Template.
Optionally, the processor is additionally operable to execute the code generator, to realize following steps:
Keyword input by user is received, Code Template is pushed to user according to the keyword;
Sequencing of the user using the Code Template of push is monitored, the sequencing point of Code Template is used according to user
The relationship between each Code Template is analysed, associated Code Template is pushed to user.
Optionally, the processor is additionally operable to execute the code generator, to realize following steps:
It obtains the number of repetition and is less than corresponding position of the code of preset value in Code Template;
The corresponding position number of repetition being less than in the Code copying to Code Template of preset value generates code.
Code generating method, code generator and computer readable storage medium proposed by the present invention, by capturing code
Number of repetition is greater than or equal to the code of preset value in development system, and the number of repetition is greater than or equal to the generation of preset value
Code is entered into template system, forms Code Template, forms Code Template;Then Code Template path input by user is received,
According to the Code Template path, corresponding Code Template is extracted, number of repetition in development system input by user is received and is less than
The code of preset value;The number of repetition is less than in the Code copying to the Code Template extracted of preset value and produces generation
Code, user need not carry out complicated operating procedure and produce code, to save the human input of programmer, improve code
Formation efficiency shortens the software project development period.
Description of the drawings
Fig. 1 is the flow diagram of code generating method first embodiment of the present invention;
Fig. 2 is the flow diagram of code generating method second embodiment of the present invention;
Fig. 3 is the flow diagram of code generating method 3rd embodiment of the present invention;
Fig. 4 is the flow diagram of code generating method fourth embodiment of the present invention;
Fig. 5 is to be copied to the essential information of code needed for the generation in the 5th embodiment of code generating method of the present invention
The refinement flow diagram for the step of code is generated in the Code Template extracted;
Fig. 6 is the device structure schematic diagram for the hardware running environment that the embodiment of the present invention is related to.
The embodiments will be further described with reference to the accompanying drawings for the realization, the function and the advantages of the object of the present invention.
Specific implementation mode
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.
The primary solutions of the embodiment of the present invention are:It is greater than or equal to by capturing number of repetition in code development system
The code of preset value, and the code by the number of repetition more than or equal to preset value is entered into template system, forms code
Template forms Code Template;Then Code Template path input by user is received, according to the Code Template path, extraction pair
The Code Template answered receives the code that number of repetition in development system input by user is less than preset value;By the number of repetition
Less than code is produced in the Code copying to the Code Template extracted of preset value, user need not carry out complicated operation
Step produces code, to save the human input of programmer, improves code building efficiency, shortens software project development week
Phase.
The embodiment of the present invention generally by programmer it is considered that in the prior art, carry out repeating to write, Huo Zhetong
It crosses existing code generator and carries out generation code.It carries out repeating to write by programmer, software project development can be caused
Period is longer, aggravates the programming burden of programmer, and carries out code building by existing code generator, can be only generated simple
Code, when needing to generate relative complex code, the operation for generating code is more complicated, and malfunction is unfavorable for user
Operation.
For this purpose, the embodiment of the present invention proposes a kind of code generating method, by capturing number of repetition in code development system
More than or equal to the code of preset value, and the code by the number of repetition more than or equal to preset value is entered into template system
In, Code Template is formed, Code Template is formed;Then Code Template path input by user is received, according to the Code Template
Corresponding Code Template is extracted in path, receives the code that number of repetition in development system input by user is less than preset value;By institute
Number of repetition is stated less than code is produced in the Code copying to the Code Template extracted of preset value, user need not carry out
Complicated operating procedure produces code, to save the human input of programmer, improves code building efficiency, shortens software
The project development period.
Referring to Fig.1, Fig. 1 is the flow diagram of code generating method first embodiment of the present invention.
In the present embodiment, this method includes:
Step S10 captures the code that number of repetition in code development system is greater than or equal to preset value, and by the repetition
The code that number is greater than or equal to preset value is entered into template system, forms Code Template;
In the present embodiment, the number that can occur to each Codabar code in software project development system counts, so
Number of repetition in code development system is captured afterwards and is greater than or equal to the code of preset value, and the number of repetition is greater than or equal to
The code of preset value is entered into template system, forms Code Template;Specifically, the Code Template of generation can be one special
Character string is converted into the template of certain format, or the Code Template that there is connection database function for one;Wherein, described
Preset value can be determined according to the program code total number of each software project development, when the program code of software project development is total
When item number is more, need the program write more, preset value could be provided as smaller value at this time, to reduce the volume of programmer
It writes workload, in specific implementation process, can also be configured according to the custom of user.Wherein, it extracts code and forms generation
The process of code mask can be completed in local development equipment, can also be completed in external equipment, be then introduced into local development equipment
In.
Step S20 receives Code Template path input by user, according to the Code Template path, extracts corresponding generation
Code mask receives the code that number of repetition in development system input by user is less than preset value;
During User Exploitation, user can directly input Code Template path, and system can be according to the code mould
The corresponding Code Template of plate path extraction, after extracting Code Template, user can be according to the software project needs of exploitation
The function of realization compares the Code Template extracted, you can knows existing program code in Code Template, then by the soft of exploitation
Part project needs the function realized in requisition in the program code write, the code input system not having in Code Template is i.e.
Can, i.e., number of repetition in development system is less than to the code input system of preset value.Therefore, after extracting Code Template,
Also need to receive the code that number of repetition in development system input by user is less than preset value.In specific implementation process, extracting
Before Code Template, Code Template can also be extracted by inputting the function to be realized of project of developing.
The number of repetition is less than in the Code copying to the Code Template extracted of preset value and generates generation by step S30
Code.
Number of repetition is less than the generation of preset value in extracting Code Template and receiving development system input by user
After code, number of repetition in the development system, which is less than in the Code copying to the Code Template extracted of preset value, to give birth to
At code.
The code generating method that the present embodiment proposes is greater than or equal in advance by capturing number of repetition in code development system
If the code of value, and the code by the number of repetition more than or equal to preset value is entered into template system, forms code mould
Plate forms Code Template;Then Code Template path input by user is received, according to the Code Template path, extraction corresponds to
Code Template, receive the code that number of repetition in development system input by user is less than preset value;The number of repetition is small
Code is produced in the Code copying to the Code Template extracted of preset value, user need not carry out complicated operation step
It is rapid to produce code, to save the human input of programmer, code building efficiency is improved, shortens software project development week
Phase.
Further, with reference to Fig. 2, code building side of the present invention is proposed based on code generating method first embodiment of the present invention
Method second embodiment.
In the present embodiment, after the step S10 the step of further includes:
Step S40 receives the code specification that user inputs in the Code Template of formation, wherein the code specification packet
Include code vulnerabilities and system vulnerability;
Step S50 automatically generates the code for avoiding the code vulnerabilities and system vulnerability according to the code specification.
In the present embodiment, after forming Code Template, user can be further to inputting in the Code Template of generation
Code specification, wherein the code specification includes code vulnerabilities and system vulnerability, and the code vulnerabilities are the common generation having found
Code loophole, latest find code vulnerabilities etc., code vulnerabilities can show many aspects, algorithm itself or code itself
Problem is all likely to result in code vulnerabilities.The specific manifestation of code vulnerabilities includes mainly:(1) the data of input are not carried out effective
Property inspection either checks inconsiderate or to deal with usually said overflowing loopholes in buffer improperly all be that thus problem causes.For example it inputs
When password, user may input the password of overlength, if program is not restricted the when of may may result in storage password and covers it
Its data are to cause problem.(2) code logic design defect or mistake mostly by programmer's general idea or inconsiderate cause.Than
Condition is leaked when such as judging less, when encountering special data, program may be caused unexpected operation result occur.(3) algorithm itself
The strict algorithm of loophole is safe premise, and the loophole of algorithm itself may result in various problems, such as using comparing
Simple Encryption Algorithm may easily lead to leakage of information, it is therefore desirable to take precautions against code vulnerabilities, specifically, receive
To user in the Code Template of generation after input code specification, can extract in systems it is common avoid code vulnerabilities and
The Code Template of system vulnerability, then developer need according to the function of being realized needed for current exploration project, write
Property the code for avoiding code vulnerabilities and system vulnerability, be then uploaded in system, system receiving user upload
The code for avoiding code vulnerabilities and system vulnerability of property, is copied to the corresponding generation for avoiding code vulnerabilities and system vulnerability
In code mask, you can the code for avoiding the code vulnerabilities and system vulnerability for current exploration project is automatically generated, to
Prevent to carry out potential hazard to program itself, system or data band due to the meeting that programming itself is inconsiderate and generates.
The code generating method that the present embodiment proposes is advised by receiving user's input code in the Code Template of generation
Model, wherein the code specification includes code vulnerabilities and system vulnerability;Then it is automatically generated according to the code specification and avoids institute
The code of code vulnerabilities and system vulnerability is stated, to prevent since the meeting that programming itself is inconsiderate and generates is to program sheet
Body, system or data band carry out potential hazard.
Further, with reference to Fig. 3, code building side of the present invention is proposed based on code generating method first embodiment of the present invention
Method 3rd embodiment.
In the present embodiment, after the step S30 the step of further includes:
Step S60 tests the code of generation, and generates test report automatically;
Step S70 is adjusted Code Template according to the test report, and the Code Template after adjustment is carried out
Update;
Step S80 counts the access times of Code Template according to the preset period, generates using report, and will
The reference for using report to be generated as Code Template.
In the present embodiment, after generating code, further the code of generation can be tested automatically, test generation
Whether code is problematic, then generates test report, so that user knows whether the code of generation is problematic, if the code generated
Problematic, specially code where goes wrong, and user is facilitated to change.It, can further basis after generating test report
The test report is adjusted Code Template, and the Code Template after adjustment is updated, so that Code Template is more
Add precisely.Further, the access times of each Code Template can also be counted according to the preset period, generates and uses
Report, and report described use to the reference that is generated as Code Template.
The code generating method that the present embodiment proposes, is tested automatically by the code to generation, and generates test report
It accuses, so that user knows the code of generation specific location that is whether problematic, and going wrong;Then it is reported according to the test
Announcement is adjusted Code Template, and the Code Template after adjustment is updated, so that Code Template is more accurate;Finally
The access times of Code Template can be counted according to the preset period, is generated using report, to use report by described
Accuse the reference generated as Code Template.
Further, with reference to Fig. 4, code building side of the present invention is proposed based on code generating method first embodiment of the present invention
Method fourth embodiment.
In the present embodiment, after the step S10 the step of further includes:
Step S90 receives keyword input by user, and Code Template is pushed to user according to the keyword;
Step S100, monitoring user use Code Template using the sequencing of the Code Template of push according to user
Sequencing analyzes the relationship between each Code Template, and associated Code Template is pushed to user.
In the present embodiment, user obtains except through directly inputting Code Template path other than Code Template, can be with
By inputting the function to be realized of software project of exploitation, to obtain Code Template.Therefore key input by user is being received
After word, can according to the Code Template that the keyword received is matched with the Code Template of holding, and will match to
User pushes.Simultaneously during Code Template of the user using push, code of the user using push can be further monitored
Then the sequencing of template analyzes the relationship between each Code Template, Xiang Yong according to user using the sequencing of Code Template
Family pushes associated Code Template, improves the experience that user uses Code Template.
The code generating method that the present embodiment proposes, by receiving keyword input by user, you can according to the key
Word pushes Code Template to user;Then monitoring user uses generation using the sequencing of the Code Template of push according to user
The sequencing of code mask analyzes the relationship between each Code Template, and associated Code Template is pushed to user, improves user and uses
The experience of Code Template.
Further, with reference to Fig. 5, the present invention is proposed based on first to fourth any embodiment of code generating method of the present invention
The 5th embodiment of code generating method.
In the present embodiment, the step S30 includes:
Step S31 obtains corresponding position of the essential information of code needed for the generation in Code Template;
The essential information of code needed for the generation is copied to the corresponding position in Code Template and generates generation by step S32
Code.
In the present embodiment, after receiving the essential information for generating required code, need to analyze generation needed for the generation
Corresponding position of the essential information of code in Code Template, to improve the accuracy rate of the code generated, then by the generation institute
It needs the essential information of code to be copied to the corresponding position in Code Template and produces code.
The present invention further provides a kind of code generators.
As shown in fig. 6, code generator may include:Processor 1001, such as CPU and memory 1002.These groups
Connection communication between part can be realized by communication bus.Memory 1002 can be high-speed RAM memory, can also be steady
Fixed memory (non-volatile memory), such as magnetic disk storage.Memory 1002 optionally can also be independently of
The storage device of aforementioned processor 1001.
Optionally, code generator can also include user interface, network interface, camera, RF (Radio
Frequency, radio frequency) circuit, sensor, voicefrequency circuit, WiFi module etc..User interface may include display screen
(Display), input unit such as keyboard (Keyboard), optional user interface can also include wireline interface, the nothing of standard
Line interface.Network interface may include optionally standard wireline interface and wireless interface (such as WI-FI interface).
It will be understood by those skilled in the art that code generator structure shown in Fig. 6 is not constituted to code generator
Restriction, may include either combining certain components or different components arrangement than illustrating more or fewer components.
As shown in fig. 6, as may include operating system and generation in a kind of memory 1002 of computer storage media
Code generator program.Wherein, operating system is management and the hardware of code generator and the program of software resource, support code life
The operation of program of growing up to be a useful person and other software or program.
In code generator shown in Fig. 6, processor 1001 can be used for executing the code stored in memory 1002
Program is generated, to realize following steps:
It captures number of repetition in code development system and is greater than or equal to the code of preset value, and the number of repetition is more than
Or be entered into template system equal to the code of preset value, form Code Template;
Code Template path input by user is received, according to the Code Template path, corresponding Code Template is extracted, connects
Receive the code that number of repetition in development system input by user is less than preset value;
The number of repetition is less than in the Code copying to the Code Template extracted of preset value and generates code.
Further, the code generator stored in memory 1002 can also be performed in processor 1001, with realize with
Lower step:
Receive the code specification that user inputs in the Code Template of formation, wherein the code specification includes code leakage
Hole and system vulnerability;
The code for avoiding the code vulnerabilities and system vulnerability is automatically generated according to the code specification.
Further, the code generator stored in memory 1002 can also be performed in processor 1001, with realize with
Lower step:
The code of generation is tested automatically, and generates test report;
Code Template is adjusted according to the test report, and the Code Template after adjustment is updated;
The access times of Code Template are counted according to the preset period, are generated using report, and by the use
Report the reference generated as Code Template.
Further, the code generator stored in memory 1002 can also be performed in processor 1001, with realize with
Lower step:
Keyword input by user is received, Code Template is pushed to user according to the keyword;
Sequencing of the user using the Code Template of push is monitored, the sequencing point of Code Template is used according to user
The relationship between each Code Template is analysed, associated Code Template is pushed to user.
Further, the code generator stored in memory 1002 can also be performed in processor 1001, with realize with
Lower step:
It obtains the number of repetition and is less than corresponding position of the code of preset value in Code Template;
The corresponding position number of repetition being less than in the Code copying to Code Template of preset value generates code.
The specific embodiment of code generator of the present invention and each embodiment of above-mentioned code generating method are essentially identical, herein not
It repeats.
The present invention provides a kind of computer readable storage medium, the computer-readable recording medium storage there are one or
The multiple programs of person, one or more of programs can be executed by one or more processor, to realize following steps:
It captures number of repetition in code development system and is greater than or equal to the code of preset value, and the number of repetition is more than
Or be entered into template system equal to the code of preset value, form Code Template;
Code Template path input by user is received, according to the Code Template path, corresponding Code Template is extracted, connects
Receive the code that number of repetition in development system input by user is less than preset value;
The number of repetition is less than in the Code copying to the Code Template extracted of preset value and generates code.
Further, one or more of programs can be executed by one or more of processors, also realize with
Lower step:
Receive the code specification that user inputs in the Code Template of formation, wherein the code specification includes code leakage
Hole and system vulnerability;
The code for avoiding the code vulnerabilities and system vulnerability is automatically generated according to the code specification.
Further, one or more of programs can be executed by one or more of processors, also realize with
Lower step:
The code of generation is tested automatically, and generates test report;
Code Template is adjusted according to the test report, and the Code Template after adjustment is updated;
The access times of Code Template are counted according to the preset period, are generated using report, and by the use
Report the reference generated as Code Template.
Further, one or more of programs can be executed by one or more of processors, also realize with
Lower step:
Keyword input by user is received, Code Template is pushed to user according to the keyword;
Sequencing of the user using the Code Template of push is monitored, the sequencing point of Code Template is used according to user
The relationship between each Code Template is analysed, associated Code Template is pushed to user.
Further, one or more of programs can be executed by one or more of processors, also realize with
Lower step:
It obtains the number of repetition and is less than corresponding position of the code of preset value in Code Template;
The corresponding position number of repetition being less than in the Code copying to Code Template of preset value generates code.
The specific embodiment of computer readable storage medium of the present invention and above-mentioned code generating method and code generating method
Each embodiment of device is essentially identical, and therefore not to repeat here.
It should also be noted that, herein, the terms "include", "comprise" or its any other variant are intended to non-
It is exclusive to include, so that process, method, article or device including a series of elements include not only those elements,
But also include other elements that are not explicitly listed, or further include solid by this process, method, article or device
Some elements.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including
There is also other identical elements in the process of the element, method, article or device.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side
Method can add the mode of required general hardware platform to realize by software, naturally it is also possible to by hardware, but in many cases
The former is more preferably embodiment.Based on this understanding, technical scheme of the present invention substantially in other words does the prior art
Going out the part of contribution can be expressed in the form of software products, which is stored in a storage medium
In (such as ROM/RAM, magnetic disc, CD), including some instructions are used so that a station terminal equipment (can be mobile phone, computer, clothes
Be engaged in device, air conditioner or the network equipment etc.) method that executes each embodiment of the present invention.
It these are only the preferred embodiment of the present invention, be not intended to limit the scope of the invention, it is every to utilize this hair
Equivalent structure or equivalent flow shift made by bright specification and accompanying drawing content is applied directly or indirectly in other relevant skills
Art field, is included within the scope of the present invention.
Claims (10)
1. a kind of code generating method, which is characterized in that the described method comprises the following steps:
It captures number of repetition in code development system and is greater than or equal to the code of preset value, and the number of repetition is more than or is waited
It is entered into template system in the code of preset value, forms Code Template;
Code Template path input by user is received, according to the Code Template path, corresponding Code Template is extracted, receives and use
Number of repetition is less than the code of preset value in the development system of family input;
The number of repetition is less than in the Code copying to the Code Template extracted of preset value and generates code.
2. code generating method as described in claim 1, which is characterized in that number of repetition in the crawl code development system
More than or equal to the code of preset value, and the code by the number of repetition more than or equal to preset value is entered into system, shape
Further include at after the step of Code Template:
Receive the code specification that is inputted in the Code Template of formation of user, wherein the code specification include code vulnerabilities and
System vulnerability;
The code for avoiding the code vulnerabilities and system vulnerability is automatically generated according to the code specification.
3. code generating method as described in claim 1, which is characterized in that described that the number of repetition is less than preset value
Further include after the step of generating code in Code copying to the Code Template extracted:
The code of generation is tested automatically, and generates test report;
Code Template is adjusted according to the test report, and the Code Template after adjustment is updated;
The access times of Code Template are counted according to the preset period, are generated using report, and report is used by described
The reference generated as Code Template.
4. code generating method as described in claim 1, which is characterized in that number of repetition in the crawl code development system
More than or equal to the code of preset value, and the code by the number of repetition more than or equal to preset value is entered into system, shape
Further include at after the step of Code Template:
Keyword input by user is received, Code Template is pushed to user according to the keyword;
Sequencing of the user using the Code Template of push is monitored, it is each using the sequencing analysis of Code Template according to user
Relationship between Code Template pushes associated Code Template to user.
5. code generating method according to any one of claims 1-4, which is characterized in that described to be less than the number of repetition
The step of generation code, includes in the Code copying of preset value to the Code Template extracted:
It obtains the number of repetition and is less than corresponding position of the code of preset value in Code Template;
The corresponding position number of repetition being less than in the Code copying to Code Template of preset value generates code.
6. a kind of code generator, which is characterized in that the code generator includes processor and memory, in the memory
It is stored with code generator;The processor is for executing the code generator, to realize following steps:
It captures number of repetition in code development system and is greater than or equal to the code of preset value, and the number of repetition is more than or is waited
It is entered into template system in the code of preset value, forms Code Template;
Code Template path input by user is received, according to the Code Template path, corresponding Code Template is extracted, receives and use
Number of repetition is less than the code of preset value in the development system of family input;
The number of repetition is less than in the Code copying to the Code Template extracted of preset value and generates code.
7. code generator as claimed in claim 6, which is characterized in that the processor is additionally operable to execute the code building
Program, to realize following steps:
Receive user's input code specification in the Code Template of formation, wherein the code specification includes code vulnerabilities and is
System loophole;
The code for avoiding the code vulnerabilities and system vulnerability is automatically generated according to the code specification.
8. code generator as claimed in claim 6, which is characterized in that the processor is additionally operable to execute the code building
Program, to realize following steps:
The code of generation is tested automatically, and generates test report;
Code Template is adjusted according to the test report, and the Code Template after adjustment is updated;
The access times of Code Template are counted according to the preset period, are generated using report, and report is used by described
The reference generated as Code Template.
9. code generator as claimed in claim 6, which is characterized in that the processor is additionally operable to execute the code building
Program, to realize following steps:
Keyword input by user is received, Code Template is pushed to user according to the keyword;
Sequencing of the user using the Code Template of push is monitored, it is each using the sequencing analysis of Code Template according to user
Relationship between Code Template pushes associated Code Template to user.
10. a kind of computer readable storage medium, which is characterized in that be stored with code life on the computer readable storage medium
The code building as described in any one of claim 1 to 5 is realized at program, when the code generator is executed by processor
The step of method.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710656395.4A CN108345453A (en) | 2017-08-01 | 2017-08-01 | Code generating method, code generator and readable storage medium storing program for executing |
PCT/CN2018/083942 WO2019024543A1 (en) | 2017-08-01 | 2018-04-20 | Code generation method and apparatus, code generator and readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710656395.4A CN108345453A (en) | 2017-08-01 | 2017-08-01 | Code generating method, code generator and readable storage medium storing program for executing |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108345453A true CN108345453A (en) | 2018-07-31 |
Family
ID=62963215
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710656395.4A Pending CN108345453A (en) | 2017-08-01 | 2017-08-01 | Code generating method, code generator and readable storage medium storing program for executing |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN108345453A (en) |
WO (1) | WO2019024543A1 (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109254774A (en) * | 2018-08-30 | 2019-01-22 | 郑州云海信息技术有限公司 | The management method and device of code in software development system |
CN109255059A (en) * | 2018-08-31 | 2019-01-22 | 平安科技(深圳)有限公司 | Product basic algorithm determines method, apparatus, computer equipment and storage medium |
CN109375943A (en) * | 2018-10-18 | 2019-02-22 | 中国银行股份有限公司 | A kind of program file generation method and device |
CN110688103A (en) * | 2019-10-10 | 2020-01-14 | 北京东软望海科技有限公司 | Code writing method and device, electronic equipment and computer readable storage medium |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20030229885A1 (en) * | 2002-06-06 | 2003-12-11 | International Business Machines Corporation | System and method for automated source code generation |
CN106469064A (en) * | 2016-09-04 | 2017-03-01 | 深圳市云智易联科技有限公司 | Code generating method and code generating unit |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20080313605A1 (en) * | 2007-06-14 | 2008-12-18 | Motorola, Inc. | Development framework for automated data throughput optimization |
CN103150165B (en) * | 2013-03-07 | 2016-05-18 | 中国农业大学 | For building frame system and the program construction method of outdoor data acquisition program |
CN104267966B (en) * | 2014-10-15 | 2018-05-15 | 北京国双科技有限公司 | The generation method and device of the program code of software |
CN106354492B (en) * | 2016-08-23 | 2020-08-18 | 深圳Tcl新技术有限公司 | Automatic code generation method and system for quickly adjusting transaction flow docking |
-
2017
- 2017-08-01 CN CN201710656395.4A patent/CN108345453A/en active Pending
-
2018
- 2018-04-20 WO PCT/CN2018/083942 patent/WO2019024543A1/en active Application Filing
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20030229885A1 (en) * | 2002-06-06 | 2003-12-11 | International Business Machines Corporation | System and method for automated source code generation |
CN106469064A (en) * | 2016-09-04 | 2017-03-01 | 深圳市云智易联科技有限公司 | Code generating method and code generating unit |
Non-Patent Citations (1)
Title |
---|
鑫鱻: ""巧用Live Template,不仅能提升AS开发效率,还能装逼"", 《CSDN博客HTTPS://BLOG.CSDN.NET/CQKXZSXY/ARTICLE/DETAILS/62066573?UTM_SOURCE=APP,SINGLEMESSAGE&FROM=SINGLEMESSAGE&ISAPPINSTALLED=0》 * |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109254774A (en) * | 2018-08-30 | 2019-01-22 | 郑州云海信息技术有限公司 | The management method and device of code in software development system |
CN109255059A (en) * | 2018-08-31 | 2019-01-22 | 平安科技(深圳)有限公司 | Product basic algorithm determines method, apparatus, computer equipment and storage medium |
CN109375943A (en) * | 2018-10-18 | 2019-02-22 | 中国银行股份有限公司 | A kind of program file generation method and device |
CN110688103A (en) * | 2019-10-10 | 2020-01-14 | 北京东软望海科技有限公司 | Code writing method and device, electronic equipment and computer readable storage medium |
CN110688103B (en) * | 2019-10-10 | 2023-07-04 | 望海康信(北京)科技股份公司 | Code writing method, device, electronic equipment and computer readable storage medium |
Also Published As
Publication number | Publication date |
---|---|
WO2019024543A1 (en) | 2019-02-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Uusitalo et al. | Hexa-X the European 6G flagship project | |
CN104765612B (en) | It is a kind of to access credible performing environment, the system and method for trusted application | |
CN108345453A (en) | Code generating method, code generator and readable storage medium storing program for executing | |
CN104137076B (en) | Method and device for validation of applications | |
US8640084B2 (en) | Generating validation test suites | |
US9489277B2 (en) | Application component testing | |
Griebe et al. | A model-based approach to test automation for context-aware mobile applications | |
Zarrad et al. | Evaluating network test scenarios for network simulators systems | |
CN105701008A (en) | Integrated automated test case generation for safety-critical software | |
CN109033772A (en) | A kind of input method and device of verification information | |
CN111488277B (en) | Node matching method, device, equipment and system | |
CN113268243B (en) | Memory prediction method and device, storage medium and electronic equipment | |
WO2021203260A1 (en) | Node matching method, apparatus, device and system | |
US20230308381A1 (en) | Test script generation from test specifications using natural language processing | |
CN113590454A (en) | Test method, test device, computer equipment and storage medium | |
CN111400167A (en) | Redfish service compliance verification method, device, equipment and medium | |
CN109582524A (en) | A kind of test method, system and electronic equipment and storage medium | |
CN106874202A (en) | Method, device and readable storage medium storing program for executing for unit testing | |
CN108170600A (en) | The coverage rate statistical method of front-end code test, apparatus and system | |
CN106201865A (en) | A kind of application programming interface API method of testing, device and terminal unit | |
Arbula et al. | Pymote: High level python library for event-based simulation and evaluation of distributed algorithms | |
CN108093057A (en) | Method and device for guiding permission to be opened | |
CN107066240A (en) | The implementation method and device of assembly function | |
KR102543557B1 (en) | Network simulation platform generation method, network simulation method and corresponding device | |
CN107133160A (en) | Test system |
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 | ||
WD01 | Invention patent application deemed withdrawn after publication | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20180731 |