CN114610751A - Structured parameter analysis method, device, equipment and medium for geographic computing language - Google Patents

Structured parameter analysis method, device, equipment and medium for geographic computing language Download PDF

Info

Publication number
CN114610751A
CN114610751A CN202210498166.5A CN202210498166A CN114610751A CN 114610751 A CN114610751 A CN 114610751A CN 202210498166 A CN202210498166 A CN 202210498166A CN 114610751 A CN114610751 A CN 114610751A
Authority
CN
China
Prior art keywords
expression
structured
basic
structural
geographic
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
CN202210498166.5A
Other languages
Chinese (zh)
Other versions
CN114610751B (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.)
Tsinghua University
Original Assignee
Tsinghua University
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 Tsinghua University filed Critical Tsinghua University
Priority to CN202210498166.5A priority Critical patent/CN114610751B/en
Publication of CN114610751A publication Critical patent/CN114610751A/en
Application granted granted Critical
Publication of CN114610751B publication Critical patent/CN114610751B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/242Query formulation
    • G06F16/2433Query languages
    • G06F16/2445Data retrieval commands; View definitions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/29Geographical information databases

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Remote Sensing (AREA)
  • Mathematical Physics (AREA)
  • Computational Linguistics (AREA)
  • Machine Translation (AREA)

Abstract

The embodiment of the application relates to the technical field of geographic computing, in particular to a method, a device, equipment and a medium for analyzing structured parameters of a geographic computing language, and aims to analyze structured expressions in DAS documents. The method comprises the following steps: reading geographic calculation task parameters in the DAS document; analyzing a structural expression in the geographic calculation task parameters to obtain task parameters containing a basic expression; and executing the corresponding geographic calculation task according to the task parameters containing the basic expressions to obtain a calculation result.

Description

