Form page analysis method and device and storage medium

By creating form instances and page instances in the form page and mounting the form instances on the page instance, the problem of inflexible form page data management in the prior art is solved, and more flexible data management and data sharing between content is achieved.

CN119883278APending Publication Date: 2025-04-25上海瑞家信息技术有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411954382.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-26
Publication Date
2025-04-25

AI Technical Summary

Technical Problem

When the prior art renders a form page based on JSON Schema description document, the form page data management is inflexible and data sharing between form content and non-form content cannot be realized.

Method used

By creating form instances and page instances, they carry form-level data and page-level data respectively, and mount form instances on page instances, hierarchical management and data sharing of form-level data and page-level data.

Benefits of technology

It improves the flexibility of page data management and realizes data sharing and linkage between form content and non-form content.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119883278A_ABST
    Figure CN119883278A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a form page analysis method and device and a storage medium. In the embodiment of the invention, a form instance and a page instance are respectively created for form-level data and page-level data; the form instance is used for bearing the form-level data, and the page instance is used for bearing the page-level data, so that hierarchical management of the form-level data and the page-level data is realized, and the flexibility of page data management is improved. Furthermore, the form instance is mounted on the page instance, and data sharing of the page-level data between page parts, namely non-form parts, inside the form and outside the form is achieved. And in the form-level component node analysis process, the dynamic form-level component in the form can be associated with the page state information in the page-level data, so that the analyzed dynamic form-level component can sense and respond to the change of the page state information, and linkage with the page state information is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computers, and in particular to a form page parsing method, device and storage medium. Background Art

[0002] As a visual application development method, low code does not need to use traditional handwritten code for programming in most cases. Instead, developers can complete development work in more efficient ways such as graphical drag and drop and parameter configuration.

[0003] Developing form pages based on a low-code platform can simplify the development difficulty of form pages and improve development efficiency. In the process of developing form pages, it not only involves developing form content in the form page based on the form domain model, but also involves the development of non-form content in the form page. After the development of these two parts is completed, a JSON Schema (a JSON-based format) description document of the entire form page can be obtained.

[0004] In the related art, a form page can be rendered based on a JSON Schema description document. In the process of rendering a form page based on a JSON Schema description document, a form instance is created with the form as the root node, and the entire page data is mounted under the form instance for rendering, which is tightly coupled in page data management, inflexible in page data management, and unable to achieve data sharing between form content and non-form content. Summary of the invention

[0005] Multiple aspects of the present application provide a form page parsing method, device and storage medium to implement hierarchical management of form-level data and page-level data, improve the flexibility of page data management, and implement data sharing between form content and non-form content.

[0006] The embodiment of the present application provides a form page parsing method, comprising: responding to a page access request, obtaining a structured description document of a form page to be accessed, the form page comprising form-level data and page-level data, the structured description document comprising at least description information of a page-level root node for storing the page-level data and description information of a form-level component node, the description information of the form-level component node being used to describe the form-level components in the form-level data; creating a page instance of the form page, creating a form instance for each form included in the form page, and mounting each form instance on the page instance, the page instance being an instance for carrying the page-level data, and the form instance being an instance for carrying the form-level data; parsing the page-level data from the description information of the page-level root node, and mounting the page-level data on the page instance to obtain context information of the page instance; recursively parsing the description information of the form-level component node according to the context information of the page instance to obtain the form-level component corresponding to each form instance, and mounting the form-level component corresponding to each form instance on the corresponding form instance to obtain the form page.

[0007] An embodiment of the present application also provides an electronic device, including a memory and a processor, wherein the memory is used to store a computer program, and the processor is coupled to the memory and is used to execute the computer program to implement the steps in each method provided in the embodiment of the present application.

[0008] The embodiment of the present application also provides a form page parsing device, including: an acquisition module, used to respond to a page access request, obtain a structured description document of a form page to be accessed, the form page includes form-level data and page-level data, the structured description document at least includes description information of a page-level root node for storing the page-level data and description information of a form-level component node, the description information of the form-level component node is used to describe the form-level component in the form-level data; a creation module, used to create a page instance of the form page, create a form instance for each form contained in the form page, and mount each form instance to the page In the example, the page instance is an instance for carrying the page-level data, and the form instance is an instance for carrying the form-level data; the first parsing module is used to parse the page-level data from the description information of the page-level root node, and mount the page-level data on the page instance to obtain the context information of the page instance; the second parsing module is used to recursively parse the description information of the form-level component node according to the context information of the page instance to obtain the form-level component corresponding to each form instance, and mount the form-level component corresponding to each form instance to the corresponding form instance to obtain the form page.

[0009] An embodiment of the present application also provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the processor is enabled to implement the steps in the above method.

