WO2023077932A1 - Method and apparatus for automatically registering floor code, and storage medium - Google Patents

Method and apparatus for automatically registering floor code, and storage medium Download PDF

Info

Publication number
WO2023077932A1
WO2023077932A1 PCT/CN2022/115963 CN2022115963W WO2023077932A1 WO 2023077932 A1 WO2023077932 A1 WO 2023077932A1 CN 2022115963 W CN2022115963 W CN 2022115963W WO 2023077932 A1 WO2023077932 A1 WO 2023077932A1
Authority
WO
WIPO (PCT)
Prior art keywords
floor
development
manager
code
current page
Prior art date
Application number
PCT/CN2022/115963
Other languages
French (fr)
Chinese (zh)
Inventor
张旋
Original Assignee
北京沃东天骏信息技术有限公司
北京京东世纪贸易有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 北京沃东天骏信息技术有限公司, 北京京东世纪贸易有限公司 filed Critical 北京沃东天骏信息技术有限公司
Publication of WO2023077932A1 publication Critical patent/WO2023077932A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/34Graphical or visual programming
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/73Program documentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/546Message passing systems or structures, e.g. queues

Definitions

  • the present application relates to the field of computer technology, in particular to a method, device and storage medium for automatically registering floor codes.
  • the floor-based development of the page is a relatively popular development method.
  • the floor-based development allows each floor to be developed independently, flexibly controls the floor sequence, and can determine whether each floor is displayed.
  • the current floor-based development is to make each floor Manually register the customized code to the development page, which restricts the storage location of the customized code to be placed with the registration container, and loses part of the flexibility of the developed platform.
  • the embodiment of the present application provides a method, device, and storage medium for automatically registering floor codes, which can automatically register floors in a floor manager and improve the flexibility of floor development.
  • An embodiment of the present application provides a method for automatically registering a floorization code, the method comprising:
  • the floor development code is registered in the floor manager, and the comprehensive floor development information processed by each floor is obtained;
  • the floor development information represents the unique identification and type of the floor;
  • the floor development information is loaded and rendered by the floor manager, and the current page is displayed, and the current page includes the function display areas of the various floors.
  • the floor annotator calls the collection method in the added third-party library to obtain the type of the floor.
  • the method also includes:
  • the floor development information consisting of the unique identifier of the floor and the type of the floor is stored in a file related to the development project.
  • the application composed of the various floors 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; according to the unique identifier of the floor and the type of the floor, call the floor
  • the registration method in the manager automatically registers the marked floor development code, and when the registration is successful, uses the floor manager to perform parameter information processing on the development information of each floor to obtain the The processed integrated floor development information.
  • the parameter information processing includes at least one of the following:
  • the use of the floor manager to perform parameter information processing on the development information of each floor to obtain the comprehensive floor development information processed on each floor includes:
  • the loading and rendering of the floor development information through the floor manager to display the current page includes:
  • the current page is displayed, and the current page includes the function display areas of the various floors.
  • the floor development information representing the layout function of each floor is loaded, and the development information of each floor is rendered to a corresponding control in the layout to obtain the current page.
  • An embodiment of the present application provides a device for automatically registering a floor code
  • the device for automatically registering a floor code includes an automatic floor collection part, a floor automatic registration part, a floor manager part, a page rendering part and a floor manager loading floor part ;in,
  • the floor annotation part is configured to use the floor annotation device to traverse the development project of the current page, and obtain the floor development code of the current interface for marking;
  • the automatic floor collection part is configured to determine the unique identifier of the floor and obtain the type of the floor according to the floor mark;
  • the floor automatic registration part is configured to register the floor development code with 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;
  • the floor manager part is configured to obtain the processed comprehensive floor development information of each floor
  • the page rendering part is configured to load and render the floor development information through the floor manager
  • the floor manager loads the floor part, and is configured to display the current page, and the current page includes the function display area of each floor.
  • An embodiment of the present application provides a device for automatically registering a floor code, and the device for automatically registering a floor code includes:
  • the processor When the processor is configured to execute the executable instructions stored in the memory, when the executable instructions are executed, the processor executes the automatic registration layered code method.
  • An embodiment of the present application provides a computer-readable storage medium, the storage medium stores executable instructions, and when the executable instructions are executed by one or more processors, the processors execute the automatic registration Stratified code approach.
  • the embodiment of the present application provides a method and device for automatically registering a floor code, and a storage medium.
  • the method includes: using the floor annotation device to traverse the development projects of the current page, obtaining the floor development code of the current interface and marking it, and determining the floor code uniquely identify and obtain the type of the floor; when the application composed of each floor is started, according to the unique identifier of the floor and the type of the floor, register the development code of the floor to the floor manager to obtain the Comprehensive floor development information after floor processing; wherein, the floor development information represents the unique identification and type of the floor; the floor development information is loaded and rendered by the floor manager, and the current page is displayed, and the current page contains Contains the function display area of each floor.
  • the floor annotator can add marks to the floors.
  • the annotator can count the floors according to the floor annotation marks, realize the collection of floors, and automatically register the floors to the floor manager through automatic registration. Register the floorization code, so that the floorization code can be placed anywhere in the development project, improving the flexibility of floorization development.
  • FIG. 1 is a first schematic flow diagram of a method for automatically registering a floorization code provided by an embodiment of the present application
  • Fig. 2 is a schematic diagram of the effect of a page provided by the embodiment of the present application.
  • Fig. 3 is a schematic flow diagram II of a method for automatically registering a floorization code provided by an embodiment of the present application
  • FIG. 4 is a schematic flow diagram three of a method for automatically registering a floorization code provided by an embodiment of the present application
  • Fig. 5 is a schematic flow diagram 4 of a method for automatically registering a floorization code provided by an embodiment of the present application
  • FIG. 6 is a schematic flow diagram five of a method for automatically registering a floorization code provided by an embodiment of the present application.
  • Figure 7 is a flow chart of the existing development technology provided by the embodiment of the present application.
  • Fig. 8 is a schematic flow diagram of a floor annotator provided in the embodiment of the present application.
  • FIG. 9 is a schematic flow diagram VI of a method for automatically registering a floorization code provided by an embodiment of the present application.
  • Fig. 10 is a schematic structural diagram of a method and device for automatically registering a floorization code provided by the embodiment of the present application;
  • FIG. 11 is a second structural schematic diagram of a method and device for automatically registering a floorization code provided by an embodiment of the present application.
  • FIG. 1 is a first schematic flow diagram of a method for automatically registering a floorization code provided by an embodiment of the present application, which will be described in conjunction with the steps shown in FIG. 1 .
  • the floor annotator to mark the floor development code, determine the unique identifier of the floor and obtain the floor type.
  • the page when developing the page on the mobile terminal, the page is composed of multiple blocks, which can be regarded as different floors, and the different floors in the page are marked by using the floor annotation device. Different floors are given a unique identification id, and the floors are counted to realize the collection of floors; the interface developed in this way can be called floor-based development.
  • stratification is a term used to separately develop and describe mobile phone application pages from top to bottom according to obvious connections.
  • the mark indicates that the floor can be collected, and provides a unique identification id of the floor; the unique identification id is used when each floor is automatically registered in the floor manager.
  • the types of floors indicate different purposes of different interfaces.
  • the product is a mobile phone
  • the specifications of the mobile phone include the launch time of the mobile phone, the thickness of the mobile phone body, the internal memory and the screen size of the mobile phone.
  • Commodity price range It mainly stipulates a price range. When choosing different appearances and specifications, the commodity has a corresponding price.
  • the delivery address of the goods indicate the origin of the goods, such as: Shenzhen, Guangdong, Xi'an, Shaanxi, and Taiyuan, Shanxi, etc.
  • Commodity activities Generally, the price is reduced for receiving the existing red envelopes.
  • Product service The merchant indicates that free shipping insurance or 15-day return, etc. are available.
  • Product selection and product parameters The product type, brand, quality and after-sales service are introduced.
  • the above-mentioned complete interface is developed in blocks from top to bottom according to the functions of different areas of the product by using the layered development technology.
  • 7 parts for the detailed introduction of the product. These 7 parts can be regarded as 7 floors, such as the price floor, address floor, etc.
  • Each floor has its corresponding function.
  • For development mark each floor according to the degree of attention of the product information in the actual page. After all the floors are developed, they will be automatically registered in the floor manager. The floor manager will sort the different floors according to the marks. After the page is displayed, it is a complete and orderly interface including all floor functions.
  • Figure 2 takes the sale of mobile phones as an example, a complete interface composed of 10 floors, each floor has its unique identification F1-F10, the type of F1 floor is the large picture of the mobile phone, the type of F2 floor is the price floor, F3 is the product name floor, F4 is the advertising floor, F5 is the explanation floor, F6 is the specification floor, F7 is the discount floor, F8 is the event floor, F9 is the selected floor, and F10 is the delivery floor.
  • F1-F10 the type of F1 floor is the large picture of the mobile phone
  • the type of F2 floor is the price floor
  • F3 is the product name floor
  • F4 is the advertising floor
  • F5 is the explanation floor
  • F6 is the specification floor
  • F7 is the discount floor
  • F8 is the event floor
  • F9 is the selected floor
  • F10 is the delivery floor.
  • the floor development code is registered in the floor manager, and the comprehensive floor development information processed by each floor is obtained; wherein, the floor development information represents The unique identifier and type of the floor.
  • the scenario of automatically registering the development codes of each floor into the floor manager is applicable.
  • the development code when the app consisting of each floor is started, for each floor, the development code can be registered in the floor manager according to the id and floor type of the floor itself, and the processed data of each floor can be obtained
  • the comprehensive floor development information consists of the development information of each floor.
  • the processed integrated floor development information of each floor is the final, complete and orderly piece of floor development information composed of initial floor development information.
  • the floor manager sorts the floors according to the floor id, performs data binding on the floors, and refreshes the floors, and finally forms a complete Orderly floor development information.
  • the collected floors are automatically registered in the floor manager according to the identification and type of the floors, and the comprehensive floor development information processed by each floor is obtained.
  • the layered code is registered by means of automatic registration, so that the layered code can be placed anywhere in the development project, which improves the flexibility of the layered development.
  • 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 containing the function display area of each floor is displayed.
  • the domain name system maps the domain name and the ip address to each other; sends an http request to the server according to the ip address; the server processes the http request and returns the main code and some static resource memory; according to The returned html code generates a DOM Tree, generates CSSOM (a css object model) according to the css code; integrates the DOM Tree and CSSOM to generate a Render Tree; renders the page according to the render tree; pauses rendering when encountering a ⁇ script tag, and loads and executes js first Code; after the above process is executed, the rendering ends, and a complete interface consisting of each floor is obtained.
  • the interface containing the functions of each floor will be displayed.
  • the floor manager loads, renders and displays a complete floor development information composed of each floor, which improves the flexibility of floor development.
  • FIG. 3 is a schematic flow diagram II of a method for automatically registering a floorization code provided by an embodiment of the present application.
  • S101 shown in FIG. 3 can be implemented through S1011 to S1033 , which will be shown in conjunction with FIG. Outlined steps are described.
  • all floor codes in the current interface are obtained by traversing the development projects of the current interface.
  • the development items of the page are traversed to obtain the development code of the floor, so as to provide convenience for marking the code later.
  • the floor annotations are used to mark the obtained floor development codes, so that each floor development code has a unique identifier.
  • annotations are tags that can be inserted into the source code, and the user's compiler can make logical judgments on them, or the user can write a tool method to read the annotation information in the source code , so as to achieve a certain operation; the annotation itself will not play any role, it needs to cooperate with the annotation processor to play a certain role, itself is actually more like a special annotation; the floor annotation is actually a class, so it only has It will not take effect until it is loaded into the jvm.
  • annotations are defined through the @interface keyword, such as:
  • TestAnnotation It is equivalent to creating an annotation named TestAnnotation.
  • TestAnnotation You can also define the attributes in the annotation of TestAnnotation, such as the id and msg attributes, which should be assigned values when using them.
  • F1 to F10 are the unique identifiers of each floor.
  • the acquired floor development code is marked by an annotator, and a unique identifier id of the floor is provided, so as to facilitate subsequent registration in the floor manager.
  • the floor annotator calls the collection method in the added third-party library to obtain the type of the floor.
  • the maven repository is a third-party library that the project depends on.
  • the maven warehouse includes three types: local, central and remote; when maven starts to look for dependent libraries, it first searches in the local warehouse, and then searches in the central warehouse. If it cannot be found, and one or more remote warehouses have been set , searches for dependent files in one or more remote warehouses, and if found, downloads to the local warehouse for future reference, otherwise Maven will stop processing and throw an error (cannot find dependent files).
  • the Maven local warehouse is created in the %USER_HOME% directory by default. To modify 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.
  • the floor annotator collects the floors according to the floor identification, and collects the marked development codes to facilitate the automatic registration of the development codes of each floor into the floor manager .
  • the floor development information needs to be stored before the floor is automatically registered in the floor manager, which can be realized through S201, which will be described in conjunction with the following steps.
  • the floor development information consisting of the unique identifier of the floor and the floor type is stored in a file related to the development project.
  • FIG. 4 is a schematic flowchart of a method for automatically registering a floorization code provided in an embodiment of the present application.
  • the third step. S102 shown in FIG. Outlined steps are described.
  • the path of the file storing the floor identifier and type is read to obtain the unique identifier and floor type of the floor.
  • the identification and type of the floor are obtained by reading the file, so that the floor can be automatically registered by using the identification and type of the floor in the floor development information.
  • each floor is automatically registered to the floor manager and the processed comprehensive floor development information of each floor is obtained.
  • the registration method in the floor manager is directly called to automatically register each floor. Do parameter information processing, and finally the development information of each floor forms a complete floor development information.
  • the parameter information processing includes refreshing floors, sorting by floor id, binding data, and the like.
  • FIG. 5 is a schematic flowchart of a method for automatically registering a floor code provided in the embodiment of the present application.
  • S1022 shown in FIG. 5 can be implemented through S301 to S303, which will be combined The steps shown in Figure 5 are described.
  • the floor manager when each floor is automatically registered to the floor manager, sorts the floors according to the identifier id of each floor, and the sorted floors form a complete floor development information.
  • the displayed development interface is arranged in order from F1 to F10 .
  • the floors are sorted by using the floor identifiers, so that the developed interface can be ordered and standardized.
  • the floor manager determines whether each floor can be displayed.
  • data binding is involved in the transfer process of the front-end and back-end data, and the floor manager performs data binding on each floor, and converts the parameters in the form of strings into the type that the server really needs. convert.
  • the default parameter type provided by Spring MVC can be directly used in the formal parameters of the background method for data binding; the Spring MVC framework will pass the request through the data binding component (DataBinder)
  • the content of the parameter string is type-converted, and then the converted value is assigned to the formal parameter of the method in the controller class, so that the background method can be correctly bound and obtain the parameters carried by the client request.
  • the commonly used default parameter type is HttpServletRequest: Get the request information through the request object, HttpServletResponse: process the response information through the response, and HttpSession: get the objects stored in the session through the session object, etc.
  • 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, etc. Fill in the parameter object; call the Validator component to verify the data validity of the parameter object that has been bound to the request message data; after the validation is completed, the data binding result BindingResult object will be generated, and Spring MVC will assign the content in the BindingResult object to the processing The corresponding parameters of the method.
  • data binding is performed on each floor through the floor manager, so that the framework has more automation, better fault tolerance and higher coding efficiency.
  • S1022 can be implemented through S401, and will be described in conjunction with the following steps.
  • S401 Process the development information of each floor by using any one of the parameter information processing methods of sorting each floor, whether each floor is displayed, and data binding of each floor, to obtain the comprehensive floor development after processing each floor. information.
  • the floor manager when each floor is successfully registered to the floor manager, the floor manager sorts the floors, binds data, determines whether each floor should be displayed, and refreshes the floors. , finally making each floor constitute a complete floor development information.
  • FIG. 6 is a schematic flowchart of a method for automatically registering a floor code provided by the embodiment of the present application.
  • S103 shown in FIG. 6 can be implemented through S1031 to S1033, which will be combined The steps shown in Figure 6 are described.
  • a corresponding ip address will be generated, and a series of operations on the page will be performed by accessing the address.
  • the device parses and displays the content in the order of the development code, the top one is loaded first, and then the following content is loaded; when the page is rendered, the rendering engine starts to parse the HTML /SVG/XHTML, and convert the tags into dom nodes in the dom tree.
  • the rendering engine starts to parse the HTML /SVG/XHTML, and convert the tags into dom nodes in the dom tree.
  • it parses the external CSS file and the style information in the style tag to generate a rule tree.
  • the combination of dom tree and rule tree generates render tree.
  • the Render tree consists of rectangles that contain attributes such as color and size, and they will be displayed on the screen in the correct order.
  • the layout process will be performed, which will determine the exact coordinates of each node on the screen.
  • the next step is to draw, that is, traverse the render tree and use the UI backend layer to draw each node.
  • the rendering is completed gradually.
  • the rendering engine will render the content to the screen as early as possible, and will not wait until all the html is parsed.
  • Build and layout render tree It displays part of the content after parsing part of the content, and at the same time, may still be downloading the rest of the content through the network.
  • it is suitable for displaying the scene of the current interface.
  • the HTML becomes an image seen by human eyes, and then a developed interface is obtained, which includes the functions of each floor.
  • S1032 can be implemented through S501, and will be described in conjunction with the following steps.
  • the device parses and displays the content in the order of the development codes, the top one is loaded first, and then the content below is loaded, and the data of each floor is displayed on the corresponding control in the layout to complete the rendering. to get the current page.
  • the embodiment of the present application provides a flowchart of an existing development technology, as shown in FIG. 7 .
  • the floor may be placed in a dependent library in the floor manager or in a library where the floor manager is located.
  • the floor manager FM loads the floor F.
  • This embodiment provides a development procedure of a floor annotator, and an optional flow chart is shown in FIG. 8 .
  • An embodiment of the present application provides a method for automatically registering a floorization code, and an optional flow chart is shown in FIG. 9 .
  • the floor annotator adds annotations (marks) to each floor.
  • the floor annotator automatically collects floors (obtains the type of the floor) according to the floor mark.
  • the Floor Annotator automatically collects floors based on floor markings, including:
  • the floor manager (the floor manager performs parameter information processing on each floor successfully registered automatically).
  • the floor manager loads floors.
  • the development code of each floor is marked by the floor annotation device, and the floors are collected; the collected floors are automatically registered in the floor manager, and finally the page is rendered and the information is loaded, through
  • the layered code is registered in the way of automatic registration, so that the layered code can be placed anywhere in the development project, and the flexibility of the layered development is improved.
  • the embodiment of the present application provides a device for automatically registering floor codes, as shown in FIG. 10 , which is a schematic structural diagram of a device for automatically registering floor codes provided in the embodiment of the present application.
  • the device includes: a floor adding annotation part 1001 , Automatically collect floor part 1002, floor automatic registration part 1003, floor manager part 1004, page rendering part 1005, floor manager load floor part 1006; wherein,
  • the floor annotation part 1001 is configured to use the floor annotation device to traverse the development projects of the current page, and obtain the floor development code of the current interface for marking;
  • the automatic floor collection part 1002 is configured to determine the unique identifier of the floor and obtain the type of the floor according to the floor mark;
  • the floor automatic registration part 1003 is configured to register the floor development code with 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;
  • the floor manager part 1004 is configured to obtain the processed comprehensive floor development information of each floor;
  • the page rendering part 1005 is configured to load and render the floor development information through the floor manager;
  • the floor manager loads a floor part 1006 configured to display the current page, and the current page includes the function display area of each floor.
  • the floor adding annotation part 1001 is further configured to traverse the development projects of the current page, obtain the floor development code of the current interface; and pass the floor annotation The device marks the acquired floor development code.
  • the automatic collection of floors part 1002 is further configured based on the unique identifier of the floor, and the floor annotator invokes the collection method in the added third-party library to obtain the floor type.
  • the automatic floor collection part 1002 is further configured to save the floor development information composed of the unique identifier of the floor and the type of the floor in the in the file.
  • the automatic floor registration part 1003 is further configured to read the file when the application composed of the various floors is started, and obtain the unique identifier of the floor and the the type of the floor; and according to the unique identifier of the floor and the type of the floor, call the registration method in the floor manager to automatically register the marked floor development code, and when the registration is successful, use the The floor manager performs parameter information processing on the development information of each floor to obtain the comprehensive floor development information processed on each floor.
  • the floor manager part 1004 is further configured to use the unique identifier of the floor to sort the various floors; and determine whether each floor is displayed among the various floors; and Performing data binding on the various floors; and using any one of the parameter information processing methods in the sorting of the various floors, whether each floor is displayed, and the data binding of the various floors
  • the development information of each floor is processed to obtain the comprehensive floor development information after the processing of each floor.
  • the page rendering part 1005 is further configured to render the page when the floor manager loads information.
  • the floor manager loads the floor part 1006, and is further configured to generate a service address corresponding to the development project when the development project is started; and load the representation by accessing the service address
  • the floor development information of the layout function of each floor is combined with rendering to obtain and display the current interface.
  • the floor manager loads the floor part 1006, and is further configured to load the floor development information representing the layout function of each floor, and render the development information of each floor Go to the corresponding control in the layout to get the current page.
  • the development code of each floor is marked by the floor annotation device, and the floors are collected; the collected floors are automatically registered in the floor manager, and finally the page is rendered and the information is loaded,
  • the layered code is registered through automatic registration, so that the layered code can be placed anywhere in the development project, improving the flexibility of layered development.
  • FIG. 11 is a schematic structural diagram of an automatic registration floor code device provided by the embodiment of the present application.
  • the device 11 includes : a processor 1101 and a memory 1102; the memory 1102 stores one or more programs executable by the processor 1101, and when one or more programs are executed, the processor 1101 executes a server corresponding to the embodiment described above Automatic registration of stratified code methods.
  • the embodiment of the present application also provides a computer-readable storage medium.
  • the computer-readable storage medium stores one or more programs, and one or more programs can be used by one or more A processor is executed, and when the program is executed by the processor, the automatic registration layered code method disclosed in the embodiment of the present application is realized.
  • the embodiments of the present application may be provided as methods, systems, or computer program products. Accordingly, the present application may take the form of a hardware embodiment, a software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may 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, etc.) having computer-usable program code embodied therein.
  • a computer-usable storage media including but not limited to disk storage and optical storage, etc.
  • These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing apparatus to operate in a specific manner, such that the instructions stored in the computer-readable memory produce an article of manufacture comprising instruction means, the instructions
  • the device realizes the function specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.
  • the embodiment of the present application provides a method and device for automatically registering floor codes, and a storage medium.
  • the method includes: using the floor annotation device to traverse the development projects of the current page, obtaining the floor development code of the current interface and marking it, and determining the floor code Uniquely identify and obtain the type of floor; when the application composed of each floor is started, according to the unique identifier of the floor and the type of the floor, register the development code of the floor to the floor manager to obtain the Comprehensive floor development information after floor processing; wherein, the floor development information represents the unique identification and type of the floor; the floor development information is loaded and rendered by the floor manager, and the current page is displayed, and the current page Contains the function display area of each floor.
  • the floor annotator can add marks to the floors.
  • the annotator can count the floors according to the floor annotation marks, realize the collection of floors, and automatically register the floors to the floor manager through automatic registration. Register the floorization code, so that the floorization code can be placed anywhere in the development project, improving the flexibility of floorization development.

