## 3 Methodology
### Scene Decomposer
#### 3.2.2 Implementation of COS Prompting Method
Obviously, explicit relations are related to the statements in the scene, while implicit relations depend on the type of scene. Relations in this paper do not refer to quantitative relations because they are all involved in solving AWPs. Our method first classifies the text of each scene using the Quantity-to-Relation Attention Network (QRAN) proposed by [17], and sequentially extracts explicit and implicit relations based on the classification results. The QRAN reallocates attention weights to the contexts of quantity-related entities, which contain critical information for distinguishing scene types, thereby effectively accomplishing the scene classification task. In order to extract explicit relations from each scene, this method first constructs a pool of Scene-Aware \(S^{2}\) models. It is based on the \(S^{2}\) model proposed by [17] and re-summarizes the explicit relation patterns in different scenes. It not only considers general explicit relations that may appear in all scenes, but also considers explicit relations that only appear in specific scenes. The definition of the Scene-Aware \(S^{2}\) model is as follows:

Definition 4 (Scene-Aware \(S^{2}\) Model): A Scene-Aware \(S^{2}\) model is a quintuple \(\delta\) = (L, P, K, Q; R), with \(L\) denoting scene types to which the model is applicable, P denoting structure of Part-Of-Speech (POS), K representing keywords, Q representing the matching rules, and R representing the relation of the model. \(\Delta\) = {\(\delta_{i}=(L_{i},P_{i},K_{i},Q_{i};R_{i})\mid i=1,2,3,\ldots\)} is called a pool of Scene-Aware \(S^{2}\) models. Table 2 shows typical models in the Scene-Aware \(S^{2}\) model pool, where each row represents a model. In the \"model structure\", the first line represents the POS structure \(P\) (outside the \"[ ]\") and the keywords \(K\) (inside the \"[ ]\") to be matched; the second line represents the matching rules \(Q\); the third line represents the relation \(R\) to be mapped. Models with scene type \"general\" are used to extract general explicit relations and are applicable to all scenes. Few models are applicable to multiple scene types because the explicit relations in these scenes are similar. It is worth noting that the original \(S^{2}\) model [17] only considers the quantitative relations between entities, such as the quantitative relation between \"Pen\" and \"Eraser\" in the second row. Our method evolves this model to enable it to extract the relations between the attributes of entities, such as the relation between \"durian\" and \"apple\" in the \"price\" attribute in the third row. In order to extract implicit relations, this method prepares an implicit template pool for non-general scenes. The form of the implicit template is similar to [17, 33, 34], which consists of several concepts and a template relation between them. For example, the implicit template for a \"Circle Area\" scene is \(\{CC:[Area,Radius],TP:\)\({}^{\prime}Area=\pi\times Radius\times Radius^{\prime\prime}\}\), where \"CC\" is the concepts and \"TP\" is the template of relation. We use the concepts in the implicit template to match the entities or attributes in the explicit relation acquired by Scene-Aware \(S^{2}\) models. By replacing the concepts with the matched entities or attributes, the relation template can be instantiated into an implicit relation. Overall, this method extracts a relation set including all explicit and implicit relations for each scene, thereby producing a list of relation sets for an AWP. #### 3.3.2 Implementation of Scene-Aware \(S^{2}\) Method

This section discusses the implementation of the Scene-Aware \(S^{2}\) method for acquiring a relation set from a scene. It first utilizes QRAN for classifying the type of scene, then employs scene-aware \(S^{2}\) models to match scene text and extract explicit relations; finally, it matches concepts in the implicit template with entities in the explicit relations to instantiate implicit relations. This process of this component is delineated by Procedure 2.