[0010] In the embodiment of the present application, a form instance and a page instance are created for form-level data and page-level data respectively; the form instance is used to carry form-level data, and the page instance is used to carry page-level data, thereby realizing hierarchical management of form-level data and page-level data, and improving the flexibility of page data management. Furthermore, the form instance is mounted on the page instance to realize data sharing between the page-level data inside the form and the page part outside the form, that is, the non-form part.

[0011] Furthermore, during parsing of the form-level component nodes, the dynamic form-level components within the form can be associated with the page status information in the page-level data, so that the parsed dynamic form-level components can perceive and respond to changes in the page status information, thereby achieving linkage with the page status information. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0013] Figure 1 A flowchart of a form page parsing method is provided for an exemplary embodiment of the present application;

[0014] Figure 2 A flowchart of a form page parsing method is provided for another exemplary embodiment of the present application;

[0015] Figure 3 A schematic diagram of the structure of an electronic device provided for another exemplary embodiment of the present application;

[0016] Figure 4 A schematic diagram of the structure of a form page parsing device provided as an exemplary embodiment of the present application. DETAILED DESCRIPTION

[0017] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in combination with the specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.

[0018] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0019] In the process of developing form pages based on the low-code platform, the low-code platform provides a visual interface and component library for users to quickly build form pages. Among them, the component library provides a series of pre-built component templates, so that users can complete the development of form pages without writing a lot of code, and form a structured description document corresponding to the form page. The structured description document serves as the communication language between the low-code platform and the form parsing engine. The structured description document output by the low-code platform can be parsed by the form parsing engine and generate a corresponding form page. In the embodiment of the present application, the type of structured description document is not limited, for example, it can be JSON Schema, XML (Extensible Markup Language), etc.

[0020] Among them, the component is the smallest reusable unit for building a form page. Each component corresponds to a component node in the structured description document, and the description information of the component node is used to describe the component. Among them, the properties of the component are marked in the fields of its corresponding component node, and each component can correspond to one or more fields. During the parsing process, according to the description information of the component node, the component type, properties and other information can be identified; according to the component type, the corresponding component template is selected from the component library; further, a component instance is created according to the component template, and the properties are mapped to the component instance to complete the rendering of the component.

[0021] The component templates in the component library vary depending on the front-end framework used. For example, in a component library based on the React framework, the component templates can be implemented as function components or class components; in a component library based on the Vue framework, the component templates can exist in the form of single file components (SFCs).

[0022] Furthermore, a form is also considered as a component, more specifically, a container component, which can contain one or more components, and these components can be but are not limited to input boxes, drop-down menus, check boxes, etc. When the container component is implemented as a form, the components contained in the container component are called form-level components, and the description information of the form-level component node is used to describe the form-level components. Among them, the container component is responsible for providing, creating and holding data for each form-level component inside it. In other words, the container component mainly processes data, maintains its own status information, can pass data to each form-level component inside it for use, and may not contain its own UI (UserInterface).

[0023] Based on this, in the embodiment of the present application, the form page includes one or more forms, each form includes one or more form-level components, and for the convenience of description, the collection of form-level components included in each form is called form-level data, that is, the form-level data includes each form-level component inside each form in the form page, each form-level component has a state and related data, and the form-level data can also be called form content. Correspondingly, page-level data refers to other data in the form page except form-level data, which can also be called non-form content.

[0024] Because it is wrapped by a container component such as a form, the form-level components inside it cannot obtain data outside the form, forming a data island, making it impossible to share and link form content with non-form content. In addition, when the form parsing engine parses the structured description document, it parses it based on the form, that is, it identifies the form root node from the structured description document and creates a form instance with the form as the root node; and the entire page data is mounted on the form instance for parsing, which is tightly coupled in page data management. The page data is mixed with the form data itself, and the page data management is inflexible.

[0025] In view of the above technical problems, in the embodiment of the present application, form instances and page instances are created for form-level data and page-level data respectively; the form instance is used to carry form-level data, and the page instance is used to carry page-level data, thereby realizing hierarchical management of form-level data and page-level data, and improving the flexibility of page data management. Furthermore, the form instance is mounted on the page instance to realize data sharing between the page-level data inside the form and the page part outside the form, that is, the non-form part.

[0026] Furthermore, in an optional embodiment of the present application, during the parsing of the form-level component nodes, the dynamic form-level components within the form can be associated with the page status information in the page-level data, so that the parsed dynamic form-level components can perceive and respond to changes in the page status information, thereby achieving linkage with the page status information.

[0027] The technical solutions provided by various embodiments of the present application are described in detail below in conjunction with the accompanying drawings.

[0028] Figure 1 The following is a flow chart of a form page parsing method provided by an exemplary embodiment of the present application. Figure 1 As shown, the method includes:

[0029] S101: Responding to a page access request, obtaining a structured description document of a form page to be accessed, wherein the form page includes form-level data and page-level data, and the structured description document includes at least description information of a page-level root node for storing the page-level data and description information of a form-level component node, wherein the description information of the form-level component node is used to describe a form-level component in the form-level data;

[0030] S102: creating a page instance of the form page; creating a form instance for each form included in the form page, and mounting each form instance on the page instance, the page instance is an instance used to carry page-level data, and the form instance is an instance used to carry form-level data;

[0031] S103: parsing the page-level data from the description information of the page-level root node, and mounting the page-level data on the page instance to obtain the context information of the page instance;

[0032] S104: According to the context information of the page instance, recursively parse the description information of the form-level component node corresponding to each form instance to obtain the form-level component corresponding to each form instance, and mount the form-level component corresponding to each form instance to the corresponding form instance to obtain the form page.

[0033] In the embodiment of the present application, there is no limitation on the execution subject of the page parsing method. For example, it can be a server or a client. If the execution subject is a server, then when a page access request is received, the form page and its corresponding structured description document that need to be loaded can be determined according to the page access request, and then the corresponding structured description document can be loaded from the database, and the structured description document can be parsed to dynamically generate the corresponding form page. After obtaining the form page, the form page can be sent to the corresponding client. If it is a client, the corresponding form page and its corresponding structured description document can be pulled from the server according to the page access request, and then after obtaining the structured description document, the structured description document can be parsed locally to dynamically generate the corresponding form page.

[0034] In an embodiment of the present application, the structured description document includes at least description information of the root node of the page-level data and description information of the form-level component node. Optionally, the form-level component node includes description information of the dynamic form-level component and description information of the static form-level component. According to the description information of the dynamic form-level component, the dynamic form-level component is parsed to obtain the dynamic form-level component, which refers to the component that can be linked with the page-level data. Correspondingly, according to the description information of the static form-level component, the static form-level component is parsed to obtain the static form-level component, which refers to the component that cannot be linked with the page-level data.

[0035] Among them, the page-level data includes page status information, and the page status information refers to the global status data in the page-level data. For example, the page status information may include the various states of the page corresponding to the life cycle functions of the page, such as initialization, loading, and loading completion. For another example, the page status information may also include the state of the component. The component may have its own state, and when interacting with the user, its state changes, thereby triggering the update of the component. Optionally, in the case where the page status information is the state of a component, the component may be a form-level component, or it may be other components in the form page except the form-level components, that is, non-form-level components, and there is no limitation on this.

[0036] In this embodiment, the page status information can be added by the user when developing a form page based on the low-code platform, or it can be the default information of the low-code platform, and there is no limitation on this.

[0037] In order to realize the hierarchical management of page-level data and form-level data, in this embodiment, a corresponding form instance is created for each form contained in the form page, and a page instance is created for the form page. Among them, this embodiment does not limit the order of creating form instances and page instances. The page instance is an instance used to carry page-level data, and the form instance is an instance used to carry corresponding form-level data. On this basis, in order to realize global data sharing of page-level data, the form instance is mounted on the page instance, so that the page-level data can be accessed and used by each form instance and the form-level components it contains.

[0038] It is explained here that when a page instance is created, the page-level data it carries can be empty. In the process of parsing the description information of the page-level root node, the page-level data can be parsed and mounted on the page instance to obtain the context information of the page instance. The context information of the page instance can be used to parse the form-level component node. And, when parsing the page-level root node, the page initialization lifecycle function is executed to complete the initialization of the form page.

[0039] Then, according to the context information of the page instance, the description information of the form-level component node is recursively parsed to obtain the form-level component corresponding to each form instance. During the parsing process, the description information of the form-level component node can be obtained from the structured description document to identify its component type, attributes and other information; according to the component type, the corresponding component template is selected and the component instance is created; and the attributes are mapped to the component instance to complete the parsing of the form-level component node and obtain the form-level component corresponding to each form instance. Furthermore, the form-level component corresponding to each form instance obtained by parsing is mounted on the corresponding form instance to obtain the form page.

[0040] In the embodiment of the present application, a form instance and a page instance are created for form-level data and page-level data respectively; the form instance is used to carry form-level data, and the page instance is used to carry page-level data, thereby realizing hierarchical management of form-level data and page-level data, and improving the flexibility of page data management. Furthermore, the form instance is mounted on the page instance to realize data sharing between the page-level data inside the form and the page part outside the form.

[0041] Based on the above embodiments, Figure 2As shown, an embodiment of the present application also provides a page parsing method. In this method, corresponding form instances are created in advance for each form contained in the form page, and corresponding page instances are created for the form page. In the process of creating a page instance of a form page, multiple objects for carrying different types of page-level data are created. Further, the page instance and the structured description document are passed into the page parsing engine for parsing. In the parsing process, parsing is performed based on the page, that is, parsing starts from the page-level root node, so as to establish the context information of the page instance; the global object set passed in by the user is received and the same name is overwritten to obtain the target global object set; the remaining structured description documents, form instances and target global object sets are passed into the form parsing engine, so that the form parsing engine can recursively parse the description information of the form-level component nodes according to the target global object set to obtain the form page. The following is combined with Figure 2 This method is introduced in detail.