Abstract

Disclosed in the embodiments of the present application are a method and apparatus for automatically registering a floor code, and a storage medium. The method comprises: traversing a development project of the current page by using a floor annotator, acquiring a floor development code of the current interface and marking same, determining a unique identifier of a floor, and acquiring the type of the floor; when an application formed by each floor is started, registering the floor development code to a floor manager according to the unique identifier of the floor and the type of the floor, so as to obtain comprehensive floor development information after each floor is processed, wherein the floor development information represents the unique identifier and type of the floor; and loading the floor development information by means of the floor manager and rendering same, and displaying the current page, wherein the current page includes a function display area of each floor.

Description

一种自动注册楼层化代码方法及装置、存储介质A method, device, and storage medium for automatically registering floor-based codes
相关申请的交叉引用Cross References to Related Applications
本申请要求在2021年11月03日提交中国专利局、申请号为202111295144.0、申请名称为“一种自动注册楼层化代码方法及装置、存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application submitted to the China Patent Office on November 03, 2021, the application number is 202111295144.0, and the application name is "A method and device for automatic registration of floor-based codes, and storage media", the entire content of which is passed References are incorporated in this application.
技术领域technical field
本申请涉及计算机技术领域,尤其涉及一种自动注册楼层化代码的方法及装置、存储介质。The present application relates to the field of computer technology, in particular to a method, device and storage medium for automatically registering floor codes.
背景技术Background technique
目前页面的楼层化开发是比较流行的开发方式,楼层化开发可以让每个楼层单独开发、灵活的控制楼层顺序,并且可以决定每个楼层是否显示,当前的楼层化开发都是将每个楼层化的代码手动注册到开发页面,这样就限制了楼层化代码存放位置必须和注册容器放在一起,使楼层开发的灵活性丧失了一部分。At present, the floor-based development of the page is a relatively popular development method. The floor-based development allows each floor to be developed independently, flexibly controls the floor sequence, and can determine whether each floor is displayed. The current floor-based development is to make each floor Manually register the customized code to the development page, which restricts the storage location of the customized code to be placed with the registration container, and loses part of the flexibility of the developed platform.
发明内容Contents of the invention
本申请实施例提供了一种自动注册楼层化代码的方法及装置、存储介质,能够自动的将楼层注册到楼层管理器中,提高了楼层化开发的灵活性。The embodiment of the present application provides a method, device, and storage medium for automatically registering floor codes, which can automatically register floors in a floor manager and improve the flexibility of floor development.
本申请的技术方案是这样实现的:The technical scheme of the present application is realized like this:
本申请实施例提供了一种自动注册楼层化代码的方法,所述方法包括:An embodiment of the present application provides a method for automatically registering a floorization code, the method comprising:
利用楼层注解器对当前页面的开发项目进行遍历,获取当前界面的楼层开发代码进行标记,确定楼层的唯一标识,并获取楼层的类型;Use the floor annotator to traverse the development projects of the current page, obtain the floor development code of the current interface to mark, determine the unique identifier of the floor, and obtain the type of the floor;
在由各个楼层所构成的应用启动时,根据所述楼层的唯一标识和所述楼层的类型,将所述楼层开发代码注册到楼层管理器,得到所述各个楼层处理后的综合楼层开发信息;其中,所述楼层开发信息表征楼层的唯一标识和类型;When the application composed of each floor is started, according to the unique identifier of the floor and the type of the floor, the floor development code is registered in the floor manager, and the comprehensive floor development information processed by each floor is obtained; Wherein, the floor development information represents the unique identification and type of the floor;
通过所述楼层管理器加载所述楼层开发信息并渲染,显示所述当前页面,所述当前页面中包含所述各个楼层的功能显示区域。The floor development information is loaded and rendered by the floor manager, and the current page is displayed, and the current page includes the function display areas of the various floors.
上述方案中,所述利用楼层注解器对当前页面的开发项目进行遍历,获取当前界面的楼 层开发代码进行标记,确定楼层的唯一标识,并获取楼层的类型,包括:In the above scheme, the use of the floor annotation device to traverse the development project of the current page, obtain the floor development code of the current interface to mark, determine the unique identifier of the floor, and obtain the type of the floor, including:
对所述当前页面的开发项目进行遍历,获取所述当前界面的所述楼层开发代码;Traversing the development projects of the current page to obtain the floor development code of the current interface;
通过所述楼层注解器对获取的所述楼层开发代码进行标记,确定楼层的唯一标识;marking the acquired floor development code 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.
上述方案中,所述方法还包括:In the above scheme, the method also includes:
将由所述楼层的唯一标识和所述楼层的类型组成的所述楼层开发信息保存在与所述开发项目相关的文件中。The floor development information consisting of the unique identifier of the floor and the type of the floor is stored in a file related to the development project.
上述方案中,所述在由各个楼层所构成的应用启动时,根据所述楼层的唯一标识和所述楼层的类型,将所述楼层开发代码注册到楼层管理器,得到所述各个楼层处理后的综合楼层开发信息,包括:In the above solution, when the application consisting of each floor is started, the floor development code is registered in the floor manager according to the unique identifier of the floor and the type of the floor, and the processed code of each floor is obtained. Comprehensive floor development information, including:
所述由所述各个楼层所构成的应用启动时,读取所述文件,获取所述楼层的唯一标识和所述楼层的类型;根据所述楼层的唯一标识和所述楼层的类型,调用楼层管理器中的注册方法对所述带标记的楼层开发代码进行自动注册,并在注册成功时,利用所述楼层管理器对所述的各个楼层的开发信息进行参数信息处理,得到所述各个楼层处理后的所述综合楼层开发信息。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; according to the unique identifier of the floor and the type of the floor, call the floor The registration method in the manager automatically registers the marked floor development code, and when the registration is successful, uses the floor manager to perform parameter information processing on the development information of each floor to obtain the The processed integrated floor development information.
上述方案中,所述参数信息处理包括以下至少一种:In the above solution, the parameter information processing includes at least one of the following:
利用所述楼层的唯一标识对所述各个楼层排序;sorting the floors by using the unique identifiers of the floors;
在所述各个楼层中确定每个楼层是否显示;determining whether each floor is displayed among the various floors;
对所述各个楼层进行数据绑定。Perform data binding on each floor.
上述方案中,所述利用所述楼层管理器对所述的各个楼层的开发信息进行参数信息处理,得到所述各个楼层处理后的所述综合楼层开发信息,包括:In the above solution, the use of the floor manager to perform parameter information processing on the development information of each floor to obtain the comprehensive floor development information processed on each floor includes:
利用所述对各个楼层进行排序、所述每个楼层是否显示和所述对各个楼层进行数据绑定中的任意一种参数信息处理方法对所述的各个楼层的开发信息进行处理,得到所述各个楼层处理后的所述综合楼层开发信息。Process the development information of each floor by using any one of the parameter information processing methods of sorting each floor, whether each floor is displayed, and data binding of each floor, to obtain the The comprehensive floor development information processed by each floor.
上述方案中,所述通过所述楼层管理器加载所述楼层开发信息并渲染,显示所述当前页面,包括:In the above solution, the loading and rendering of the floor development information through the floor manager to display the current page includes:
当所述开发项目进行启动时,生成开发项目对应的服务地址;When the development project is started, generate a service address corresponding to the development project;
通过访问所述服务地址,加载表征每个楼层的布局功能的所述楼层开发信息,并进行渲染,得到所述当前页面;By accessing the service address, loading the floor development information representing the layout function of each floor, and performing rendering to obtain the current page;
显示所述当前页面,所述当前页面中包含所述各个楼层的功能显示区域。The current page is displayed, and the current page includes the function display areas of the various floors.
上述方案中,所述通过访问所述服务地址,加载表征每个楼层的布局功能的所述楼层开发信息,并进行渲染,得到所述当前页面,包括:In the above solution, by accessing the service address, loading the floor development information representing the layout function of each floor, and performing rendering to obtain the current page, including:
加载所述表征每个楼层的布局功能的所述楼层开发信息,将所述每个楼层的开发信息渲染到布局中的对应控件上,得到所述当前页面。The floor development information representing the layout function of each floor is loaded, and the development information of each floor is rendered to a corresponding control in the layout to obtain the current page.
本申请实施例提供一种自动注册楼层化代码的装置,所述自动注册楼层化代码的装置包括自动收集楼层部分、楼层自动注册部分、楼层管理器部分、页面渲染部分和楼层管理器加载楼层部分;其中,An embodiment of the present application provides a device for automatically registering a floor code, the device for automatically registering a floor code includes an automatic floor collection part, a floor automatic registration part, a floor manager part, a page rendering part and a floor manager loading floor part ;in,
所述楼层添加注解部分,被配置为利用楼层注解器对当前页面的开发项目进行遍历,获取当前界面的楼层开发代码进行标记;The floor annotation part is configured to use the floor annotation device to traverse the development project of the current page, and obtain the floor development code of the current interface for marking;
所述自动收集楼层部分,被配置为根据楼层标记,确定楼层的唯一标识,并获取楼层的类型;The automatic floor collection part is configured to determine the unique identifier of the floor and obtain the type of the floor according to the floor mark;
所述楼层自动注册部分,被配置为在由各个楼层所构成的应用启动时,根据所述楼层的唯一标识和所述楼层的类型,将所述楼层开发代码注册到楼层管理器;The floor automatic registration part is configured to register the floor development code with 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;
所述楼层管理器部分,被配置为得到所述各个楼层处理后的综合楼层开发信息;The floor manager part is configured to obtain the processed comprehensive floor development information of each floor;
所述页面渲染部分,被配置为通过所述楼层管理器加载所述楼层开发信息并渲染;The page rendering part is configured to load and render the floor development information through the floor manager;
所述楼层管理器加载楼层部分,被配置为显示所述当前页面,所述当前页面中包含所述各个楼层的功能显示区域。The floor manager loads the floor part, and is configured to display the current page, and the current page includes the function display area of each floor.
本申请实施例提供一种自动注册楼层化代码的装置,所述自动注册楼层化代码的装置包括:An embodiment of the present application provides a device for automatically registering a floor code, and the device for automatically registering a floor code includes:
存储器,被配置为存储可执行数据指令;memory configured to store executable data instructions;
处理器,被配置为执行所述存储器中存储的可执行指令时,当所述可执行指令被执行时,所述处理器执行所述的自动注册楼层化代码方法。When the processor is configured to execute the executable instructions stored in the memory, when the executable instructions are executed, the processor executes the automatic registration layered code method.
本申请实施例提供一种计算机可读存储介质,所述存储介质存储有可执行指令,当所述可执行指令被一个或多个处理器执行的时候,所述处理器执行所述的自动注册楼层化代码方法。An embodiment of the present application provides a computer-readable storage medium, the storage medium stores executable instructions, and when the executable instructions are executed by one or more processors, the processors execute the automatic registration Stratified code approach.
本申请实施例提供了一种自动注册楼层化代码方法及装置、存储介质,该方法包括:利用楼层注解器对当前页面的开发项目进行遍历,获取当前界面的楼层开发代码进行标记,确定楼层的唯一标识,并获取楼层的类型;在由各个楼层所构成的应用启动时,根据所述楼层的唯一标识和所述楼层的类型,将所述楼层开发代码注册到楼层管理器,得到所述各个楼层处理后的综合楼层开发信息;其中,所述楼层开发信息表征楼层的唯一标识和类型;通过所述楼层管理器加载所述楼层开发信息并渲染,显示所述当前页面,所述当前页面中包含所述 各个楼层的功能显示区域。采用上述方案,楼层注解器可以给楼层增加标记,在项目编译期间,注解器可以根据楼层注解标记来统计楼层,实现楼层的收集,并自动将楼层注册到楼层管理器中,通过自动注册的方式注册楼层化代码,使楼层化代码可以放在开发工程中的任意地方,提高楼层化开发的灵活性。The embodiment of the present application provides a method and device for automatically registering a floor code, and a storage medium. The method includes: using the floor annotation device to traverse the development projects of the current page, obtaining the floor development code of the current interface and marking it, and determining the floor code uniquely identify and obtain the type of the floor; when the application composed of each floor is started, according to the unique identifier of the floor and the type of the floor, register the development code of the floor to the floor manager to obtain the Comprehensive floor development information after floor processing; wherein, the floor development information represents the unique identification and type of the floor; the floor development information is loaded and rendered by the floor manager, and the current page is displayed, and the current page contains Contains the function display area of each floor. Using the above scheme, the floor annotator can add marks to the floors. During project compilation, the annotator can count the floors according to the floor annotation marks, realize the collection of floors, and automatically register the floors to the floor manager through automatic registration. Register the floorization code, so that the floorization code can be placed anywhere in the development project, improving the flexibility of floorization development.
附图说明Description of drawings
图1为本申请实施例提供的一种自动注册楼层化代码方法的流程示意图一;FIG. 1 is a first schematic flow diagram of a method for automatically registering a floorization code provided by an embodiment of the present application;
图2为本申请实施例提供的一种页面的效果示意图;Fig. 2 is a schematic diagram of the effect of a page provided by the embodiment of the present application;
图3为本申请实施例提供的一种自动注册楼层化代码方法的流程示意图二;Fig. 3 is a schematic flow diagram II of a method for automatically registering a floorization code provided by an embodiment of the present application;
图4为本申请实施例提供的一种自动注册楼层化代码方法的流程示意图三;FIG. 4 is a schematic flow diagram three of a method for automatically registering a floorization code provided by an embodiment of the present application;
图5为本申请实施例提供的一种自动注册楼层化代码方法的流程示意图四;Fig. 5 is a schematic flow diagram 4 of a method for automatically registering a floorization code provided by an embodiment of the present application;
图6为本申请实施例提供的一种自动注册楼层化代码方法的流程示意图五;FIG. 6 is a schematic flow diagram five of a method for automatically registering a floorization code provided by an embodiment of the present application;
图7为本申请实施例提供的现有开发技术流程图;Figure 7 is a flow chart of the existing development technology provided by the embodiment of the present application;
图8为本申请实施例提供的一种楼层注解器的流程示意图;Fig. 8 is a schematic flow diagram of a floor annotator provided in the embodiment of the present application;
图9为本申请实施例提供的一种自动注册楼层化代码方法的流程示意图六;FIG. 9 is a schematic flow diagram VI of a method for automatically registering a floorization code provided by an embodiment of the present application;
图10为本申请实施例提供的一种自动注册楼层化代码方法装置的结构示意图一;Fig. 10 is a schematic structural diagram of a method and device for automatically registering a floorization code provided by the embodiment of the present application;
图11为本申请实施例提供的一种自动注册楼层化代码方法装置的结构示意图二。FIG. 11 is a second structural schematic diagram of a method and device for automatically registering a floorization code provided by an embodiment of the present application.
具体实施方式Detailed ways
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部实施例。基于本申请的实施例,本领域普通技术人员在没有做出创造性劳动前提下,所获得的所有其他实施例,都属于本申请保护范围。The following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, not all of them. Based on the embodiments of the present application, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present application.
为了使本技术领域的人员更好地理解本申请方案,下面结合附图和具体实施方式对本申请作进一步的详细说明。图1为本申请实施例提供的一种自动注册楼层化代码方法的流程示意图一,将结合图1示出的步骤进行说明。In order to enable those skilled in the art to better understand the solution of the present application, the present application will be further described in detail below in conjunction with the drawings and specific implementation methods. FIG. 1 is a first schematic flow diagram of a method for automatically registering a floorization code provided by an embodiment of the present application, which will be described in conjunction with the steps shown in FIG. 1 .
S101、利用楼层注解器对当前页面的开发项目进行遍历,获取当前界面的楼层开发代码进行标记,确定楼层的唯一标识,并获取楼层的类型。S101. Use the floor annotator to traverse the development projects of the current page, obtain the floor development code of the current interface and mark it, determine the unique identifier of the floor, and obtain the type of the floor.
在本申请实施例中,适用于利用楼层注解器对楼层开发代码进行标记,确定楼层的唯一标识和获取楼层类型的场景。In the embodiment of this application, it is applicable to use the floor annotator to mark the floor development code, determine the unique identifier of the floor and obtain the floor type.
在本申请实施例中,对移动端的页面进行开发时,该页面由多个分块组成,该分块可以 看成不同的楼层,利用楼层注解器对页面中不同的楼层进行标记,通过标记可以对不同的楼层赋予唯一的标识id,并对楼层进行统计,实现楼层的收集;通过楼层的这种方式开发的界面可以称之为楼层化开发。In the embodiment of this application, when developing the page on the mobile terminal, the page is composed of multiple blocks, which can be regarded as different floors, and the different floors in the page are marked by using the floor annotation device. Different floors are given a unique identification id, and the floors are counted to realize the collection of floors; the interface developed in this way can be called floor-based development.
在本申请实施例中,楼层化是一种将手机应用页面根据明显的接线按顺序从上到下分开开发和描述的术语。In this embodiment of the application, stratification is a term used to separately develop and describe mobile phone application pages from top to bottom according to obvious connections.
在本申请实施例中,该标记表明该楼层可以被收集,且提供楼层唯一的标识id;该唯一的标识id在将各个楼层自动注册到楼层管理器中的时候进行使用。In the embodiment of the present application, the mark indicates that the floor can be collected, and provides a unique identification id of the floor; the unique identification id is used when each floor is automatically registered in the floor manager.
在本申请实施例中,楼层的类型表示不同的界面的不同目的。In this embodiment of the application, the types of floors indicate different purposes of different interfaces.
示例性的,在购物网站上输入商品进行搜寻时,会弹出多个不同颜色、不同价格、不同品牌的该商品,任选一款进行点击,跳转到一个新的界面,该界面包含了该商品的各种信息介绍。如:该商品的大图片或视频介绍;商品的价格区间;商品的发货地址;商品的发货地址;商品的活动;商品的服务;商品的选择以及商品的参数。Exemplarily, when searching for a product on a shopping website, multiple products of different colors, different prices, and different brands will pop up. Click on any one to jump to a new interface, which includes the Various information about the product. Such as: a large picture or video introduction of the product; the price range of the product; the shipping address of the product; the shipping address of the product; the activities of the product; the service of the product; the selection of the product and the parameters of the product.
商品的大图片或视频介绍:主要对商品的外观,规格进行介绍,如果该商品为手机时,则手机的规格包括手机的上市时间、手机的机身厚度、机身内存和屏幕尺寸。Large picture or video introduction of the product: It mainly introduces the appearance and specifications of the product. If the product is a mobile phone, the specifications of the mobile phone include the launch time of the mobile phone, the thickness of the mobile phone body, the internal memory and the screen size of the mobile phone.
商品的价格区间:主要规定了一个价格区间,在选择不同的外观和规格时,商品都有对应的价格。Commodity price range: It mainly stipulates a price range. When choosing different appearances and specifications, the commodity has a corresponding price.
商品的发货地址:注明了商品的来源地,如:广东深圳、陕西西安及山西太原等。The delivery address of the goods: indicate the origin of the goods, such as: Shenzhen, Guangdong, Xi'an, Shaanxi, and Taiyuan, Shanxi, etc.
商品的活动:一般为领取已有的红包进行减价。Commodity activities: Generally, the price is reduced for receiving the existing red envelopes.
商品的服务:商家注明可以免运费险或15天退货等。Product service: The merchant indicates that free shipping insurance or 15-day return, etc. are available.
商品的选择以及商品的参数:对商品的类型、品牌、成色和售后服务做了介绍。Product selection and product parameters: The product type, brand, quality and after-sales service are introduced.
以上为实际上购买商品时所展示的完整界面。The above is the complete interface displayed when actually purchasing the product.
在本申请的实施例中,利用楼层化开发技术对上述一个完整的界面按照商品不同区域的功能从上到下分块进行开发。该页面中,对商品的详细介绍一共有7部分,可以将这7部分看成7个楼层,如价格楼层、地址楼层等等,每个楼层都有其相应的功能,对每个楼层分别进行开发,将每个楼层按照实际页面中商品信息的关注程度对每个楼层进行标记,所有的楼层开发完后,自动注册到楼层管理器中,楼层管理器将不同的楼层按照标记进行排序,待页面显示完后,是一个完整的、有序的、包含所有楼层功能的界面。In the embodiment of this application, the above-mentioned complete interface is developed in blocks from top to bottom according to the functions of different areas of the product by using the layered development technology. In this page, there are 7 parts for the detailed introduction of the product. These 7 parts can be regarded as 7 floors, such as the price floor, address floor, etc. Each floor has its corresponding function. For development, mark each floor according to the degree of attention of the product information in the actual page. After all the floors are developed, they will be automatically registered in the floor manager. The floor manager will sort the different floors according to the marks. After the page is displayed, it is a complete and orderly interface including all floor functions.
图2以手机的售卖为例,10个楼层构成的一个完整的界面,每个楼层都有其唯一的标识F1-F10,F1楼层的类型为手机的大图片、F2楼层的类型为价格楼层、F3为商品名称楼、F4为广告楼层、F5为说明楼层、F6为规格楼层、F7为优惠楼层、F8为活动楼层、F9为已选楼层、F10为送至楼层。Figure 2 takes the sale of mobile phones as an example, a complete interface composed of 10 floors, each floor has its unique identification F1-F10, the type of F1 floor is the large picture of the mobile phone, the type of F2 floor is the price floor, F3 is the product name floor, F4 is the advertising floor, F5 is the explanation floor, F6 is the specification floor, F7 is the discount floor, F8 is the event floor, F9 is the selected floor, and F10 is the delivery floor.
可以理解的是,在本申请实施例中,利用楼层注解器对不同楼层进行标记,根据标记表明该楼层可以被收集,并且获得各个楼层的唯一标识id,利用该id,对各个楼层进行收集。通过利用楼层注解器对各个楼层进行标记,方便了楼层化的开发。It can be understood that, in the embodiment of the present application, different floors are marked by the floor annotation device, and the floors can be collected according to the marks, and the unique identification id of each floor is obtained, and each floor is collected by using the id. By using the floor annotation to mark each floor, the development of floorization is facilitated.
S102、在由各个楼层所构成的应用启动时,根据楼层的唯一标识和楼层的类型,将楼层开发代码注册到楼层管理器,得到各个楼层处理后的综合楼层开发信息;其中,楼层开发信息表征楼层的唯一标识和类型。S102. When the application composed of each floor is started, according to the unique identifier of the floor and the type of the floor, the floor development code is registered in the floor manager, and the comprehensive floor development information processed by each floor is obtained; wherein, the floor development information represents The unique identifier and type of the floor.
在本申请的实施例中,适用将各个楼层的开发代码自动注册到楼层管理器中的场景。In the embodiment of the present application, the scenario of automatically registering the development codes of each floor into the floor manager is applicable.
在本申请的一些实施例中,在由各个楼层组成的app启动时,对于各个楼层来说,可以根据楼层自身的id和楼层类型,将开发代码注册到楼层管理器中,得到各个楼层处理后的综合楼层开发信息由各个楼层的开发信息。In some embodiments of the present application, when the app consisting of each floor is started, for each floor, the development code can be registered in the floor manager according to the id and floor type of the floor itself, and the processed data of each floor can be obtained The comprehensive floor development information consists of the development information of each floor.
在本申请实施例中,各个楼层处理后的综合楼层开发信息为由初始的各个楼层开发信息构成的最终的完整的有序的一个楼层开发信息。In the embodiment of the present application, the processed integrated floor development information of each floor is the final, complete and orderly piece of floor development information composed of initial floor development information.
在本申请实施例中,各个楼层开发代码自动注册到楼层管理器时,楼层管理器根据楼层id对楼层进行排序、对楼层进行数据绑定,以及对楼层进行刷新等处理,最终形成一个完整的有序的楼层开发信息。In the embodiment of this application, when the development codes of each floor are automatically registered to the floor manager, the floor manager sorts the floors according to the floor id, performs data binding on the floors, and refreshes the floors, and finally forms a complete Orderly floor development information.
可以理解的是,在本申请实施例中,在应用启动时,根据楼层的标识和类型,将收集到的楼层自动注册到楼层管理器中,得到各个楼层处理后的综合楼层开发信息。通过自动注册的方式注册楼层化代码,使楼层化代码可以放在开发工程中的任意地方,提高了楼层化开发的灵活性。It can be understood that, in this embodiment of the application, when the application is started, the collected floors are automatically registered in the floor manager according to the identification and type of the floors, and the comprehensive floor development information processed by each floor is obtained. The layered code is registered by means of automatic registration, so that the layered code can be placed anywhere in the development project, which improves the flexibility of the layered development.
S103、通过楼层管理器加载楼层开发信息并渲染,显示当前页面,当前页面中包含各个楼层的功能显示区域。S103. Load and render the floor development information through the floor manager, and display the current page, which includes function display areas of each floor.
在本申请的实施例中,适用于将楼层开发信息加载并渲染出来的场景。In the embodiment of the present application, it is applicable to a scene where floor development information is loaded and rendered.
在本申请实施例中,将各个楼层的开发信息进行加载,并进行渲染,加载的资源包括html、js、css代码和媒体文件;最后显示一个包含各个楼层的功能显示区域的页面。In the embodiment of this application, 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 containing the function display area of each floor is displayed.
在本申请实施例中,在加载的过程中,域名系统将域名和ip地址相互映射;根据ip地址向服务器发送http请求;服务器处理http请求,并将主要的代码和一些静态资源记性返回;根据返回的html代码生成DOM Tree,根据css代码生成CSSOM(一个css对象模型);将DOM Tree和CSSOM整合生成Render Tree;根据render tree渲染页面;遇到<script标签则暂停渲染,优先加载并执行js代码;上述过程执行完成以后,渲染结束,得到了一个由各个楼层组成的一个完整界面。In the embodiment of this application, during the loading process, the domain name system maps the domain name and the ip address to each other; sends an http request to the server according to the ip address; the server processes the http request and returns the main code and some static resource memory; according to The returned html code generates a DOM Tree, generates CSSOM (a css object model) according to the css code; integrates the DOM Tree and CSSOM to generate a Render Tree; renders the page according to the render tree; pauses rendering when encountering a <script tag, and loads and executes js first Code; after the above process is executed, the rendering ends, and a complete interface consisting of each floor is obtained.
可以理解的是,在本申请的实施例中,通过加载楼层开发信息并进行渲染,将包含各个 楼层的功能的界面进行显示。楼层管理器将各个楼层组成的一个完整的楼层开发信息进行加载渲染并显示,提高了楼层化开发的灵活性。It can be understood that, in the embodiment of the present application, by loading and rendering the floor development information, the interface containing the functions of each floor will be displayed. The floor manager loads, renders and displays a complete floor development information composed of each floor, which improves the flexibility of floor development.
在一些实施例中,参见图3,图3是本申请实施例提供的一种自动注册楼层化代码方法的流程示意图二,图3示出的S101可以通过S1011至S1033实现,将结合图3示出的步骤进行说明。In some embodiments, refer to FIG. 3 . FIG. 3 is a schematic flow diagram II of a method for automatically registering a floorization code provided by an embodiment of the present application. S101 shown in FIG. 3 can be implemented through S1011 to S1033 , which will be shown in conjunction with FIG. Outlined steps are described.
S1011、对当前页面的开发项目进行遍历,获取当前界面的楼层开发代码。S1011. Traversing the development projects of the current page to obtain the floor development code of the current interface.
在本申请的一些实施例中,适用于获取界面的开发代码的场景。In some embodiments of the present application, it is applicable to the scenario of acquiring the development code of the interface.
在本申请的一些实施例中,通过对当前界面的开发项目进行遍历,获取当前界面中的所有的楼层代码。In some embodiments of the present application, all floor codes in the current interface are obtained by traversing the development projects of the current interface.
可以理解的是,在本申请的一些实施例中,对页面的开发项目进行遍历来获取楼层的开发代码,为之后对该代码进行标记提供便利。It can be understood that, in some embodiments of the present application, the development items of the page are traversed to obtain the development code of the floor, so as to provide convenience for marking the code later.
S1012、通过楼层注解器对获取的楼层开发代码进行标记,确定楼层的唯一标识。S1012. Mark the acquired floor development code through the floor annotator to determine the unique identifier of the floor.
在本申请的一些实施例中,适用于对楼层代码进行标记的场景。In some embodiments of the present application, it is applicable to the scene of marking the floor code.
在本申请的一些实施例中,对项目进行遍历获取到楼层开发代码以后,利用楼层注解器对获取的楼层开发代码进行标记,使得每个楼层开发代码拥有唯一的标识。In some embodiments of the present application, after the floor development codes are obtained by traversing the project, the floor annotations are used to mark the obtained floor development codes, so that each floor development code has a unique identifier.
在本申请的一些实施例中,注解就是一种标签,可以插入到源代码中,用户的编译器可以对它们进行逻辑判断,或者用户可以自己写一个工具方法来读取源代码中的注解信息,从而实现某种操作;注解本身不会起到任何作用,需要配合注解处理器才能发挥一定的作用,自己本身其实更像是一种特殊的注释;楼层注解器实际上也是类,所以它只有在被加载到jvm中才能生效。In some embodiments of this application, annotations are tags that can be inserted into the source code, and the user's compiler can make logical judgments on them, or the user can write a tool method to read the annotation information in the source code , so as to achieve a certain operation; the annotation itself will not play any role, it needs to cooperate with the annotation processor to play a certain role, itself is actually more like a special annotation; the floor annotation is actually a class, so it only has It will not take effect until it is loaded into the jvm.
在本申请的一些实施例中,注解通过@interface关键字进行定义,如:In some embodiments of the present application, annotations are defined through the @interface keyword, such as:
public@interface TestAnnotation{public@interface TestAnnotation{
}}
相当于创建了一个名为TestAnnotation的注解。It is equivalent to creating an annotation named TestAnnotation.
@TestAnnotation@TestAnnotation
public class Test{public class Test{
}}
创建一个类Test,然后在类定义的地方加上@TestAnnotation就可以用TestAnnotation注解这个类了。Create a class Test, and then add @TestAnnotation to the class definition to annotate the class with TestAnnotation.
也可以定义TestAnnotation这个注解中拥有的属性,如拥有id和msg两个属性,在使用的时候,应该给它们进行赋值。You can also define the attributes in the annotation of TestAnnotation, such as the id and msg attributes, which should be assigned values when using them.
示例性的,参见图2,F1到F10为每一个楼层的唯一标识。For example, referring to FIG. 2 , F1 to F10 are the unique identifiers of each floor.
可以理解的是,在本申请的一些实施例中,通过注解器对获取的楼层开发代码进行标记,并提供楼层唯一的标识id,便于之后的在楼层管理器中进行注册。It can be understood that, in some embodiments of the present application, the acquired floor development code is marked by an annotator, and a unique identifier id of the floor is provided, so as to facilitate subsequent registration in the floor manager.
S1013、基于楼层的唯一标识,楼层注解器调用已添加的第三方库中的收集方法,获取楼层的类型。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.
在本申请的一些实施例中,适用于根据楼层标记对楼层进行收集的场景。In some embodiments of the present application, it is applicable to a scene where floors are collected according to floor marks.
在本申请的一些实施例中,楼层注解器对各个楼层进行标记以后,根据获取的id,利用添加的第三方库中的process方法对标记的楼层开发代码进行收集。In some embodiments of the present application, after the floor annotator marks each floor, according to the obtained id, use the process method in the added third-party library to collect the marked floor development codes.
在本申请的一些实施例中,maven仓库是项目中依赖的第三方库。maven仓库包含本地、中央和远程三种类型;当maven开始查找依赖的库时,首先在本地仓库中搜索,然后在中央仓库中搜索,如果找不到,并且有一个或多个远程仓库已经设置,在一个或多个远程仓库中搜索依赖的文件,如果找到则下载到本地仓库以备将来引用,否则Maven将停止处理并抛出错误(无法找到依赖的文件)。Maven本地仓库默认被创建在%USER_HOME%目录下。要修改默认位置,在%M2_HOME%\conf目录中的Maven的settings.xml文件中定义另一个路径,当你运行Maven命令,Maven将下载依赖的文件到你指定的路径中。In some embodiments of the present application, the maven repository is a third-party library that the project depends on. The maven warehouse includes three types: local, central and remote; when maven starts to look for dependent libraries, it first searches in the local warehouse, and then searches in the central warehouse. If it cannot be found, and one or more remote warehouses have been set , searches for dependent files in one or more remote warehouses, and if found, downloads to the local warehouse for future reference, otherwise Maven will stop processing and throw an error (cannot find dependent files). The Maven local warehouse is created in the %USER_HOME% directory by default. To modify 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.
在本申请的一些实施例中,添加第三方库,即注册器开发依赖库后,继承AbstractProcessor类,调用process()方法将带有标记的楼层开发代码进行收集。In some embodiments of the present application, after adding a third-party library, that is, the registry development dependency library, inherit the AbstractProcessor class, and call the process() method to collect marked floor development codes.
可以理解的是,在本申请的一些实施例中,楼层注解器根据楼层标识对楼层进行收集,通过对带有标记的开发代码进行收集,便于之后将各个楼层开发代码自动注册到楼层管理器中。It can be understood that, in some embodiments of the present application, the floor annotator collects the floors according to the floor identification, and collects the marked development codes to facilitate the automatic registration of the development codes of each floor into the floor manager .
在本申请的一些实施例中,将楼层自动注册到楼层管理器之前还需要将楼层开发信息进行存储,可以通过S201实现,将结合以下步骤进行说明。In some embodiments of the present application, the floor development information needs to be stored before the floor is automatically registered in the floor manager, which can be realized through S201, which will be described in conjunction with the following steps.
S201、将由楼层的唯一标识和楼层的类型组成的楼层开发信息保存在与开发项目相关的文件中。S201. Store the floor development information composed of the unique identifier of the floor and the type of the floor in a file related to the development project.
在本申请的一些实施例中,适用于将开发信息进行保存的场景。In some embodiments of the present application, it is applicable to the scenario of saving the development information.
在本申请的一些实施例中,将由楼层的唯一标识和楼层类型组成的楼层开发信息保存在与开发项目相关的文件中。In some embodiments of the present application, the floor development information consisting of the unique identifier of the floor and the floor type is stored in a file related to the development project.
可以理解的是,在本申请的一些实施例中,通过保存包含楼层标识和楼层类型的楼层开发信息,便于之后利用楼层开发信息中的楼层标识和楼层类型将楼层进行自动注册。It can be understood that, in some embodiments of the present application, by saving the floor development information including the floor identifier and floor type, it is convenient to use the floor identifier and floor type in the floor development information to automatically register floors.
在一些实施例中,参见图4,图4是本申请实施例提供的一种自动注册楼层化代码方法的流程示意图三,图4示出的S102可以通过S1021至S1022实现,将结合图4示出的步骤进行说明。In some embodiments, refer to FIG. 4. FIG. 4 is a schematic flowchart of a method for automatically registering a floorization code provided in an embodiment of the present application. The third step. S102 shown in FIG. Outlined steps are described.
S1021、由各个楼层所构成的应用启动时,读取文件,获取楼层的唯一标识和楼层的类型。S1021. When the application composed of each floor is started, the file is read to obtain the unique identifier of the floor and the type of the floor.
在本申请的一些实施例中,适用于获取楼层标识和楼层类型的场景。In some embodiments of the present application, it is applicable to the scene of obtaining the floor identifier and floor type.
在本申请的一些实施例中,当由各个楼层所构成的应用启动时,对保存楼层标识和类型的文件的路径进行读取,获取楼层的唯一标识和楼层类型。In some embodiments of the present application, when the application composed of each floor is started, the path of the file storing the floor identifier and type is read to obtain the unique identifier and floor type of the floor.
在本申请实施例中,可以直接通过代码File file=new File(path)进行实现,path为文件实际存储的路径。In the embodiment of the present application, it can be realized directly through the code File file=new File(path), where path is the path where the file is actually stored.
可以理解的是,在本申请的一些实施例中,当应用启动时,通过读取文件来获取楼层的标识和类型,便于之后利用楼层开发信息中的楼层标识和楼层类型将楼层进行自动注册。It can be understood that, in some embodiments of the present application, when the application is started, the identification and type of the floor are obtained by reading the file, so that the floor can be automatically registered by using the identification and type of the floor in the floor development information.
S1022、根据楼层的唯一标识和楼层的类型,调用楼层管理器中的注册方法对带标记的楼层开发代码进行自动注册,并在注册成功时,利用楼层管理器对的各个楼层的开发信息进行参数信息处理,得到各个楼层处理后的综合楼层开发信息。S1022. According to the unique identifier of the floor and the type of the floor, call the registration method in the floor manager to automatically register the marked floor development code, and when the registration is successful, use the floor manager to parameterize the development information of each floor Information processing, to obtain the comprehensive floor development information processed by each floor.
在本申请的一些实施例中,适用于将各个楼层自动注册到楼层管理器,得到各个楼层处理后的综合楼层开发信息的场景。In some embodiments of the present application, it is applicable to the scene where each floor is automatically registered to the floor manager and the processed comprehensive floor development information of each floor is obtained.
在本申请的一些实施例中,读取到各个楼层的标识和类型之后,直接调用楼层管理器中的注册方法对各个楼层进行自动注册,在注册成功时,楼层管理器对各个楼层的开发信息做参数信息处理,最终各个楼层的开发信息形成一个完整的楼层开发信息。In some embodiments of the present application, after reading the identification and type of each floor, the registration method in the floor manager is directly called to automatically register each floor. Do parameter information processing, and finally the development information of each floor forms a complete floor development information.
在本申请的一些实施例中,参数信息处理包括对楼层进行刷新、利用楼层id进行排序,绑定数据等。In some embodiments of the present application, the parameter information processing includes refreshing floors, sorting by floor id, binding data, and the like.
可以理解的是,在本申请的一些实施例中,读取到各个楼层的标识和类型之后,直接调用楼层管理器中的注册方法对各个楼层进行自动注册,并利用楼层管理器对注册成功的各个楼层开发信息进行参数信息处理,使得各个楼层开发信息最终形成一个完整的楼层开发信息。通过自动注册的方式注册楼层化代码,使楼层化代码可以放在开发工程中的任意地方,提高了楼层化开发的灵活性。It can be understood that, in some embodiments of the present application, after reading the identification and type of each floor, directly call the registration method in the floor manager to automatically register each floor, and use the floor manager to register successfully. The parameter information processing is performed on the development information of each floor, so that the development information of each floor finally forms a complete floor development information. The layered code is registered by means of automatic registration, so that the layered code can be placed anywhere in the development project, which improves the flexibility of the layered development.
在本申请的一些实施例中,参见图5,图5是本申请实施例提供的一种自动注册楼层化代码方法的流程示意图四,图5示出的S1022可以通过S301至S303实现,将结合图5示出的步骤进行说明。In some embodiments of the present application, refer to FIG. 5, which is a schematic flowchart of a method for automatically registering a floor code provided in the embodiment of the present application. S1022 shown in FIG. 5 can be implemented through S301 to S303, which will be combined The steps shown in Figure 5 are described.
S301、利用楼层的唯一标识对各个楼层排序。S301. Use the unique identifier of the floor to sort each floor.
在本申请的一些实施例中,适用于对楼层进行排序的场景。In some embodiments of the present application, it is applicable to the scene of sorting floors.
在本申请的一些实施例中,将各个楼层自动注册到楼层管理器时,楼层管理器按照各个楼层的标识id对楼层进行排序,排序完的各个楼层组成一个完整楼层开发信息。In some embodiments of the present application, 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.
示例性的,参见图2,显示的开发界面由F1到F10是按照顺序进行排列。Exemplarily, referring to FIG. 2 , the displayed development interface is arranged in order from F1 to F10 .
可以理解的是,在本申请的一些实施例中,利用楼层标识对楼层排序,使得开发的界面有序规范。It can be understood that, in some embodiments of the present application, the floors are sorted by using the floor identifiers, so that the developed interface can be ordered and standardized.
S302、在各个楼层中确定每个楼层是否显示。S302. Determine whether each floor is displayed in each floor.
在发明的一些实施例中,适用于确定楼层是否显示的场景。In some embodiments of the invention, it is applicable to the scenario of determining whether a floor is displayed.
在本申请的一些实施例中,楼层管理器在对各个楼层进行管理时,确定每个楼层是否都可以进行显示。In some embodiments of the present application, when managing each floor, the floor manager determines whether each floor can be displayed.
S303、对各个楼层进行数据绑定。S303. Perform data binding on each floor.
在本申请的一些实施例中,适用于对楼层进行数据绑定的场景。In some embodiments of the present application, it is applicable to the scenario of data binding on floors.
在本申请的一些实施例中,在前后端数据的传递过程中涉及到数据的绑定,楼层管理器对各个楼层进行数据绑定,把字符串形式的参数转换成服务端真正需要的类型的转换。In some embodiments of the present application, data binding is involved in the transfer process of the front-end and back-end data, and the floor manager performs data binding on each floor, and converts the parameters in the form of strings into the type that the server really needs. convert.
在本申请的一些实施例中,当前端请求时,可以在后台方法的形参中直接使用Spring MVC提供的默认参数类型进行数据绑定;Spring MVC框架会通过数据绑定组件(DataBinder)将请求参数串的内容进行类型转换,然后将转换后的值赋给控制器类中方法的形参,这样后台方法就可以正确绑定并获取客户端请求携带的参数,常用的默认参数类型为HttpServletRequest:通过request对象获取请求信息、HttpServletResponse:通过response处理响应信息以及HttpSession:通过session对象得到session中存放的对象等等。数据绑定的具体过程为:Spring MVC将ServletRequest对象传递给DataBinder;将处理方法的入参对象传递给DataBinder;DataBinder调用ConversionService组件进行数据类型转换、数据格式化等工作,并将ServletRequest对象中的消息填充到参数对象中;调用Validator组件对已经绑定了请求消息数据的参数对象进行数据合法性效验;效验完成后会生成数据绑定结果BindingResult对象,Spring MVC会将BindingResult对象中的内容赋给处理方法的相应参数。In some embodiments of this application, when the front end requests, the default parameter type provided by Spring MVC can be directly used in the formal parameters of the background method for data binding; the Spring MVC framework will pass the request through the data binding component (DataBinder) The content of the parameter string is type-converted, and then the converted value is assigned to the formal parameter of the method in the controller class, so that the background method can be correctly bound and obtain the parameters carried by the client request. The commonly used default parameter type is HttpServletRequest: Get the request information through the request object, HttpServletResponse: process the response information through the response, and HttpSession: get the objects stored in the session through the session object, etc. The specific process of data binding is: 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, etc. Fill in the parameter object; call the Validator component to verify the data validity of the parameter object that has been bound to the request message data; after the validation is completed, the data binding result BindingResult object will be generated, and Spring MVC will assign the content in the BindingResult object to the processing The corresponding parameters of the method.
可以理解的是,在本申请的一些实施例中,通过楼层管理器对各个楼层进行数据绑定,使得框架更多的自动化,更好容错性以及更高的编码效率。It can be understood that, in some embodiments of the present application, data binding is performed on each floor through the floor manager, so that the framework has more automation, better fault tolerance and higher coding efficiency.
S1022可以通过S401实现,将结合以下步骤进行说明。S1022 can be implemented through S401, and will be described in conjunction with the following steps.
S401、利用对各个楼层进行排序、每个楼层是否显示和对各个楼层进行数据绑定中的任意一种参数信息处理方法对的各个楼层的开发信息进行处理,得到各个楼层处理后的综合楼层开发信息。S401. Process the development information of each floor by using any one of the parameter information processing methods of sorting each floor, whether each floor is displayed, and data binding of each floor, to obtain the comprehensive floor development after processing each floor. information.
在本申请的一些实施例中,适用于对各个楼层进行参数处理,得到各个楼层处理后的综合楼层开发信息的场景。In some embodiments of the present application, it is applicable to the scene of performing parameter processing on each floor to obtain the processed comprehensive floor development information of each floor.
在本申请的一些实施例中,当各个楼层成功注册到楼层管理器时,楼层管理器对各个楼 层进行排序、绑定数据、确定每个楼层是否都应该显示以及对楼层进行刷新等各种处理,最终使得各个楼层构成一个完整的楼层开发信息。In some embodiments of the present application, when each floor is successfully registered to the floor manager, the floor manager sorts the floors, binds data, determines whether each floor should be displayed, and refreshes the floors. , finally making each floor constitute a complete floor development information.
在本申请的一些实施例中,参见图6,图6是本申请实施例提供的一种自动注册楼层化代码方法的流程示意图五,图6示出的S103可以通过S1031到S1033实现,将结合图6示出的步骤进行说明。In some embodiments of the present application, refer to FIG. 6, which is a schematic flowchart of a method for automatically registering a floor code provided by the embodiment of the present application. S103 shown in FIG. 6 can be implemented through S1031 to S1033, which will be combined The steps shown in Figure 6 are described.
S1031、当开发项目进行启动时,生成开发项目对应的服务地址。S1031. When the development project is started, generate a service address corresponding to the development project.
在本申请的一些实施例中,适用于生成服务地址的场景。In some embodiments of the present application, it is applicable to the scenario of generating a service address.
在本申请的一些实施例中,当开发项目部署完成以后,启动该项目,会生成一个对应的ip地址,通过访问该地址,进行页面的一系列操作。In some embodiments of the present application, when the development project is deployed and the project is started, a corresponding ip address will be generated, and a series of operations on the page will be performed by accessing the address.
可以理解的是,在本申请的一些实施例中,当启动开发项目时,会生成一个项目对应的服务地址,通过之后对该地址的访问,便于页面的生成。It can be understood that, in some embodiments of the present application, when a development project is started, a service address corresponding to the project will be generated, and subsequent access to the address facilitates page generation.
S1032、通过访问服务地址,加载表征每个楼层的布局功能的楼层开发信息,并进行渲染,得到当前页面。S1032. By accessing the service address, load the floor development information representing the layout function of each floor, and perform rendering to obtain the current page.
在本申请的一些实施例中,适用于得到开发界面的场景。In some embodiments of the present application, it is applicable to the scenario of obtaining a development interface.
在本申请的一些实施例中,通过访问生成的服务地址,设备按照开发代码的顺序进行解析并显示内容,顶端的先加载,然后加载下面的内容;在进行页面渲染时,渲染引擎开始解析HTML/SVG/XHTML,并将标签转化为dom tree中的dom节点。接着,它解析外部CSS文件及style标签中的样式信息生成rule tree。dom tree和rule tree结合生成render tree。Render tree由一些包含有颜色和大小等属性的矩形组成,它们将被按照正确的顺序显示到屏幕上。Render tree构建好了之后,将会执行布局过程,它将确定每个节点在屏幕上的确切坐标。再下一步就是绘制,即遍历render tree,并使用UI后端层绘制每个节点。In some embodiments of the present application, by accessing the generated service address, the device parses and displays the content in the order of the development code, the top one is loaded first, and then the following content is loaded; when the page is rendered, the rendering engine starts to parse the HTML /SVG/XHTML, and convert the tags into dom nodes in the dom tree. Next, it parses the external CSS file and the style information in the style tag to generate a rule tree. The combination of dom tree and rule tree generates render tree. The Render tree consists of rectangles that contain attributes such as color and size, and they will be displayed on the screen in the correct order. After the Render tree is built, the layout process will be performed, which will determine the exact coordinates of each node on the screen. The next step is to draw, that is, traverse the render tree and use the UI backend layer to draw each node.
在本申请的一些实施例中,渲染是逐步完成的,为了更好的用户体验,渲染引擎将会尽可能早的将内容呈现到屏幕上,并不会等到所有的html都解析完成之后再去构建和布局render tree。它是解析完一部分内容就显示一部分内容,同时,可能还在通过网络下载其余内容。In some embodiments of this application, the rendering is completed gradually. For a better user experience, the rendering engine will render the content to the screen as early as possible, and will not wait until all the html is parsed. Build and layout render tree. It displays part of the content after parsing part of the content, and at the same time, may still be downloading the rest of the content through the network.
S1033、显示当前页面,当前页面中包含各个楼层的功能显示区域。S1033. Display the current page, which includes the function display areas of each floor.
在本申请的一些实施例中,适用于显示当前界面的场景。In some embodiments of the present application, it is suitable for displaying the scene of the current interface.
在本申请的一些实施例中,当加载信息并渲染完成以后,HTML变成人眼看到的图像,进而得到开发完成后的界面,该界面包含了各个楼层的功能。In some embodiments of the present application, after the information is loaded and rendered, the HTML becomes an image seen by human eyes, and then a developed interface is obtained, which includes the functions of each floor.
S1032可以通过S501实现,将结合以下步骤进行说明。S1032 can be implemented through S501, and will be described in conjunction with the following steps.
S501、加载表征每个楼层的布局功能的所述楼层开发信息,将每个楼层的开发信息渲染 到布局中的对应控件上,得到当前页面。S501. Load the floor development information representing the layout function of each floor, render the development information of each floor to the corresponding control in the layout, and obtain the current page.
在本申请的一些实施例中适用于得到开发界面的场景。In some embodiments of the present application, it is applicable to the scenario of obtaining the development interface.
在本申请的一些实施例中,设备按照开发代码的顺序进行解析并显示内容,顶端的先加载,然后加载下面的内容,将每个楼层的数据显示到布局中的对应控件上,完成渲染,得到当前页面。In some embodiments of the present application, the device parses and displays the content in the order of the development codes, the top one is loaded first, and then the content below is loaded, and the data of each floor is displayed on the corresponding control in the layout to complete the rendering. to get the current page.
为了能更加体现本申请的目的,下面将说明本申请实施例在一个实际的应用场景中的示例性应用。In order to better reflect the purpose of the present application, an exemplary application of the embodiment of the present application in an actual application scenario will be described below.
本申请实施例提供一种现有开发技术的流程图,如图7所示。The embodiment of the present application provides a flowchart of an existing development technology, as shown in FIG. 7 .
S601、开发界面各楼层F1-FN。S601. F1-FN on each floor of the development interface.
S602、楼层可以放到楼层管理器中的依赖库或放在楼层管理器所在的库中。S602. The floor may be placed in a dependent library in the floor manager or in a library where the floor manager is located.
S603、楼层管理器FM。S603. The floor manager FM.
S604、页面渲染。S604. Page rendering.
S605、楼层管理器FM加载楼层F。S605. The floor manager FM loads the floor F.
本实施例提供一种楼层注解器的开发步骤,可选的流程图如图8所示。This embodiment provides a development procedure of a floor annotator, and an optional flow chart is shown in FIG. 8 .
S701、添加注册器开发依赖库。S701. Add a registry development dependency library.
S702、继承AbstractProcessor类。S702. Inherit the AbstractProcessor class.
S703、实现process()方法。S703. Implement the process () method.
S704、根据注解标记收集放在各个库中的楼层。S704. Collect the floors placed in each library according to the annotation marks.
S705、将收集到的楼层信息保存文件中。S705. Save the collected floor information in a file.
S706、应用启动时,将收集到楼层自动注册到楼层管理器。S706. When the application is started, the collected floors are automatically registered to the floor manager.
S707、UI渲染页面时楼层管理器加载楼层信息并渲染。S707. When the UI renders the page, the floor manager loads and renders the floor information.
本申请实施例提供一种自动注册楼层化代码的方法,可选的流程图如图9所示。An embodiment of the present application provides a method for automatically registering a floorization code, and an optional flow chart is shown in FIG. 9 .
S1、开发界面各楼层F1-FN(当前页面)。S1. F1-FN (current page) on each floor of the development interface.
S2、楼层注解器对各个楼层添加注解(标记)。S2. The floor annotator adds annotations (marks) to each floor.
S3、楼层注解器根据楼层标记自动收集楼层(获取楼层的类型)。S3. The floor annotator automatically collects floors (obtains the type of the floor) according to the floor mark.
楼层注解器根据楼层标记自动收集楼层,包括:The Floor Annotator automatically collects floors based on floor markings, including:
S31、添加注册器开发依赖库(第三方库)。S31. Adding a registry development dependency library (third-party library).
S32、继承AbstractProcessor类,实现process()方法(收集方法)。S32. Inherit the AbstractProcessor class, and implement the process () method (collection method).
S33、在process()方法中根据注解标记收集放在各个库中的楼层。S33. In the process () method, collect the floors placed in each library according to the annotation marks.
S34、将收集到的楼层信息(楼层开发信息)保存在与项目相关的文件中。S34. Store the collected floor information (floor development information) in a project-related file.
S4、将自动收集的楼层自动注册到楼层管理器。S4. Automatically register the automatically collected floors to the floor manager.
S5、楼层管理器(楼层管理器对自动注册成功的各个楼层进行参数信息处理)。S5. The floor manager (the floor manager performs parameter information processing on each floor successfully registered automatically).
S6、页面渲染。S6. Page rendering.
S7、楼层管理器加载楼层。S7. The floor manager loads floors.
可以理解是,在本申请实施例中,利用楼层注解器对各个楼层的开发代码进行标记,并收集楼层;将收集到的楼层自动注册到楼层管理器中,最后对页面渲染和信息加载,通过自动注册的方式注册楼层化代码,使楼层化代码可以放在开发工程中的任意地方,提高楼层化开发的灵活性。It can be understood that, in the embodiment of the present application, the development code of each floor is marked by the floor annotation device, and the floors are collected; the collected floors are automatically registered in the floor manager, and finally the page is rendered and the information is loaded, through The layered code is registered in the way of automatic registration, so that the layered code can be placed anywhere in the development project, and the flexibility of the layered development is improved.
本申请实施例提供一种自动注册楼层化代码装置,如图10所述,图10为本申请实施例提供的一种自动注册楼层化代码装置的结构示意图,该装置包括:楼层添加注解部分1001、自动收集楼层部分1002、楼层自动注册部分1003、楼层管理器部分1004、页面渲染部分1005、楼层管理器加载楼层部分1006;其中,The embodiment of the present application provides a device for automatically registering floor codes, as shown in FIG. 10 , which is a schematic structural diagram of a device for automatically registering floor codes provided in the embodiment of the present application. The device includes: a floor adding annotation part 1001 , Automatically collect floor part 1002, floor automatic registration part 1003, floor manager part 1004, page rendering part 1005, floor manager load floor part 1006; wherein,
所述楼层添加注解部分1001,被配置为利用楼层注解器对当前页面的开发项目进行遍历,获取当前界面的楼层开发代码进行标记;The floor annotation part 1001 is configured to use the floor annotation device to traverse the development projects of the current page, and obtain the floor development code of the current interface for marking;
所述自动收集楼层部分1002,被配置为根据楼层标记,确定楼层的唯一标识,并获取楼层的类型;The automatic floor collection part 1002 is configured to determine the unique identifier of the floor and obtain the type of the floor according to the floor mark;
所述楼层自动注册部分1003,被配置为在由各个楼层所构成的应用启动时,根据所述楼层的唯一标识和所述楼层的类型,将所述楼层开发代码注册到楼层管理器;The floor automatic registration part 1003 is configured to register the floor development code with 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;
所述楼层管理器部分1004,被配置为得到所述各个楼层处理后的综合楼层开发信息;The floor manager part 1004 is configured to obtain the processed comprehensive floor development information of each floor;
所述页面渲染部分1005,被配置为通过所述楼层管理器加载所述楼层开发信息并渲染;The page rendering part 1005 is configured to load and render the floor development information through the floor manager;
所述楼层管理器加载楼层部分1006,被配置为显示所述当前页面,所述当前页面中包含所述各个楼层的功能显示区域。The floor manager loads a floor part 1006 configured to display the current page, and the current page includes the function display area of each floor.
在本申请的一些实施例中,所述楼层添加注解部分1001,还被配置为对所述当前页面的开发项目进行遍历,获取所述当前界面的所述楼层开发代码;及通过所述楼层注解器对获取的所述楼层开发代码进行标记。In some embodiments of the present application, the floor adding annotation part 1001 is further configured to traverse the development projects of the current page, obtain the floor development code of the current interface; and pass the floor annotation The device marks the acquired floor development code.
在本申请的一些实施例中,所述自动收集楼层部分1002,还被配置为基于所述楼层的唯一标识,所述楼层注解器调用已添加的第三方库中的收集方法,获取所述楼层的类型。In some embodiments of the present application, the automatic collection of floors part 1002 is further configured based on the unique identifier of the floor, and the floor annotator invokes the collection method in the added third-party library to obtain the floor type.
在本申请的一些实施例中,所述自动收集楼层部分1002,还被配置为将由所述楼层的唯一标识和所述楼层的类型组成的所述楼层开发信息保存在与所述开发项目相关的文件中。In some embodiments of the present application, the automatic floor collection part 1002 is further configured to save the floor development information composed of the unique identifier of the floor and the type of the floor in the in the file.
在本申请的一些实施例中,所述楼层自动注册部分1003,还被配置为所述由所述各个楼层所构成的应用启动时,读取所述文件,获取所述楼层的唯一标识和所述楼层的类型;及根据所述楼层的唯一标识和所述楼层的类型,调用楼层管理器中的注册方法对所述带标记的楼 层开发代码进行自动注册,并在注册成功时,利用所述楼层管理器对所述的各个楼层的开发信息进行参数信息处理,得到所述各个楼层处理后的所述综合楼层开发信息。In some embodiments of the present application, the automatic floor registration part 1003 is further configured to read the file when the application composed of the various floors is started, and obtain the unique identifier of the floor and the the type of the floor; and according to the unique identifier of the floor and the type of the floor, call the registration method in the floor manager to automatically register the marked floor development code, and when the registration is successful, use the The floor manager performs parameter information processing on the development information of each floor to obtain the comprehensive floor development information processed on each floor.
在本申请的一些实施例中,所述楼层管理器部分1004,还被配置为利用所述楼层的唯一标识对所述各个楼层排序;及在所述各个楼层中确定每个楼层是否显示;及对所述各个楼层进行数据绑定;以及利用所述对各个楼层进行排序、所述每个楼层是否显示和所述对各个楼层进行数据绑定中的任意一种参数信息处理方法对所述的各个楼层的开发信息进行处理,得到所述各个楼层处理后的所述综合楼层开发信息。In some embodiments of the present application, the floor manager part 1004 is further configured to use the unique identifier of the floor to sort the various floors; and determine whether each floor is displayed among the various floors; and Performing data binding on the various floors; and using any one of the parameter information processing methods in the sorting of the various floors, whether each floor is displayed, and the data binding of the various floors The development information of each floor is processed to obtain the comprehensive floor development information after the processing of each floor.
在本申请的一些实施例中,所述页面渲染部分1005,还被配置为在楼层管理器加载信息时,对页面进行渲染。In some embodiments of the present application, the page rendering part 1005 is further configured to render the page when the floor manager loads information.
在本申请的一些实施例中,所述楼层管理器加载楼层部分1006,还被配置为当所述开发项目进行启动时,生成开发项目对应的服务地址;及通过访问所述服务地址,加载表征每个楼层的布局功能的所述楼层开发信息,结合渲染得到当前界面并显示。In some embodiments of the present application, the floor manager loads the floor part 1006, and is further configured to generate a service address corresponding to the development project when the development project is started; and load the representation by accessing the service address The floor development information of the layout function of each floor is combined with rendering to obtain and display the current interface.
在本申请的一些实施例中,所述楼层管理器加载楼层部分1006,还被配置为加载所述表征每个楼层的布局功能的所述楼层开发信息,将所述每个楼层的开发信息渲染到布局中的对应控件上,得到所述当前页面。In some embodiments of the present application, the floor manager loads the floor part 1006, and is further configured to load the floor development information representing the layout function of each floor, and render the development information of each floor Go to the corresponding control in the layout to get the current page.
可以理解的是,在上述装置实现方案中,利用楼层注解器对各个楼层的开发代码进行标记,并收集楼层;将收集到的楼层自动注册到楼层管理器中,最后对页面渲染和信息加载,通过自动注册的方式注册楼层化代码,使楼层化代码可以放在开发工程中的任意地方,提高楼层化开发的灵活性。It can be understood that, in the implementation scheme of the above-mentioned device, the development code of each floor is marked by the floor annotation device, and the floors are collected; the collected floors are automatically registered in the floor manager, and finally the page is rendered and the information is loaded, The layered code is registered through automatic registration, so that the layered code can be placed anywhere in the development project, improving the flexibility of layered development.
基于上述实施例的方法,本申请实施例提供的一种服务器的结构示意图,如图11所示,图11本申请实施例提供的一种自动注册楼层化代码装置的结构示意图,该装置11包括:处理器1101和存储器1102;存储器1102存储处理器1101可执行的一个或者多个程序,当一个或者多个程序被执行时,通过处理器1101执行如前所述实施例的服务器对应的一种自动注册楼层化代码方法。Based on the method of the above-mentioned embodiment, a schematic structural diagram of a server provided by the embodiment of the present application is shown in FIG. 11. FIG. 11 is a schematic structural diagram of an automatic registration floor code device provided by the embodiment of the present application. The device 11 includes : a processor 1101 and a memory 1102; the memory 1102 stores one or more programs executable by the processor 1101, and when one or more programs are executed, the processor 1101 executes a server corresponding to the embodiment described above Automatic registration of stratified code methods.
基于上述实施例的自动注册楼层化代码方法,本申请实施例还提供了一种计算机可读存储介质,计算机可读存储介质存储有一个或者多个程序,一个或者多个程序可被一个或者多个处理器执行,程序被处理器执行时实现如本申请实施例公开的自动注册楼层化代码方法。Based on the method for automatically registering floor codes in the above embodiments, the embodiment of the present application also provides a computer-readable storage medium. The computer-readable storage medium stores one or more programs, and one or more programs can be used by one or more A processor is executed, and when the program is executed by the processor, the automatic registration layered code method disclosed in the embodiment of the present application is realized.
本领域内的技术人员应明白,本申请的实施例可提供为方法、系统、或计算机程序产品。因此,本申请可采用硬件实施例、软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器和光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art should understand that the embodiments of the present application may be provided as methods, systems, or computer program products. Accordingly, the present application may take the form of a hardware embodiment, a software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may 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, etc.) having computer-usable program code embodied therein.
本申请是参照根据本申请实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present application is described with reference to flowcharts and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the present application. It should be understood that each procedure and/or block in the flowchart and/or block diagram, and a combination of procedures and/or blocks in the flowchart and/or block diagram can be realized by computer program instructions. These computer program instructions may be provided to a general purpose computer, special purpose computer, embedded processor, or processor of other programmable data processing equipment to produce a machine such that the instructions executed by the processor of the computer or other programmable data processing equipment produce a An apparatus for realizing the functions specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing apparatus to operate in a specific manner, such that the instructions stored in the computer-readable memory produce an article of manufacture comprising instruction means, the instructions The device realizes the function specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded onto a computer or other programmable data processing device, causing a series of operational steps to be performed on the computer or other programmable device to produce a computer-implemented process, thereby The instructions provide steps for implementing the functions specified in the flow chart or blocks of the flowchart and/or the block or blocks of the block diagrams.
以上所述,仅为本申请的较佳实施例而已,并非用于限定本申请的保护范围。The above descriptions are only preferred embodiments of the present application, and are not intended to limit the protection scope of the present application.
工业实用性Industrial Applicability
本申请实施例提供了一种自动注册楼层化代码方法及装置、存储介质,该方法包括:利用楼层注解器对当前页面的开发项目进行遍历,获取当前界面的楼层开发代码进行标记,确定楼层的唯一标识,并获取楼层的类型;在由各个楼层所构成的应用启动时,根据所述楼层的唯一标识和所述楼层的类型,将所述楼层开发代码注册到楼层管理器,得到所述各个楼层处理后的综合楼层开发信息;其中,所述楼层开发信息表征楼层的唯一标识和类型;通过所述楼层管理器加载所述楼层开发信息并渲染,显示所述当前页面,所述当前页面中包含所述各个楼层的功能显示区域。采用上述方案,楼层注解器可以给楼层增加标记,在项目编译期间,注解器可以根据楼层注解标记来统计楼层,实现楼层的收集,并自动将楼层注册到楼层管理器中,通过自动注册的方式注册楼层化代码,使楼层化代码可以放在开发工程中的任意地方,提高楼层化开发的灵活性。The embodiment of the present application provides a method and device for automatically registering floor codes, and a storage medium. The method includes: using the floor annotation device to traverse the development projects of the current page, obtaining the floor development code of the current interface and marking it, and determining the floor code Uniquely identify and obtain the type of floor; when the application composed of each floor is started, according to the unique identifier of the floor and the type of the floor, register the development code of the floor to the floor manager to obtain the Comprehensive floor development information after floor processing; wherein, the floor development information represents the unique identification and type of the floor; the floor development information is loaded and rendered by the floor manager, and the current page is displayed, and the current page Contains the function display area of each floor. Using the above scheme, the floor annotator can add marks to the floors. During project compilation, the annotator can count the floors according to the floor annotation marks, realize the collection of floors, and automatically register the floors to the floor manager through automatic registration. Register the floorization code, so that the floorization code can be placed anywhere in the development project, improving the flexibility of floorization development.

