An automatic registration floor coding method and device, and a storage medium

CN113961191BActive Publication Date: 2026-10-23BEIJING WODONG TIANJUN INFORMATION TECH CO LTD +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111295144.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-03
Publication Date
2026-10-23
Estimated Expiration
2041-11-03

AI Technical Summary

Technical Problem

[0002]目前页面的楼层化开发是比较流行的开发方式,楼层化开发可以让每个楼层单独开发、灵活的控制楼层顺序,并且可以决定每个楼层是否显示,当前的楼层化开发都是将每个楼层化的代码手动注册到开发页面,这样就限制了楼层化代码存放位置必须和注册容器放在一起,使楼层开发的灵活性丧失了一部分

Benefits of technology

[0040]本发明实施例提供了一种自动注册楼层化代码方法及装置、存储介质,该方法包括:利用楼层注解器对当前页面的开发项目进行遍历,获取当前界面的楼层开发代码进行标记,确定楼层的唯一标识,并获取楼层的类型;在由各个楼层所构成的应用启动时,根据所述楼层的唯一标识和所述楼层的类型,将所述楼层开发代码注册到楼层管理器,得到所述各个楼层处理后的综合楼层开发信息;其中,所述楼层开发信息表征楼层的唯一标识和类型;通过所述楼层管理器加载所述楼层开发信息并渲染,显示所述当前页面,所述当前页面中包含所述各个楼层的功能显示区域。采用上述方案,楼层注解器可以给楼层增加标记,在项目编译期间,注解器可以根据楼层注解标记来统计楼层,实现楼层的收集,并自动将楼层注册到楼层管理器中,通过自动注册的方式注册楼层化代码,使楼层化代码可以放在开发工程中的任意地方,提高楼层化开发的灵活性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113961191B_ABST
    Figure CN113961191B_ABST
Patent Text Reader

Abstract

The embodiment of the application discloses a kind of automatic registration floor code method and device, storage medium, current page is traversed using floor annotator to development project, the floor development code of current interface is marked, the unique identification of floor is determined, and the type of floor is obtained;When the application is started by each floor, according to the unique identification of floor and the type of floor, floor development code is registered to floor manager, and the comprehensive floor development information after each floor processing is obtained;Wherein, the floor development information represents the unique identification and type of floor;Through floor manager, load floor development information and render, display current page, the functional display area of each floor is included in current page.In the above scheme, floor code is registered by automatic registration mode, so that floor code can be placed anywhere in development engineering, and the flexibility of floor development is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and in particular to a method, apparatus, and storage medium for automatically registering floor-level codes. Background Technology

[0002] Currently, layered development is a popular development method. Layered development allows each layer to be developed independently, flexibly controls the order of layers, and determines whether each layer is displayed. However, current layered development involves manually registering the code for each layer to the development page. This restricts the storage location of the layered code to be placed together with the registration container, thus reducing the flexibility of layered development. Summary of the Invention

[0003] This invention provides a method, apparatus, and storage medium for automatically registering floor-based code, which can automatically register floors to a floor manager, improving the flexibility of floor-based development.

[0004] The technical solution of this invention is implemented as follows:

[0005] This invention provides a method for automatically registering floor-level codes, the method comprising:

[0006] The development project of the current page is traversed using the floor annotation tool to obtain the floor development code of the current interface, mark it, determine the unique identifier of the floor, and obtain the type of the floor.

[0007] When the application, which consists of various floors, is launched, the development code of each floor is registered with the floor manager according to the unique identifier and type of each floor, thereby obtaining the comprehensive floor development information after processing of each floor; wherein, the floor development information represents the unique identifier and type of the floor;

[0008] The floor development information is loaded and rendered by the floor manager, and the current page is displayed, which contains the functional display areas for each floor.

[0009] In the above scheme, the step of using a floor annotation tool to traverse the development project of the current page, obtaining and marking the floor development code of the current interface, determining the unique identifier of the floor, and obtaining the type of the floor includes:

[0010] The development projects on the current page are traversed to obtain the development code for the floor of the current interface;

[0011] The floor development code is marked by the floor annotator to determine the unique identifier of the floor;

[0012] Based on the unique identifier of the floor, the floor annotator calls the collection method in the added third-party library to obtain the type of the floor.

[0013] The method in the above scheme further includes:

[0014] The floor development information, consisting of the floor's unique identifier and the floor's type, is stored in a file related to the development project.

[0015] In the above scheme, when the application, which consists of various floors, is launched, the development code of each floor is registered with the floor manager according to the unique identifier and type of the floor, thereby obtaining the comprehensive floor development information after processing of each floor, including:

[0016] When the application, which consists of the various floors, is launched, it reads the file to obtain the unique identifier and type of each floor. Based on the unique identifier and type of each floor, it calls the registration method in the floor manager to automatically register the development code of the marked floor. Upon successful registration, it uses the floor manager to process the development information of each floor using parameter information to obtain the processed comprehensive floor development information.

