CN112214217A - Method for storing programming graph as JSON format data - Google Patents

Method for storing programming graph as JSON format data Download PDF

Info

Publication number
CN112214217A
CN112214217A CN202011075821.3A CN202011075821A CN112214217A CN 112214217 A CN112214217 A CN 112214217A CN 202011075821 A CN202011075821 A CN 202011075821A CN 112214217 A CN112214217 A CN 112214217A
Authority
CN
China
Prior art keywords
programming
identifier
additional information
json
representing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011075821.3A
Other languages
Chinese (zh)
Inventor
罗海鹰
张望成
张俊
周平平
丛明宇
林永生
廖峰
张洪宇
潘新平
周晓波
江海雷
芦勤桑
姜芳芳
刘林林
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jiangxi Hongdu Aviation Industry Group Co Ltd
Original Assignee
Jiangxi Hongdu Aviation Industry Group 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 Jiangxi Hongdu Aviation Industry Group Co Ltd filed Critical Jiangxi Hongdu Aviation Industry Group Co Ltd
Priority to CN202011075821.3A priority Critical patent/CN112214217A/en
Publication of CN112214217A publication Critical patent/CN112214217A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/34Graphical or visual programming
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/11File system administration, e.g. details of archiving or snapshots
    • G06F16/116Details of conversion of file system types or formats

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Stored Programmes (AREA)

Abstract

A method for storing programming graphics as JSON format data, firstly defining a group of programming graphics capable of carrying additional information and a group of identifiers, then comparing the programming graphics in the obtained graphical editor with the programming graphics capable of carrying additional information, and after each comparison is completed, adding one item of content in output according to the JSON data format as an identifier': the 'name/value' pairs of the 'additional information' are stored until all the programming graphs are stored as JSON format data, so that technical support is provided for converting the programming graphs into source codes of any development language through the JSON format data, and the working efficiency of software development is further improved.

Description