Claims (11)

  1. 一种自动注册楼层化代码方法,包括:A method for automatically registering stratified codes, including:
    利用楼层注解器对当前页面的开发项目进行遍历,获取当前界面的楼层开发代码进行标记,确定楼层的唯一标识,并获取楼层的类型;Use the floor annotator to traverse the development projects of the current page, obtain the floor development code of the current interface to mark, determine the unique identifier of the floor, and obtain the type of the floor;
    在由各个楼层所构成的应用启动时,根据所述楼层的唯一标识和所述楼层的类型,将所述楼层开发代码注册到楼层管理器,得到所述各个楼层处理后的综合楼层开发信息;其中,所述楼层开发信息表征楼层的唯一标识和类型;When the application composed of each floor is started, according to the unique identifier of the floor and the type of the floor, the floor development code is registered in the floor manager, and the comprehensive floor development information processed by each floor is obtained; Wherein, the floor development information represents the unique identification and type of the floor;
    通过所述楼层管理器加载所述楼层开发信息并渲染,显示所述当前页面,所述当前页面中包含所述各个楼层的功能显示区域。The floor development information is loaded and rendered by the floor manager, and the current page is displayed, and the current page includes the function display areas of the various floors.
  2. 根据权利要求1所述的方法,其中,所述利用楼层注解器对当前页面的开发项目进行遍历,获取当前界面的楼层开发代码进行标记,确定楼层的唯一标识,并获取楼层的类型,包括:The method according to claim 1, wherein the step of traversing the development project of the current page by using the floor annotation device, obtaining the floor development code of the current interface for marking, determining the unique identifier of the floor, and obtaining the type of the floor includes:
    对所述当前页面的开发项目进行遍历,获取所述当前界面的所述楼层开发代码;Traversing the development projects of the current page to obtain the floor development code of the current interface;
    通过所述楼层注解器对获取的所述楼层开发代码进行标记,确定楼层的唯一标识;marking the acquired floor development code 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. 根据权利要求1或2所述的方法,其中,所述方法还包括:The method according to claim 1 or 2, wherein the method further comprises:
    将由所述楼层的唯一标识和所述楼层的类型组成的所述楼层开发信息保存在与所述开发项目相关的文件中。The floor development information consisting of the unique identifier of the floor and the type of the floor is stored in a file related to the development project.
  4. 根据权利要求3所述的方法,其中,所述在由各个楼层所构成的应用启动时,根据所述楼层的唯一标识和所述楼层的类型,将所述楼层开发代码注册到楼层管理器,得到所述各个楼层处理后的综合楼层开发信息,包括:The method according to claim 3, wherein when the application composed of each floor is started, the floor development code is registered to the floor manager according to the unique identifier of the floor and the type of the floor, Obtain the comprehensive floor development information processed by each floor, including:
    所述由所述各个楼层所构成的应用启动时,读取所述文件,获取所述楼层的唯一标识和所述楼层的类型;When the application composed of the various floors is started, the file is read to obtain the unique identifier of the floor and the type of the floor;
    根据所述楼层的唯一标识和所述楼层的类型,调用楼层管理器中的注册方法对带标记的楼层开发代码进行自动注册,并在注册成功时,利用所述楼层管理器对所述的各个楼层的开发信息进行参数信息处理,得到所述各个楼层处理后的所述综合楼层开发信息。According to the unique identification of the floor and the type of the floor, call the registration method in the floor manager to automatically register the marked floor development code, and when the registration is successful, use the floor manager to register each of the The parameter information processing is performed on the development information of the floors to obtain the comprehensive floor development information after the processing of each floor.
  5. 根据权利要求4所述的方法,其中,所述参数信息处理包括以下至少一种:The method according to claim 4, wherein the parameter information processing includes at least one of the following:
    利用所述楼层的唯一标识对所述各个楼层排序;sorting the floors by using the unique identifiers of the floors;
    在所述各个楼层中确定每个楼层是否显示;determining whether each floor is displayed among the various floors;
    对所述各个楼层进行数据绑定。Perform data binding on each floor.
  6. 根据权利要求5所述的方法,其中,所述利用所述楼层管理器对所述的各个楼层的开发信息进行参数信息处理,得到所述各个楼层处理后的所述综合楼层开发信息,包括:The method according to claim 5, wherein said using said floor manager to perform parameter information processing on said development information of each floor, to obtain said comprehensive floor development information after said processing of each floor, comprising:
    根据利用所述楼层管理器对所述各个楼层排序、所述每个楼层是否显示和所述对各个楼层进行数据绑定中的任意一种参数信息处理方法,对所述各个楼层的开发信息进行处理,得到所述各个楼层处理后的所述综合楼层开发信息。According to any one of the parameter information processing methods of using the floor manager to sort the floors, whether to display each floor, and binding data to each floor, the development information of each floor is processed. processing to obtain the comprehensive floor development information after the processing of each floor.
  7. 根据权利要求1、2、4-6任一项所述的方法,其中,所述通过所述楼层管理器加载所述楼层开发信息并渲染,显示所述当前页面,包括:The method according to any one of claims 1, 2, 4-6, wherein loading the floor development information through the floor manager and rendering and displaying the current page includes:
    当所述开发项目进行启动时,生成开发项目对应的服务地址;When the development project is started, generate a service address corresponding to the development project;
    通过访问所述服务地址,加载表征每个楼层的布局功能的所述楼层开发信息,并进行渲染,得到所述当前页面;By accessing the service address, loading the floor development information representing the layout function of each floor, and performing rendering to obtain the current page;
    显示所述当前页面,所述当前页面中包含所述各个楼层的功能显示区域。The current page is displayed, and the current page includes the function display areas of the various floors.
  8. 根据权利要求7所述的方法,其中,所述通过访问所述服务地址,加载表征每个楼层的布局功能的所述楼层开发信息,并进行渲染,得到所述当前页面,包括:The method according to claim 7, wherein, by accessing the service address, loading the floor development information representing the layout function of each floor, and performing rendering to obtain the current page, including:
    加载所述表征每个楼层的布局功能的所述楼层开发信息,将所述每个楼层的开发信息渲染到布局中的对应控件上,得到所述当前页面。The floor development information representing the layout function of each floor is loaded, and the development information of each floor is rendered to a corresponding control in the layout to obtain the current page.
  9. 一种自动注册楼层化代码的装置,其中,包括:A device for automatically registering floor codes, including:
    所述楼层添加注解部分,被配置为利用楼层注解器对当前页面的开发项目进行遍历,获取当前界面的楼层开发代码进行标记;The floor annotation part is configured to use the floor annotation device to traverse the development project of the current page, and obtain the floor development code of the current interface for marking;
    所述自动收集楼层部分,被配置为根据楼层标记,确定楼层的唯一标识,并获取楼层的类型;The automatic floor collection part is configured to determine the unique identifier of the floor and obtain the type of the floor according to the floor mark;
    所述楼层自动注册部分,被配置为在由各个楼层所构成的应用启动时,根据所述楼层的唯一标识和所述楼层的类型,将所述楼层开发代码注册到楼层管理器;The floor automatic registration part is configured to register the floor development code with 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;
    所述楼层管理器部分,被配置为得到所述各个楼层处理后的综合楼层开发信息;The floor manager part is configured to obtain the processed comprehensive floor development information of each floor;
    所述页面渲染部分,被配置为通过所述楼层管理器加载所述楼层开发信息并渲染;The page rendering part is configured to load and render the floor development information through the floor manager;
    所述楼层管理器加载楼层部分,被配置为显示所述当前页面,所述当前页面中包含所述各个楼层的功能显示区域。The floor manager loads the floor part, and is configured to display the current page, and the current page includes the function display area of each floor.
  10. 一种自动注册楼层化代码的装置,其中,包括:A device for automatically registering floor codes, including:
    存储器,被配置为存储可执行数据指令;memory configured to store executable data instructions;
    处理器,被配置为执行所述存储器中存储的可执行指令时,实现权利要求1至8任一项所述的方法。The processor is configured to implement the method according to any one of claims 1 to 8 when executing the executable instructions stored in the memory.
  11. 一种计算机可读存储介质,其中,存储有可执行指令,用于引起处理器执行时,实 现权利要求1至8任一项所述的方法。A computer-readable storage medium, wherein executable instructions are stored for causing a processor to execute the method to implement the method according to any one of claims 1 to 8.