[0017] In the above scheme, the parameter information processing includes at least one of the following:

[0018] The floors are sorted using their unique identifiers.

[0019] Determine whether each floor is displayed within the aforementioned floors;

[0020] Data binding is performed on each of the aforementioned floors.

[0021] In the above scheme, the step of using the floor manager to process the development information of each floor using parameter information to obtain the processed comprehensive floor development information includes:

[0022] The development information of each floor is processed using any one of the parameter information processing methods mentioned above, such as sorting each floor, displaying each floor, and binding each floor to data, to obtain the comprehensive floor development information after processing.

[0023] In the above solution, loading and rendering the floor development information through the floor manager to display the current page includes:

[0024] When the development project is started, a service address corresponding to the development project is generated;

[0025] By accessing the service address, the floor development information representing the layout function of each floor is loaded and rendered to obtain the current page;

[0026] The current page is displayed, and the current page contains the functional display areas for each floor.

[0027] In the above scheme, the step of accessing the service address, loading the floor development information representing the layout function of each floor, and rendering it to obtain the current page includes:

[0028] Load the floor development information that represents the layout function of each floor, and render the development information of each floor onto the corresponding control in the layout to obtain the current page.

[0029] This disclosure provides an apparatus for automatically registering floor-level codes. The apparatus includes an automatic floor collection unit, an automatic floor registration unit, a floor manager unit, a page rendering unit, and a floor manager loading unit.

[0030] The floor annotation unit is used to traverse the development project of the current page using the floor annotator, and mark the floor development code of the current interface.

[0031] The automatic floor collection unit is used to determine the unique identifier of a floor and obtain the type of the floor based on the floor marker;

[0032] The automatic floor registration unit is used to register the development code of a floor to the floor manager when the application, which consists of various floors, is launched, based on the unique identifier of the floor and the type of the floor.

[0033] The floor manager unit is used to obtain the comprehensive floor development information after processing of each floor;

[0034] The page rendering unit is used to load and render the floor development information through the floor manager;

[0035] The floor manager loads floor units to display the current page, which contains the functional display areas for each floor.

[0036] This disclosure provides an apparatus for automatically registering floor-level codes, the apparatus comprising:

[0037] Memory, used to store executable data instructions;

[0038] When a processor executes executable instructions stored in the memory, the processor executes the automatic registration layered code method when the executable instructions are executed.

[0039] This embodiment provides a computer-readable storage medium storing executable instructions. When the executable instructions are executed by one or more processors, the processors execute the automatic registration flooring code method.

[0040] This invention provides a method, apparatus, and storage medium for automatically registering floor-based code. The method includes: traversing the development projects of the current page using a floor annotator, obtaining and marking the floor development code of the current interface, determining the unique identifier of the floor, and obtaining the floor type; when the application composed of each floor starts, registering the floor development code to a floor manager according to the unique identifier and type of the floor, obtaining comprehensive floor development information after processing of each floor; wherein, the floor development information represents the unique identifier and type of the floor; loading and rendering the floor development information through the floor manager, displaying the current page, which contains the functional display area of ​​each floor. Using the above scheme, the floor annotator can add marks to floors. During project compilation, the annotator can count floors based on the floor annotation marks, collect floors, and automatically register the floors to the floor manager. By automatically registering the floor-based code, the floor-based code can be placed anywhere in the development project, improving the flexibility of floor-based development. Attached Figure Description

[0041] Figure 1 A flowchart illustrating an automatic registration method for floor-level codes provided in this embodiment of the invention. Figure 1 ;

[0042] Figure 2 This is a schematic diagram illustrating the effect of a page according to an embodiment of the present invention;

[0043] Figure 3 A flowchart illustrating an automatic registration method for floor-level codes provided in this embodiment of the invention. Figure 2 ;

[0044] Figure 4 A flowchart illustrating an automatic registration method for floor-level codes provided in this embodiment of the invention. Figure 3 ;

[0045] Figure 5 A flowchart illustrating an automatic registration method for floor-level codes provided in this embodiment of the invention. Figure 4 ;

[0046] Figure 6A flowchart illustrating an automatic registration method for floor-level codes provided in this embodiment of the invention. Figure 5 ;

[0047] Figure 7 A flowchart of existing development technology provided for embodiments of the present invention;

[0048] Figure 8 This is a flowchart illustrating a floor annotation tool provided in an embodiment of the present invention.

[0049] Figure 9 A flowchart illustrating an automatic registration method for floor-level codes provided in this embodiment of the invention. Figure 6 ;

[0050] Figure 10 A schematic diagram of the structure of an automatic registration floor-level code method device provided in an embodiment of the present invention. Figure 1 ;

[0051] Figure 11 A schematic diagram of the structure of an automatic registration floor-level code method device provided in an embodiment of the present invention. Figure 2 . Detailed Implementation

[0052] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the protection scope of the present invention.

