View interface generation methods, apparatus and electronic devices

CN116185398BActive Publication Date: 2026-08-14BEIJING WODONG TIANJUN INFORMATION TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-09
Publication Date
2026-08-14

AI Technical Summary

Technical Problem

[0004]本公开提供一种视图界面生成方法,用以解决现有技术中生成视图树缓慢的缺陷,实现预先加载视图树的部分信息,减少视图树生成时间,进而提升视图生成速度,以提升用户体验

Benefits of technology

[0032]本公开提供的视图界面生成方法、装置和电子设备,获取配置类结构信息,配置类结构信息表示了对应的应用类型和需要配置的模块;解析配置类结构信息,得到预加载种类信息,通过解析可以确定属于预设的哪种预加载种类,以便根据对应的预加载种类进行针对性的预加载;根据预加载种类信息和预存的模板文件进行预加载,得到视图树预加载信息,根据视图树预加载信息和预先获取的视图树配置信息生成视图树,通过对模板文件进行针对性的预加载得到视图树预加载信息,结合需要配置的视图树配置信息即可生成视图树,根据视图树进行渲染,生成视图界面,通过预加载视图树的部分信息减少视图树生成时间,进而提升了生成视图界面的速度,提升了用户体验。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116185398B_ABST
    Figure CN116185398B_ABST
Patent Text Reader

Abstract

This disclosure provides a view interface generation method, apparatus, and electronic device. The method involves obtaining configuration class structure information, which represents the corresponding application type and the modules that need to be configured; parsing the configuration class structure information to obtain preload type information, which determines the preset preload type for targeted preloading; preloading based on the preload type information and a pre-stored template file to obtain view tree preload information; generating a view tree based on the view tree preload information and pre-obtained view tree configuration information; and rendering the view tree to generate the view interface. By preloading partial information of the view tree, the generation time is reduced, thereby improving the speed of view interface generation and enhancing the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of computer information processing technology, and in particular to a method, apparatus and electronic device for generating a view interface. Background Technology

[0002] In existing technologies, the process of generating a view interface based on view configuration requires setting a large amount of code, attribute information, and expressions to generate a view tree, and then rendering the view interface based on the view tree, resulting in a slow view interface generation process. However, some code, attribute information, and expressions are common to the view tree generation process. This information can be pre-loaded to reduce the view tree generation time, thereby improving view generation speed and enhancing the user experience.

[0003] Therefore, proposing a view interface generation method that preloads some information of the view tree to reduce the view tree generation time and thus improve the view generation speed to enhance the user experience is an urgent problem to be solved. Summary of the Invention

[0004] This disclosure provides a view interface generation method to address the shortcomings of slow view tree generation in the prior art. It enables preloading of some information of the view tree, reduces the view tree generation time, and thus improves the view generation speed to enhance the user experience.

[0005] This disclosure provides a method for generating a view interface, including:

[0006] Retrieve configuration class structure information;

[0007] Parse the configuration class structure information to obtain the preloaded category information;

[0008] Preloading is performed based on the preload type information and the pre-stored template file to obtain the view tree preload information;

[0009] A view tree is generated based on the view tree preloading information and the pre-acquired view tree configuration information;

[0010] The view interface is generated by rendering based on the view tree.

[0011] According to the view interface generation method provided in this disclosure, obtaining the configuration class structure information includes:

[0012] Retrieve pre-configured data based on preset request parameters;

[0013] The pre-configured data is processed according to preset rules to obtain the configuration class structure information.

[0014] According to the view interface generation method provided in this disclosure, the step of processing the pre-configured data according to preset rules to obtain the configuration class structure information includes:

[0015] The pre-configured data is parsed to obtain parsed pre-configured data;

[0016] The pre-configured data is filtered according to preset rules to obtain the configuration class structure information.

[0017] According to the view interface generation method provided in this disclosure, the step of preloading based on the preloaded type information and the pre-stored template file to obtain view tree preload information includes:

[0018] When the preloaded type information is Extensible Markup Language preloaded information, attribute parsing and expression parsing are performed on the first template file in the pre-stored template file, and the obtained attribute parsing results and expression parsing results are used as view tree preloaded information.

[0019] According to the view interface generation method provided in this disclosure, the step of preloading based on the preloaded type information and the pre-stored template file to obtain view tree preload information includes:

[0020] If the preloaded type information is encoded preloaded information, the second template file in the pre-stored template file is encoded and parsed to obtain decoded preloaded information;

[0021] The decoded preloaded information is parsed for attributes and expressions, and the obtained attribute parsing results and expression parsing results are used as view tree preloaded information.

[0022] According to the view interface generation method provided in this disclosure, the step of generating a view tree based on the view tree preloading information and pre-acquired view tree configuration information includes:

[0023] The attribute parsing results and expression parsing results are assigned values ​​based on the pre-acquired view tree configuration information to obtain view tree attributes and view tree expressions;

[0024] A view tree is generated based on the view tree properties and the view tree expression.

[0025] This disclosure also provides a view interface generation apparatus, including:

[0026] The acquisition unit is used to obtain configuration class structure information;

[0027] The preloading unit is used to parse the configuration class structure information to obtain preloading type information; and to perform preloading based on the preloading type information and the pre-stored template file to obtain view tree preloading information.

[0028] The view unit is used to generate a view tree based on the view tree preload information and the pre-acquired view tree configuration information; and to render the view interface based on the view tree.

[0029] This disclosure also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of any of the above-described view interface generation methods.

[0030] This disclosure also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the view interface generation method as described above.

[0031] This disclosure also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of any of the above-described view interface generation methods.

[0032] The view interface generation method, apparatus, and electronic device disclosed herein acquire configuration class structure information, which represents the corresponding application type and the modules that need to be configured; parse the configuration class structure information to obtain preload type information, which determines which preset preload type it belongs to, so as to perform targeted preloading according to the corresponding preload type; preload according to the preload type information and the pre-stored template file to obtain view tree preload information; generate a view tree according to the view tree preload information and the pre-acquired view tree configuration information; obtain view tree preload information by targeted preloading of the template file, and generate the view tree by combining it with the view tree configuration information that needs to be configured; render the view tree to generate the view interface; reduce the view tree generation time by preloading part of the view tree information, thereby improving the speed of view interface generation and improving the user experience. Attached Figure Description

[0033] To more clearly illustrate the technical solutions in this disclosure or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0034] Figure 1 This is a diagram of the edge container architecture of MCube in the existing technology;

[0035] Figure 2 This is a schematic diagram of the view tree generation process based on MCube in the existing technology;

[0036] Figure 3 This is a flowchart illustrating the view interface generation method provided in this disclosure;

[0037] Figure 4 This is a schematic diagram of the stages of view tree generation provided in this disclosure;

[0038] Figure 5 This is a schematic diagram of the view tree preloading process provided in this disclosure;

[0039] Figure 6 This is a schematic diagram of the view tree generation process provided in this disclosure;

[0040] Figure 7 This is a schematic diagram of the structure of the view interface generation device provided in this disclosure;

[0041] Figure 8 This is a schematic diagram of the structure of the electronic device provided in this disclosure. Detailed Implementation

[0042] To make the objectives, technical solutions, and advantages of the embodiments of this disclosure clearer, the technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the embodiments of this disclosure, and not all embodiments. Based on the embodiments of this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the protection scope of the embodiments of this disclosure.

[0043] To facilitate understanding of the technical solutions disclosed herein, the background of the prior art will now be explained.

[0044] MCube Dynamics (hereinafter referred to as MCube) is committed to providing a complete technical solution for dynamic display of cross-platform pages, enabling businesses to achieve the effect of "develop once, go online at any time, and reuse across multiple platforms" based on MCube. In addition, the reuse of MCube code can also alleviate the package size problem caused by the continuous increase of business, and solve the pain point of local new requirements or requirement changes strongly depending on the release.