PCT/CN2022/115963 2021-11-03 2022-08-30 Method and apparatus for automatically registering floor code, and storage medium WO2023077932A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111295144.0A CN113961191A (en) 2021-11-03 2021-11-03 Method and device for automatically registering hierarchical code and storage medium
CN202111295144.0 2021-11-03

Publications (1)

Publication Number Publication Date
WO2023077932A1 true WO2023077932A1 (en) 2023-05-11

Family

ID=79468984

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/115963 WO2023077932A1 (en) 2021-11-03 2022-08-30 Method and apparatus for automatically registering floor code, and storage medium

Country Status (2)

Country Link
CN (1) CN113961191A (en)
WO (1) WO2023077932A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113961191A (en) * 2021-11-03 2022-01-21 北京沃东天骏信息技术有限公司 Method and device for automatically registering hierarchical code and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107450922A (en) * 2017-07-27 2017-12-08 武汉斗鱼网络科技有限公司 Method, storage medium, equipment and the system that barrage event is registered automatically in Android
US20180107585A1 (en) * 2016-10-17 2018-04-19 Microsoft Technology Licensing, Llc Using edit and continue to dynamically set and unset optimizations in source code while debugging
CN111045655A (en) * 2019-12-18 2020-04-21 广州市百果园信息技术有限公司 Page rendering method and device, rendering server and storage medium
CN112100552A (en) * 2020-08-06 2020-12-18 北京沃东天骏信息技术有限公司 Page rendering method, device, equipment and computer readable storage medium
CN112860232A (en) * 2019-11-28 2021-05-28 杭州萤石软件有限公司 Component implementation method and device
CN112925562A (en) * 2021-02-19 2021-06-08 京东方科技集团股份有限公司 Application generation method and device based on android system and storage medium
CN113961191A (en) * 2021-11-03 2022-01-21 北京沃东天骏信息技术有限公司 Method and device for automatically registering hierarchical code and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180107585A1 (en) * 2016-10-17 2018-04-19 Microsoft Technology Licensing, Llc Using edit and continue to dynamically set and unset optimizations in source code while debugging
CN107450922A (en) * 2017-07-27 2017-12-08 武汉斗鱼网络科技有限公司 Method, storage medium, equipment and the system that barrage event is registered automatically in Android
CN112860232A (en) * 2019-11-28 2021-05-28 杭州萤石软件有限公司 Component implementation method and device
CN111045655A (en) * 2019-12-18 2020-04-21 广州市百果园信息技术有限公司 Page rendering method and device, rendering server and storage medium
CN112100552A (en) * 2020-08-06 2020-12-18 北京沃东天骏信息技术有限公司 Page rendering method, device, equipment and computer readable storage medium
CN112925562A (en) * 2021-02-19 2021-06-08 京东方科技集团股份有限公司 Application generation method and device based on android system and storage medium
CN113961191A (en) * 2021-11-03 2022-01-21 北京沃东天骏信息技术有限公司 Method and device for automatically registering hierarchical code and storage medium