[0042] like Figure 2 As shown, in this embodiment, in S201, a corresponding form instance is created for each form included in the form page; and a page instance of the form page is created, and each form instance is mounted on the page instance, the page instance is an instance for carrying page-level data, and the form instance is an instance for carrying corresponding form-level data. In an optional embodiment, when creating a page instance, it includes: creating a page object; creating a target observable data object, the target observable data object is used to carry page status information in the page-level data; wherein the dynamic form-level component can perceive the change of the page status information in the target observable object, and respond to the change of the page status information; further, the target observable data object is mounted on the page object to obtain the page instance.

[0043] Optionally, the association between the dynamic form-level component and the target observable data object is implemented based on the observer pattern, so that the dynamic form-level component can perceive and respond to the page status information, thereby realizing the linkage with the page status information. Figure 2As shown in S204, in the process of parsing the form-level component node, if the description information of the recursively parsed form-level component node includes the description information of the dynamic form-level component and the association relationship between the dynamic form-level component and the page status information in the page-level data, then the initial form-level component is generated according to the description information of the dynamic form-level component, and the initial form-level component does not yet have observation capabilities. Among them, the initial form-level component has an observation function, and the observation function can be defined in the corresponding form-level component node. The observation function is used to define the logic of the dynamic form-level component responding to changes. Further, the observation function of the initial form-level component is registered in the target observable object. For example, a registration request can be initiated to the target observable object to request to subscribe to changes in the page status information in the target observable object, thereby transforming the initial form-level component into a dynamic form-level component.

[0044] Optionally, in the process of transforming the initial form-level component into the dynamic form-level component, the initial form-level component is wrapped with a high-order container component. The high-order container component is a container component pre-defined by the developer, and the high-order container component carries the observation function corresponding to the initial component. Furthermore, the high-order container component can initiate a registration request to the target observable object based on the association relationship, and the registration request is used to subscribe to the changes in the page status information, thereby subscribing to the dynamic form-level component wrapped by the high-order container component. When the page status information changes, the target observable object calls the observation function on the high-order container component to respond to the changes in the page status information, thereby realizing the linkage between the wrapped dynamic form-level component and the page status information. By wrapping the dynamic form-level component with the high-order container component, the high-order container component is responsible for implementing the observer logic of the dynamic form-level component, and the form-level component only needs to focus on its own business logic, such as how to display form-level data, etc., thereby realizing the decoupling of the observer logic and the business logic.

[0045] Among them, the observation function of the dynamic form-level component is used to perceive and respond to changes in page status information. When the page status information changes, the observation function can be called by the target observable object, and then respond to the changes in the page status information according to the observation function. At the same time, the target observable data object maintains a listening list, which maintains all the observer information of the page status information, so that when the page status information changes, the observation function corresponding to all the observers of the target observable object is called to execute the corresponding response logic, thereby realizing the linkage between the dynamic form-level component and the page status information, that is, the linkage between the form-level data and the page-level data.

[0046] Optionally, the page-level data may also include at least one of static data and static methods; wherein the static data is a page-level constant, and the static methods are some general functions. In the process of creating a page instance, a target static data object and / or a target static method object may also be created to carry the static data and / or static methods respectively. Based on this, in this embodiment, if Figure 2 As shown in S201 in the process of creating a page instance, the process may also include: creating a target static data object and / or a target static method object, wherein the target static data object is used to carry the static data in the page-level data; the target static method object is used to carry the static method in the page-level data; and the target static data object and / or the target static method object are mounted on the page object to obtain the page instance. By mounting the target static data object and the target static method object on the page object, the static data and the static method can be globally accessed and used.

[0047] like Figure 2 As shown in FIG. 1 , when a page instance is obtained, the page instance and the structured description document can be sent to the page parsing engine. Figure 2 As shown in S202, the description information of the page-level root node is identified from the structured description document. For example, the page-level root node can be identified based on the identification of specific fields, and a form page has a root node; according to the data attributes, the description information of the page-level root node is parsed to obtain the page status information contained in the page-level data, and the static data and / or static methods contained in the page-level data. Optionally, according to the data attributes, the description information of the page-level root node is parsed, including: according to the preset fields of the page status information, and the preset fields in the static data and static methods, the page status information of the page data, and the static data and static methods are respectively identified. Among them, the page status information, and the static data and static methods correspond to different preset fields respectively.