[0045] MCube's edge container architecture design, such as Figure 1 As shown, it is divided into the following four core layers:

[0046] The engine layer is responsible for providing underlying support. Specifically, the layout engine is responsible for parsing the encoded display file into a view tree, and the rendering engine is responsible for mapping the view tree into the original view and rendering it. During the rendering process, MCube uses the expression engine to parse the expressions written in the business logic into the expected values ​​for use, and finally achieves the expected effects and functions of the business logic.

[0047] The view layer is mainly responsible for resolving abstract general views into native corresponding views. The main process includes parsing and assigning values ​​to view properties. At the same time, the view layer also supports business parties to register custom views for display, so as to reuse existing view capabilities.

[0048] The event layer is mainly responsible for processing user-defined events. It parses events in the DSL (Digital Subscriber Line), binds them according to the event type, and handles the events in response to user-initiated actions.

[0049] The main responsibility of the template layer is to manage and use templates, specifically to process templates, such as template downloading, template management, template caching, and template parsing.

[0050] The typical loading process of MCube can be followed as follows Figure 1 Understanding it from a top-down perspective, specifically in combination Figure 2 As shown, MCube first determines whether to retrieve the latest template from the network based on the template cache status. Once the template is retrieved, it loads the template. During the loading phase, the output is converted into a view tree structure. After the conversion, the expression engine parses the expression and obtains the correct value. The event parsing engine parses the user-defined event and completes the event binding. After parsing, assigning values, and binding the event, the view is rendered, and finally the target page is displayed on the screen.

[0051] As can be seen from the above analysis, apart from the final rendering based on the view components, the rest of the core process of MCube is a process of generating view components. This process involves a large amount of loading, which is time-consuming. Therefore, reducing the time spent in generating view components and improving the efficiency of generating view components is an important research direction for achieving rapid generation of view interfaces.

[0052] The following describes the view interface generation method, apparatus, and electronic device provided in this disclosure.

[0053] This disclosure provides a method for generating a view interface, such as Figure 3 As shown, it includes:

[0054] S31. Obtain configuration class structure information.

[0055] Specifically, the configuration structure information includes, but is not limited to, the application type to be implemented and the modules to be configured.

[0056] S32. Parse the configuration class structure information to obtain the preloaded type information.

[0057] Specifically, the configuration class structure information is parsed, and the type of preloading is determined based on the parsing results, including but not limited to XML preloading based on the XML (Extensible Markup Language) protocol and encoding preloading based on binary encoding.

[0058] S33. Preload according to the preload type information and the pre-stored template file to obtain the view tree preload information.

[0059] Specifically, based on the preset preloading type, a corresponding template file can be stored locally in advance. After determining the preloading type information, the corresponding template file can be called and preloaded to obtain the view tree preloading information.

[0060] S34. Generate a view tree based on the view tree preloading information and the pre-acquired view tree configuration information.

[0061] S35. Render the view based on the view tree to generate a view interface.

[0062] Specifically, the view tree can be generated based on the preloaded view tree information and the parameters of the view tree that need to be configured. The view interface can then be obtained by rendering the view tree.

[0063] In this embodiment, configuration class structure information is obtained, which represents the corresponding application type and the modules that need to be configured. The configuration class structure information is parsed to obtain preload type information. By parsing, it can be determined which preset preload type it belongs to, so that targeted preloading can be performed according to the corresponding preload type. Preloading is performed according to the preload type information and the pre-stored template file to obtain view tree preload information. The view tree is generated according to the view tree preload information and the pre-obtained view tree configuration information. The view tree preload information is obtained by targeted preloading of the template file. Combined with the view tree configuration information that needs to be configured, the view tree can be generated. The view tree is rendered to generate the view interface. By preloading part of the view tree information, the view tree generation time is reduced, thereby improving the speed of view interface generation and improving the user experience.

