A data reporting system UI development method, device and storage medium
By annotating and packaging the entity categories in the data reporting system, the coupling of data and business logic is decoupled, solving the problems of low development efficiency and difficulty in ensuring quality of the data reporting system, simplifying the development process and improving development efficiency and quality. effect.
Patent Information
- Application Number
- CN202111566797.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-20
- Publication Date
- 2025-01-24
- Estimated Expiration
- 2041-12-20
AI Technical Summary
When developing a data reporting system, due to the large amount of data and the serious coupling of business logic and view UI, low development efficiency and difficult to guarantee quality.
Comment on the fields corresponding to the entity classes contained in the collected data, determine the annotation parameters, create a collection of objects of packaging entity objects, and customize the UI layout rendering based on the object set, obtain rendering results, and finally submit the data to the system to the system The server and data display and business development.
It decouples the coupling between data and business logic as well as the coupling between business logic and UI interface, simplifies the UI development process, improves development efficiency and quality, and is easy to expand.
Smart Images

Figure CN114253516B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a method, device and storage medium for developing a UI for a data reporting system. Background Art
[0002] Data collection and reporting is an essential function in many business system software. Traditional data collection and reporting objects are mainly carried out in the form of text input, dictionary selection, picture selection, date selection, etc. Taking the more common data reporting system equipped with the Android operating system as an example, when performing data collection and reporting business, the general execution steps include first defining the items that receive user input in the view UI for each collected business field, binding view events, obtaining the user input content from the view instance, performing legal verification on the input content, and submitting the verified data to the server. However, when developing a system that is used to collect a large amount of data and perform corresponding data reporting, due to the large amount of data that needs to be collected, the system's business logic and the system's view UI are seriously coupled, resulting in low system development efficiency and difficulty in ensuring development quality. Summary of the invention
[0003] In view of this, an embodiment of the present application provides a data reporting system UI development method, device and storage medium to at least partially solve the above problems.
[0004] In a first aspect, an embodiment of the present application provides a data reporting system UI development method, including:
[0005] Annotating fields corresponding to entity categories contained in the collected data to determine annotation parameters of the entity categories;
[0006] According to the annotation parameters, create an object set that wraps the entity object;
[0007] According to the object set, a customized UI layout rendering is performed on the collected data to obtain a rendering result;
[0008] The collected data is submitted to a system server, and data display and business development are performed on the collected data submitted to the system server according to the rendering result.
[0009] Optionally, in an embodiment of the present application, creating a set of objects packaging the annotation parameters according to the annotation parameters includes:
[0010] Use the Java APT annotation processor to compile and parse the fields corresponding to the entity category according to the annotation parameters to generate an intermediate Java class file;
[0011] According to the intermediate Java class file, an object set packaging the entity object is created.
[0012] Optionally, in an embodiment of the present application, performing customized UI layout rendering on the collected data according to the object set to obtain a rendering result includes:
[0013] Determine a UI template corresponding to the entity object in the object set;
[0014] According to the determined UI template, RecycleView is used to perform UI list rendering on the collected data to obtain the rendering result.
[0015] Optionally, in one embodiment of the present application, before submitting the collected data to the system server, the process further includes:
[0016] According to the configuration attributes of the entity category, the collected data is structurally converted;
[0017] Submit the structure-converted data to the system server.
[0018] Optionally, in one embodiment of the present application, before submitting the collected data to the system server, the method further includes:
[0019] Data verification is performed on the entity categories contained in the collected data.
[0020] Optionally, in an embodiment of the present application, performing data verification on entity categories contained in the collected data includes:
[0021] According to the preset data class verification rules, data verification is performed on the intermediate java class file, and the result of the data verification on the intermediate java class file is determined as the result of the data verification on the entity category.
[0022] Optionally, in one embodiment of the present application, before submitting the collected data to the system server, the method further includes:
[0023] Obtain collected historical data;
[0024] According to the historical data, data adjustment is performed on the object set.
[0025] In a second aspect, based on the data reporting system UI opening method provided in the first aspect of the present application, the embodiment of the present application further provides a data reporting system UI development device, including:
[0026] An annotation module, used to annotate the fields corresponding to the entity categories contained in the collected data and determine the annotation parameters of the entity categories;
[0027] A creation module, used for creating an object set that packages the entity object according to the annotation parameters;
[0028] A submission module, used to submit the collected data to a system server;
[0029] A development module is used to display the collected data and develop UI services for the collected data submitted to the system server according to the rendering results.
[0030] In a third aspect, an embodiment of the present application further provides an electronic device, comprising: a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other through the communication bus;
[0031] The memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform operations corresponding to any one of the data reporting system UI development methods described in the first aspect of the present application.
[0032] In a fourth aspect, an embodiment of the present application further provides a computer storage medium on which a computer program is stored, and when the program is executed by a processor, it implements any one of the data reporting system UI development methods described in the first aspect of the present application.
[0033] The present application relates to the field of data processing technology, and specifically provides a data reporting system UI development method, device and storage medium, wherein the data reporting system UI development method includes: annotating the fields corresponding to the entity categories contained in the collected data, and determining the annotation parameters of the entity categories; creating an object set that packages the entity objects according to the annotation parameters; rendering the collected data according to the object set, and obtaining the rendering results; submitting the collected data to the system server; and performing data display and business development on the collected data submitted to the system server according to the rendering results. The method provided in the present application shifts the center of UI development to the annotation configuration of the collected data entities, thereby decoupling the data from the business logic and the business logic from the UI interface, simplifying the UI development process, improving development efficiency and quality, and being easy to expand. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the embodiments of the present application. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.
[0035] Figure 1A workflow diagram of a data reporting system UI development method provided in an embodiment of the present application;
[0036] Figure 2 A structural diagram of a data reporting system UI development device provided in an embodiment of the present application;
[0037] Figure 3 A structural schematic diagram of an electronic device that uses a method for developing a UI for a data reporting system is provided in an embodiment of the present application. DETAILED DESCRIPTION
[0038] In order to enable those skilled in the art to better understand the technical solutions in the embodiments of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the embodiments of the present application should fall within the scope of protection of the embodiments of the present application.
[0039] The specific implementation of the embodiment of the present application is further explained below in conjunction with the accompanying drawings of the embodiment of the present application.
[0040] Embodiment 1
[0041] The present application embodiment provides a first aspect, and the present application embodiment provides a data reporting system UI development method, such as Figure 1 As shown, Figure 1 A workflow diagram of a data reporting system UI development method provided in an embodiment of the present application includes:
[0042] S101: Annotate fields corresponding to entity categories contained in collected data to determine annotation parameters of the entity categories.
[0043] Specifically, in an embodiment of the present application, the entity categories contained in the collected data are used to indicate the corresponding filling categories in the UI interface that need to be filled in each field of the collected data, such as text input entity categories, date selection entity categories, picture selection entity categories, dictionary selection entity categories, label type entity categories, etc. In an embodiment of the present application, after the entity categories of the collected data are determined, the different fields corresponding to these entity categories are annotated. For example, the different fields of the above-mentioned entity categories are annotated as text input type text annotations, the date selection entity is annotated as date selection Dict annotations, the picture selection entity is annotated as picture selection Picture annotations, and the dictionary selection Dict annotations, etc., which will not be repeated here in this embodiment. By annotating the entity categories in the collected data and determining the annotation parameters, the readability and development convenience of the programming code in the development process of the data filling system to be developed according to the annotation parameters can be effectively improved, thereby improving the development efficiency.
[0044] In one implementation of the embodiment of the present application, various annotation parameters include public parameters and special parameters corresponding to the characteristics of different entity categories, which are used to display the titles of the fields of different entity category objects in the collected data, mark whether it is a required item, and represent the index used to sort and display the order of the fields in the collected data, and control whether the reported item is a user-editable item, etc., so that the corresponding entity object can be annotated more clearly and completely. In the embodiment of the present application, determining the above annotation parameters can enable developers to more clearly understand the target requirements of system UI development, improve the readability of program code in system UI development, and improve the efficiency of UI development, ensuring the accuracy of the final UI development.
[0045] Preferably, in one implementation of the embodiment of the present application, the annotation parameter data is Javabean field data. JavaBean is a reusable component written in JAVA language. Using JavaBean field data to compile annotation parameters can enhance the utilization rate of existing code without the need to reprogram the original code. In addition to its significance in saving development resources, it can also play a very good role in version control. Developers can continuously improve components without having to write code from scratch. In this way, the functions of the project or software to be developed can be improved or expanded more quickly on the original basis. The code reuse in the development process is realized, and it also has excellent effects such as easy to write, easy to maintain, and easy to use.
[0046] S102: Create an object set that packages the entity object according to the annotation parameters.
[0047] In the specific application of the embodiment of the present application, the object set that packages the entity object is the data source for UI rendering. Specifically, by creating the object set through the annotation parameters of the determined entity category, the project developers can more quickly and conveniently clarify the target requirements of UI development, so as to improve the development efficiency while ensuring the accuracy of development.
[0048] In one implementation of the embodiment of the present application, optionally, according to the annotation parameters, an object set that packages the annotation parameters is created, and the determined annotation parameters can be compiled through Java reflection operation to generate an intermediate Java class file, which is used to package the entity objects in the collected data. The packaged data is the object set that packages the annotation parameters, and its data representation structure is an EditData object set. Therefore, the UI properties of the corresponding collected data can be further determined based on the object set. That is, the intermediate Java class file is used as the data source for UI list rendering to develop the layout rendering of the UI list, and the compilation process is fast, efficient, and easy to implement.
[0049] Preferably, in an embodiment of the present application, the creating an object set that encapsulates the annotation parameters according to the annotation parameters comprises: using a Java APT (Annotation Processing Tool) annotation processor to compile and parse the fields corresponding to the entity category according to the annotation parameters, generate an intermediate Java class file, and create an object set that encapsulates the entity object according to the intermediate Java class file. In the embodiment of the present application, the program using APT can generate an intermediate Java class file for creating an EditData object set according to parsing annotation parameters more conveniently and quickly, which is more efficient than generating an intermediate Java class file through reflection operation and then generating an EditData object set.
[0050] S103: Perform customized UI layout rendering on the collected data according to the object set, and obtain a rendering result.
[0051] In an embodiment of the present application, an object set is used to indicate a set of determined annotation parameters, so that a customized UI list rendering with a high degree of consistency is achieved for the object categories of the collected data, thereby decoupling the collected data from the business logic, and decoupling the business logic from the UI to be developed, thereby effectively improving development efficiency.
[0052] Preferably, in an embodiment of the present application, performing UI layout rendering on the collected data according to the object set to obtain a rendering result includes:
[0053] Determine a UI template corresponding to the entity object in the object set;
[0054] According to the determined UI template, RecycleView is used to render the collected data in a UI list to obtain the rendering result. RecyclerView is a powerful control in Android, which can not only achieve the same effect as ListView, but also optimize various deficiencies in ListView. It can realize vertical scrolling of data and horizontal scrolling. In an embodiment of the present application, by using RecycleView to render a list of the determined UI template, the integrity and comprehensiveness of the rendering processing results of the collected data, such as corresponding UI filling, can be further improved.
[0055] Furthermore, when performing UI layout rendering on the data, DataBinding can also be used to bind the data, inject the collected data or historical data into the entity object set, and supplement and adjust the data in the entity object set to further improve the accuracy and comprehensiveness of the data source used for UI layout rendering. DataBinding is a framework officially released by Google. It is an implementation of MVVM on Android. It is used to reduce the coupling of layout and logic, make the code logic clearer, bind data directly to XML, and realize automatic refresh. DataBinding can save findviewbyId and greatly reduce the activity code, thereby realizing one-way or two-way binding of collected data, which helps prevent memory leaks, and can automatically perform null detection to avoid null pointer exceptions, so as to improve the stability of the system UI development results of this embodiment.
[0056] S104: Submit the collected data to the system server, and perform data display and business development on the collected data submitted to the system server according to the rendering result.
[0057] In an embodiment of the present application, data display and business development are performed on the collected data based on the rendering results, which can intuitively and clearly allow developers to clarify the requirements for system UI development based on the data display results, thereby further effectively improving the comprehensiveness and accuracy of the system UI development results.
[0058] Optionally, in an embodiment of the present application, submitting the collected data to a system server includes:
[0059] According to the configuration attributes of the javabean entity class, the collected data is structurally converted, and the data after the structural conversion is submitted to the system server. In the embodiment of the present application, the collected data is converted into a data structure of a preset structure by determining the configuration attributes of the javabean entity class, so that the data submitted to the system server is processed faster and the corresponding data is displayed to support business development such as system UI development.
[0060] Optionally, in an embodiment of the present application, before submitting the collected data to the system server, the method further includes: performing data verification on the entity categories contained in the collected data. In the embodiment of the present application, for example, performing content rule legality verification and data integrity verification on the collected data can further improve the accuracy of UI development based on the verified data to improve the development quality.
[0061] Optionally, in an embodiment of the present application, data verification is performed on the entity categories contained in the collected data, including: performing data verification on the intermediate Java class files according to preset data type verification rules. By performing data verification in this way, the verification process can be simplified while ensuring the accuracy and comprehensiveness of the data verification results, and the efficiency of data verification can be effectively improved.
[0062] Optionally, in an embodiment of the present application, before submitting the collected data to the system server, it further includes: obtaining collected historical data, and adjusting the object set according to the historical data, so as to further ensure the accuracy and comprehensiveness of UI list rendering according to the adjusted object set.
[0063] Preferably, in a specific implementation of the embodiment of the present application, the collected historical data is obtained, and the object set is adjusted according to the historical data, including: based on the collected historical data, the intermediate java class file generated for representing the data source set that packages the collected data entity object is adjusted according to the result of the parameter adjustment. In an application scenario of the embodiment of the present application, for example, when a new UI is developed based on an old version of software, the java class file generated for representing the data source set that packages the collected data entity object can be adjusted according to the historical data collected during the use of the old version of software, and the object set is adjusted according to the result of the parameter adjustment. It can not only improve the development efficiency of the UI, but also further ensure the accuracy of the UI development structure. Specifically, for example, the Java reflection API is used to obtain the historical collection data returned by the server, and then the entity object is associated through the Field Name, and the historical data is injected into the entity object of the collected data, so as to achieve parameter adjustment of the java class file. Of course, you can also generate a javabean file of the historical data based on the historical data, and then write it into a java class file corresponding to the object set whose data form is EditData objects, so as to finally realize the data adjustment of the object set whose data form is EditData objects.
[0064] Specifically, in an embodiment of the present application, the java class file after parameter adjustment is used to implement operations such as UI list rendering based on the collected data through RecycleView, thereby further improving the accuracy of operations such as rendering.
[0065] The present application provides a data reporting system UI development method, including: annotating the fields corresponding to the entity categories contained in the collected data, and determining the annotation parameters of the entity categories; creating an object set that packages the entity objects according to the annotation parameters; performing customized UI layout rendering on the collected data according to the object set, and obtaining rendering results; submitting the collected data to a system server; and performing data display and business development on the collected data submitted to the system server according to the rendering results. The method provided by the present application shifts the center of UI development to the annotation configuration of the collected data entities, thereby decoupling the data from the business logic and the business logic from the UI interface, simplifying the UI development process, improving development efficiency and quality, and being easy to expand.
[0066] Embodiment 2
[0067] In a second aspect, the present application also provides a data reporting system UI development device, such as Figure 2 As shown, Figure 2 The present invention provides a structural diagram of a data reporting system UI development device 20, which includes:
[0068] An annotation module 201 is used to annotate the fields corresponding to the entity categories contained in the collected data and determine the annotation parameters of the entity categories;
[0069] A creation module 202, used to create an object set that packages the entity object according to the annotation parameters;
[0070] A rendering module 203 is used to render a customized UI layout for the collected data according to the object set, and obtain a rendering result;
[0071] The development module 204 is used to submit the collected data to the system server, and perform data display and business development on the collected data submitted to the system server according to the rendering result.
[0072] Optionally, in one implementation of this embodiment, the creation module 202 is also used to: use the Java APT annotation processor to compile and parse the fields corresponding to the entity category according to the annotation parameters, generate an intermediate Java class file, and create an object collection that wraps the entity object based on the intermediate Java class file.
[0073] Optionally, in an implementation of the present embodiment, the rendering module 203 is also used for: performing customized UI layout rendering on the collected data according to the object set, and obtaining a rendering result, including: determining a UI template corresponding to the entity object in the object set, and performing UI list rendering on the collected data using RecycleView according to the determined UI template, and obtaining the rendering result.
[0074] Optionally, in an implementation of the present embodiment, the data reporting system UI development device also includes: a conversion module (not shown in the accompanying drawings), which is used to perform structural conversion on the collected data according to the configuration attributes of the entity category before submitting the collected data to the system server; and submit the data after structural conversion to the system server.
[0075] Optionally, in an implementation of this embodiment, the data reporting system UI development device also includes: a verification module (not shown in the accompanying drawings), which is used to perform data verification on the entity categories contained in the collected data before submitting the collected data to the system server.
[0076] Optionally, in an implementation of this embodiment, the verification module is also used to perform data verification on the intermediate java class file according to preset data class verification rules, and determine the result of data verification on the intermediate java class file as the result of data verification on the entity category.
[0077] Optionally, in an implementation of this embodiment, the data reporting system UI development device also includes: an adjustment module (not shown in the accompanying drawings), which is used to obtain collected historical data before submitting the collected data to the system server; and perform data adjustments on the object set based on the historical data.
[0078] The present application provides a data reporting system UI development device, which annotates the fields corresponding to the entity categories contained in the collected data by setting an annotation module to determine the annotation parameters of the entity categories; sets a creation module to create an object set that packages the entity objects according to the annotation parameters; sets a rendering module to render a customized UI layout for the collected data according to the object set and obtains the rendering results; sets a development module to submit the collected data to a system server, and performs data display and business development on the collected data submitted to the system server according to the rendering results. When using it to develop the UI of the data reporting system, by shifting the center of UI development to annotating and configuring the collected data entities, the coupling between data and business logic and the coupling between business logic and UI interface are released, the UI development process is simplified, the development efficiency and quality are effectively improved, and it is easy to expand. The device has a compact structure and is easy to implement.
[0079] Embodiment 3
[0080] In a third aspect, the present application also provides an electronic device, such as Figure 3 As shown, Figure 3 A schematic diagram of the structure of an electronic device using a method for developing a UI for a data reporting system provided in an embodiment of the present application, the electronic device comprising: a processor 301, a memory 303, a communication interface 302 and a communication bus 304;
[0081] The processor 301, the memory 302 and the communication interface 303 communicate with each other via the communication bus 304;
[0082] The memory 303 is used to store at least one executable instruction, and the executable instruction enables the processor 301 to perform operations corresponding to any one of the data reporting system UI development methods described in Example 1 of the present application, and the data reporting system UI development method includes but is not limited to:
[0083] Annotating fields corresponding to entity categories contained in the collected data to determine annotation parameters of the entity categories;
[0084] According to the annotation parameters, create an object set that wraps the entity object;
[0085] According to the object set, a customized UI layout rendering is performed on the collected data to obtain a rendering result;
[0086] The collected data is submitted to a system server, and according to the rendering result, data display and business development are performed on the collected data submitted to the system server.
[0087] Embodiment 4:
[0088] The present application also provides a computer storage medium, characterized in that a computer program is stored thereon, and when the program is executed by a processor, any one of the data reporting system UI development methods described in the above method embodiments of the present application is implemented, and the data reporting system UI development method includes but is not limited to:
[0089] Annotating fields corresponding to entity categories contained in the collected data to determine annotation parameters of the entity categories;
[0090] According to the annotation parameters, create an object set that wraps the entity object;
[0091] According to the object set, a customized UI layout rendering is performed on the collected data to obtain a rendering result;
[0092] The collected data is submitted to a system server, and according to the rendering result, data display and business development are performed on the collected data submitted to the system server.
[0093] Thus far, specific embodiments of the subject matter have been described. Other embodiments are within the scope of the appended claims. In some cases, the actions recited in the claims may be performed in a different order and still achieve the desired results. Additionally, the processes depicted in the accompanying drawings do not necessarily require the specific order or sequential order shown to achieve the desired results. In some embodiments, multitasking and parallel processing may be advantageous.
[0094] In the 1990s, improvements to a technology could be clearly distinguished as hardware improvements (for example, improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the method flow). However, with the development of technology, many improvements to the method flow today can be regarded as direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that an improvement in a method flow cannot be implemented using a hardware entity module. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user's programming of the device. Designers can "integrate" a digital system on a PLD by programming it themselves, without having to ask a chip manufacturer to design and produce a dedicated integrated circuit chip. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when developing and writing programs, and the original code before compilation must also be written in a specific programming language, which is called hardware description language (HDL). There is not only one HDL, but many kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also know that it is only necessary to program the method flow slightly in the above-mentioned hardware description languages and program it into the integrated circuit, and then it is easy to obtain the hardware circuit that implements the logic method flow.
[0095] The controller can be implemented in any appropriate manner, for example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (such as software or firmware) that can be executed by the (micro)processor, a logic gate, a switch, an application-specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art also know that in addition to implementing the controller in a purely computer-readable program code manner, the controller can be implemented in the form of a logic gate, a switch, an application-specific integrated circuit, a programmable logic controller, and an embedded microcontroller by logically programming the method steps. Therefore, this controller can be considered as a hardware component, and the devices included therein for implementing various functions can also be regarded as structures within the hardware component. Or even, the devices for implementing various functions can be regarded as both software modules for implementing the method and structures within the hardware component.
[0096] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0097] For the convenience of description, the above device is described in various units according to their functions. Of course, when implementing the present application, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0098] 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-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0099] 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.
[0100] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, devices, 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 on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0101] The present application may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific transactions or implement specific abstract data types. The present application may also be practiced in distributed computing environments where transactions are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.
[0102] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0103] The above is only an embodiment of the present application and is 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 in the scope of the claims of the present application.
Claims
1. A data reporting system UI development method, characterized in that: include: Annotate the fields corresponding to the entity categories contained in the collected data and determine the annotation parameters of the entity categories; According to the annotation parameters, create an object set that wraps the entity object; According to the object set, a customized UI layout rendering is performed on the collected data to obtain a rendering result; Submitting the collected data to a system server, and performing data display and business development on the collected data submitted to the system server according to the rendering result; The step of creating an object set that packages the annotation parameters according to the annotation parameters comprises: using a Java APT annotation processor to compile and parse the fields corresponding to the entity category according to the annotation parameters to generate an intermediate Java class file; and creating an object set that packages the entity object according to the intermediate Java class file; The method of rendering a customized UI layout for the collected data according to the object set and obtaining a rendering result includes: determining a UI template corresponding to the entity object in the object set; and performing a UI list rendering on the collected data using RecycleView according to the determined UI template to obtain the rendering result.
2. The data reporting system UI development method according to claim 1, characterized in that: Before submitting the collected data to the system server, the method further includes: According to the configuration attributes of the entity category, the collected data is structurally converted; Submit the structure-converted data to the system server.
3. The data reporting system UI development method according to claim 1, characterized in that: Before submitting the collected data to the system server, the method further includes: Data verification is performed on the entity categories contained in the collected data.
4. The data reporting system UI development method according to claim 3, characterized in that: The performing data verification on the entity categories contained in the collected data includes: According to the preset data class verification rules, data verification is performed on the intermediate java class file, and the result of the data verification on the intermediate java class file is determined as the result of the data verification on the entity category.
5. The data reporting system UI development method according to claim 1, characterized in that: Before submitting the collected data to the system server, it also includes: Get the collected historical data; According to the historical data, data adjustment is performed on the object set.
6. A data reporting system UI development device, characterized in that: include: An annotation module, used to annotate the fields corresponding to the entity categories contained in the collected data and determine the annotation parameters of the entity categories; A creation module, used for creating an object set of packaging entity objects according to the annotation parameters; A rendering module, used to render a customized UI layout for the collected data according to the object set, and obtain a rendering result; A development module for submitting the collected data to a system server; According to the rendering result, data display and UI business development are performed on the collected data submitted to the system server; The creation module is also used to use the Java APT annotation processor to compile and parse the fields corresponding to the entity category according to the annotation parameters to generate an intermediate Java class file; and to create an object set that packages the entity object according to the intermediate Java class file; The rendering module is also used to determine the UI template corresponding to the entity object in the object set; according to the determined UI template, use RecycleView to perform UI list rendering on the collected data to obtain the rendering result.
7. An electronic device, characterized in that: include: A processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus; The memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform operations corresponding to the data reporting system UI development method according to any one of claims 1-5.
8. A computer storage medium, characterized in that: A computer program is stored thereon, and when the program is executed by a processor, the method for developing a UI for a data reporting system as described in any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Template rendering method and device and browser
CN107766344A
View component creation method and device and storage medium
CN111782212A