[0048] In an optional embodiment, when mounting page-level data on a page instance to obtain context information of the page instance, the method includes: mounting page status information in the page-level data on a target observable data object in the page instance; and mounting static data and / or static methods in the page-level data on target static data objects and / or target static method objects on the page instance, respectively, to obtain context information of the page instance. Based on this, the access and use of static data and static methods can be achieved by accessing the target observable data object and target static method object on the page instance.

[0049] In an alternative embodiment, if Figure 2As shown, when the page instance and the structured description document are passed into the page parsing engine, a global object set passed in by the user can also be received, and the global object set includes at least one of a custom observable data object, a custom static data object, and a custom static method object. Among them, the global object set passed in by the user has a higher priority, so the objects in the context information of the page instance are overwritten with the same name using the objects in the global object set to obtain the target global object set (such as Figure 2 As shown in S203 in the above). Optionally, when using an object in the global object set to overwrite an object in the context information of a page instance with the same name, it includes: overwriting a target observable data object with a custom observable data object; overwriting a target static data object with a custom static data object; and overwriting a target static method object with a custom static method object. Wherein, overwriting with the same name means assigning the value of an object with the same name in the global object set to a corresponding object in the context information of the page instance.

[0050] In an alternative embodiment, if Figure 2 As shown in the figure, when the page instance and structured description document are passed into the page parsing engine, the user can also pass in a custom component. The custom component is a pre-built component in the component library provided by the low-code platform.

[0051] It should be noted that, in the embodiment of the present application, there is no limitation on the timing of the user inputting the global object set and the custom component. As long as the inputting is before the page parsing engine parses the structured description document, it is applicable to the present embodiment.

[0052] like Figure 2 As shown, the description information, custom components, form instances and target global object sets of the remaining form-level component nodes are sent to the form parsing engine for parsing. The process of parsing the form-level component nodes can refer to the aforementioned embodiment. Among them, in the case of parsing the form-level component nodes corresponding to the dynamic form-level components, the parsing process can refer to the aforementioned embodiment. The parsing process for the static form-level components is introduced below.

[0053] In an alternative embodiment, if Figure 2 As shown in S204, during the process of parsing the form-level component node, if the description information of the recursively parsed form-level component node includes the description information of the static form-level component, a static form-level component is generated according to the description information of the static form-level component, and the static form-level component does not have an observation function.

[0054] In an optional embodiment, the page-level data also includes: non-form-level components, which refer to other components in the form page except the form-level components, such as some layout components, button components, and operation components, etc. Among them, the structured description document also includes the description information of the non-form-level component nodes; the above method also includes: using the context information of the page instance, recursively parsing the description information of the non-form-level component nodes, identifying the type, attributes and other information of the non-form-level component; matching the component template of the corresponding non-form-level component from the component library according to the component type of the non-form-level component; further, creating a component instance of the non-form-level component according to the component template of the non-form-level component, and mapping its attributes to the component instance to complete the rendering of the non-form-level component and obtain the non-form-level component in the form page; mounting the non-form-level component on the page instance.

[0055] It should be noted that in the embodiment of the present application, the parsing order of the form-level component nodes and the non-form-level component nodes is not limited, and may be determined according to the order of the nodes in the structured description document.

[0056] The detailed implementation and beneficial effects of each step in the method of this embodiment have been described in detail in the aforementioned embodiments and will not be elaborated here.

[0057] It should be noted that the execution subject of each step of the method provided in the above embodiment can be the same device, or the method can be executed by different devices. For example, the execution subject of steps 101 to 103 can be device A; for another example, the execution subject of steps 101 and 102 can be device A, and the execution subject of step 103 can be device B; and so on.

[0058] In addition, in some of the processes described in the above embodiments and the accompanying drawings, multiple operations that appear in a specific order are included, but it should be clearly understood that these operations may not be executed in the order in which they appear in this article or executed in parallel, and the sequence numbers of the operations, such as 101, 102, etc., are only used to distinguish between different operations, and the sequence numbers themselves do not represent any execution order. In addition, these processes may include more or fewer operations, and these operations may be executed in sequence or in parallel. It should be noted that the descriptions of "first", "second", etc. in this article are used to distinguish different messages, devices, modules, etc., do not represent the order of precedence, and do not limit the "first" and "second" to be different types.

[0059] Figure 3 FIG. 1 is a schematic diagram of a structure of an electronic device provided by another exemplary embodiment of the present application. Figure 3 As shown, the electronic device includes: a memory 34 and a processor 35.

[0060] The memory 34 is used to store computer programs and can be configured to store various other data to support operations on the electronic device. Examples of such data include instructions for any application or method operating on the electronic device, contact data, phone book data, messages, pictures, videos, etc.

[0061] The memory 34 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk.