[0064] According to the view interface generation method provided in this disclosure, step S31 specifically includes S311-S312.

[0065] S311. Obtain pre-configured data based on preset request parameters.

[0066] Specifically, in one example, a configuration retriever can send preset request parameters to the server, request and receive corresponding pre-configured data returned by the server using these preset request parameters. The pre-configured data represents partial configuration information of the view tree that needs to be pre-configured.

[0067] S312. Process the pre-configured data according to preset rules to obtain the configuration class structure information.

[0068] Step S312 can be specifically S3121-S3122.

[0069] S3121. The pre-configured data is parsed to obtain parsed pre-configured data.

[0070] S3122. The pre-parsed configuration data is filtered according to preset rules to obtain the configuration class structure information.

[0071] Specifically, the configuration data can be parsed by a configuration processor to obtain parsed configuration data. This parsed configuration data includes, but is not limited to, information such as the application type of the view tree to be implemented and the modules to be configured. The parsed configuration information is then filtered, retaining information that conforms to the rules and deleting information that does not conform or is outdated, resulting in the configuration class structure information.

[0072] In this embodiment, configuration data is obtained through preset request parameters, parsed to obtain information including, but not limited to, the application type of the view tree to be implemented and the modules to be configured. Then, it is filtered according to preset rules to obtain configuration class structure information. This parsing and filtering process ensures that the configuration class structure information has high security, accuracy, and timeliness.

[0073] According to the view interface generation method provided in this disclosure, step S33 specifically includes:

[0074] S331. If the preloaded type information is Extensible Markup Language preloaded information, perform attribute parsing and expression parsing on the first template file in the pre-stored template file, and use the obtained attribute parsing results and expression parsing results as view tree preloaded information.

[0075] Specifically, there are multiple pre-saved template files, each corresponding to a different pre-loading type.

[0076] In one example, if the preload parser determines that the preload type information is Extensible Markup Language (XML) preload information, the first template file corresponding to the XML preload information is called, and the attribute parsing and expression parsing of the first template file are performed respectively.

[0077] The first template file undergoes attribute parsing to extract its core, frequently used attributes, enabling attribute preloading and yielding the parsing results. The first template file also undergoes expression parsing to extract its expressions, enabling expression preloading and yielding the expression parsing results. These attribute parsing results and expression parsing results are then used as preloaded information for the view tree.

[0078] In this embodiment of the disclosure, the corresponding first template file is called for XML preloading information. The first template file is parsed for attributes and expressions to achieve preloading of the attributes and expressions of the first template file. The attribute parsing results and expression parsing results are used as view tree preloading information to facilitate the subsequent generation of view tree in combination with view tree configuration information.

[0079] According to the view interface generation method provided in this disclosure, step S33 specifically includes:

[0080] S332. If the preloaded type information is encoded preloaded information, the second template file in the pre-stored template file is encoded and parsed to obtain decoded preloaded information;

[0081] S333. Perform attribute parsing and expression parsing on the decoded preload information, and use the obtained attribute parsing results and expression parsing results as view tree preload information.

[0082] Specifically, binary preloading offers a significant improvement in security compared to XML preloading, and also improves transmission efficiency. In one example, binary-encoded template files have a compression rate of 60% or even higher than XML template files.

[0083] In one example, if the preload parser determines that the preload type information is encoded preload information, the second template file corresponding to the encoded preload information is called. First, the second template file needs to be encoded and parsed (i.e. decoded) to obtain the decoded preload information.

[0084] The decoded preloaded information undergoes attribute parsing to extract the core, frequently used attributes, achieving attribute preloading and yielding the attribute parsing results. The decoded preloaded information also undergoes expression parsing to extract the expressions, achieving expression preloading and yielding the expression parsing results. These attribute parsing results and expression parsing results are then used as preloaded information for the view tree.

