CN114706660B - DAS-based custom function expansion method, device, equipment and storage medium - Google Patents

DAS-based custom function expansion method, device, equipment and storage medium Download PDF

Info

Publication number
CN114706660B
CN114706660B CN202210532723.0A CN202210532723A CN114706660B CN 114706660 B CN114706660 B CN 114706660B CN 202210532723 A CN202210532723 A CN 202210532723A CN 114706660 B CN114706660 B CN 114706660B
Authority
CN
China
Prior art keywords
script file
das
task
interface
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210532723.0A
Other languages
Chinese (zh)
Other versions
CN114706660A (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 CN202210532723.0A priority Critical patent/CN114706660B/en
Publication of CN114706660A publication Critical patent/CN114706660A/en
Application granted granted Critical
Publication of CN114706660B publication Critical patent/CN114706660B/en
Priority to US18/090,536 priority patent/US11775260B1/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/31Programming languages or programming paradigms
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45504Abstract machines for programme code execution, e.g. Java virtual machine [JVM], interpreters, emulators
    • G06F9/45508Runtime interpretation or emulation, e g. emulator loops, bytecode interpretation
    • G06F9/45512Command shells
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging
    • 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/25Integrating or interfacing systems involving database management systems
    • G06F16/252Integrating or interfacing systems involving database management systems between a Database Management System and a front-end application
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/448Execution paradigms, e.g. implementations of programming paradigms
    • G06F9/4482Procedural
    • G06F9/4484Executing subprograms
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/448Execution paradigms, e.g. implementations of programming paradigms
    • G06F9/4488Object-oriented
    • G06F9/449Object-oriented method invocation or resolution
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication

Abstract

The embodiment of the application relates to the technical field of geographic computing, in particular to a method, a device, equipment and a storage medium for extending a customized function based on DAS (distributed system architecture), and aims to realize that a user adds a customized function in DAS and extends a G language customized keyword. The method comprises the following steps: generating a corresponding target task script file according to the target geographic analysis task; setting a rule according to an interface identifier of the DAS to obtain an interface identifier corresponding to the target task script file; generating a corresponding interface script file according to the interface identifier and the target task script file; and calling the interface script file through a user-defined keyword in a calculation process table of the DAS to obtain an analysis result of the target geographic analysis task.

Description

DAS-based custom function extension method, device, equipment and storage medium
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 storage medium for extending a custom function based on DAS.
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. When a geographic analysis model is constructed by the G language, the key words of the G language are the core of the geographic analysis model, the richness of the key words determines the breadth and the depth of the problem to be solved, the key words are descriptions of the geographic analysis method, and different key words correspond to different functional implementations. At present, by summarizing a common geographic analysis method, 6 major categories 40 of keywords including a data acquisition category, a spatial analysis category, a data acquisition category, an index extraction category, a data expression category and other categories are extracted, and a corresponding G language keyword library is constructed. Therefore, the keyword library of the G language needs to be expanded to enrich the functions that the DAS can implement. Generally, the updating and expansion work of the keyword library of the G language is completed by research and development personnel, and the research and development personnel expand the keyword library of the G language according to the newly added function.
Research personnel develop new function at DAS, the G language keyword that the update corresponds, this kind of function extension and keyword maintenance update mechanism have very big limitation, the user can not expand new function according to own needs, expand the keyword bank, make the user when using DAS because the restriction of function and keyword, can't model the analysis and solve the geographical analysis problem that awaits solution urgently, user's use experience has been reduced, DAS technical popularization has been restricted.
Disclosure of Invention
The embodiment of the application provides a method, a device, equipment and a storage medium for extending a customized function based on DAS, and aims to realize that a user adds a customized function in the DAS and extends a G language customized keyword.
A first aspect of an embodiment of the present application provides a method for extending a custom function based on a DAS, where the method includes:
generating a corresponding target task script file according to the target geographic analysis task;
setting a rule according to an interface identifier of the DAS to obtain an interface identifier corresponding to the target task script file;
generating a corresponding interface script file according to the interface identifier and the target task script file;
and calling the interface script file through a user-defined keyword in the calculation process table of the DAS to obtain an analysis result of the target geographic analysis task.
Optionally, the method further comprises:
filling keyword description data of the target geographic analysis task in a control information column in the calculation process table according to parameter information in the interface script file;
and generating hyperlinks of input information, the interface script file and the analysis result in the calculation process table.
Optionally, the generating a corresponding target task script file according to the target geographic analysis task includes:
determining the target geographic analysis task, and receiving related task parameters of the target geographic analysis task;
generating a corresponding function script file according to the related task parameters and a script file writing rule;
and debugging the function script file to obtain the target task script file.
Optionally, the obtaining an interface identifier corresponding to the target task script file according to the interface identifier setting rule of the DAS includes:
setting an explanatory information interface identifier according to the function of the target task script file;
setting an input interface identifier according to the input object information of the target task script file;
setting an output interface identifier according to the output object information of the target task script file;
and setting a control parameter interface identifier according to the control parameter information of the target task script file.
Optionally, the generating a corresponding interface-oriented script file according to the interface identifier and the target task script file includes:
determining the position of the corresponding character string of the interface identifier in the target task script file;
and replacing the corresponding character string with the interface identifier to obtain the interface script file.
Optionally, the interface script file is called through a user-defined keyword to obtain an analysis result of the target geographic analysis task, including:
determining the file information of the target task script file through the control parameters of the user-defined keywords;
and calling and operating the interface script file according to the file information to obtain an analysis result of the target geographic analysis task.
A second aspect of the embodiments of the present application provides a device for extending a custom function based on a DAS, the device including:
the first script file generation module is used for generating a corresponding target task script file according to the target geographic analysis task;
the interface identifier setting module is used for obtaining an interface identifier corresponding to the target task script file according to an interface identifier setting rule of the DAS;
the second script file generation module is used for generating a corresponding interface script file according to the interface identifier and the target task script file;
and the script file calling module is used for calling the interface script file through a user-defined keyword in the calculation process table of the DAS to obtain an analysis result of the target geographic analysis task.
Optionally, the apparatus further comprises:
a keyword description data generation module, configured to generate keyword description data of the target geographic analysis task in a control information column in the calculation process table according to parameter information in the interface script file;
and the hyperlink generation module is used for generating hyperlinks of input information, the interface script files and the analysis results in the calculation process table.
Optionally, the first script file generating module includes:
the task parameter receiving submodule is used for determining the target geographic analysis task and receiving related task parameters of the target geographic analysis task;
the functional script file generation submodule is used for generating a corresponding functional script file according to the relevant task parameters and the script file writing rule;
and the script file debugging submodule is used for debugging the functional script file to obtain the target task script file.
Optionally, the interface identifier setting includes:
the first interface identifier setting submodule is used for setting an explanatory information interface identifier according to the function of the target task script file;
the second interface identifier setting submodule is used for setting an input interface identifier according to the input object information of the target task script file;
the third interface mark setting submodule is used for setting an output interface mark according to the output object information of the target task script file;
and the fourth interface identifier setting submodule is used for setting a control parameter interface identifier according to the control parameter information of the target task script file.
Optionally, the second script file generating module includes:
the character string position determining submodule is used for determining the position of the corresponding character string of the interface identifier in the target task script file;
and the interface script file generation submodule is used for replacing the corresponding character strings by using the interface identifications to obtain the interface script file.
Optionally, the script file calling module includes:
the script file information obtaining submodule is used for determining the file information of the target task script file according to the control parameters of the user-defined keywords;
and the script file calling submodule is used for calling and operating the interface script file according to the file information to obtain an analysis result of the target geographic analysis task.
A third aspect of embodiments of the present application provides a readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps in the DAS-based softfunction extension method 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 computer program is executed by the processor, and the steps of the DAS-based custom function expansion method according to the first aspect of the present application are implemented.
By adopting the DAS-based user-defined function expansion method, a corresponding target task script file is generated according to a target geographic analysis task; according to the interface identification setting rule of the DAS, obtaining an interface identification corresponding to the target task script file; generating a corresponding interface script file according to the interface identifier and the target task script file; and calling the interface script file through a user-defined keyword in the calculation process table of the DAS to obtain an analysis result of the target geographic analysis task. According to the method and the device, the target task script file can be generated according to the target geographic analysis task, and the corresponding task script file is compiled according to different geographic analysis tasks, so that the method and the device are suitable for various geographic analysis tasks. The method interface identification of the DAS is set, when the target task script file is obtained, the corresponding interface identification is generated according to the target task script file according to the setting rule of the method interface identification of the DAS, and then the corresponding interface script file is generated, so that a user-defined function module can be called through the DAS, bidirectional parameter transmission is carried out, namely DAS interface information is transmitted into the script file, and keyword information in the script file is transmitted into a calculation process table of the DAS. And calling the interface script file through a calculation process table of the DAS to obtain an analysis result of the target geographic analysis task, so that a user can realize the execution of the personalized geographic analysis task based on the DAS, a user-defined extended function is added to the DAS, the user-defined keywords of the DAS are enriched, the use experience of the user is greatly improved, and the popularization of the DAS technology is facilitated.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required to be used in the description of the embodiments of the present application will be briefly described below, and it is obvious that the drawings in the description below are only some embodiments of the present application, and it is obvious for those skilled in the art that other drawings may be obtained according to these drawings without inventive labor.
Fig. 1 is a flowchart of a DAS-based custom function expansion method according to an embodiment of the present application;
FIG. 2 is a graph of output results provided by an embodiment of the present application;
fig. 3 is a schematic diagram of a DAS-based extended custom function device 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.
The embodiment of the application is a custom function and a custom keyword expansion method based on DAS (Document As a System), a geographic computing task can be executed through a DAS platform, a user custom keyword is set in the DAS, the keyword is an abstract keyword, the specific realization function of the keyword is realized through a script written according to the specific geographic computing task, a user can obtain a corresponding function script according to a target geographic analysis task required to be executed, the corresponding custom function is realized in the DAS, and the custom keyword is expanded.
Referring to fig. 1, fig. 1 is a flowchart of a DAS-based custom function extension method according to an embodiment of the present application. As shown in fig. 1, the method comprises the steps of:
s11: and generating a corresponding target task script file according to the target geographic analysis task.
In this embodiment, the target geographic analysis task is a geographic related computational analysis task that needs to be executed by the user, and the target task script file is a section of executable code written according to the target geographic analysis task.
In this embodiment, first, a corresponding target task script file needs to be generated according to a target geographic analysis task, and the specific steps are as follows:
s11-1: and determining the target geographic analysis task, and receiving related task parameters of the target geographic analysis task.
In this embodiment, when a user needs to perform geographic calculation, task description information of a target geographic analysis task is input in the script writing unit, and the script writing unit receives relevant parameters of the task.
Illustratively, the objective geographic analysis task may be to perform unary linear regression on vegetation coverage temperature and temperature data of N sampling points in an area and draw an analysis graph, where relevant parameters of the task are that a task objective is: drawing a unary linear regression analysis chart; inputting data: a data table of vegetation coverage and temperature ("d: \ data1. csv" table file); and (3) outputting: unitary linear regression of vegetation coverage and temperature (d: \ TJT. jpg); the labels of the horizontal and vertical coordinate axes are respectively 'vegetation coverage' and 'temperature'; scattering point color: blue (blue); regression line color: green (green).
S11-2: and generating a corresponding function script file according to the related task parameters and the script file writing rule.
In this embodiment, after the script generation unit determines the target geographic analysis task and receives the relevant task parameters, the script generation unit may generate a corresponding function script file according to a script file writing rule.
For example, the script file can be written by using an R language or a Python language, and the script file writing rule is the same as a common script file writing rule, and the normalization setting can be performed in advance. The R language script for drawing the unitary linear regression graph of the vegetation coverage and the temperature is as follows:
# read File
data=read.csv("d:\data1.csv")
library(ggplot2)
# analysis chart Axis tag information
pLab = 'vegetation coverage, temperature'
Analysis chart color information
pColor="blue,green"
# Process Axis Label information and color information
pLab<-strsplit(pLab,",",fixed = TRUE)
pColor<-strsplit(pColor,",",fixed = TRUE)
# plot analysis
ggplot(data,aes(x=VALUE1,y=VALUE2))+
geom_point(pch=17,color=pColor[[1]][1],size=2) +
geom_smooth(method="lm",color=pColor[[1]][2],linetype=2) +
labs (title = 'vegetation coverage and temperature unary linear regression', x = pLab [ [1] ] [1], y = pLab [ [1] ] [2])
# preservation analysis chart
ggsave(file="d:\TJT.jpg")
Referring to table 1, table 1 is an input data table including a vegetation coverage column "VALUE 1" and a temperature column "VALUE 2", where the columns DIST1 "indicate sampling point positions.
Figure 799526DEST_PATH_IMAGE001
S11-3: and debugging the function script file to obtain the target task script file.
In this embodiment, the target task script file is a script file that runs without errors after the functional script file is debugged.
In this embodiment, the script debugging unit may perform operation debugging on the function script file, and when an error occurs in the script operation, modify the error code according to the error reporting information until the script file is debugged without error, so as to obtain the target task script file.
S12: and setting a rule according to the interface identifier of the DAS to obtain the interface identifier corresponding to the target task script file.
In this embodiment, the interface identifier is an identifier of an interface of each item information in the DAS document, and the DAS document implants the interface identifier into the script file to transfer information and parameters of the function script and the DAS document.
In this embodiment, in order to implement the invocation of the user-defined function by the DAS and implement the bidirectional transfer of the parameters between the DAS and the target task script, the interaction between the DAS document and the background system needs to be implemented through the computation process table in the DAS document, and therefore, the input column information, the control column information, and the output column information in the computation process table need to be identified.
IN this embodiment, the information provided by the input field is a layer or a table for processing, and may include one or more layers or data tables, and for example, "[ IN ]" may be used as an identifier. Where x represents 1 to N, N being the number of entries.
The information provided by the output column is the result of keyword processing, including filling OUT the form serial number, the layer and the data form, and for the expansion of the user-defined function, only the layer and the data form need to be processed, and for example, "[ OUT ]" may be used as an identifier, where x represents 1 to N, and N is the number of output items (excluding the form serial number).
The control column information comprises keyword description data and keyword control parameters, and the keyword description data comprises keyword Chinese brief description, keyword input and output and control parameter description information. Illustratively, the keyword chinese brief description uses "# [ description ] as an identifier; the keyword input/output and control parameter description information uses "# [ keyword ] as an identifier. The keyword control parameter describes a parameter used when the keyword is specifically called, and is divided by the symbol "|", and each parameter is identified by [ P1], [ P2], [ PN ].
The method comprises the following specific steps:
s12-1: and setting an information interface identification according to the function information of the target task script file.
In this embodiment, the function information refers to a function that can be realized by the target task script, and the function information corresponds to an interface identifier briefly described in the keyword chinese according to a design rule of a method interface of the DAS.
For example, for the function script in S11-1, the description information is: and (3) analyzing by unary linear regression, wherein the interface is marked with "#".
S12-2: and setting an input interface identifier according to the input object information of the target task script file.
In this embodiment, the input object information refers to information of a data table or a layer input in a script, and corresponds to the input object information and the input interface identifier according to a method interface design rule of the DAS.
Illustratively, for the function script IN S11-1, the input information is a data sheet file (CSV format), denoted by F, and the interface identification "[ IN1 ]".
S12-3: and setting an output interface identifier according to the output object information of the target task script file.
In this embodiment, the output object information refers to information of a processing result output in the script, and corresponds to the output object information and the output interface identifier according to the interface design rule of the DAS method.
Illustratively, for the function script in S11-1, the output information is a picture file (which may include jpg, bmp, emf, pdf, etc. formats), denoted by F, and the interface identifier "[ OUT1 ]".
S12-4: and setting a control parameter interface identifier according to the control parameter information of the target task script file.
In this embodiment, the control parameter information is information of each parameter for controlling the script function, and each control parameter is respectively corresponding to the control parameter interface identifier according to the design rule of the method interface of the DAS.
Illustratively, for the function script in S11-1, the control parameters are: the picture names | XName | YNAme | XLAb, YLab | PointColor, LineColor, the interfaces are identified as "[ P1 ]", "[ P2 ]", "[ P3 ]", "[ P4 ]" and "[ P5 ]", respectively.
In this embodiment, according to the function script and the interface setting rule of the key word method of the DAS, corresponding interface identifiers are set for the function identifier information, the input object information, the output object information, and the control parameter information in the script, so that the DAS can perform information transfer according to the interface identifiers and various parameters in the script, and fill in the corresponding key word information in the calculation process table.
S13: and generating a corresponding interface script file according to the interface identifier and the target task script file.
In this embodiment, the interfacing script file is a script file obtained by implanting an interface identifier into the target task script file.
In this embodiment, after the interface identifier of the function script is designed according to the interface design rule of the DAS, the interface identifier needs to be embedded into the target task script file, and the DAS document performs parameter transmission with the script file through the interface identifier.
In this embodiment, the specific step of generating a corresponding interfacing script file according to the interface identifier and the target task script file includes:
s13-1: and determining the position of the corresponding character string of the interface identifier in the target task script file.
S13-2: and replacing the corresponding character string with the interface identifier to obtain the interface script file.
In this embodiment, the position of the corresponding character string in the target task script file of the interface identifier is determined, and the corresponding character string in the script is replaced with the interface identifier related in S12, thereby generating an interfacing script. And saving the generated interfacing script in a specified directory of the DAS, such as a UserModel subdirectory, so as to facilitate the DAS to call.
For example, the function script in S11-1 replaces the corresponding character string with the interface identifier, and the generated interfacing script is:
# [ Explanation ] univariate Linear regression analysis
[ keywords ] F, script name | image name | XName | YNAme | XLAb, YLab | PointColor, LineColor
# read File
data=read.csv("[IN1]")
library(ggplot2)
# analysis Diagram Axis tag information
pLab="[P4]"
# analysis chart color information
pColor="[P5]"
# Process Axis Label information and color information
pLab<-strsplit(pLab,",",fixed = TRUE)
pColor<-strsplit(pColor,",",fixed = TRUE)
# plot analysis
ggplot(data,aes(x=[P2],y=[P3]))+
geom_point(pch=17,color=pColor[[1]][1],size=2) +
geom_smooth(method="lm",color=pColor[[1]][2],linetype=2) +
labs(title="[P1]",x=pLab[[1]][1],y=pLab[[1]][2])
# preservation analysis chart
ggsave(file="[OUT1]")
S14: and calling the interface script file through a user-defined keyword in a calculation process table of the DAS to obtain an analysis result of the target geographic analysis task.
In this embodiment, the calculation process table of the DAS is used to perform calculation of the target geographic analysis task and output a calculation result.
In this embodiment, the custom keyword is a G language keyword, but is different from other G language keywords, and the keyword is an abstract keyword, that is, a specific implementation function of the keyword is implemented by a script corresponding to a target geographic analysis task that a user needs to execute. This keyword is named KX _ MyKeyWord. The control parameters of the keyword are as follows:
script file method interface control parameter list
The script file may be a script written in Python (with an extension of py or txt) or R (with an extension of R). The method interface control parameter list is an application interface of the script function module, the control of the script function is realized through a series of parameters in the list, and the content in the list is determined according to the specific content of the script.
In this embodiment, in the DAS computation process table, the interfacing script is called by the user-defined keyword, and the script is executed to obtain an analysis result of the target geographic analysis task. The method comprises the following specific steps:
s14-1: and determining the file information of the target task script file according to the control parameters of the user-defined keywords.
In this embodiment, the control parameters of the customized keyword include file information of the target task script file, a name of the target task script file, and parameters required to invoke the script function.
In this embodiment, after the interfaced script file is stored in the DAS specific directory, a user-defined keyword is added to an operation column (control information column) in the DAS computation process table, where the user-defined keyword includes a script file name and control parameter information. And determining the file information of the script file according to the user-defined keyword.
For example, referring to table 2, table 2 is a calculation process table according to an embodiment of the present application, and as shown in table 2, the calculation process table includes a step column, an operation description column, an input column, an operation column (control information column), an output column, and a description column. The user's target geographic task is to perform univariate linear regression on vegetation coverage temperature and temperature data of N sampling points in a region and draw an analysis graph, in order to implement the function and expand custom keywords, after storing an interface script file in a DAS specified directory, inputting corresponding parameters in a calculation process table, mainly inputting "vegetation and temperature" in an input field, adding the custom keywords "KX _ MyKeyWord (RModel 1/univariate linear regression. R | vegetation coverage and temperature univariate linear regression | VALUE1| VALUE2| vegetation coverage, temperature | blue, green)" in an operation field, and inputting "[ univariate linear regression statistical chart ] tjt. This completes the pre-call setup.
Figure 112739DEST_PATH_IMAGE002
S14-2: and calling and operating the interface script file according to the file information to obtain an analysis result of the target geographic analysis task.
In this embodiment, after obtaining the script file information, according to the name of the script file, a script that needs to be called may be searched in the DAS specific directory, the script is run, and an operation is performed in the system background, so that an analysis result of the target geographic analysis task, that is, an output analysis table or an analysis image may be obtained.
For example, referring to fig. 3, fig. 3 is a graph of output results provided by an embodiment of the present application, and as shown in fig. 3, a unitary linear regression analysis graph of vegetation coverage and temperature is output for a target geographic task of vegetation and coverage temperature analysis. Wherein the horizontal axis is vegetation coverage, the vertical axis is temperature, and the triangle represents vegetation.
In the embodiment, by means of the user-defined keywords, a user can add a user-defined function in the DAS, expansion of the user-defined keywords is achieved, personalized geographic analysis requirements of the user are met, the DAS is greatly promoted to develop, the breadth and the depth of geographic problem analysis are greatly improved, the user does not need to master complex languages and software operation, according to target geographic tasks and script compiling rules of the user, and according to interface design rules of the script, a functional module which can be called by the DAS can be designed, and use experience of the user is improved.
In another embodiment of the present application, the method further comprises:
s21: and filling the keyword description data of the target geographic analysis task in a control information column in the calculation process table according to the parameter information in the interface script file.
In this embodiment, when the system calls the interfacing script file, the script file of the control parameter is the called interfacing script file, and according to the parameter information in the interfacing script file, the method interface control parameter list fills corresponding parameters in the control information field according to the design rule of the keyword method interface, after the script is run, the target geographic analysis task is executed, and in the control information field of the calculation process table, the system automatically fills keyword description data, which includes the chinese brief description of the keyword, the input and output of the keyword, and the control parameter description information, which are respectively identified by "#" (description ") and" # "(keyword").
Exemplarily, referring to table 3, table 3 is a calculation process table proposed in an embodiment of the present application. In the operation field (control information field), the "description" customized kinetic energy [ unary linear regression ] and the "keyword" < F, F >, < script name | image name | XName | XLab, YLab | PointColor, LineColor > are automatically filled.
Figure 158056DEST_PATH_IMAGE003
S22: and generating hyperlinks of input information, the interface script file and the analysis result in the calculation process table.
In this embodiment, after the interfacing script is called and run, the system may generate a hyperlink of input data in an input field of the calculation process table, generate a hyperlink of a script file in an operation field, and generate a hyperlink of an output result in an output field, so as to facilitate browsing by a user.
For example, referring to table 3, in table 3, hyperlinks of vegetation and temperature are generated in the input field, hyperlinks of called scripts are generated in the operation field (control information field), and hyperlinks of a unary linear regression statistical chart are generated in the output field, and a user can directly click the corresponding hyperlinks to view and browse.
In this embodiment, the description information of the keyword, and hyperlinks for input, output, and scripts are automatically filled in the calculation process table, and a specific function that can be realized by the keyword is described for the user. The user can quickly know the specific functions corresponding to the user-defined keywords by inputting and outputting data and control parameter information, the user can use the user conveniently, hyperlinks are generated, the user can check the input and output data and scripts conveniently, the user can be helped to master the geographical analysis problem more comprehensively, and the user experience is improved.
Based on the same inventive concept, an embodiment of the present application provides a custom function expansion device based on a DAS. Referring to fig. 3, fig. 3 is a schematic diagram of a DAS-based custom function extension apparatus 300 according to an embodiment of the present application. As shown in fig. 3, the apparatus includes:
a first script file generating module 301, configured to generate a corresponding target task script file according to the target geographic analysis task;
an interface identifier setting module 302, configured to obtain an interface identifier corresponding to the target task script file according to an interface identifier setting rule of the DAS;
a second script file generating module 303, configured to generate a corresponding interface script file according to the interface identifier and the target task script file;
and the script file calling module 304 is configured to call the interfaced script file through a user-defined keyword in the calculation process table of the DAS to obtain an analysis result of the target geographic analysis task.
Optionally, the apparatus further comprises:
a keyword description data generation module, configured to generate keyword description data of the target geographic analysis task in a control information column in the computation process table according to parameter information in the interfaced script file;
and the hyperlink generation module is used for generating hyperlinks of input information, the interface script files and the analysis results in the calculation process table.
Optionally, the first script file generating module includes:
the task parameter receiving submodule is used for determining the target geographic analysis task and receiving related task parameters of the target geographic analysis task;
the functional script file generation submodule is used for generating a corresponding functional script file according to the relevant task parameters and a script file compiling rule;
and the script file debugging submodule is used for debugging the functional script file to obtain the target task script file.
Optionally, the interface identifier setting includes:
the first interface identifier setting submodule is used for setting an explanatory information interface identifier according to the function of the target task script file;
the second interface identifier setting submodule is used for setting an input interface identifier according to the input object information of the target task script file;
the third interface identifier setting submodule is used for setting an output interface identifier according to the output object information of the target task script file;
and the fourth interface identifier setting submodule is used for setting a control parameter interface identifier according to the control parameter information of the target task script file.
Optionally, the second script file generating module includes:
the character string position determining submodule is used for determining the position of the corresponding character string of the interface identifier in the target task script file;
and the interface script file generation submodule is used for replacing the corresponding character strings by using the interface identifications to obtain the interface script file.
Optionally, the script file calling module includes:
the script file information obtaining submodule is used for determining the file information of the target task script file according to the control parameters of the user-defined keywords;
and the script file calling submodule is used for calling and operating the interface script file according to the file information to obtain an analysis result of the target geographic analysis task.
Based on the same inventive concept, another embodiment of the present application provides a readable storage medium, on which a computer program is stored, and the program, when executed by a processor, implements the steps in the DAS-based custom function extension method 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 in the memory and executable on the processor, and when the processor executes the computer program, the electronic device implements the steps in the DAS-based custom function extension method according to any of the above embodiments of the present application.
For the apparatus embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and reference may be made to the partial description of the method embodiment for relevant points.
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 extending the custom function of the DAS 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 manner 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 (9)

1. A method for extending a custom function based on DAS is characterized in that the method comprises the following steps:
generating a corresponding target task script file according to the target geographic analysis task;
according to interface identification setting rules of the DAS, obtaining an interface identification corresponding to the target task script file;
generating a corresponding interface script file according to the interface identifier and the target task script file;
and calling the interface script file through a user-defined keyword in the calculation process table of the DAS to obtain an analysis result of the target geographic analysis task.
2. The DAS-based custom function extension method of claim 1, further comprising:
generating keyword description data of the target geographic analysis task in a control information column in the calculation process table according to the parameter information in the interface script file;
and generating hyperlinks of input information, the interface script file and the analysis result in the calculation process table.
3. The DAS-based custom function extension method of claim 1, wherein the generating of the corresponding target task script file according to the target geographic analysis task comprises:
determining the target geographic analysis task, and receiving related task parameters of the target geographic analysis task;
generating a corresponding function script file according to the related task parameters and a script file writing rule;
and debugging the function script file to obtain the target task script file.
4. The method of claim 1, wherein the obtaining of the interface identifier corresponding to the target task script file according to the interface identifier setting rule of the DAS includes:
setting an explanatory information interface identifier according to the function of the target task script file;
setting an input interface identifier according to the input object information of the target task script file;
setting an output interface identifier according to the output object information of the target task script file;
and setting a control parameter interface identifier according to the control parameter information of the target task script file.
5. The DAS-based custom function extension method of claim 1, wherein the generating a corresponding interfaced script file according to the interface identifier and the target task script file comprises:
determining the position of the corresponding character string of the interface identifier in the target task script file;
and replacing the corresponding character string with the interface identifier to obtain the interface script file.
6. The DAS-based custom function extension method of claim 1, wherein the invoking the interfacing script file by a custom keyword to obtain an analysis result of the target geographic analysis task comprises:
determining the file information of the target task script file according to the control parameters of the user-defined keywords;
and calling and operating the interface script file according to the file information to obtain an analysis result of the target geographic analysis task.
7. A DAS-based custom function extension apparatus, comprising:
the first script file generation module is used for generating a corresponding target task script file according to the target geographic analysis task;
the interface identifier setting module is used for obtaining an interface identifier corresponding to the target task script file according to an interface identifier setting rule of the DAS;
the second script file generation module is used for generating a corresponding interface script file according to the interface identifier and the target task script file;
and the script file calling module is used for calling the interface script file through a user-defined keyword in the calculation process table of the DAS to obtain an analysis result of the target geographic analysis task.
8. A computer readable storage medium having stored thereon a computer program, which when executed by a processor, performs the steps of the DAS-based softfunction extension method according to any of claims 1 to 6.
9. 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 DAS-based custom function extension method according to any of claims 1 to 6 when executing the computer program.
CN202210532723.0A 2022-05-17 2022-05-17 DAS-based custom function expansion method, device, equipment and storage medium Active CN114706660B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202210532723.0A CN114706660B (en) 2022-05-17 2022-05-17 DAS-based custom function expansion method, device, equipment and storage medium
US18/090,536 US11775260B1 (en) 2022-05-17 2022-12-29 Method, apparatus, and device for DAS-based custom function expansion, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210532723.0A CN114706660B (en) 2022-05-17 2022-05-17 DAS-based custom function expansion method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN114706660A CN114706660A (en) 2022-07-05
CN114706660B true CN114706660B (en) 2022-09-09

Family

ID=82177343

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210532723.0A Active CN114706660B (en) 2022-05-17 2022-05-17 DAS-based custom function expansion method, device, equipment and storage medium

Country Status (2)

Country Link
US (1) US11775260B1 (en)
CN (1) CN114706660B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115577060B (en) * 2022-09-27 2023-05-16 清华大学 DAS-based efficient field computing expression method, device, medium and product
CN115510173B (en) * 2022-09-27 2023-06-06 清华大学 DAS-based intelligent thematic map making method, device and product

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106371931A (en) * 2016-09-30 2017-02-01 电子科技大学 Web framework-based high-performance geocomputation service system
CN110334169A (en) * 2019-07-01 2019-10-15 清华大学 A kind of novel geocomputation mode

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060230051A1 (en) * 2005-04-08 2006-10-12 Muds Springs Geographers Inc. Method to share and exchange geographic based information
US8589142B2 (en) * 2005-06-29 2013-11-19 Qualcomm Incorporated Visual debugging system for 3D user interface program
EP2057551B1 (en) * 2006-08-18 2013-04-10 Barclays Capital Inc. Email forms engine for portable devices
US8539443B2 (en) * 2008-05-13 2013-09-17 National Instruments Corporation Edit time analyzer in a loosely typed textual language
US8319793B2 (en) * 2009-04-17 2012-11-27 Definiens Ag Analyzing pixel data by imprinting objects of a computer-implemented network structure into other objects
CA3171835A1 (en) * 2011-09-09 2013-03-14 Accipiter Radar Technologies, Inc. Device and method for 3d sampling with avian radar
WO2014049854A1 (en) * 2012-09-28 2014-04-03 株式会社日立製作所 Computer system and program
US10599741B2 (en) * 2013-07-08 2020-03-24 Big Fish Design, Llc Application software for a browser with enhanced efficiency
US9606900B1 (en) * 2016-03-24 2017-03-28 Fmr Llc Intelligent automation of computer software test scripts and code requirements
US10542119B2 (en) * 2017-12-07 2020-01-21 Citrix Systems, Inc. Multi-geographical processing of user requests

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106371931A (en) * 2016-09-30 2017-02-01 电子科技大学 Web framework-based high-performance geocomputation service system
CN110334169A (en) * 2019-07-01 2019-10-15 清华大学 A kind of novel geocomputation mode

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
A New GeoComputation Pattern and Its Application in Dual-Evaluation;Wensheng Zhou;《Spring Link》;20210425;1-15 *
基于DAS 的地理设计方法在空间规划中的应用;周文生;《人类居住》;20211231;32-42 *

Also Published As

Publication number Publication date
US11775260B1 (en) 2023-10-03
CN114706660A (en) 2022-07-05

Similar Documents

Publication Publication Date Title
CN114706660B (en) DAS-based custom function expansion method, device, equipment and storage medium
CN108139891B (en) Method and system for generating suggestions to correct undefined token errors
CN108762743B (en) Data table operation code generation method and device
CN111507086B (en) Automatic discovery of translated text locations in localized applications
CN105528418B (en) A kind of design documentation generation method and device
CN103309806B (en) The device and method of a kind of quick development and testing
KR100456023B1 (en) Method and apparatus for wrapping existing procedure oriented program into component based system
CN105743736B (en) Automated testing method and system
CN110673854A (en) SAS language compiling method, device, equipment and readable storage medium
US9311077B2 (en) Identification of code changes using language syntax and changeset data
US11301643B2 (en) String extraction and translation service
CN112199086A (en) Automatic programming control system, method, device, electronic device and storage medium
CN103309667A (en) Method for positioning UI (user interface) control and picture modifying position in Android system
CN101499063A (en) Tracing-based database schema evolution method and system
US11526484B2 (en) Methods and systems for creating and managing micro content from an electronic document
CN107515739B (en) Method and device for improving code execution performance
CN113268227A (en) Zero-code visualization software development platform and development method
CN110262800A (en) Multilingual processing method and processing device
Walker et al. The symbolics Genera programming environment
CN101253477A (en) Nullable and late binding
CN113360385A (en) Test method, device, equipment and medium
CN113297251A (en) Multi-source data retrieval method, device, equipment and storage medium
CN113934748A (en) Mixed type SQL script file generation method, execution method and device
Koznov et al. View to view transformations in domain specific modeling
JP2012173745A (en) Database analysis device and database analysis program

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