[0062] The processor 35 is coupled to the memory 34 and is used to execute the computer program in the memory 34, so as to: respond to the page access request, obtain a structured description document of the form page to be accessed, the form page includes form-level data and page-level data, the structured description document includes at least description information of a page-level root node for storing the page-level data and description information of a form-level component node, the description information of the form-level component node is used to describe the form-level component in the form-level data; create a page instance of the form page, create a form instance for each form included in the form page, and store each form in the form-level root node; The instance is mounted on the page instance, the page instance is an instance for carrying the page-level data, and the form instance is an instance for carrying the form-level data; the page-level data is parsed from the description information of the page-level root node, and the page-level data is mounted on the page instance to obtain the context information of the page instance; according to the context information of the page instance, the description information of the form-level component node is recursively parsed to obtain the form-level component corresponding to each form instance, and the form-level component corresponding to each form instance is mounted on the corresponding form instance to obtain the form page.

[0063] In an optional embodiment, when creating a page instance of the form page, the processor 35 is specifically used to: create a page object; create a target observable data object, wherein the target observable data object is used to carry the page status information contained in the page-level data; and mount the target observable data object on the page object to obtain the page instance.

[0064] In an optional embodiment, the processor 35, during the process of creating a page instance of the form page, is further used to: create a target static data object and / or a target static method object, wherein the target static data object is used to carry the static data in the page-level data, and the target static method object is used to carry the static method in the page-level data; and mount the target static data object and / or the target static method object on the page object.

[0065] In an optional embodiment, when the processor 35 mounts the page-level data onto the page instance to obtain the context information of the page instance, it is specifically used to: mount the page status information in the page-level data onto the target observable data object in the page instance; and mount the static data and / or static methods in the page-level data onto the target static data object and / or target static method object in the page instance, respectively, to obtain the context information of the page instance.

[0066] In an optional embodiment, the processor 35 is further used to: receive a global object set passed in by a user, wherein the global object set includes at least one of a custom observable data object, a custom static data object, and a custom static method object; and use the objects in the global object set to overwrite objects in the context information of the page instance with the same name to obtain a target global object set.

[0067] In an optional embodiment, when the processor 35 parses the page-level data from the description information of the page-level root node, it is specifically used to: identify the description information of the page-level root node from the structured description document; and parse the description information of the page-level root node according to data attributes to obtain the page status information contained in the page-level data, as well as the static data and / or static methods contained in the page-level data.

[0068] In an optional embodiment, the form-level component includes at least a dynamic form-level component. When the processor 35 recursively parses the description information of the form-level component node according to the context information of the page instance to obtain the form-level component corresponding to each form instance, it is specifically used to: recursively parse the description information of the form-level component node according to the context information of the page instance; if the description information of the recursively parsed form-level component node includes the description information of the dynamic form-level component and the association relationship between the dynamic form-level component and the page status information in the page-level data, then generate an initial form-level component according to the description information of the dynamic form-level component, the initial form-level component has an observation function, and according to the association relationship, the observation function of the initial form-level component is registered in the target observable object to obtain the dynamic form-level component; wherein the observation function of the dynamic form-level component is used to sense and respond to changes in the page status information.

[0069] In an optional embodiment, the processor 35 is further used to: if the description information of the recursively parsed form-level component node includes the description information of a static form-level component, generate a static form-level component according to the description information of the static form-level component, and the static form-level component does not have an observation function.

[0070] In an optional embodiment, the page-level data also includes: non-form-level components, and the structured description document also includes description information of non-form-level component nodes; the processor 35, before obtaining the form page, is also used to: use the context information of the page instance to recursively parse the description information of the non-form-level component nodes to obtain the non-form-level components in the form page; and mount the non-form-level components on the page instance.

[0071] Further, if Figure 3 As shown, the electronic device also includes: a communication component 36, a display 37, a power component 38, an audio component 39 and other components. Figure 3 Only some components are shown schematically, which does not mean that the electronic device only includes Figure 3 In addition, Figure 3 The components in the dashed box are optional components, not mandatory components, and the specific components depend on the product form of the electronic device. The electronic device of this embodiment can be implemented as a terminal device such as a desktop computer, a laptop computer, a smart phone, or an IOT device, or a server device such as a conventional server, a cloud server, or a server array. If the electronic device of this embodiment is implemented as a terminal device such as a desktop computer, a laptop computer, a smart phone, etc., it can include Figure 3 If the electronic device of this embodiment is implemented as a server device such as a conventional server, a cloud server or a server array, it may not include Figure 3Components within the dashed box.

[0072] Accordingly, an embodiment of the present application further provides a computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, the processor is enabled to implement the steps in the above method.

[0073] Figure 4 The following is a schematic diagram of a form page parsing device provided by an exemplary embodiment of the present application. Figure 4 As shown, the form page parsing device 40 includes: an acquisition module 41 , a creation module 42 , a first parsing module 43 and a second parsing module 44 .