[0085] In this embodiment, the corresponding second template file is called for the encoded preloading information. The second template file is then encoded and parsed to obtain the decoded preloading information, thereby decoding the encoded template file and improving security. Attribute parsing and expression parsing are performed to preload the attributes and expressions of the second template file. The results of attribute parsing and expression parsing are used as view tree preloading information, facilitating the subsequent generation of the view tree in conjunction with view tree configuration information.

[0086] According to the view interface generation method provided in this disclosure, step S34 includes S341-S342.

[0087] S341. Assign values ​​to the attribute parsing results and the expression parsing results according to the pre-acquired view tree configuration information to obtain view tree attributes and view tree expressions.

[0088] Specifically, since attribute preloading and expression preloading have already been implemented, the attribute parsing results and expression parsing results are obtained. The attribute parsing results and expression parsing results are directly assigned values ​​based on the pre-obtained view tree configuration information, and the number of preloading operations is determined based on the view tree configuration information, thus completing the preparation work for generating the view tree.

[0089] S342. Generate a view tree based on the view tree attributes and the view tree expression.

[0090] In this embodiment, the attribute parsing results and expression parsing results are assigned values ​​based on pre-acquired view tree configuration information to obtain view tree attributes and view tree expressions. The view tree is then generated based on these attributes and expressions. By pre-loading the attribute parsing results and expression parsing results, the time for temporary loading during view tree generation is reduced. By loading attributes and expressions in advance, assigning values ​​to them, and determining the number of pre-loading operations, complete view tree attributes and expressions are obtained, thereby generating the view tree. This reduces the time for temporary loading during view tree generation and improves the user experience.

[0091] In one example based on the above embodiments, the view tree generation stage diagram of this disclosure is as follows: Figure 4 As shown, the process is divided into three stages: configuration, parsing and preloading type, and preloading. The configuration stage includes obtaining configuration information, parsing configuration information, and distributing configuration information. The parsing and preloading type stage involves parsing the preload configuration to determine whether it is XML preloading or encoded preloading. The preloading stage includes encoded parsing preloading, attribute parsing preloading, and expression parsing preloading.

[0092] In another example, the view tree preloading process is as follows: Figure 5 As shown. Figure 5 The steps shown are as follows:

[0093] S51. Determine whether the configuration class structure information has been obtained. If not, end directly without preloading. If yes, proceed to step S52.

[0094] S52. Determine whether it is encoding preloading. If not, proceed to step S53. If yes, proceed to step S54.

[0095] S53. Execute the XML preloading scheme;

[0096] S54. Implement the preloading scheme for encoded compressed files;

[0097] S55, Parsing the preloading strategy;

[0098] S56. Confirm preload information;

[0099] S57. Confirm the number of preloads.

[0100] Steps S51-S57 have been described in the above embodiments and can be referred to the description of the relevant parts in the above embodiments, and will not be repeated here. Step S51 can refer to step S31; step S53 can refer to step S331; steps S54-S57 can refer to steps S332-S333.

[0101] In another example, the view tree generation process is as follows: Figure 6 As shown. Pre-configuration data is obtained through the configuration acquirer; the configuration processor processes the pre-configuration data to obtain configuration class structure information; the configuration dispatcher distributes the configuration class structure information to the user; the user obtains the configuration class structure information through the configuration listener; the configuration class structure information is input into the preload parser to determine whether it is encoding preload or XML preload; for encoding preload, encoding parsing is performed, and the encoding parsing results are subjected to attribute parsing and expression parsing; for XML preload, attribute parsing and expression parsing are performed; a view tree is generated based on the attribute parsing results, expression parsing results, and view tree configuration information.

[0102] The above-described view tree generation process can be referenced in conjunction with the view interface generation methods provided in the above embodiments. The specific details and beneficial effects have been described above and will not be repeated here.