Method for storing programming graph as JSON format data
Technical Field
The invention relates to the technical field of data conversion, in particular to a method for storing a programming graph as JSON format data.
Background
There are many software development languages, each software development language has an adaptive development tool and application scenario, however, developers cannot master all development languages, but the ideas of software development are consistent, so a data conversion method is designed to store the software results developed by the developers through programming graphics as data in the JSON format, and then convert the data in the JSON format into source codes of any development language, which has become a technical problem to be urgently solved by the technical personnel in the field.
Disclosure of Invention
The technical problem to be solved by the present invention is to provide a method for saving a programming graph as JSON format data, so as to solve the above problems in the background art.
The technical problem solved by the invention is realized by adopting the following technical scheme:
a method for storing programming graphics as JSON format data, firstly defining a group of programming graphics capable of carrying additional information and a group of identifiers, then comparing the programming graphics in the obtained graphical editor with the programming graphics capable of carrying additional information, and after each comparison is completed, adding one item of content in output according to the JSON data format as an identifier': the "name/value" pair of "additional information", until all programming figures are saved as JSON-formatted data; the method comprises the following specific steps:
step one, defining a group of programming graphs capable of carrying additional information, wherein the programming graphs respectively represent start, end, declaration variable, variable assignment, condition (if), else, loop (for) and loop (while);
step two, defining a group of identifiers which respectively represent the beginning, the end, the declaration variable, the variable assignment, the condition (if), the else (else), the loop (for) and the loop (while);
step three, obtaining the graph in the graphical editor to compare with the programming graph defined in the step one:
when the programming graph is the programming graph representing the start, finding the identifier representing the start in the identifiers defined in the step two, and adding a 'name/value' pair with the content of 'start identifier': in output according to the JSON data format;
when the programming graph is the programming graph representing the end, finding the identifier representing the end in the identifiers defined in the step two, and adding a name/value pair with the content of ' end identifier ': in ' into the output according to the JSON data format;
when the programming graph is the programming graph representing the declared variable, finding the identifier representing the declared variable from the identifiers defined in the step two, and adding a name/value pair with the content of ' declared variable identifier ' [ ' additional information 1 ': additional information 2 ' ] in the output according to the JSON data format;
when the programming graph is the programming graph representing variable assignment, finding the identifier representing the variable assignment from the identifiers defined in the step two, and adding a name/value pair with the content of ' variable assignment identifier ' [ ' additional information 1 ': additional information 2 ' ] in the output according to the JSON data format;
when the programming graph is the programming graph representing the condition (if), finding the identifier representing the condition (if) from the identifiers defined in the step two, and adding one item of content in the JSON data format into the output, wherein the item of content is the 'condition (if) identifier' and the 'name/value' pair of the 'additional information';
when the programming graph is the programming graph representing the else (else), finding the identifier representing the else (else) in the identifiers defined in the step two, and adding a ' name/value ' pair with the content of ' the else (else) identifier ': ' in the output according to the JSON data format;
when the programming graph is a programming graph representing a loop (for), finding an identifier representing the loop (for) in the identifiers defined in the step two, and adding a name/value pair with the content of the "loop (for) identifier" of [ "additional information 1", "additional information 2", "additional information 3" ] in the output according to the JSON data format;
when the programming graph is the programming graph representing the loop (while), finding the identifier representing the loop (while) from the identifiers defined in the step two, and adding a name/value pair with the content of the "loop (while) identifier": additional information "in the output according to the JSON data format;
and step four, repeatedly executing the step three until all the programming graphs are stored as JSON format data.
Has the advantages that: in the invention, the acquired programming graph in the graphical editor is compared with the defined programming graph capable of carrying the additional information, and after each comparison is completed, a content is added into the output according to the JSON data format as an identifier': the 'name/value' pairs of the 'additional information' are stored until all the programming graphs are stored as JSON format data, so that technical support is provided for converting the programming graphs into source codes of any development language through the JSON format data, and the working efficiency of software development is further improved.
Detailed Description
In order to make the technical means, the creation characteristics, the achievement purposes and the effects of the invention easy to understand, the invention is further described with the specific embodiments.
A method for storing programming graphics as JSON format data, firstly defining a group of programming graphics capable of carrying additional information and a group of identifiers, then comparing the programming graphics in the obtained graphical editor with the programming graphics capable of carrying additional information, and after each comparison is completed, adding one item of content in output according to the JSON data format as an identifier': the "name/value" pair of "additional information", until all programming figures are saved as JSON-formatted data; the method comprises the following specific steps:
step one, defining a group of programming graphs capable of carrying additional information, wherein the programming graphs respectively represent start, end, declaration variable, variable assignment, condition (if), else, loop (for) and loop (while);
step two, defining a group of identifiers which respectively represent the beginning, the end, the declaration variable, the variable assignment, the condition (if), the else (else), the loop (for) and the loop (while);
step three, acquiring a programming graph in the graphical editor to compare with the programming graph defined in the step one:
when the programming graph is the programming graph representing the start, finding the identifier representing the start in the identifiers defined in the step two, and adding a 'name/value' pair with the content of 'start identifier': in output according to the JSON data format;
when the programming graph is the programming graph representing the end, finding the identifier representing the end in the identifiers defined in the step two, and adding a name/value pair with the content of ' end identifier ': in ' into the output according to the JSON data format;
when the programming graph is the programming graph representing the declared variable, finding the identifier representing the declared variable from the identifiers defined in the step two, and adding a name/value pair with the content of ' declared variable identifier ' [ ' additional information 1 ': additional information 2 ' ] in the output according to the JSON data format;
when the programming graph is the programming graph representing variable assignment, finding the identifier representing the variable assignment from the identifiers defined in the step two, and adding a name/value pair with the content of ' variable assignment identifier ' [ ' additional information 1 ': additional information 2 ' ] in the output according to the JSON data format;
when the programming graph is the programming graph representing the condition (if), finding the identifier representing the condition (if) from the identifiers defined in the step two, and adding one item of content in the JSON data format into the output, wherein the item of content is the 'condition (if) identifier' and the 'name/value' pair of the 'additional information';
when the programming graph is the programming graph representing the else (else), finding the identifier representing the else (else) in the identifiers defined in the step two, and adding a ' name/value ' pair with the content of ' the else (else) identifier ': ' in the output according to the JSON data format;
when the programming graph is a programming graph representing a loop (for), finding an identifier representing the loop (for) in the identifiers defined in the step two, and adding a name/value pair with the content of the "loop (for) identifier" of [ "additional information 1", "additional information 2", "additional information 3" ] in the output according to the JSON data format;
when the programming graph is the programming graph representing the loop (while), finding the identifier representing the loop (while) from the identifiers defined in the step two, and adding a name/value pair with the content of the "loop (while) identifier": additional information "in the output according to the JSON data format;
and step four, repeatedly executing the step three until all the programming graphs are stored as JSON format data.

Claims (9)

1. A method for storing programming graphics as JSON format data is characterized in that a group of programming graphics capable of carrying additional information and a group of identifiers are defined firstly, then the programming graphics in an acquired graphical editor are compared with the programming graphics capable of carrying the additional information, and after each comparison is completed, one item of content is added into output according to a JSON data format to be an identifier': the "name/value" pair of "additional information" until all programming graphics are saved as JSON formatted data.
2. The method for saving programming graphics as JSON formatted data according to claim 1, comprising the steps of:
step one, defining a group of programming graphs capable of carrying additional information;
defining a group of identifiers, wherein the identifiers have a one-to-one correspondence relationship with programming graphs capable of carrying additional information;
step three, acquiring a programming graph in the graphical editor, comparing the programming graph with the programming graph defined in the step one, finding a corresponding identifier in the step two according to the acquired format of the step one, and finally adding a name/value pair of which the content is an identifier and additional information in output according to the JSON data format;
and step four, repeatedly executing the step three until all the programming graphs are stored as JSON format data.
3. A method for saving programming graphics as JSON formatted data according to claim 2, wherein in the second step), the identifier has a one-to-one correspondence relationship with the programming graphics carrying additional information, and the identifier includes symbols representing start, end, declaration variable, variable assignment, condition (if), else, loop (for), and while, respectively;
the programming graph that can carry additional information includes graphs representing start, end, declared variables, variable assignments, conditions (if), else (else), loops (for), and loops (while), respectively.
4. The method for saving program graphics as JSON format data according to claim 2 or 3, wherein in the third step),
when the programming graph is the programming graph representing the start, finding the identifier representing the start in the identifiers defined in the step two, and adding a 'name/value' pair with the content of 'start identifier': in output according to the JSON data format;
when the programming graph is the programming graph representing the end, the identifier representing the end is found in the identifiers defined in the step two, and an item of 'name/value' pair with the content of 'end identifier': is added in the output according to the JSON data format.
5. The method of claim 2 or 3, wherein in the fourth step), when the programming graph is a programming graph representing declared variables, the identifier representing the declared variables is found in the identifiers defined in the second step, and a name/value pair with contents of "declared variable identifier" [ "additional information 1": additional information 2 "] is added to the output according to the JSON data format;
when the programming graph is the programming graph representing variable assignment, the identifier representing the variable assignment is found in the identifiers defined in the step two, and a name/value pair with the content of ' variable assignment identifier ' [ ' additional information 1 ': additional information 2 ' ] is added in the output according to the JSON data format.
6. A method for saving a programming graph as JSON formatted data according to claim 2 or 3, wherein in the third step), when the programming graph is a programming graph representing a condition (if), an identifier representing the condition (if) is found in the identifiers defined in the second step, and a "name/value" pair whose contents are "condition (if) identifier": "additional information" is added to the output according to the JSON data format.
7. A method for saving programming graphics as JSON formatted data according to claim 2 or 3 wherein in step three), when the programming graphics is the programming graphics representing the else (else), the identifier representing the else (else) is found in the identifier defined in step two, and a "name/value" pair whose content is "else (else) identifier" is added to the output according to the JSON data format.
8. A method for saving a programming graph as JSON formatted data according to claim 2 or 3, wherein in the third step), when the programming graph is a programming graph representing a loop (for), an identifier representing the loop (for) is found in the identifiers defined in the second step, and a "name/value" pair whose contents are "loop (for) identifier" [ "additional information 1", "additional information 2", "additional information 3" ] is added to the output according to the JSON data format.
9. A method for saving programming graphics as JSON formatted data according to claim 2 or 3, wherein in the third step, when the programming graphics is the programming graphics representing the loop (while), the identifier representing the loop (while) is found in the identifier defined in the second step, and a "name/value" pair whose content is "loop (while) identifier": additional information "is added to the output according to the JSON data format.
CN202011075821.3A 2020-10-10 2020-10-10 Method for storing programming graph as JSON format data Pending CN112214217A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011075821.3A CN112214217A (en) 2020-10-10 2020-10-10 Method for storing programming graph as JSON format data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011075821.3A CN112214217A (en) 2020-10-10 2020-10-10 Method for storing programming graph as JSON format data