Also Published As

Publication number Publication date
CN113961191A (en) 2022-01-21

Similar Documents

Publication Publication Date Title
CN108334387B (en) Dynamic interface rendering method and device
CN102971688B (en) Cross-platform program frame
CN112328224B (en) Service interface docking method and device, storage medium and electronic equipment
CN107315764B (en) Method and system for updating non-relational database associated data
US20140019889A1 (en) Regenerating a user interface area
CN113868126A (en) Application debugging method, device and storage medium of equipment
US20100162146A1 (en) Visually processing instance data
WO2023077932A1 (en) Method and apparatus for automatically registering floor code, and storage medium
CN106648569A (en) Target serialization achieving method and device
CN116560683A (en) Software updating method, device, equipment and storage medium
CN115237805A (en) Test case data preparation method and device
CN114911775A (en) Method and system for configuring and storing dynamic form and field
CN112860581B (en) Execution method, device, equipment and storage medium of test case
CN106341449B (en) Method of data synchronization and device
CN106233284A (en) The method and system stablizing identifier is generated for the node potentially including main contents in information resources
CN105739717B (en) Data inputting method and device
CN115328458B (en) Business application development method and device
CN116719523A (en) Page rendering method and electronic device
KR102014500B1 (en) Drill-down slide presentation content generation method and apparatus, drill-down slide presentation content distribution method and apparatus, drill-down slide presentation content rendering method and apparatus, and drill-down slide presentation content publication and rendering system
CN114637499B (en) Visualization component processing method, device, equipment and medium
CN111831277B (en) Virtual data generation method, system, device and computer readable storage medium
CN113254455B (en) Dynamic configuration method and device of database, computer equipment and storage medium
CN109101429A (en) A kind of method and device of the browser page debugging of set-top box
CN115061785A (en) Information issuing method and device, storage medium and server
CN110515946B (en) Data extraction method, device, equipment and computer readable storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22888963

Country of ref document: EP

Kind code of ref document: A1