[0053] To enable those skilled in the art to better understand the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. Figure 1 A flowchart illustrating an automatic registration method for floor-level codes provided in this embodiment of the invention. Figure 1 , will combine Figure 1 The steps shown are explained.

[0054] S101. Use the floor annotation tool to traverse the development projects of the current page, obtain the floor development code of the current interface, mark it, determine the unique identifier of the floor, and obtain the type of the floor.

[0055] In this embodiment of the invention, it is applicable to scenarios in which floor annotators are used to mark floor development codes, determine the unique identifier of a floor, and obtain the floor type.

[0056] In this embodiment of the invention, when developing a mobile terminal page, the page is composed of multiple blocks, which can be regarded as different floors. The different floors in the page are marked using a floor annotation tool. By marking, a unique identifier ID can be assigned to each floor, and the floors can be counted to achieve floor collection. The interface developed in this way can be called floor-based development.

[0057] In this embodiment of the invention, layering is a term used to describe the development and description of mobile application pages in a sequential manner from top to bottom according to obvious connections.

[0058] In this embodiment of the invention, the marker indicates that the floor can be collected and provides a unique identifier ID for the floor; this unique identifier ID is used when automatically registering each floor to the floor manager.

[0059] In this embodiment of the invention, the type of floor represents different purposes of different interfaces.

[0060] For example, when searching for a product on a shopping website, multiple listings of the same product in different colors, prices, and brands will appear. Clicking on any of these listings will redirect you to a new interface containing various information about the product, such as: a large image or video of the product; the product's price range; the product's shipping address; promotional offers; services offered; product options; and product parameters.

[0061] Large images or videos of the product: This section mainly introduces the product's appearance and specifications. If the product is a mobile phone, the specifications include the phone's release date, body thickness, internal memory, and screen size.

[0062] Price range of the product: This mainly defines a price range, and the product has a corresponding price when different appearances and specifications are selected.

[0063] Shipping address of goods: This indicates the place of origin of the goods, such as Shenzhen, Guangdong; Xi'an, Shaanxi; and Taiyuan, Shanxi.

[0064] Product promotions: Generally, discounts are offered by claiming existing coupons.

[0065] Product services: The merchant indicates that free shipping insurance or 15-day return policy are available.

[0066] Product selection and parameters: The product type, brand, condition, and after-sales service are introduced.

[0067] The above is the complete interface displayed when actually purchasing goods.

[0068] In an embodiment of the invention, a layered development technique is used to develop the aforementioned complete interface in blocks from top to bottom according to the functions of different areas of the product. The page contains seven parts detailing the product information, which can be viewed as seven layers, such as a price layer, an address layer, etc. Each layer has its corresponding function. Each layer is developed separately, and each layer is marked according to the level of attention given to the product information on the actual page. After all layers are developed, they are automatically registered in the layer manager. The layer manager sorts the different layers according to their markings. Once the page is fully displayed, it presents a complete, orderly interface containing the functions of all layers.

[0069] Figure 2 Taking the sale of mobile phones as an example, it is a complete interface consisting of 10 floors. Each floor has its unique identifier F1-F10. The type of F1 floor is a large picture of the mobile phone, the type of F2 floor is the price floor, F3 is the product name floor, F4 is the advertisement floor, F5 is the description floor, F6 is the specification floor, F7 is the discount floor, F8 is the activity floor, F9 is the selected floor, and F10 is the delivery floor.

[0070] It is understood that in this embodiment of the invention, different floors are marked using a floor annotator. The marking indicates that the floor can be collected, and a unique identifier (id) is obtained for each floor. This ID is then used to collect data from each floor. By using a floor annotator to mark each floor, floor-based development is facilitated.

[0071] S102. When the application, which consists of various floors, is launched, the floor development code is registered with the floor manager according to the unique identifier and type of the floor, and the comprehensive floor development information after processing of each floor is obtained; wherein, the floor development information represents the unique identifier and type of the floor.

[0072] In an embodiment of the present invention, the scenario in which the development code of each floor is automatically registered to the floor manager is applicable.

[0073] In some embodiments of the present invention, when the app, which consists of various floors, is launched, each floor can register its development code in the floor manager according to its own ID and floor type, thereby obtaining the comprehensive floor development information after processing by each floor.

[0074] In this embodiment of the invention, the comprehensive floor development information after processing of each floor is the final, complete, and ordered floor development information composed of the initial floor development information.

[0075] In the embodiments of the present invention, when each floor development code is automatically registered to the floor manager, the floor manager performs processing such as sorting the floors according to the floor ID, performing data binding on the floors, and refreshing the floors, and finally forms a complete and ordered floor development information.

[0076] It can be understood that, in the embodiments of the present invention, when an application is started, the collected floors are automatically registered to the floor manager according to the identifiers and types of the floors, so as to obtain comprehensive processed floor development information of each floor. By registering the floor-based code in an automatic registration manner, the floor-based code can be placed anywhere in the development project, which improves the flexibility of floor-based development.