[0103] The view interface generation apparatus provided in the embodiments of this disclosure is described below. The view interface generation apparatus described below can be referred to in correspondence with the view interface generation method described above.

[0104] This disclosure also provides a view interface generation apparatus, such as Figure 7 As shown, it includes:

[0105] The acquisition unit 71 is used to acquire configuration class structure information.

[0106] The preloading unit 72 is used to parse the configuration class structure information to obtain preloading type information; and to perform preloading based on the preloading type information and the pre-stored template file to obtain view tree preloading information.

[0107] The view unit 73 is used to generate a view tree based on the view tree preloading information and the pre-acquired view tree configuration information; and to render the view tree to generate a view interface.

[0108] In this embodiment, configuration class structure information is obtained, which represents the corresponding application type and the modules that need to be configured. The configuration class structure information is parsed to obtain preload type information. By parsing, it can be determined which preset preload type it belongs to, so that targeted preloading can be performed according to the corresponding preload type. Preloading is performed according to the preload type information and the pre-stored template file to obtain view tree preload information. The view tree is generated according to the view tree preload information and the pre-obtained view tree configuration information. The view tree preload information is obtained by targeted preloading of the template file. Combined with the view tree configuration information that needs to be configured, the view tree can be generated. The view tree is rendered to generate the view interface. By preloading part of the view tree information, the view tree generation time is reduced, thereby improving the speed of generating the view interface and improving the user experience.

[0109] According to the view generation apparatus provided in this disclosure, the configuration unit 71 is specifically used for:

[0110] Retrieve pre-configured data based on preset request parameters;

[0111] The pre-configured data is processed according to preset rules to obtain the configuration class structure information.

[0112] According to the view generation apparatus provided in this disclosure, the configuration unit 71 is specifically used for:

[0113] The pre-configured data is parsed to obtain parsed pre-configured data;

[0114] The pre-configured data is filtered according to preset rules to obtain the configuration class structure information.

[0115] According to the view generation apparatus provided in this disclosure, the preloading unit 72 is specifically used for:

[0116] When the preloaded type information is Extensible Markup Language preloaded information, attribute parsing and expression parsing are performed on the first template file in the pre-stored template file, and the obtained attribute parsing results and expression parsing results are used as view tree preloaded information.

[0117] According to the view generation apparatus provided in this disclosure, the preloading unit 72 is specifically used for:

[0118] If the preloaded type information is encoded preloaded information, the second template file in the pre-stored template file is encoded and parsed to obtain decoded preloaded information;

[0119] The decoded preloaded information is parsed for attributes and expressions, and the obtained attribute parsing results and expression parsing results are used as view tree preloaded information.

[0120] According to the view generation apparatus provided in this disclosure, the view unit 73 is specifically used for:

[0121] The attribute parsing results and expression parsing results are assigned values ​​based on the pre-acquired view tree configuration information to obtain view tree attributes and view tree expressions;

[0122] A view tree is generated based on the view tree properties and the view tree expression.

[0123] Figure 8 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 8 As shown, the electronic device may include a processor 810, a communication interface 820, a memory 830, and a communication bus 840, wherein the processor 810, the communication interface 820, and the memory 830 communicate with each other through the communication bus 840. The processor 810 can call logical instructions in the memory 830 to execute a view interface generation method, which includes: obtaining configuration class structure information; parsing the configuration class structure information to obtain preloaded category information; preloading according to the preloaded category information and a pre-stored template file to obtain view tree preload information; generating a view tree according to the view tree preload information and pre-obtained view tree configuration information; and rendering according to the view tree to generate a view interface.