Publications (1)

Publication Number Publication Date
CN112214217A true CN112214217A (en) 2021-01-12

Family

ID=74052919

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011075821.3A Pending CN112214217A (en) 2020-10-10 2020-10-10 Method for storing programming graph as JSON format data

Country Status (1)

Country Link
CN (1) CN112214217A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100088666A1 (en) * 2008-10-03 2010-04-08 Microsoft Corporation Common intermediate representation for data scripting language
CN107704235A (en) * 2017-09-22 2018-02-16 深圳航天科技创新研究院 The analytic method of data flowchart, system and storage medium in mathematics library
CN109542422A (en) * 2018-11-21 2019-03-29 成都聚维合科技有限公司 A method of realizing visual patternization programming
CN109634561A (en) * 2018-10-16 2019-04-16 阿里巴巴集团控股有限公司 A kind of online visual programming method and device
CN110497412A (en) * 2019-08-26 2019-11-26 中科新松有限公司 Robot graphic programming interactive system based on webpage and mobile terminal

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100088666A1 (en) * 2008-10-03 2010-04-08 Microsoft Corporation Common intermediate representation for data scripting language
CN107704235A (en) * 2017-09-22 2018-02-16 深圳航天科技创新研究院 The analytic method of data flowchart, system and storage medium in mathematics library
CN109634561A (en) * 2018-10-16 2019-04-16 阿里巴巴集团控股有限公司 A kind of online visual programming method and device
CN109542422A (en) * 2018-11-21 2019-03-29 成都聚维合科技有限公司 A method of realizing visual patternization programming
CN110497412A (en) * 2019-08-26 2019-11-26 中科新松有限公司 Robot graphic programming interactive system based on webpage and mobile terminal