[0077] S103. The floor manager loads and renders the floor development information, and displays the current page, where the current page includes the function display area of each floor.

[0078] The embodiments of the present invention are applicable to scenarios where floor development information is loaded and rendered.

[0079] In the embodiments of the present invention, the development information of each floor is loaded and rendered, and the loaded resources include HTML, JS, CSS codes and media files; finally, a page including the function display area of each floor is displayed.

[0080] In the embodiments of the present invention, during the loading process, the Domain Name System maps domain names and IP addresses to each other; sends an HTTP request to the server according to the IP address; the server processes the HTTP request and returns main codes and some static resources; generates a DOM Tree according to the returned HTML code, and generates a CSSOM (a CSS Object Model) according to the CSS code; integrates the DOM Tree and the CSSOM to generate a Render Tree; renders the page according to the render tree; pauses rendering when encountering a <script tag, and preferentially loads and executes the JS code; after the above process is completed, the rendering is finished, and a complete interface composed of all floors is obtained.

[0081] It can be understood that, in the embodiments of the present invention, by loading and rendering the floor development information, the interface including the functions of each floor is displayed. The floor manager loads, renders and displays the complete floor development information composed of all floors, which improves the flexibility of floor-based development.

[0082] In some embodiments, refer to Figure 3 , Figure 3 which is a schematic flowchart of a method for automatically registering floor-based code provided by the embodiments of the present invention Figure 2 , Figure 3The shown S101 can be implemented by S1011 to S1033, which will combine Figure 3 The steps shown are explained.

[0083] S1011. Iterate through the development projects on the current page and obtain the floor development code for the current interface.

[0084] In some embodiments of the present invention, it is applicable to scenarios where the development code for obtaining the interface is needed.

[0085] In some embodiments of the present invention, all floor codes in the current interface are obtained by traversing the development projects of the current interface.

[0086] It is understood that, in some embodiments of the present invention, the development projects of the page are traversed to obtain the development code of the floor, which facilitates the subsequent marking of the code.

[0087] S1012. Mark the obtained floor development code using the floor annotator to determine the unique identifier of the floor.

[0088] In some embodiments of the present invention, it is applicable to scenarios where floor codes are marked.

[0089] In some embodiments of the present invention, after traversing the project to obtain the floor development code, the obtained floor development code is marked using a floor annotator so that each floor development code has a unique identifier.

[0090] In some embodiments of the present invention, annotations are a type of tag that can be inserted into the source code. The user's compiler can make logical judgments on them, or the user can write a utility method to read the annotation information in the source code to perform a certain operation. Annotations themselves do not play any role and need to be used with annotation processors to play a certain role. They are actually more like a special kind of comment. Floor annotation processors are actually classes, so they only take effect when they are loaded into the JVM.

[0091] In some embodiments of the present invention, annotations are defined using the @interface keyword, such as:

[0092] public@interface TestAnnotation{

[0093] }

[0094] This is equivalent to creating an annotation named TestAnnotation.

[0095] @TestAnnotation

[0096] public class Test{

[0097] }

[0098] Create a class named Test, and then add @TestAnnotation to the class definition to annotate the class with TestAnnotation.

[0099] You can also define the attributes that the TestAnnotation annotation has, such as the id and msg attributes. When using it, you should assign values ​​to them.

[0100] For example, see Figure 2 F1 to F10 are unique identifiers for each floor.

[0101] It is understood that, in some embodiments of the present invention, the obtained floor development code is marked by an annotator and a unique identifier ID for each floor is provided to facilitate subsequent registration in the floor manager.

[0102] S1013. Based on the unique identifier of the floor, the floor annotator calls the collection method in the added third-party library to obtain the type of the floor.

[0103] In some embodiments of the present invention, it is applicable to scenarios where floors are collected based on floor markers.

[0104] In some embodiments of the present invention, after the floor annotator marks each floor, it collects the development code of the marked floors using the process method in the added third-party library based on the obtained ID.

[0105] In some embodiments of this invention, a Maven repository is a third-party library that the project depends on. Maven repositories include three types: local, central, and remote. When Maven begins searching for dependent libraries, it first searches the local repository, then the central repository. If the library is not found, and one or more remote repositories are already set up, it searches for the dependent file in one or more remote repositories. If found, it is downloaded to the local repository for future reference; otherwise, Maven will stop processing and throw an error (dependency file not found). The Maven local repository is created by default in the %USER_HOME% directory. To change the default location, define another path in the Maven settings.xml file in the %M2_HOME%\conf directory. When you run the Maven command, Maven will download the dependent files to the path you specify.

[0106] In some embodiments of the present invention, after adding a third-party library, namely the registry development dependency library, the AbstractProcessor class is inherited, and the process() method is called to collect the development code of the marked floors.

[0107] It is understood that in some embodiments of the present invention, the floor annotator collects floors based on floor identifiers. By collecting the marked development code, it is convenient to automatically register the development code of each floor into the floor manager later.