[0074] Wherein, the acquisition module 41 is used to respond to the page access request and acquire the structured description document of the form page to be accessed, wherein the form page includes form-level data and page-level data, and the structured description document includes at least description information of a page-level root node for storing the page-level data and description information of a form-level component node, and the description information of the form-level component node is used to describe the form-level component in the form-level data;

[0075] A creation module 42, used to create a page instance of the form page, create a form instance for each form included in the form page, and mount each form instance to the page instance, the page instance is an instance for carrying the page-level data, and the form instance is an instance for carrying the form-level data;

[0076] A first parsing module 43, configured to parse the page-level data from the description information of the page-level root node, and mount the page-level data to the page instance to obtain context information of the page instance;

[0077] The second parsing module 44 is used to recursively parse the description information of the form-level component node according to the context information of the page instance to obtain the form-level component corresponding to each form instance, and mount the form-level component corresponding to each form instance to the corresponding form instance to obtain the form page. In an optional embodiment, when creating the page instance of the form page, the creation module 42 is specifically used to: create a page object; create a target observable data object, the target observable object is used to carry the page state information contained in the page-level data; mount the target observable data object on the page object to obtain the page instance.

[0078] In an optional embodiment, the creation module 42 is further used, during the process of creating a page instance of the form page, to: create a target static data object and / or a target static method object, wherein the target static data object is used to carry the static data in the page-level data, and the target static method object is used to carry the static method in the page-level data; and mount the target static data object and / or the target static method object on the page object.

[0079] In an optional embodiment, when the first parsing module 43 mounts the page-level data onto the page instance to obtain the context information of the page instance, it is specifically used to: mount the page status information in the page-level data onto the target observable data object in the page instance; and, mount the static data and / or static methods in the page-level data onto the target static data object and / or target static method object in the page instance, respectively, to obtain the context information of the page instance.

[0080] In an optional embodiment, the first parsing module 43 is further used to: receive a global object set passed in by a user, wherein the global object set includes at least one of a custom observable data object, a custom static data object, and a custom static method object; and use the objects in the global object set to overwrite objects in the context information of the page instance with the same name to obtain a target global object set.

[0081] In an optional embodiment, when the first parsing module 43 parses the page-level data from the description information of the page-level root node, it is specifically used to: identify the description information of the page-level root node from the structured description document; and parse the description information of the page-level root node according to data attributes to obtain the page status information contained in the page-level data, as well as the static data and / or static methods contained in the page-level data.

[0082] In an optional embodiment, the form-level component includes at least a dynamic form-level component. When the second parsing module 44 recursively parses the description information of the form-level component node according to the context information of the page instance to obtain the form-level component corresponding to each form instance, it is specifically used to: recursively parse the description information of the form-level component node according to the context information of the page instance; if the description information of the recursively parsed form-level component node includes the description information of the dynamic form-level component and the association relationship between the dynamic form-level component and the page status information in the page-level data, then generate an initial form-level component according to the description information of the dynamic form-level component, the initial form-level component has an observation function, and according to the association relationship, the observation function of the initial form-level component is registered in the target observable object to obtain the dynamic form-level component; wherein the observation function of the dynamic form-level component is used to sense and respond to changes in the page status information.

[0083] In an optional embodiment, the second parsing module 44 is further used to: if the description information of the recursively parsed form-level component node includes the description information of a static form-level component, then generate a static form-level component according to the description information of the static form-level component, and the static form-level component does not have an observation function.

[0084] In an optional embodiment, the page-level data also includes: non-form-level components, and the structured description document also includes description information of non-form-level component nodes; the second parsing module 44, before obtaining the form page, is also used to: utilize the context information of the page instance to recursively parse the description information of the non-form-level component nodes to obtain the non-form-level components in the form page; and mount the non-form-level components on the page instance.

[0085] It should be noted that, for the specific functions and implementation processes of each module in the above-mentioned device, reference may be made to the description of the corresponding parts in the above-mentioned method embodiment, which will not be repeated here.

[0086] The above-mentioned memory can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read only memory (EEPROM), erasable programmable read only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk.

[0087] The above-mentioned communication component is configured to facilitate wired or wireless communication between the device where the communication component is located and other devices. The device where the communication component is located can access a wireless network based on a communication standard, such as WiFi, 2G, 3G, 4G / LTE, 5G and other mobile communication networks, or a combination thereof. In an exemplary embodiment, the communication component receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be based on Radio Frequency Identification (RFID) technology, Infrared Data Association (IrDA) technology, Ultra Wide Band (UWB) technology, Bluetooth (BT) technology and other technologies.

[0088] The above-mentioned display includes a screen, and the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation.