[0124] Furthermore, the logical instructions in the aforementioned memory 830 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of this disclosure, essentially, or the parts that contribute to the prior art, or parts of the technical solutions, can be embodied in the form of software products. These computer software products are stored in a storage medium and include several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this disclosure. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0125] On the other hand, this disclosure also provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium. The computer program includes program instructions, and when the program instructions are executed by a computer, the computer can execute the view interface generation method provided by the above methods. The method includes: obtaining configuration class structure information; parsing the configuration class structure information to obtain preloaded type information; preloading according to the preloaded type information and a pre-stored template file to obtain view tree preload information; generating a view tree according to the view tree preload information and pre-obtained view tree configuration information; and rendering according to the view tree to generate a view interface.

[0126] In another aspect, this disclosure also provides a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the aforementioned view interface generation methods. The method includes: acquiring configuration class structure information; parsing the configuration class structure information to obtain preloaded type information; preloading according to the preloaded type information and a pre-stored template file to obtain view tree preload information; generating a view tree according to the view tree preload information and pre-acquired view tree configuration information; and rendering according to the view tree to generate a view interface.

[0127] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0128] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0129] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this disclosure, and are not intended to limit them. Although this disclosure has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this disclosure.

Claims

1. A method for generating a view interface, characterized in that, include: Retrieve configuration class structure information; Parse the configuration class structure information to obtain the preloaded category information; Preloading is performed based on the preload type information and the pre-stored template file to obtain the view tree preload information; The step of preloading according to the preload type information and the pre-stored template file to obtain view tree preload information includes: when the preload type information is Extensible Markup Language (XML) preload information, performing attribute parsing and expression parsing on the first template file in the pre-stored template file, and using the obtained attribute parsing results and expression parsing results as view tree preload information; when the preload type information is encoded preload information, performing encoded parsing on the second template file in the pre-stored template file to obtain decoded preload information; performing attribute parsing and expression parsing on the decoded preload information, and using the obtained attribute parsing results and expression parsing results as view tree preload information; A view tree is generated based on the view tree preloading information and the pre-acquired view tree configuration information; The view interface is generated by rendering based on the view tree.

2. The view interface generation method according to claim 1, characterized in that, The process of obtaining configuration class structure information includes: Retrieve pre-configured data based on preset request parameters; The pre-configured data is processed according to preset rules to obtain the configuration class structure information.

3. The view interface generation method according to claim 2, characterized in that, The step of processing the pre-configured data according to preset rules to obtain the configuration class structure information includes: The pre-configured data is parsed to obtain parsed pre-configured data; The pre-configured data is filtered according to preset rules to obtain the configuration class structure information.

4. The view interface generation method according to claim 1, characterized in that, The step of generating the view tree based on the view tree preloading information and the pre-acquired view tree configuration information includes: The attribute parsing results and expression parsing results are assigned values ​​based on the pre-acquired view tree configuration information to obtain view tree attributes and view tree expressions; A view tree is generated based on the view tree properties and the view tree expression.

5. A view interface generation device, characterized in that, include: The acquisition unit is used to obtain configuration class structure information; The preloading unit is used to parse the configuration class structure information to obtain preloading type information; Preloading is performed based on the preloading type information and the pre-stored template file to obtain view tree preloading information; the preloading unit is specifically used to perform attribute parsing and expression parsing on the first template file in the pre-stored template file when the preloading type information is Extensible Markup Language preloading information, and use the obtained attribute parsing results and expression parsing results as view tree preloading information. If the preloaded type information is encoded preloaded information, the second template file in the pre-stored template file is encoded and parsed to obtain decoded preloaded information; The decoded preloaded information is parsed for attributes and expressions, and the obtained attribute parsing results and expression parsing results are used as view tree preloaded information; A view unit is used to generate a view tree based on the view tree preloading information and the pre-acquired view tree configuration information; Render the view based on the view tree to generate the view interface.

6. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the view interface generation method as described in any one of claims 1 to 4.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the view interface generation method as described in any one of claims 1 to 4.

8. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the view interface generation method as described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Interface view display method, terminal equipment and computer readable storage medium

    CN114489619A

  • KR20220064289A