[0108] In some embodiments of the present invention, the floor development information needs to be stored before the floor is automatically registered to the floor manager. This can be achieved through S201, which will be described in conjunction with the following steps.

[0109] S201. Store the floor development information, consisting of the unique identifier of the floor and the floor type, in a file related to the development project.

[0110] In some embodiments of the present invention, it is applicable to scenarios where development information is saved.

[0111] In some embodiments of the present invention, floor development information consisting of a unique identifier for the floor and the floor type is stored in a file related to the development project.

[0112] It is understood that, in some embodiments of the present invention, by saving floor development information including floor identifiers and floor types, it is convenient to automatically register floors using the floor identifiers and floor types in the floor development information later.

[0113] In some embodiments, see Figure 4 , Figure 4 This is a flowchart illustrating an automatic registration method for floor-level codes provided in an embodiment of the present invention. Figure 3 , Figure 4 The shown S102 can be implemented through S1021 to S1022, which will combine Figure 4 The steps shown are explained.

[0114] S1021. When the application, which consists of various floors, starts, it reads the file to obtain the unique identifier of the floor and the type of the floor.

[0115] In some embodiments of the present invention, it is applicable to scenarios that obtain floor identifiers and floor types.

[0116] In some embodiments of the present invention, when an application consisting of various floors is launched, the path of the file storing floor identifiers and types is read to obtain the unique identifier and floor type of the floor.

[0117] In this embodiment of the invention, it can be implemented directly by the code File file = new File(path), where path is the actual storage path of the file.

[0118] It is understood that, in some embodiments of the present invention, when the application starts, the floor identifier and type are obtained by reading a file, so that the floor can be automatically registered using the floor identifier and floor type in the floor development information.

[0119] S1022. Based on the unique identifier and type of the floor, call the registration method in the floor manager to automatically register the development code of the marked floor. When the registration is successful, use the floor manager to process the parameter information of each floor's development information to obtain the processed comprehensive floor development information.

[0120] In some embodiments of the present invention, it is applicable to scenarios in which each floor is automatically registered to the floor manager to obtain the comprehensive floor development information after processing of each floor.

[0121] In some embodiments of the present invention, after reading the identifier and type of each floor, the registration method in the floor manager is directly called to automatically register each floor. When the registration is successful, the floor manager performs parameter information processing on the development information of each floor, and finally the development information of each floor forms a complete floor development information.

[0122] In some embodiments of the present invention, parameter information processing includes refreshing the floors, sorting by floor ID, and binding data.

[0123] It is understood that, in some embodiments of the present invention, after reading the identifier and type of each floor, the registration method in the floor manager is directly called to automatically register each floor, and the floor manager is used to process the parameter information of each successfully registered floor, so that the development information of each floor finally forms a complete floor development information. By registering the floor code automatically, the floor code can be placed anywhere in the development project, improving the flexibility of floor development.

[0124] In some embodiments of the present invention, see Figure 5 , Figure 5 This is a flowchart illustrating an automatic registration method for floor-level codes provided in an embodiment of the present invention. Figure 4 , Figure 5 The shown S1022 can be implemented through S301 to S303, and will be combined with Figure 5 The steps shown are explained.

[0125] S301. Sort each floor by using its unique identifier.

[0126] In some embodiments of the present invention, it is applicable to scenarios where floors are sorted.

[0127] In some embodiments of the present invention, when each floor is automatically registered to the floor manager, the floor manager sorts the floors according to the identifier ID of each floor, and the sorted floors form a complete floor development information.

[0128] For example, see Figure 2 The development interface displayed is arranged sequentially from F1 to F10.

[0129] It is understood that in some embodiments of the present invention, floor identifiers are used to sort the floors, making the developed interface orderly and standardized.

[0130] S302. Determine whether each floor is displayed in each floor list.

[0131] In some embodiments of the invention, it is applicable to scenarios where it is necessary to determine whether a floor is displayed.

[0132] In some embodiments of the present invention, when managing each floor, the floor manager determines whether each floor can be displayed.

[0133] S303. Bind data to each floor.

[0134] In some embodiments of the present invention, it is applicable to scenarios where data binding of floors is performed.

[0135] In some embodiments of the present invention, data binding is involved in the transmission of data between the front-end and back-end. The floor manager binds data to each floor and converts string parameters into the type that the server actually needs.

[0136] In some embodiments of the present invention, when the front-end makes a request, the default parameter types provided by Spring MVC can be directly used for data binding in the formal parameters of the back-end method. The Spring MVC framework will use the data binding component (DataBinder) to convert the type of the request parameter string, and then assign the converted value to the formal parameter of the method in the controller class. In this way, the back-end method can correctly bind and obtain the parameters carried by the client request. Commonly used default parameter types are HttpServletRequest: obtaining request information through the request object, HttpServletResponse: processing response information through the response, and HttpSession: obtaining objects stored in the session through the session object, etc. The specific process of data binding is as follows: Spring MVC passes the ServletRequest object to DataBinder; passes the input parameter object of the processing method to DataBinder; DataBinder calls the ConversionService component to perform data type conversion, data formatting, and other tasks, and populates the parameter object with the message from the ServletRequest object; calls the Validator component to validate the data validity of the parameter object that has been bound with the request message data; after the validation is completed, a data binding result BindingResult object is generated, and Spring MVC assigns the content of the BindingResult object to the corresponding parameter of the processing method.