[0089] The power supply assembly provides power to various components of the device where the power supply assembly is located. The power supply assembly may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the device where the power supply assembly is located.

[0090] The above-mentioned audio component can be configured to output and / or input audio signals. For example, the audio component includes a microphone (Microphone, MIC), and when the device where the audio component is located is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in a memory or sent via a communication component. In some embodiments, the audio component also includes a speaker for outputting an audio signal.

[0091] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-readable storage media (including but not limited to disk storage, compact disc read-only memory (Compact Disc Read-Only Memory, CD-ROM), optical storage, etc.) containing computer-usable program code.

[0092] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0093] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0094] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0095] In a typical configuration, a computing device includes one or more processors (Central Processing Unit, CPU), input / output interface, network interface and memory.

[0096] Memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.

[0097] Computer readable media include permanent and non-permanent, removable and non-removable media that can be used to store information by any method or technology. Information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase-change random access memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0098] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0099] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.

Claims

1. A form page parsing method, characterized in that: The method comprises: In response to a page access request, a structured description document of a form page to be accessed is obtained, wherein the form page includes form-level data and page-level data, and the structured description document includes at least description information of a page-level root node for storing the page-level data and description information of a form-level component node, wherein the description information of the form-level component node is used to describe a form-level component in the form-level data; Creating a page instance of the form page, creating a form instance for each form included in the form page, and mounting each form instance on the page instance, the page instance is an instance for carrying the page-level data, and the form instance is an instance for carrying the form-level data; Parsing the page-level data from the description information of the page-level root node, and mounting the page-level data on the page instance to obtain context information of the page instance; According to the context information of the page instance, the description information of the form-level component node is recursively parsed to obtain the form-level component corresponding to each form instance, and the form-level component corresponding to each form instance is mounted on the corresponding form instance to obtain the form page.

2. The method according to claim 1, characterized in that Create a page instance of the form page, including: Create a page object; Creating a target observable data object, wherein the target observable object is used to carry the page state information contained in the page-level data; The target observable data object is mounted on the page object to obtain the page instance.

3. The method according to claim 2, characterized in that The process of creating a page instance of the form page also includes: Creating a target static data object and / or a target static method object, wherein the target static data object is used to carry the static data in the page-level data, and the target static method object is used to carry the static method in the page-level data; The target static data object and / or the target static method object is mounted on the page object.

4. The method according to claim 3, characterized in that Mounting the page-level data onto the page instance to obtain context information of the page instance includes: Mounting the page state information in the page-level data onto a target observable data object in the page instance; and The static data and / or static method in the page-level data are respectively mounted to the target static data object and / or the target static method object in the page instance to obtain the context information of the page instance.

5. The method according to claim 4, characterized in that Also includes: Receive a global object set passed in by a user, wherein the global object set includes at least one of a custom observable data object, a custom static data object, and a custom static method object; The objects in the context information of the page instance are overwritten with the same names using the objects in the global object set to obtain a target global object set.

6. The method according to claim 3, characterized in that Parsing the page-level data from the description information of the page-level root node includes: Identifying description information of the page-level root node from the structured description document; According to the data attributes, the description information of the page-level root node is parsed to obtain the page status information contained in the page-level data, and the static data and / or static methods contained in the page-level data.

7. The method according to claim 2, characterized in that The form-level component at least includes a dynamic form-level component. According to the context information of the page instance, the description information of the form-level component node is recursively parsed to obtain the form-level component corresponding to each form instance, including: Recursively parsing description information of the form-level component node according to the context information of the page instance; If the description information of the recursively parsed form-level component node includes the description information of the dynamic form-level component and the association relationship between the dynamic form-level component and the page status information in the page-level data, an initial form-level component is generated according to the description information of the dynamic form-level component, and the initial form-level component has an observation function. According to the association relationship, the observation function of the initial form-level component is registered in the target observable object to obtain the dynamic form-level component; wherein the observation function of the dynamic form-level component is used to sense and respond to changes in the page status information.

8. The method according to claim 2, characterized in that: Also includes: If the description information of the recursively parsed form-level component node includes the description information of a static form-level component, a static form-level component is generated according to the description information of the static form-level component, and the static form-level component does not have an observation function.

9. The method according to any one of claims 1 to 8, characterized in that: The page-level data also includes: non-form-level components, and the structured description document also includes description information of non-form-level component nodes; before obtaining the form page, the method also includes: Recursively parsing the description information of the non-form-level component node using the context information of the page instance to obtain the non-form-level component in the form page; The non-form-level component is mounted on the page instance.

10. An electronic device, characterized in that: include: Memory and processor; The memory is used to store a computer program, and the processor is coupled to the memory and is used to execute the computer program to implement the steps in the method according to any one of claims 1 to 9.

11. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the processor is enabled to implement the steps in the method according to any one of claims 1 to 9.