Structured parameter analysis method, device, equipment and medium for geographic computing language
Technical Field
The embodiment of the application relates to the technical field of geographic computing, in particular to a method, a device, equipment and a medium for analyzing a structured parameter of a geographic computing language.
Background
The "Document As a System" (DAS) is a completely new model of geo-computing. According to the technology, a geographic analysis model is described by adopting a geographic computing language (G language) under an MS word or Jinshan WPS document processing environment to form a DAS intelligent document, and then the DAS intelligent document drives a background GIS (such as ArcGIS and QGIS) to complete geographic computing, so that the technical threshold of GIS application is greatly reduced, and the development efficiency of a GIS application system is improved. A G-language integrated development platform DAS2019 has been developed, and a series of DAS application systems are constructed based on the platform. In 2021, the achievement was awarded the 48 th international invention fund-showing prize of the Japanese Rionella, and is incorporated into the world Internet congress 'world Internet leading scientific and technological achievement' in the book 2021. When a geographic analysis model is constructed by applying the G language, when parameters are input into a DAS document, control parameters of input objects (layers or data tables) in an 'input and control table', input objects, output objects and partial keywords in a 'calculation process table' are required to be listed one by one, and the parameters are input into corresponding columns for subsequent calculation.
However, when the geographic computation model is complex, on one hand, the expression method may result in excessive redundant information, not only occupy a large amount of table space, but also cause certain difficulty for the user to understand the logic expressed by the document. On the other hand, the user needs to repeatedly input parameters with similar structures, so that the efficiency is low, errors are easy to occur, and the later modification and maintenance are not facilitated.
Disclosure of Invention
The embodiment of the application provides a method, a device, equipment and a storage medium for analyzing structured parameters of a geographic computing language, and aims to analyze a structured expression in a DAS document.
A first aspect of an embodiment of the present application provides a method for parsing a structured parameter in a geographic computing language, where the method includes:
reading geographic calculation task parameters in the DAS document;
analyzing a structural expression in the geographic calculation task parameters to obtain task parameters containing a basic expression;
and executing the corresponding geographic calculation task according to the task parameters containing the basic expressions to obtain a calculation result.
Optionally, the analyzing the structured expression in the geographic computation task parameter to obtain the task parameter including the basic expression includes:
determining the structure type of the structured expression according to the expression structure of the structured expression;
expanding and reducing the structured expression according to the structure type of the structured expression to obtain a basic expression corresponding to the structured expression;
and in the geographic calculation task parameters, replacing the structural expression with a basic expression corresponding to the structural expression to obtain the task parameters containing the basic expression.
Optionally, the structure type of the structured expression includes: enumerated expressions, tabular expressions, grouped expressions, and grouped hybrid expressions.
Optionally, the determining the structure type of the structured expression according to the expression structure of the structured expression includes:
when the expression structure of the structured expression is detected to be A [ item1; item2; … ] B, determining that the type of the structured expression is an enumerated expression, wherein A and B are character strings of the same part in a basic expression corresponding to the structured expression, and item1 and item2 represent numerical values in the basic expression corresponding to the structured expression;
when the expression structure of the structured expression is detected to be A [ item1: item2] B, determining that the type of the structured expression is a tabular expression, wherein A and B are character strings of the same part in a basic expression corresponding to the structured expression, and item1 and item2 represent numerical values in the basic expression corresponding to the structured expression;
when detecting that a grouping identifier exists in the structural expression, determining the type of the structural expression as a grouping expression, wherein the grouping expression is an expression which applies the enumeration expression or the list expression to all sub-items in a grouping through the grouping identifier;
when detecting that the grouped expression exists in the structured expression and a fixed identifier exists, determining the type of the structured expression as a grouped mixed expression, wherein the grouped mixed expression comprises expressions of fixed subentries.
Optionally, the structural expression is expanded and reduced according to the structural type of the structural expression to obtain a basic expression corresponding to the structural expression:
when the type of the structured expression is an enumerated expression, expanding all sub-items displayed in the structured expression one by one to obtain a basic expression corresponding to the structured expression;
when the type of the structured expression is a tabular expression, expanding all sub-items displayed in the structured expression and middle sub-items of all sub-items one by one to obtain a basic expression corresponding to the structured expression;
when the type of the structural expression is a grouped expression, expanding grouped items in the structural expression according to corresponding rules, and replacing grouped identifiers in the structural expression with corresponding sub-items to obtain a basic expression corresponding to the structural expression;
and when the type of the structural expression is a grouping mixed expression, expanding grouping items in the structural expression according to corresponding rules, and keeping fixed sub items in the structural expression unchanged to obtain a basic expression corresponding to the structural expression.
A second aspect of the embodiments of the present application provides a device for parsing structured parameters in a geographic computing language, where the device includes:
the data reading module is used for reading geographic calculation task parameters in the DAS document;
the data analysis module is used for analyzing the structural expression in the geographic calculation task parameters to obtain task parameters containing a basic expression;
and the geographic calculation module is used for executing the corresponding geographic calculation task according to the task parameters containing the basic expressions to obtain a calculation result.
Optionally, the data parsing module includes:
the structure type determining submodule is used for determining the structure type of the structured expression according to the expression structure of the structured expression;
the expression expansion submodule is used for expanding and reducing the structured expression according to the structure type of the structured expression to obtain a basic expression corresponding to the structured expression;
and the parameter obtaining submodule is used for replacing the structural expression with a basic expression corresponding to the structural expression in the geographic calculation task parameters to obtain the task parameters containing the basic expression.
Optionally, the structure type of the structured expression includes: enumerated expressions, tabular expressions, grouped expressions, and grouped hybrid expressions.
Optionally, the structure type determining sub-module includes:
an enumerated expression determining submodule, configured to determine that the type of the structured expression is an enumerated expression when detecting that an expression structure of the structured expression is a [ item1; item2; item … ] B, where a and B are character strings of the same part in a basic expression corresponding to the structured expression, and item1 and item2 represent values in the basic expression corresponding to the structured expression;
a tabular expression determining submodule, configured to determine that the type of the structured expression is a tabular expression when detecting that an expression structure of the structured expression is a [ item1: item2] B, where a and B are character strings of the same part in a basic expression corresponding to the structured expression, and item1 and item2 represent numerical values in the basic expression corresponding to the structured expression;
a grouping expression determining submodule, configured to determine, when it is detected that a grouping identifier exists in the structured expression, that the type of the structured expression is a grouping expression, where the grouping expression is an expression in which the enumerated expression or the tabular expression is applied to all sub-items in a group through the grouping identifier;
and the grouping mixed expression determining submodule is used for determining that the type of the structured expression is a grouping mixed expression when detecting that the grouping expression exists in the structured expression and a fixed identifier exists, and the grouping mixed expression contains an expression of a fixed subentry in the grouping expression.
Optionally, the expression expansion sub-module includes:
an enumerated expression expansion submodule, configured to expand all sub-items displayed in the structured expression one by one to obtain a basic expression corresponding to the structured expression when the type of the structured expression is an enumerated expression;
the tabular expression expansion submodule is used for expanding all sub-items displayed in the structured expression and middle sub-items of all the sub-items one by one to obtain a basic expression corresponding to the structured expression when the type of the structured expression is the tabular expression;
the grouped expression expansion submodule is used for expanding the grouped items in the structured expression according to corresponding rules when the type of the structured expression is the grouped expression, and replacing the grouped identifiers in the structured expression with corresponding sub-items to obtain a basic expression corresponding to the structured expression;
and the grouping mixed expression unfolding submodule is used for unfolding the grouping items in the structured expression according to the corresponding rules and keeping the fixed sub-items in the structured expression unchanged to obtain the basic expression corresponding to the structured expression when the type of the structured expression is the grouping mixed expression.
A third aspect of the embodiments of the present application provides a readable storage medium, on which a computer program is stored, which, when being executed by a processor, implements the steps in the structured parameter parsing method for a geo-computing language according to the first aspect of the present application.
A fourth aspect of the embodiments of the present application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the steps of the method for parsing a structured parameter of a geographic computing language according to the first aspect of the present application when executing the computer program.
Reading a geographic computing task parameter in a DAS document by adopting a structured parameter analysis method of a geographic computing language provided by the application; analyzing a structural expression in the geographic calculation task parameters to obtain task parameters containing a basic expression; and executing the geographic calculation task according to the task parameters containing the basic expressions to obtain a calculation result. In the application, a structured expression of a G language is preset, a user can input parameters of a geographic computation task into a DAS document according to the form of the structured expression, the DAS document analyzes the structured expression in the parameters of the geographic computation task after receiving the parameters of the geographic computation task, the structured expression is expanded and restored into a basic expression, geographic computation is carried out according to the basic expression to obtain a computation result, the system can analyze the structured expression without repeatedly inputting parameters with similar structures by the user, the input workload of the user is reduced, the probability of inputting wrong parameters by the user is reduced, the parameters in the DAS document are concise and clear, the generation of redundant data is reduced, the user can conveniently understand the logic of the whole computation process, the later modification and maintenance of the DAS document are also facilitated, and the use threshold of the G language is reduced, is beneficial to the popularization of G language.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the description of the embodiments of the present application will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without inventive exercise.
FIG. 1 is a flowchart of a method for structured parameter parsing of a geographic computing language according to an embodiment of the present application;
fig. 2 is a schematic diagram of a structured parameter parsing apparatus for a geo-computing language according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some, but not all, embodiments of the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without inventive step, are within the scope of the present disclosure.
Referring to fig. 1, fig. 1 is a flowchart of a structured parameter parsing method for a geo-computing language according to an embodiment of the present application. As shown in fig. 1, the method comprises the steps of:
s11: and reading the geographic computing task parameters in the DAS document.
In this embodiment, a geo-computing task includes an "input and control table" and a "computing process table".
In this embodiment, the "input and control table" and the "calculation process table" store the specific manner of the relevant data and calculation that are needed for the geographic calculation, and during the geographic calculation, the background of the DAS calculates according to the relevant parameters in the "input and control table" and the "calculation process table".
In this embodiment, when performing geographic calculation, the relevant information of the geographic calculation task in the DAS document is read through the background.
For example, referring to table 1, table 1 is an input and control table 1 proposed in an embodiment of the present application, as shown in table 1, rows listed in the input and control table one by one in sequence, and corresponding to serial numbers 3 to 6 are all basic sub-items with similar structures, and if the input is performed without using a structured expression, the input is troublesome.
Figure RE-DEST_PATH_IMAGE001
Referring to table 2, table 2 is a calculation process table 1 proposed in an embodiment of the present application, and as shown in table 2, in 4 rows of parameters in table 2, there are also a lot of data with similar structures, except that some serial numbers are different, and the parameters in the operation column and the input column are all basic sub-items.
Figure RE-DEST_PATH_IMAGE002
The parameters in the input and control table and the calculation process table are used in the geographic calculation task.
S12: and analyzing the structural expression in the geographic calculation task parameters to obtain the task parameters containing the basic expression.
In this embodiment, in order to simplify the input workload of the user, a series of G-language structured expressions are set, and when the user inputs data into the DAS document, the user only needs to input a plurality of basic sub-items in the geographic computation task parameter into the list of the DAS document in the form of the structured expressions.
After a user inputs geographic calculation task parameters including the structured expressions into an input and control table and a calculation process table in the DAS document, the DAS drives the background to analyze the structured expressions in the parameters, and the structured expressions are restored into basic expressions, so that subsequent calculation is facilitated.
In this embodiment, the specific steps of analyzing the structured expression in the geographic computation task parameter to obtain the task parameter including the basic expression include:
s12-1: and determining the structure type of the structured expression according to the expression structure of the structured expression.
In this embodiment, the structural types of the structural expression are divided into four types: enumerated expressions, tabular expressions, grouped expressions, and grouped hybrid expressions.
In this embodiment, the expression of each structure type differs from the used symbol in the specific structure, and the background determines the structure type of the structured expression according to the specific structure and the specific symbol of the structured expression in the input parameter, and the specific steps include:
s12-1-1: when the expression structure of the structured expression is detected to be A [ item1; item2; … ] B, determining that the type of the structured expression is an enumerated expression, wherein A and B are character strings of the same part in the basic expression, and item1 and item2 represent numerical values or character strings in the basic expression.
In this embodiment, the structure of the enumerated expression is a [ item1; item2; … ] B, which is to extract the difference part in each sub-item of the original basic expression as a list for expression. Wherein A and B are character strings of the same part in the basic expression, item1 and item2 represent numerical values or character strings in the basic expression, and each sub-item is divided by; ".
In the embodiment, when the interpreter detects that the structure of the structured expression is A [ item1; item2; … ] B, the type of the structured expression is determined to be an enumerated expression.
S12-1-2: when the expression structure of the structured expression is detected to be A [ item1: item2] B, determining that the type of the structured expression is a tabular expression, wherein A and B are character strings of the same part in the basic expression, and item1 and item2 represent numerical values in the basic expression.
In this embodiment, the tabular expression has a structure a [ item1: item2] B, which essentially represents continuously changing items in a tabular form. Wherein, A and B are character strings of the same part in the basic expression, item1 and item2 represent numerical values in the basic expression.
In the embodiment, when the interpreter detects that the structure of the structured expression is A [ item1: item2] B, the structured expression is determined to be a tabular expression.
S12-1-3: when detecting that a grouping identifier exists in the structural expression, determining the type of the structural expression as a grouping expression, wherein the grouping expression is an expression which applies the enumeration expression or the list expression to all sub-items in a grouping through the grouping identifier.
In this embodiment, the grouped expression is to apply an enumerated or tabular rule to all sub-items in the group through the group identifier.
Illustratively, the expression of the block-based expression is:
a [ item1, item2, item3] # B [ # C [ # D # E or
A [item1:item2;item3]#B[*]#C[*]#D#E
Wherein A, B, C is a grouping item, the grouping item is written according to a list formula or an enumeration formula rule, D, E is a general item, [ ] is a grouping identifier.
In this embodiment, a plurality of packets are allowed in the packet type, for example:
the packet formula "A [1:3] # B [ # C [ # X [1;5] # Y [ # Z [ ]" includes two packets, which are (A, B, C) and (X, Y, Z), respectively. The first group is a tabular expression, and the second group is an enumerated expression.
S12-1-4: when detecting that the fixed identifier exists in the structured expression, determining the type of the structured expression as a grouped mixed expression, wherein the grouped mixed expression comprises expressions of fixed subentries.
In this embodiment, the grouping mixed expression means that a grouping formula includes a fixed sub-item, and when the grouping formula includes a fixed sub-item, the fixed item is identified by a fixed identifier.
In this embodiment, when the interpreter detects that a fixed identifier exists in a structural expression, it determines that the type of the structural expression is a packet hybrid expression.
Illustratively, the expression is:
a [ item1; item2; item 3# B [ # C [ ] or
A [item1:item3]#@B[*]#C[*]
A, B, C is a group, in which item B is a fixed sub-item, and fixed sub-item B is identified by using group identifier "@".
S12-2: and expanding and reducing the structured expression according to the structure type of the structured expression to obtain a basic expression corresponding to the structured expression.
In this embodiment, after the structural type of the structural expression is determined, the structural expression is expanded and restored according to the corresponding expansion rule, and the obtained expanded expression is the basic expression corresponding to the structural expression.
In this embodiment, the specific steps of expanding and reducing the structured expression according to the structure type of the structured expression to obtain the basic expression corresponding to the structured expression include:
s12-2-1: and when the type of the structured expression is an enumerated expression, expanding all sub-items displayed in the structured expression one by one to obtain a basic expression corresponding to the structured expression.
In this embodiment, when it is detected that the type of the structured expression is an enumerated expression, all the sub-items of the enumerated expression are expanded one by one according to the structural characteristics of the enumerated expression, and then the basic expression corresponding to the structured expression is obtained.
In this embodiment, the expression form is an enumeration expression of "a [ item1; item2; … ] B", and the form of the basic expression obtained after expansion and reduction is "Aitem 1B # Aitem2B # …".
Illustratively, in a geographic computing task, if an enumerated expression is "thematic map ([ timberland; grassland; arable land ])", then the expanded expression is a thematic map ([ timberland; grassland; arable land ]).
Referring to table 3, table 3 is an input and control table 2 proposed in an embodiment of the present application, and as shown in table 2, in a row corresponding to a sequence number 1 in the list, a layer name and a parameter of a physical layer are enumerated expressions.
Figure RE-DEST_PATH_IMAGE003
Referring to table 4, table 4 is an input and control table 3 proposed in an embodiment of the present application, and as shown in table 4, rows corresponding to the serial numbers 1 and 2 in the list are basic expressions after the expansion of the enumerated expressions in table 3.
Figure RE-DEST_PATH_IMAGE004
S12-2-2: and when the type of the structured expression is a tabular expression, expanding all sub-items displayed in the structured expression and the middle sub-items of all the sub-items one by one to obtain a basic expression corresponding to the structured expression.
In this embodiment, when it is detected that the structured expression is a tabular expression, all sub-items displayed in the structured expression and middle sub-items of all sub-items are expanded one by one according to the specificity of the tabular expression, and then a corresponding basic expression can be obtained.
In this embodiment, for a tabular expression with an expression structure of A [ item1: item2] B, there are two cases:
when tem1< item2, its basic expression is Aitem1B # Aitem1+1B # Aitem1+2B # … Aitem2B,
illustratively, in a certain geographic computation task, the tabular expression "topic map ([ 1:3 ])" corresponds to a basic expression "topic map (1) # topic map (2) # topic map (3)".
When item1> item2, its basic expression is Aitem1B # Aitem1-1B # Aitem1-2B # … Aitem 2B.
Illustratively, in a certain geographic computing task, the tabular expression "thematic map ([ 3:1 ])" corresponds to a basic expression "thematic map (3) # thematic map (2) # thematic map (1)".
Wherein, item1 and item2 are sub-items displayed in a list, and all sub-items in the middle of item1 and item2 are middle sub-items.
In addition, the expanded sequence number character length of the tabular expression is not less than the character length of item1, such as a thematic map ([ 01:3 ]), and the expanded basic expression is a thematic map (01) # thematic map (02) # thematic map (03).
Referring to table 5, table 5 is a tabular expression corresponding to the basic expressions of data in rows corresponding to sequence numbers 3 to 6 in table 1, in a row corresponding to sequence number 3 of the input and control table 4, and in a list, a layer name and a parameter in a physical layer, which are provided in an embodiment of the present application.
Figure RE-DEST_PATH_IMAGE005
S12-2-3: when the type of the structural expression is a grouped expression, expanding the grouped items in the structural expression according to corresponding rules, and replacing the grouped identifiers in the structural expression with corresponding sub-items to obtain a basic expression corresponding to the structural expression.
In this embodiment, when the interpreter detects a type-class grouped expression of a structured expression, according to an expansion rule of the grouped expression, the grouped items in the expression are expanded according to a corresponding rule, and the grouped identifiers in the expression are replaced with corresponding sub-items. The grouping item with the grouping identifier has the same type and the same sub-item content as the previous grouping item.
Illustratively, a block-based expression is "Value [3;6;9] # Rvalue [ # Sum", which is expanded to the basic expression:
Value3#Rvalue3#Value6# Rvalue6#Value9# Rvalue9#Sum
wherein Value [3;6;9] and Rvalue [ are ] grouping items, Sum is a general item, and the general item does not need to be expanded.
When there are a plurality of packets in the packet formula, for example, "a [1:3] # B [ # C [ # X [1;5] # Y [ # Z [ ]" includes two packets of (a, B, C) and (X, Y, Z), the first group employs a tabular expression, and the second group is an enumerated expression. The basic expression corresponding to the expression is as follows:
A1#B1#C1#A2#B2#C2#A3#B3#C3#X1#Y1#Z1#X5#Y5#Z5
referring to table 6, table 6 is a calculation process table 2 according to an embodiment of the present application, and as shown in table 6, an input field in the calculation process table is a tabular expression, and an output field in the calculation process table is a grouped expression.
Figure RE-DEST_PATH_IMAGE006
Referring to table 7, table 7 is a calculation process table 3 according to an embodiment of the present application, and as shown in table 7, in an input column of the calculation process table in table 7, there are basic expressions corresponding to the tabular expression in table 6, and in an output column, there are basic expressions corresponding to the grouped expression in table 6.
Figure RE-DEST_PATH_IMAGE007
S12-2-4: when the type of the structural expression is a grouping mixed expression, expanding grouping items in the structural expression according to corresponding rules, and keeping fixed items in the structural expression unchanged to obtain a basic expression corresponding to the structural expression.
In this embodiment, when the interpreter detects that the type of the structural expression is a grouped mixed expression, according to the structural characteristics of the grouped mixed expression, the grouped items in the grouped mixed expression are expanded according to the corresponding rules, and the fixed items are kept unchanged, so as to obtain the basic expression corresponding to the structural expression.
Illustratively, when a packet hybrid expression is "A [3;6;9 ## B [ # C ]", its corresponding basic expression is: a3# B # C3# A6# B # C6# A9# B # C9.
Wherein B is a fixed item, and the content is kept unchanged after expansion.
Referring to table 8, table 8 is a calculation process table 4 according to an embodiment of the present application, and as shown in table 8, an input field in the calculation process table is a fixed term, an output field in the calculation process table is a grouped expression, and an operation field in the calculation process table is a list expression. The basic expressions of the structured expressions in this figure are the basic expressions in the input, output, and operation columns in table 2.
Figure RE-DEST_PATH_IMAGE008
Referring to table 9, table 9 is a table 5 of a calculation process according to an embodiment of the present application, and as shown in table 9, the input column in the figure is a grouped mixed expression, and the output column in the figure is a grouped expression.
Figure RE-DEST_PATH_IMAGE009
Referring to table 10, table 10 is a calculation process table 6 according to an embodiment of the present application, in which the basic expressions in the input field are the basic expressions corresponding to the grouped and mixed expressions in table 9, and the grouped expressions in the output field are the basic expressions corresponding to the grouped expressions in the output field in table 9.
Figure RE-DEST_PATH_IMAGE010
The input fields of table 10 include 3 fixed terms, [ study area ], [ business center ], and [ tile map ], and thus need to be expressed using a grouped and mixed expression.
S12-3: and in the geographic calculation task parameters, replacing the structural expression with a basic expression corresponding to the structural expression to obtain the task parameters containing the basic expression.
In this embodiment, after obtaining a basic expression corresponding to a structured expression in the geographic computation task parameters, the structured expression in the task parameters is replaced with an unstructured expression, so as to obtain task parameters including a cost-saving expression.
S13: and executing the corresponding geographic calculation task according to the task parameters containing the basic expressions to obtain a calculation result.
In this embodiment, after the task parameters including the basic expression are obtained, the corresponding geographic calculation task is executed according to the task parameters, and a calculation result is obtained.
In this embodiment, the background obtains data required for executing the geographic computation task by reading the parameters in the input and control table, determines the task model required for computation and the function to be called by reading the parameters in the computation and control table, and further obtains and displays the computation result of the geographic computation.
Illustratively, the geographic computation task in table 10 is to make a thematic map, the background develops and restores task parameters including a basic expression according to the content in the computation process table, and executes the task for making the thematic map according to the obtained task parameters to obtain the made thematic map.
In the embodiment of the application, a set of structural expression rules based on the G language is specified, a user inputs the structural expression in a parameter list of the DAS document, and the background interpreter can expand and restore the structural expression into a corresponding basic expression.
Based on the same inventive concept, an embodiment of the present application provides a structured parameter analysis device for a geographic computing language. Referring to fig. 2, fig. 2 is a schematic diagram of a structured parameter parsing apparatus 200 for a geo-computing language according to an embodiment of the present application. As shown in fig. 2, the apparatus includes:
a data reading module 201, configured to read a geographic computation task parameter in the DAS document;
the data analysis module 202 is configured to analyze a structured expression in the geographic computation task parameters to obtain task parameters including a basic expression;
and the geographic calculation module 203 is configured to execute a corresponding geographic calculation task according to the task parameter including the basic expression, so as to obtain a calculation result.
Optionally, the data parsing module includes:
the structure type determining submodule is used for determining the structure type of the structured expression according to the expression structure of the structured expression;
the expression expansion submodule is used for expanding and reducing the structured expression according to the structure type of the structured expression to obtain a basic expression corresponding to the structured expression;
and the parameter obtaining submodule is used for replacing the structural expression with a basic expression corresponding to the structural expression in the geographic calculation task parameters to obtain the task parameters containing the basic expression.
Optionally, the structure type of the structured expression includes: an enumerated expression, a list expression, a grouped expression and a grouped mixed expression.
Optionally, the structure type determining sub-module includes:
an enumerated expression determining submodule, configured to determine that the type of the structured expression is an enumerated expression when detecting that an expression structure of the structured expression is a [ item1; item2; item … ] B, where a and B are character strings of the same part in a basic expression corresponding to the structured expression, and item1 and item2 represent numeric values or character strings in the basic expression corresponding to the structured expression;
a tabular expression determining submodule, configured to determine that the type of the structured expression is a tabular expression when detecting that an expression structure of the structured expression is a [ item1: item2] B, where a and B are character strings of the same part in a basic expression corresponding to the structured expression, and item1 and item2 represent numerical values in the basic expression corresponding to the structured expression;
a grouping expression determining submodule, configured to determine, when it is detected that a grouping identifier exists in the structured expression, that the type of the structured expression is a grouping expression, where the grouping expression is an expression in which the enumerated expression or the tabular expression is applied to all sub-items in a group through the grouping identifier;
and the grouping mixed expression determining submodule is used for determining that the type of the structured expression is a grouping mixed expression when detecting that the grouping expression exists in the structured expression and a fixed identifier exists, and the grouping mixed expression contains an expression of a fixed subentry in the grouping expression.
Optionally, the expression expansion sub-module includes:
an enumerated expression expansion submodule, configured to expand all sub-items displayed in the structured expression one by one to obtain a basic expression corresponding to the structured expression when the type of the structured expression is an enumerated expression;
the tabular expression expansion submodule is used for expanding all sub-items displayed in the structured expression and middle sub-items of all the sub-items one by one to obtain a basic expression corresponding to the structured expression when the type of the structured expression is the tabular expression;
the grouped expression expansion submodule is used for expanding the grouped items in the structured expression according to corresponding rules when the type of the structured expression is the grouped expression, and replacing the grouped identifiers in the structured expression with corresponding sub-items to obtain a basic expression corresponding to the structured expression;
and the grouping mixed expression unfolding submodule is used for unfolding the grouping items in the structured expression according to the corresponding rules and keeping the fixed sub-items in the structured expression unchanged to obtain the basic expression corresponding to the structured expression when the type of the structured expression is the grouping mixed expression.
Based on the same inventive concept, another embodiment of the present application provides a readable storage medium, on which a computer program is stored, which when executed by a processor implements the steps in the structured parameter parsing method of the geo-computing language according to any of the above embodiments of the present application.
Based on the same inventive concept, another embodiment of the present application provides an electronic device, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor, and when the processor executes the computer program, the electronic device implements the steps in the method for parsing the structured parameters of the geo-computing language according to any of the above embodiments of the present application.
For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, apparatus, or computer program product. Accordingly, embodiments of the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
Embodiments of the present application are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing terminal to cause a series of operational steps to be performed on the computer or other programmable terminal to produce a computer implemented process such that the instructions which execute on the computer or other programmable terminal provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present application have been described, additional variations and modifications of these embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including the preferred embodiment and all such alterations and modifications as fall within the true scope of the embodiments of the application.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or terminal that comprises the element.
The method, the apparatus, the device and the storage medium for analyzing the structured parameters of the geographic computing language provided by the present application are introduced in detail, and a specific example is applied in the present application to explain the principle and the implementation of the present application, and the description of the above embodiment is only used to help understanding the method and the core idea of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (8)

1. A method for structured parameter parsing in a geo-computing language, the method comprising:
reading geographic calculation task parameters in the DAS document;
analyzing a structural expression in the geographic calculation task parameters to obtain task parameters containing a basic expression;
and executing the corresponding geographic calculation task according to the task parameters containing the basic expressions to obtain a calculation result.
2. The method for parsing structural parameters of a geo-computing language according to claim 1, wherein parsing the structural expression in the geo-computing task parameters to obtain task parameters including a basic expression includes:
determining the structure type of the structured expression according to the expression structure of the structured expression;
expanding and reducing the structured expression according to the structure type of the structured expression to obtain a basic expression corresponding to the structured expression;
and in the geographic calculation task parameters, replacing the structural expression with a basic expression corresponding to the structural expression to obtain the task parameters containing the basic expression.
3. The method of parsing parameters in a geographic computing language according to claim 2, wherein the structural type of the structural expression comprises: enumerated expressions, tabular expressions, grouped expressions, and grouped hybrid expressions.
4. The method of parsing parameters in a geographic computing language according to claim 3, wherein said determining a structure type of said structured expression from an expression structure of said structured expression comprises:
when the expression structure of the structured expression is detected to be A [ item1; item2; … ] B, determining that the type of the structured expression is an enumerated expression, wherein A and B are character strings of the same part in a basic expression corresponding to the structured expression, and item1 and item2 represent numerical values in the basic expression corresponding to the structured expression;
when detecting that the expression structure of the structured expression is A [ item1: item2] B, determining that the type of the structured expression is a tabular expression, wherein A and B are character strings of the same part in a basic expression corresponding to the structured expression, and item1 and item2 represent numerical values in the basic expression corresponding to the structured expression;
when detecting that a grouping identifier exists in the structural expression, determining the type of the structural expression as a grouping expression, wherein the grouping expression is an expression which applies the enumeration expression or the list expression to all sub-items in a grouping through the grouping identifier;
when detecting that the grouped expression exists in the structured expression and a fixed identifier exists, determining the type of the structured expression as a grouped mixed expression, wherein the grouped mixed expression comprises expressions of fixed subentries.
5. The method for parsing structural parameters of a geographic computing language according to claim 2, wherein the expanding and restoring the structural expression according to the structural type of the structural expression to obtain a basic expression corresponding to the structural expression includes:
when the type of the structured expression is an enumerated expression, expanding all sub-items displayed in the structured expression one by one to obtain a basic expression corresponding to the structured expression;
when the type of the structured expression is a tabular expression, expanding all sub-items displayed in the structured expression and middle sub-items of all sub-items one by one to obtain a basic expression corresponding to the structured expression;
when the type of the structural expression is a grouped expression, expanding grouped items in the structural expression according to corresponding rules, and replacing grouped identifiers in the structural expression with corresponding sub-items to obtain a basic expression corresponding to the structural expression;
and when the type of the structural expression is a grouping mixed expression, expanding grouping items in the structural expression according to corresponding rules, and keeping fixed sub items in the structural expression unchanged to obtain a basic expression corresponding to the structural expression.
6. An apparatus for structured parameter parsing for a geographic computing language, the apparatus comprising:
the data reading module is used for reading geographic calculation task parameters in the DAS document;
the data analysis module is used for analyzing the structural expression in the geographic calculation task parameters to obtain task parameters containing a basic expression;
and the geographic calculation module is used for executing the corresponding geographic calculation task according to the task parameters containing the basic expressions to obtain a calculation result.
7. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method for structured parameter parsing in a geo-computing language according to any one of claims 1 to 5.
8. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the steps of the method for structured parameter resolution in a geo-computing language according to any one of claims 1 to 5 when executing the computer program.
CN202210498166.5A 2022-05-09 2022-05-09 Structured parameter analysis method, device, equipment and medium for geographic computing language Active CN114610751B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210498166.5A CN114610751B (en) 2022-05-09 2022-05-09 Structured parameter analysis method, device, equipment and medium for geographic computing language

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210498166.5A CN114610751B (en) 2022-05-09 2022-05-09 Structured parameter analysis method, device, equipment and medium for geographic computing language

Publications (2)

Publication Number Publication Date
CN114610751A true CN114610751A (en) 2022-06-10
CN114610751B CN114610751B (en) 2023-02-03

Family

ID=81869094

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210498166.5A Active CN114610751B (en) 2022-05-09 2022-05-09 Structured parameter analysis method, device, equipment and medium for geographic computing language

Country Status (1)

Country Link
CN (1) CN114610751B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115510173A (en) * 2022-09-27 2022-12-23 清华大学 DAS-based intelligent thematic map making method, device and product

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011065582A (en) * 2009-09-18 2011-03-31 Yahoo Japan Corp Device and method for gradually developing natural language user interface
US20130031113A1 (en) * 2011-07-29 2013-01-31 Feng Donghui Query Parser Derivation Computing Device and Method for Making a Query Parser for Parsing Unstructured Search Queries
US9684544B1 (en) * 2016-02-05 2017-06-20 Sas Institute Inc. Distributed data set storage and analysis reproducibility
CN110334169A (en) * 2019-07-01 2019-10-15 清华大学 A kind of novel geocomputation mode
CN110377291A (en) * 2019-06-19 2019-10-25 深圳壹账通智能科技有限公司 Structural data conversion method, device, computer equipment and storage medium
CN111381935A (en) * 2020-03-17 2020-07-07 北京九州云动科技有限公司 DSL configuration expression-based function implementation method and system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011065582A (en) * 2009-09-18 2011-03-31 Yahoo Japan Corp Device and method for gradually developing natural language user interface
US20130031113A1 (en) * 2011-07-29 2013-01-31 Feng Donghui Query Parser Derivation Computing Device and Method for Making a Query Parser for Parsing Unstructured Search Queries
US9684544B1 (en) * 2016-02-05 2017-06-20 Sas Institute Inc. Distributed data set storage and analysis reproducibility
CN110377291A (en) * 2019-06-19 2019-10-25 深圳壹账通智能科技有限公司 Structural data conversion method, device, computer equipment and storage medium
CN110334169A (en) * 2019-07-01 2019-10-15 清华大学 A kind of novel geocomputation mode
CN111381935A (en) * 2020-03-17 2020-07-07 北京九州云动科技有限公司 DSL configuration expression-based function implementation method and system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
周文生: "基于DAS 的地理设计方法在空间规划中的应用", 《人类居住》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115510173A (en) * 2022-09-27 2022-12-23 清华大学 DAS-based intelligent thematic map making method, device and product

Also Published As

Publication number Publication date
CN114610751B (en) 2023-02-03

Similar Documents

Publication Publication Date Title
CN110472068B (en) Big data processing method, equipment and medium based on heterogeneous distributed knowledge graph
CN107358208B (en) A kind of PDF document structured message extracting method and device
US20110219045A1 (en) Data processing device
KR101617696B1 (en) Method and device for mining data regular expression
CN109961146A (en) Mathematical problem answers method and device
CN102375746A (en) Method and device for enabling input method to self-adapt to application program
KR20210030068A (en) System and method for ensemble question-answering
CN114610751B (en) Structured parameter analysis method, device, equipment and medium for geographic computing language
CN105468703A (en) Reason tracing method
CN115358397A (en) Parallel graph rule mining method and device based on data sampling
CN111967234A (en) Visual report generation method and device, terminal equipment and storage medium
CN110941655A (en) Data format conversion method and device
CN105183730B (en) The treating method and apparatus of webpage information
CN115204079A (en) Logic partitioning method, system, equipment and storage medium of digital circuit
WO2016147330A1 (en) Text processing method and text processing system
US11775270B1 (en) Method and apparatus for parsing structured parameters of geocomputation language, device and medium
CN107545035A (en) A kind of information search method and device
WO2021234860A1 (en) Estimation device, learning device, estimation method, learning method, and program
CN110517070B (en) Method and device for consumer group selection
JP2022154862A (en) Information processing method, program and information processing device
EP2638481A1 (en) Seed set expansion
CN115168673B (en) Data graphical processing method, device, equipment and storage medium
CN116955415B (en) Design hierarchy based data search system
CN107545008B (en) Data format requirement storage method and device
CN116245197B (en) Method, system, medium and equipment for improving training rate of language model

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