[0137] It is understood that, in some embodiments of the present invention, data binding of each floor is performed through a floor manager, which enables the framework to be more automated, more fault-tolerant, and more efficient in coding.

[0138] S1022 can be implemented through S401, which will be explained in conjunction with the following steps.

[0139] S401. Process the development information of each floor using any one of the parameter information processing methods, such as sorting each floor, whether each floor is displayed, and data binding each floor, to obtain the comprehensive floor development information after processing.

[0140] In some embodiments of the present invention, it is applicable to scenarios in which parameters of each floor are processed to obtain comprehensive floor development information after processing of each floor.

[0141] In some embodiments of the present invention, when each floor is successfully registered to the floor manager, the floor manager performs various processes such as sorting each floor, binding data, determining whether each floor should be displayed, and refreshing the floors, so that each floor constitutes a complete floor development information.

[0142] In some embodiments of the present invention, see Figure 6 , Figure 6 This is a flowchart illustrating an automatic registration method for floor-level codes provided in an embodiment of the present invention. Figure 5 , Figure 6 The shown S103 can be implemented through S1031 to S1033, which will combine Figure 6 The steps shown are explained.

[0143] S1031. When the development project is started, the service address corresponding to the development project is generated.

[0144] In some embodiments of the present invention, it is applicable to scenarios that generate service addresses.

[0145] In some embodiments of the present invention, after the development project is deployed and started, a corresponding IP address is generated. By accessing this address, a series of operations on the page can be performed.

[0146] It is understood that in some embodiments of the present invention, when a development project is started, a service address corresponding to the project is generated, and subsequent access to this address facilitates the generation of pages.

[0147] S1032. By accessing the service address, load the floor development information that represents the layout function of each floor, and render it to obtain the current page.

[0148] In some embodiments of the present invention, it is applicable to scenarios where a development interface is obtained.

[0149] In some embodiments of the present invention, by accessing the generated service address, the device parses and displays content according to the order of the development code, loading the top content first, followed by the content below. During page rendering, the rendering engine begins parsing HTML / SVG / XHTML and converts tags into DOM nodes in the DOM tree. Next, it parses the style information from external CSS files and style tags to generate a rule tree. The DOM tree and rule tree are combined to generate the render tree. The render tree consists of rectangles containing attributes such as color and size, which will be displayed on the screen in the correct order. After the render tree is built, a layout process is executed, which determines the exact coordinates of each node on the screen. The next step is drawing, i.e., traversing the render tree and drawing each node using the UI backend layer.

[0150] In some embodiments of this invention, rendering is performed incrementally. For a better user experience, the rendering engine will present the content to the screen as early as possible, without waiting for all the HTML to be parsed before building and laying out the render tree. It displays a portion of the content as it is parsed, while simultaneously downloading the remaining content over the network.

[0151] S1033. Display the current page, which contains the function display areas for each floor.

[0152] In some embodiments of the present invention, it is applicable to scenarios where the current interface is displayed.

[0153] In some embodiments of the present invention, after the information is loaded and rendered, the HTML becomes an image that the human eye can see, thus obtaining the interface after development, which includes the functions of each floor.

[0154] S1032 can be implemented through S501, which will be explained in conjunction with the following steps.

[0155] S501. Load the floor development information that represents the layout function of each floor, and render the development information of each floor onto the corresponding control in the layout to obtain the current page.

[0156] In some embodiments of the present invention, it is applicable to scenarios where a development interface is obtained.

[0157] In some embodiments of the present invention, the device parses and displays content according to the order of the development code, loading the top content first, then loading the content below, displaying the data of each floor onto the corresponding controls in the layout, completing the rendering, and obtaining the current page.

[0158] To better illustrate the purpose of this invention, an exemplary application of the embodiments of this invention in a practical application scenario will be described below.

[0159] This invention provides a flowchart of a prior art development technique, such as... Figure 7 As shown.

[0160] S601, development interface for each floor F1-FN.

[0161] S602. Floors can be placed in the dependency library of the floor manager or in the library where the floor manager is located.

[0162] S603, Floor Manager FM.

[0163] S604, Page Rendering.

[0164] S605, Floor Manager FM loads floor F.

[0165] This embodiment provides a development process for a floor annotation tool, and an optional flowchart is shown below. Figure 8 As shown.

[0166] S701, Add registry development dependency library.

[0167] S702, Inherit the AbstractProcessor class.

[0168] S703. Implement the process() method.

