# A DeBERTa-Based Semantic Conversion Model for Spatiotemporal Questions in Natural Language
## 2 NL2 Cypher Conversion Model  
NL2 Cypher aims to address the challenge of converting complex natural language spatiotemporal queries into structured Cypher query statements. These natural language spatiotemporal queries extensively encompass multiple elements including geographic entities, location information, spatiotemporal relationships, and place types, while involving various query purposes such as location queries, distance calculations, directional guidance, quantitative statistical analysis, and extremum searches. Given the limitations of traditional keyword-based search methods in handling such complex and variable semantic requirements, and in order to ensure the reliability of the experiments and the superiority of the results, this study preprocesses the datasets, which includes steps such as data cleansing, word segmentation, data annotation, and segmentation of sentence lengths according to the data characteristics and model requirements. This paper thoroughly explores the semantic information extraction and parsing process of spatiotemporal queries, thereby achieving precise mapping between natural language and database query language.  
The conversion model consists of two modules: a semantic encoding module and a semantic understanding method. The overall research framework is illustrated in Figure 1, and Table 1 provides an example of a natural language spatiotemporal query. The specific contents are as follows:  
(1) Semantic encoding module: In this study, the DeBERTa pre-trained model is applied for the first time to the natural language spatiotemporal interrogative entity recognition task, which effectively overcomes the limitations of the traditional static word vectors and the BERT model in processing Chinese character features. By combining BiGRU, this model effectively mines the temporal and spatial features of the text, and furthermore, the dynamic integration between features is achieved with the help of CRF, which greatly op  
\begin{table}
\begin{tabular}{c c} \hline \hline
**Question** & **What Are the Three Closest Parks to Tiananmen Square?** \\ \hline Semantic encoding & sppdt2 \\ Question type & maximum/minimum value query \\  & MATCH (p(name: ‘Tiananmen Square’)), (t:parks) WITH p, t ORDER BY \\ Cypher question & point.distance(point([latitude: p.latitude, longitude: p.longitude]), \\  & point([latitude: t.latitude, longitude: t.longitude])) LIMIT 3 RETURN t \\ \hline \hline \end{tabular}
\end{table}
Table 1: Examples of natural language to Cypher.  
Figure 1: Technology framework of semantic understanding of spatiotemporal questions in natural language.  
timizes the model's ability to understand and characterize spatiotemporal interrogative sentences in Chinese natural language. In the Section 5.2 Semantic Encoding Model Results section of Section 5, comparisons are made with other state-of-the-art models, and the experimental results show that the F1 value of the present model is as high as 92.69%, which is a significant improvement in accuracy compared with other models.  
(2) Semantic understanding method: This component classifies queries based on semantic encoding results; performs semantic parsing of intra-class queries according to temporal relationships, spatial relationships, and dependency relationships in the query structure; and subsequently generates Cypher statements to complete query intent recognition.  
Through the above research framework, a comprehensive understanding and mapping of natural language spatiotemporal interrogations will be realized, the connection efficiency and accuracy between natural language interrogations and database queries will be improved, and effective solutions will be provided for natural language interrogation queries oriented to natural language with spatiotemporal characteristics.