Similar Documents

Publication Publication Date Title
CN110471666A (en) Code automatic switching method and device, code converter and medium
CN104035754A (en) XML (Extensible Markup Language)-based custom code generation method and generator
CN104932905A (en) Automatic code generation method from AADL to C language
CN104317589A (en) Automatic code generating method and automatic code generating device for loading dynamic link library
US20080155500A1 (en) Method for automatic generation of schema mapping application code
CN109522008B (en) Intelligent contract construction method for block chain
US20120167065A1 (en) Compiler compiler system with syntax-controlled runtime and binary application programming interfaces
CN102693281B (en) AUTOCAD-based method for generating auxiliary line in PDMS
CN111427583A (en) Component compiling method and device, electronic equipment and computer readable storage medium
CN108037913B (en) Method for converting xUML4MC model into MSVL (modeling, simulation and verification language) program and computer-readable storage medium
CN108509193A (en) A kind of system using visualization component encapsulation function
CN107015841A (en) The preprocess method and program compiling equipment of a kind of program compiling
CN110362334B (en) Method, device and medium for managing C + + object life cycle of secondary development language
CN112214217A (en) Method for storing programming graph as JSON format data
CN103336706B (en) False code is converted to the system and method for programming language
CN102929853A (en) DCS (Data Communication System) project data generating system and method based on Excel sheet association
CN105630489A (en) Data processing method and data processing device
CN110780863B (en) Cross-platform development method, device, equipment and medium of storage system
CN116301826A (en) Method for calling software command to conduct data batch processing in CAA development
CN108170953B (en) Circuit diagram migration method and device
CN116796289A (en) Operator processing method and device, electronic equipment and storage medium
CN112070858B (en) Implementation method of electronic chart representation library conforming to S-52 specification
CN115730564A (en) Image processing method and device
CN111596923B (en) Haxe static link library construction method and device and electronic equipment
CN102968443A (en) Optimized interface resource management system for automatic train supervision (ATS) 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