[0169] S704. Collect the floors placed in each library according to the annotation tags.

[0170] S705. Save the collected floor information to a file.

[0171] S706: When the application starts, the collected floors will be automatically registered to the floor manager.

[0172] In S707, when rendering the UI page, the floor manager loads and renders the floor information.

[0173] This invention provides a method for automatically registering floor-level codes, with optional flowcharts as follows: Figure 9 As shown.

[0174] S1, the development interface, and each floor F1-FN (current page).

[0175] S2, the floor annotator adds annotations (markers) to each floor.

[0176] S3, The floor annotator automatically collects floors based on floor markers (obtaining the type of floor).

[0177] The floor annotator automatically collects floors based on floor markers, including:

[0178] S31. Add registry development dependency library (third-party library).

[0179] S32. Inherit the AbstractProcessor class and implement the process() method (collection method).

[0180] S33. In the process() method, collect the floors placed in each library according to the annotation tags.

[0181] S34. Save the collected floor information (floor development information) in a file related to the project.

[0182] S4. Automatically register the automatically collected floors to the floor manager.

[0183] S5, Floor Manager (The Floor Manager processes parameter information for each floor that has been automatically registered successfully).

[0184] S6, Page Rendering.

[0185] S7, Floor Manager loads floors.

[0186] This can be understood as using a floor annotation tool to mark the development code of each floor and collecting the floors; automatically registering the collected floors to the floor manager; and finally registering the floor-based code through automatic registration for page rendering and information loading, so that the floor-based code can be placed anywhere in the development project, improving the flexibility of floor-based development.

[0187] This invention provides an automatic registration device for floor-level codes, such as... Figure 10 The above, Figure 10 This is a schematic diagram of an automatic registration layered code device provided in an embodiment of the present invention. The device includes: a layer annotation adding unit 1001, an automatic layer collection unit 1002, an automatic layer registration unit 1003, a layer manager unit 1004, a page rendering unit 1005, and a layer manager loading unit 1006; wherein,

[0188] The floor annotation unit 1001 is used to traverse the development project of the current page using the floor annotator, and mark the floor development code of the current interface.

[0189] The automatic floor collection unit 1002 is used to determine the unique identifier of a floor based on the floor marker and to obtain the type of the floor;

[0190] The automatic floor registration unit 1003 is used to register the development code of the floor to the floor manager according to the unique identifier of the floor and the type of the floor when the application composed of each floor is started.

[0191] The floor manager unit 1004 is used to obtain the comprehensive floor development information after processing of each floor.

[0192] The page rendering unit 1005 is used to load and render the floor development information through the floor manager.

[0193] The floor manager loads floor unit 1006 to display the current page, which includes the functional display areas for each floor.

[0194] In some embodiments of the present invention, the floor annotation unit 1001 is further configured to traverse the development projects of the current page to obtain the floor development code of the current interface; and to mark the obtained floor development code through the floor annotator.

[0195] In some embodiments of the present invention, the automatic floor collection unit 1002 is further configured to, based on the unique identifier of the floor, call a collection method in an added third-party library to obtain the type of the floor.

[0196] In some embodiments of the present invention, the automatic floor collection unit 1002 is further configured to store the floor development information, consisting of the unique identifier of the floor and the type of the floor, in a file related to the development project.

[0197] In some embodiments of the present invention, the automatic floor registration unit 1003 is further configured to, when the application composed of the various floors is started, read the file to obtain the unique identifier of the floor and the type of the floor; and, based on the unique identifier of the floor and the type of the floor, call the registration method in the floor manager to automatically register the development code of the marked floor, and when the registration is successful, use the floor manager to process the development information of the various floors to obtain the comprehensive floor development information after processing of the various floors.

[0198] In some embodiments of the present invention, the floor manager unit 1004 is further configured to sort the floors using the unique identifier of the floors; determine whether each floor is displayed in the various floors; bind the data of the various floors; and process the development information of the various floors using any one of the parameter information processing methods of sorting the various floors, determining whether each floor is displayed, and binding the data of the various floors to obtain the processed comprehensive floor development information.

[0199] In some embodiments of the present invention, the page rendering unit 1005 is further configured to render the page when the floor manager loads information.

[0200] In some embodiments of the present invention, the floor manager loads the floor unit 1006 and is further configured to generate a service address corresponding to the development project when the development project is started; and to load the floor development information representing the layout function of each floor by accessing the service address, and to obtain and display the current interface by combining rendering.

[0201] In some embodiments of the present invention, the floor manager loads the floor unit 1006 and is also used to load the floor development information that characterizes the layout function of each floor, and render the development information of each floor onto the corresponding control in the layout to obtain the current page.

[0202] Understandably, in the above device implementation scheme, the development code of each floor is marked by the floor annotator and the floors are collected; the collected floors are automatically registered in the floor manager; finally, the floor-based code is registered automatically for page rendering and information loading, so that the floor-based code can be placed anywhere in the development project, improving the flexibility of floor-based development.

[0203] Based on the methods of the above embodiments, the present invention provides a schematic diagram of the structure of a server, as shown below. Figure 11 As shown, Figure 11 This application provides a schematic diagram of the structure of an automatic registration floor code method device. The device 11 includes a processor 1101 and a memory 1102. The memory 1102 stores one or more programs executable by the processor 1101. When one or more programs are executed, the processor 1101 executes an automatic registration floor code method corresponding to the server in the previous embodiment.

[0204] Based on the resource allocation method of the above embodiments, this application also provides a computer-readable storage medium that stores one or more programs. The one or more programs can be executed by one or more processors. When the programs are executed by the processors, they implement the automatic registration of floor-level code method disclosed in the embodiments of this invention.

[0205] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of hardware embodiments, software embodiments, or embodiments combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage and optical storage) containing computer-usable program code.

[0206] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0207] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0208] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0209] The above description is merely a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention.

Claims

1. A method for automatically registering floor-level codes, characterized in that, include: During project compilation, the development project of the current page is traversed using the floor annotation tool to obtain and mark the floor development code of the current interface, determine the unique identifier of the floor, and obtain the type of the floor; wherein, the type represents the different purposes of different interfaces; When the application, which consists of various floors, is launched, the registration method in the floor manager is called according to the unique identifier and type of each floor. The development code of each floor is registered to the floor manager to automatically register each floor. Upon successful registration, the floor manager is used to process the development information of each floor to obtain the comprehensive floor development information after processing. The floor development information represents the unique identifier and type of the floor. The floor development information is loaded and rendered by the floor manager, and the current page is displayed, which contains the functional display areas for each floor.

2. The method according to claim 1, characterized in that, The process involves using a floor annotation tool to traverse the development project of the current page, obtaining and marking the floor development code of the current interface, determining the unique identifier of the floor, and obtaining the floor type, including: The development projects on the current page are traversed to obtain the development code for the floor of the current interface; The floor development code is marked by the floor annotator to determine the unique identifier of the floor; Based on the unique identifier of the floor, the floor annotator calls the collection method in the added third-party library to obtain the type of the floor.

3. The method according to claim 1 or 2, characterized in that, The method further includes: The floor development information, consisting of the floor's unique identifier and the floor's type, is stored in a file related to the development project.

4. The method according to claim 3, characterized in that, The method further includes: When the application, which consists of the various floors, is launched, it reads the file to obtain the unique identifier of each floor and the type of each floor.

5. The method according to claim 1, characterized in that, The parameter information processing includes at least one of the following: The floors are sorted using their unique identifiers. Determine whether each floor is displayed within the aforementioned floors; Data binding is performed on each of the aforementioned floors.

6. The method according to claim 5, characterized in that, The process of using the floor manager to process the development information of each floor to obtain the processed comprehensive floor development information includes: The development information of each floor is processed by any one of the following parameter information processing methods: sorting the floors using the floor manager, determining whether each floor is displayed, and binding data to each floor, to obtain the processed comprehensive floor development information.

7. The method according to any one of claims 1, 2, 4-6, characterized in that, The process of loading and rendering the floor development information through the floor manager to display the current page includes: When the development project is started, a service address corresponding to the development project is generated; By accessing the service address, the floor development information representing the layout function of each floor is loaded and rendered to obtain the current page; The current page is displayed, and the current page contains the functional display areas for each floor.

8. The method according to claim 7, characterized in that, The process of accessing the service address, loading the floor development information representing the layout function of each floor, and rendering it to obtain the current page includes: Load the floor development information that represents the layout function of each floor, and render the development information of each floor onto the corresponding control in the layout to obtain the current page.

9. A device for automatically registering floor-level codes, characterized in that, include: Add annotation units to floors, which are used during project compilation to traverse the development project of the current page using the floor annotation tool, and mark the floor development code of the current interface. Automatically collect floor units to determine the unique identifier of a floor and obtain its type based on floor tags during project compilation; wherein the type represents the different purposes of different interfaces; The automatic floor registration unit is used to automatically register each floor by calling the registration method in the floor manager based on the unique identifier and type of the floor when the application, which consists of various floors, is launched. The floor manager unit is used to process the development information of each floor using the floor manager upon successful registration, so as to obtain the processed comprehensive floor development information. A page rendering unit is used to load and render the floor development information through the floor manager. The floor manager loads floor units to display the current page, which contains the functional display areas for each floor.

10. An apparatus for automatically registering floor-level codes, characterized in that, include: Memory, used to store executable data instructions; A processor, when executing executable instructions stored in the memory, implements the method according to any one of claims 1 to 8.

11. A computer-readable storage medium, characterized in that, It stores executable instructions for causing a processor to execute, thereby implementing the method of any one of claims 1 to 8.

Citation Information

Patent Citations

  • Page rendering method, device and equipment and computer readable storage medium

    CN112100552A