CN113961191A - Method and device for automatically registering hierarchical code and storage medium - Google Patents

Method and device for automatically registering hierarchical code and storage medium Download PDF

Info

Publication number
CN113961191A
CN113961191A CN202111295144.0A CN202111295144A CN113961191A CN 113961191 A CN113961191 A CN 113961191A CN 202111295144 A CN202111295144 A CN 202111295144A CN 113961191 A CN113961191 A CN 113961191A
Authority
CN
China
Prior art keywords
floor
development
manager
code
current page
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN202111295144.0A
Other languages
Chinese (zh)
Inventor
张旋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information Technology Co Ltd
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 Beijing Jingdong Century Trading Co Ltd, Beijing Wodong Tianjun Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN202111295144.0A priority Critical patent/CN113961191A/en
Publication of CN113961191A publication Critical patent/CN113961191A/en
Priority to PCT/CN2022/115963 priority patent/WO2023077932A1/en
Pending legal-status Critical Current

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Databases & Information Systems (AREA)
  • Library & Information Science (AREA)
  • Data Mining & Analysis (AREA)
  • Stored Programmes (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The embodiment of the invention discloses a method and a device for automatically registering a layering code and a storage medium, wherein a floor annotator is used for traversing a development project of a current page, acquiring a floor development code of a current interface for marking, determining a unique identifier of a floor and acquiring the type of the floor; when an application formed by each floor is started, registering a floor development code to a floor manager according to the unique identification of the floor and the type of the floor to obtain comprehensive floor development information processed by each floor; wherein the floor development information represents a unique identifier and type of a floor; and loading and rendering the floor development information through the floor manager, and displaying a current page, wherein the current page comprises function display areas of all floors. In the scheme, the floor-oriented codes are registered in an automatic registration mode, so that the floor-oriented codes can be placed at any place in a development project, and the flexibility of floor-oriented development is improved.

Description

Method and device for automatically registering hierarchical code and storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and an apparatus for automatically registering a hierarchical code, and a storage medium.
Background
The floor development of the current page is a popular development mode, each floor can be independently developed and flexibly controls the sequence of the floors, whether each floor is displayed can be determined, and the current floor development manually registers codes of each floor to a development page, so that the condition that the storage positions of the floor codes must be placed together with a registration container is limited, and the flexibility of the floor development is lost.
Disclosure of Invention
The embodiment of the invention provides a method, a device and a storage medium for automatically registering a storey code, which can automatically register a storey in a storey manager and improve the flexibility of storey development.
The technical scheme of the invention is realized as follows:
the embodiment of the invention provides a method for automatically registering a layering code, which comprises the following steps:
traversing the development project of the current page by using a floor annotator, acquiring a floor development code of the current interface for marking, 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 to obtain the comprehensive floor development information processed by each floor; wherein the floor development information represents a unique identifier and type of a floor;
and loading and rendering the floor development information through the floor manager, and displaying the current page, wherein the current page comprises the function display areas of all the floors.
In the above scheme, the traversing the development project of the current page by using the floor annotator, acquiring the floor development code of the current interface for marking, determining the unique identifier of the floor, and acquiring the type of the floor includes:
traversing the development project of the current page to acquire the floor development code of the current interface;
marking the acquired floor development codes through the floor annotating device, and determining the unique identification of the floor;
based on the unique identification of the floor, the floor annotator calls a collection method in the added third-party library to acquire the type of the floor.
In the above scheme, the method further comprises:
storing the floor development information consisting of the unique identification of the floor and the type of the floor in a file associated with the development project.
In the above solution, when the application constituted by 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 comprehensive floor development information processed by each floor is obtained, including:
when the application composed of all the floors is started, reading the file, and acquiring the unique identifier of the floor and the type of the floor; and calling a registration method in a floor manager to automatically register the floor development code with the mark according to the unique identifier of the floor and the type of the floor, and when the registration is successful, performing parameter information processing on the development information of each floor by using the floor manager to obtain the comprehensive floor development information processed by each floor.
In the foregoing solution, the parameter information processing includes at least one of:
sequencing the floors by using the unique identification of the floors;
determining whether each floor is displayed among the respective floors;
and carrying out data binding on each floor.
In the above solution, the performing parameter information processing on the development information of each floor by using the floor manager to obtain the processed development information of the integrated floor of each floor includes:
and processing the development information of each floor by using any parameter information processing method in the process of sequencing each floor, displaying each floor or not and binding each floor to obtain the processed comprehensive floor development information of each floor.
In the above solution, the loading and rendering the floor development information through the floor manager, and displaying the current page include:
when the development project is started, generating a service address corresponding to the development project;
loading the floor development information representing the layout function of each floor by accessing the service address, and rendering to obtain the current page;
and displaying the current page, wherein the current page comprises the function display areas of all the floors.
In the above scheme, the accessing the service address, loading the floor development information representing the layout function of each floor, and rendering to obtain the current page includes:
and loading the floor development information representing the layout function of each floor, and rendering the development information of each floor to a corresponding control in the layout to obtain the current page.
The embodiment of the disclosure provides a device for automatically registering a floor-based code, which comprises an automatic floor collecting unit, an automatic floor registering unit, a floor manager unit, a page rendering unit and a floor manager loading floor unit; wherein the content of the first and second substances,
the floor adding annotation unit is used for traversing the development project of the current page by using the floor annotator, and acquiring the floor development code of the current interface for marking;
the automatic floor collecting unit is used for determining the unique identifier of the floor according to the floor mark and acquiring the type of the floor;
the floor automatic registration unit is used for registering the floor development code to a floor manager according to the unique identifier of the floor and the type of the floor when an application formed by each floor is started;
the floor manager unit is used for obtaining the comprehensive floor development information after the treatment of each floor;
the page rendering unit is used for loading and rendering the floor development information through the floor manager;
and the floor manager loads a floor unit and is used for displaying the current page, and the current page comprises the function display area of each floor.
The embodiment of the present disclosure provides an apparatus for automatically registering a hierarchical code, where the apparatus for automatically registering a hierarchical code includes:
a memory for storing executable data instructions;
a processor for executing executable instructions stored in the memory, the processor executing the method of automatically registering a floor code when the executable instructions are executed.
The present embodiments provide a computer-readable storage medium having stored thereon executable instructions that, when executed by one or more processors, perform the method of automatically registering a floor code.
The embodiment of the invention provides a method and a device for automatically registering a layering code and a storage medium, wherein the method comprises the following steps: traversing the development project of the current page by using a floor annotator, acquiring a floor development code of the current interface for marking, 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 to obtain the comprehensive floor development information processed by each floor; wherein the floor development information represents a unique identifier and type of a floor; and loading and rendering the floor development information through the floor manager, and displaying the current page, wherein the current page comprises the function display areas of all the floors. By adopting the scheme, the floor annotator can add marks to floors, during project compiling, the annotator can count floors according to the floor annotation marks, floor collection is achieved, the floors are automatically registered in the floor manager, and floor codes are registered in an automatic registration mode, so that the floor codes can be placed at any place in development engineering, and the flexibility of floor development is improved.
Drawings
Fig. 1 is a first flowchart illustrating a method for automatically registering a floor-based code according to an embodiment of the present invention;
FIG. 2 is a schematic diagram illustrating an effect of a page according to an embodiment of the present invention;
fig. 3 is a second flowchart illustrating a method for automatically registering a floor-based code according to an embodiment of the present invention;
fig. 4 is a third schematic flowchart of a method for automatically registering a floor-based code according to an embodiment of the present invention;
fig. 5 is a fourth flowchart illustrating a method for automatically registering a floor-based code according to an embodiment of the present invention;
fig. 6 is a fifth flowchart illustrating a method for automatically registering a floor-based code according to an embodiment of the present invention;
FIG. 7 is a flowchart of a prior art development technique provided by an embodiment of the present invention;
fig. 8 is a schematic flow chart of a floor annotator according to an embodiment of the present invention;
fig. 9 is a sixth schematic flowchart of a method for automatically registering a floor-based code according to an embodiment of the present invention;
fig. 10 is a first schematic structural diagram of an apparatus for automatically registering a floor-based code according to an embodiment of the present invention;
fig. 11 is a schematic structural diagram of a method and an apparatus for automatically registering a floor code according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments obtained by a person skilled in the art based on the embodiments of the present invention without any creative work belong to the protection scope of the present invention.
In order that those skilled in the art will better understand the disclosure, the invention will be described in further detail with reference to the accompanying drawings and specific embodiments. Fig. 1 is a first flowchart of a method for automatically registering a floor-based code according to an embodiment of the present invention, which will be described with reference to the steps shown in fig. 1.
S101, traversing the development project of the current page by using a floor annotator, acquiring a floor development code of the current interface for marking, determining a unique identifier of a floor, and acquiring the type of the floor.
The embodiment of the invention is suitable for marking the floor development codes by using the floor annotating device, determining the unique identification of the floor and acquiring the scene of the floor type.
In the embodiment of the invention, when the page of the mobile terminal is developed, the page is composed of a plurality of blocks, the blocks can be regarded as different floors, different floors in the page are marked by using a floor annotator, unique identification ids can be given to different floors through marking, and the floors are counted to realize the collection of the floors; an interface developed in this manner by floors may be referred to as a floored development.
In an embodiment of the invention, the floor-based is a term for developing and describing the mobile phone application pages separately from top to bottom in sequence according to obvious wiring.
In the embodiment of the invention, 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 automatically registering the respective floor in the floor manager.
In an embodiment of the invention, the types of floors represent different purposes of different interfaces.
For example, when a commodity is input on a shopping website for searching, a plurality of commodities with different colors, different prices and different brands are popped up, and a user can choose one of the commodities to click to jump to a new interface, wherein the interface contains various information introductions of the commodity. Such as: a large picture or video presentation of the good; a price interval of the commodity; a shipping address for the goods; a shipping address for the goods; activity of the goods; a service of the goods; selection of the goods and parameters of the goods.
Large picture or video introduction of goods: the appearance and specification of the commodity are introduced, and if the commodity is a mobile phone, the specification of the mobile phone comprises the time of sale of the mobile phone, the thickness of the body of the mobile phone, the memory of the body and the size of a screen.
Price interval of the commodity: a price interval is mainly defined, and when different appearances and specifications are selected, commodities all have corresponding prices.
Delivery address of goods: the source of the commodity is noted, such as: guangdong Shenzhen, Shaanxi Xian, Shanxi Taiyuan, etc.
The activity of the commodity: the price reduction is generally carried out by taking the existing red envelope.
Service of the goods: merchants note that freight risk may be exempted or 15 days returned, etc.
Selection of goods and parameters of goods: an introduction is made to the type, brand, color, and after-market services of the goods.
The above is the complete interface presented when the merchandise was actually purchased.
In the embodiment of the invention, the complete interface is developed from top to bottom in blocks according to the functions of different areas of commodities by utilizing a floor development technology. In the page, a total of 7 parts of detailed introduction of commodities can be considered as 7 floors, such as price floors, address floors and the like, each floor has a corresponding function, each floor is developed respectively, each floor is marked according to the attention degree of commodity information in an actual page, after all floors are developed, the floors are automatically registered in a floor manager, the floor manager sorts different floors according to marks, and after the page is displayed, the page is a complete and ordered interface containing functions of all floors.
Fig. 2 is a complete interface formed by 10 floors, each floor has a unique identifier F1-F10, the type of the F1 floor is a large picture of a mobile phone, the type of the F2 floor is a price floor, the F3 floor is a commodity name floor, the F4 floor is an advertisement floor, the F5 floor is an explanation floor, the F6 floor is a specification floor, the F7 floor is a preferential floor, the F8 floor is an activity floor, the F9 floor is a selected floor, and the F10 floor is a delivery floor.
It can be understood that in the embodiment of the present invention, the floor annotating device is used to mark different floors, the floor can be collected according to the mark, and the unique identification id of each floor is obtained, and each floor is collected by using the id. By utilizing the floor annotating device to mark each floor, the floor development is facilitated.
S102, when an application formed by each floor is started, registering a floor development code to a floor manager according to the unique identification of the floor and the type of the floor to obtain comprehensive floor development information processed by each floor; wherein the floor development information characterizes the unique identity and type of the floor.
In the embodiment of the present invention, a scenario in which development codes of respective floors are automatically registered in a floor manager is applied.
In some embodiments of the present invention, when the app composed of each floor is started, for each floor, the development code may be registered in the floor manager according to the id of the floor and the floor type, and the development information of each floor, which is the integrated floor development information processed by each floor, is obtained.
In the embodiment of the invention, the processed comprehensive floor development information of each floor is final complete and ordered floor development information formed by initial floor development information of each floor.
In the embodiment of the invention, when each floor development code is automatically registered to the floor manager, the floor manager sorts the floors according to the floor id, binds the data of the floors, refreshes the floors and the like, and finally forms complete and ordered floor development information.
It can be understood that, in the embodiment of the present invention, when the application is started, the collected floors are automatically registered in the floor manager according to the identification and the type of the floor, and the processed integrated floor development information of each floor is obtained. The floor-based codes are registered in an automatic registration mode, so that the floor-based codes can be placed at any place in a development project, and the flexibility of floor-based development is improved.
And S103, loading and rendering the floor development information through the floor manager, and displaying a current page, wherein the current page comprises function display areas of all floors.
The method and the device are suitable for loading and rendering the floor development information.
In the embodiment of the invention, the development information of each floor is loaded and rendered, and the loaded resources comprise html, js and css codes and media files; and finally, displaying a page containing the function display areas of all the floors.
In the embodiment of the invention, in the loading process, a domain name system maps a domain name and an ip address with each other; sending an http request to a server according to the ip address; the server processes the http request and returns the main code and some static resource notability; generating a DOM Tree according to the returned html code, and generating CSSOM (a cs object model) according to the cs code; integrating the DOM Tree and the CSSOM to generate a Render Tree; rendering the page according to the render tree; when the < script tag is met, the rendering is suspended, and js codes are loaded and executed preferentially; after the above process is completed, the rendering is completed, and a complete interface composed of all floors is obtained.
It can be understood that, in the embodiment of the present invention, by loading the floor development information and rendering, an interface including the function of each floor is displayed. The floor manager loads, renders and displays complete floor development information formed by all floors, and flexibility of floor development is improved.
In some embodiments, referring to fig. 3, fig. 3 is a flowchart illustrating a second method for automatically registering a floor-based code according to an embodiment of the present invention, where S101 shown in fig. 3 may be implemented through S1011 to S1033, and will be described with reference to the steps shown in fig. 3.
And S1011, traversing the development project of the current page, and acquiring the floor development code of the current interface.
In some embodiments of the invention, the method is applicable to a scenario of acquiring development code of an interface.
In some embodiments of the invention, all floor codes in the current interface are obtained by traversing the development project of the current interface.
It will be appreciated that in some embodiments of the invention, a development project for a page is traversed to obtain development code for a floor, facilitating marking of the code at a later time.
And S1012, marking the acquired floor development codes through a floor annotating device, and determining the unique identification of the floor.
In some embodiments of the invention, it is applicable to scenarios where floor codes are marked.
In some embodiments of the invention, after the project is traversed to obtain the floor development codes, the obtained floor development codes are marked by using the floor annotator, so that each floor development code has a unique identifier.
In some embodiments of the present invention, the annotation is a tag, which can be inserted into the source code, and the compiler of the user can make a logical judgment on them, or the user can write a tool method by himself to read annotation information in the source code, thereby implementing a certain operation; the annotation itself does not play any role, and can play a certain role by matching with an annotation processor, and the annotation itself is more like a special annotation; the floor annotator is also actually a class so it can only take effect if loaded into jvm.
In some embodiments of the present invention, the annotation is defined by an @ interface key, such as:
public@interface TestAnnotation{
}
this is equivalent to creating an annotation called TestAnnotation.
@TestAnnotation
public class Test{
}
A class Test is created and then the class definition is annotated with the testAnnotation by adding @ testAnnotation to the class definition.
Attributes owned by testassociation in this annotation may also be defined, such as having two attributes, id and msg, which should be assigned values when used.
Illustratively, referring to fig. 2, F1 through F10 are unique identifications for each floor.
It will be appreciated that in some embodiments of the invention, the obtained floor development code is marked by the annotator and provides a unique identification id of the floor, facilitating later registration in the floor manager.
And S1013, calling a collection method in the added third-party library by the floor annotator based on the unique identifier of the floor to acquire the type of the floor.
In some embodiments of the invention, it is suitable to collect scenes of floors according to floor marks.
In some embodiments of the present invention, after the floor annotator marks each floor, the marked floor development codes are collected by using a process method in the added third-party library according to the obtained id.
In some embodiments of the invention, the maven repository is a third party repository that is dependent in the project. The maven warehouse comprises three types, namely a local type, a central type and a remote type; when Maven starts looking up the dependent libraries, it first searches in the local repository, then in the central repository, if not found and one or more remote repositories are already set, searches for dependent files in one or more remote repositories, if found, downloads to the local repository for future reference, otherwise Maven will stop processing and throw errors (cannot find dependent files). The Maven local repository is created under the% USER HOME% directory by default. To modify the default location, another path is defined in the Maven's settings.xml file in the% M2_ HOME% \ conf directory, and when you run the Maven command, the Maven will download the dependent file into the path you specify.
In some embodiments of the invention, after a third-party library is added, namely a registrar development dependency library, an abstractprocesser class is inherited, and a process () method is called to collect the marked floor development code.
It will be appreciated that in some embodiments of the invention, the floor annotator collects floors based on floor identifications, facilitating later automatic registration of individual floor development codes into the floor manager by collecting development codes with tags.
In some embodiments of the present invention, before the floor is automatically registered to the floor manager, the floor development information needs to be stored, which can be implemented by S201, and will be described with reference to the following steps.
And S201, storing floor development information consisting of the unique identification of the floor and the type of the floor in a file related to a development project.
In some embodiments of the invention, the method is applicable to a scene for storing development information.
In some embodiments of the invention, floor development information consisting of a unique identification of a floor and a floor type is stored in a file associated with the development project.
It will be appreciated that in some embodiments of the invention, by storing floor development information including floor identifications and floor types, automatic registration of floors with floor identifications and floor types in the floor development information is facilitated at a later time.
In some embodiments, referring to fig. 4, fig. 4 is a third flowchart illustrating a method for automatically registering a floor-based code according to an embodiment of the present invention, where S102 shown in fig. 4 may be implemented through S1021 to S1022, and will be described with reference to the steps shown in fig. 4.
And S1021, when the application composed of all floors is started, reading the file, and acquiring the unique identifier of the floor and the type of the floor.
In some embodiments of the invention, it is suitable to obtain the scenes of the floor identification and the floor type.
In some embodiments of the present invention, when an application constituted by each floor is started, a path of a file storing a floor identification and a type is read, and a unique identification and a floor type of the floor are acquired.
In the embodiment of the present invention, the File can be directly implemented by a new File (path), where the path is a path where the File is actually stored.
It is to be understood that in some embodiments of the present invention, when the application is started, the identification and type of the floor are obtained by reading the file, which facilitates automatic registration of the floor later by using the floor identification and the floor type in the floor development information.
And S1022, calling a registration method in the floor manager to automatically register the marked floor development code according to the unique identifier of the floor and the type of the floor, and performing parameter information processing on the development information of each floor by using the floor manager when the registration is successful to obtain the processed comprehensive floor development information of each floor.
In some embodiments of the present invention, the method and the system are suitable for automatically registering each floor to a floor manager to obtain a scene of the processed integrated floor development information of each floor.
In some embodiments of the invention, after the identification and the type of each floor are read, a registration method in the floor manager is directly called to automatically register each floor, and when the registration is successful, the floor manager performs parameter information processing on the development information of each floor, and finally the development information of each floor forms complete floor development information.
In some embodiments of the invention, parameter information processing includes refreshing floors, sorting with floor ids, binding data, and the like.
It can be understood that, in some embodiments of the present invention, after the identifier and the type of each floor are read, a registration method in the floor manager is directly invoked to automatically register each floor, and the floor manager is used to perform parameter information processing on each floor development information that is successfully registered, so that each floor development information finally forms a complete floor development information. The floor-based codes are registered in an automatic registration mode, so that the floor-based codes can be placed at any place in a development project, and the flexibility of floor-based development is improved.
In some embodiments of the present invention, referring to fig. 5, fig. 5 is a flowchart illustrating a fourth method for automatically registering a floor-based code according to an embodiment of the present invention, where S1022 shown in fig. 5 may be implemented by S301 to S303, and will be described with reference to the steps shown in fig. 5.
S301, sequencing each floor by using the unique identification of the floor.
In some embodiments of the invention, it is applicable to scenarios where floors are ranked.
In some embodiments of the present invention, when each floor is automatically registered to the floor manager, the floor manager sorts the floors according to the identification id of each floor, and each sorted floor constitutes a complete floor development information.
Illustratively, referring to FIG. 2, the development interfaces shown are arranged in order from F1 to F10.
It will be appreciated that in some embodiments of the invention, floors are ordered using floor identifications, such that an ordered specification of the interface is developed.
And S302, determining whether each floor is displayed in each floor.
In some embodiments of the invention, it is adapted to determine a scene whether a floor is displayed.
In some embodiments of the invention, the floor manager determines whether each floor can be displayed when managing the floors.
And S303, performing data binding on each floor.
In some embodiments of the invention, the method is applicable to a scene of data binding of floors.
In some embodiments of the invention, the data binding is involved in the transmission process of front-end and back-end data, and the floor manager performs data binding on each floor, and converts the parameters in the form of character strings into types really needed by the service end.
In some embodiments of the present invention, when a front-end request is made, data binding may be performed directly using a default parameter type provided by Spring MVC in the profile of a background method; the Spring MVC framework performs type conversion on the content of the request parameter string through a data binding component (DataBinder), and then assigns the converted value to the parameters of the method in the controller class, so that the background method can correctly bind and acquire the parameters carried by the client request, and the commonly used default parameter type is HttpServletRequest: acquiring request information through a request object, http servletresponse: response information is processed by response and http response: and obtaining the object stored in the session through the session object, and the like. The specific process of data binding is as follows: the Spring MVC transmits the ServeltRequest object to the DataBinder; transferring the participating objects of the processing method to a DataBinder; the DataBinder calls a Conversionservice component to perform data type conversion, data formatting and other work, and fills the message in the ServertRequest object into the parameter object; calling a Validator component to perform data validity check on the parameter object bound with the request message data; and after the verification is finished, generating a data binding result BindingResult object, and assigning the content in the BindingResult object to a corresponding parameter of the processing method by Spring MVC.
It will be appreciated that in some embodiments of the invention, data binding of individual floors by the floor manager allows for greater automation of the framework, better fault tolerance and higher coding efficiency.
S1022 can be realized by S401, which will be described with reference to the following steps.
S401, processing the development information of each floor by using any parameter information processing method of sequencing each floor, displaying each floor and binding each floor to obtain the processed comprehensive floor development information of each floor.
In some embodiments of the present invention, the method and the device are suitable for performing parameter processing on each floor to obtain a scene of the processed comprehensive floor development information of each floor.
In some embodiments of the present invention, when each floor is successfully registered to the floor manager, the floor manager performs various processes such as sorting, binding data, determining whether each floor should be displayed, refreshing the floor, and the like on each floor, so that each floor forms a complete floor development information.
In some embodiments of the present invention, referring to fig. 6, fig. 6 is a flowchart illustrating a fifth method for automatically registering a floor-based code according to an embodiment of the present invention, where S103 shown in fig. 6 may be implemented through S1031 to S1033, and will be described with reference to the steps shown in fig. 6.
And S1031, when the development project is started, generating a service address corresponding to the development project.
In some embodiments of the invention, it is applicable to a scenario of generating a service address.
In some embodiments of the present invention, when a development project is deployed, the project is started, a corresponding ip address is generated, and a series of operations of a page are performed by accessing the ip address.
It will be appreciated that in some embodiments of the invention, when a development project is launched, a service address corresponding to the project is generated, and the generation of pages is facilitated by subsequent access to the address.
And S1032, loading floor development information representing the layout function of each floor by accessing the service address, and rendering to obtain the current page.
In some embodiments of the invention, the scenario for obtaining the development interface is adapted.
In some embodiments of the present invention, by accessing the generated service address, the device parses and displays the content in the order of developing the code, and the top loads first and then loads the following content; when the page is rendered, the rendering engine begins to analyze HTML/SVG/XHTML and converts the label into a dom node in a dom tree. Then, it parses style information in the external CSS file and style tag to generate a rule tree. The dom tree and the rule tree combine to generate a render tree. The Render tree consists of rectangles containing attributes such as color and size, which are to be displayed on the screen in the correct order. After the Render tree is constructed, a layout process will be performed that will determine the exact coordinates of each node on the screen. The next step is drawing, namely traversing the render tree, and drawing each node by using the UI back-end layer.
In some embodiments of the invention, rendering is done step-by-step, and for a better user experience, the rendering engine will render the content as early as possible on the screen, and will not wait until all html has been parsed and the render tree is built and laid out. It displays a part of the content after parsing a part of the content, and may download the rest of the content through the network.
And S1033, displaying a current page, wherein the current page comprises function display areas of all floors.
In some embodiments of the invention, the method is adapted to display a scene of the current interface.
In some embodiments of the invention, after the information is loaded and rendered, the HTML becomes an image that is visible to the human eye, and a developed interface is obtained that includes the functions of each floor.
S1032 can be implemented by S501, which will be described with reference to the following steps.
S501, loading the floor development information representing the layout function of each floor, and rendering the development information of each floor to a corresponding control in the layout to obtain a current page.
In some embodiments of the invention, the method is applicable to a scenario of obtaining a development interface.
In some embodiments of the present invention, the device analyzes and displays the content according to the sequence of the development code, loads the top first, then loads the following content, displays the data of each floor on the corresponding control in the layout, and completes rendering to obtain the current page.
In order to further embody the purpose of the present invention, an exemplary application of the embodiment of the present invention in a practical application scenario will be described below.
An embodiment of the present invention provides a flowchart of a conventional development technique, as shown in fig. 7.
S601, each floor F1-FN of the development interface.
S602, the floor may be placed in a dependent library in the floor manager or in a library in which the floor manager is located.
S603, a floor manager FM.
And S604, rendering the page.
S605, the floor manager FM loads the floor F.
The embodiment provides a development step of a floor annotator, and an optional flowchart is shown in fig. 8.
And S701, adding a register development dependency library.
S702, inheriting an Abstractprocessor class.
S703, process () method is realized.
And S704, collecting floors placed in each library according to the annotation marks.
S705, storing the collected floor information in a file.
And S706, when the application is started, automatically registering the collected floor to the floor manager.
And S707, when the page is rendered by the UI, the floor manager loads the floor information and renders the page.
An alternative flowchart of a method for automatically registering a hierarchical code is shown in fig. 9.
S1, F1-FN (current page) of each floor of the development interface.
S2, the floor annotator adds annotations (marks) to each floor.
S3, the floor annotator automatically collects floors (type of acquired floor) according to the floor marks.
The floor annotator automatically collects floors according to floor marks, comprising:
and S31, adding a registry development dependency library (third-party library).
S32 inherits the abstract processor class, and implements a process () method (collection method).
The floors placed in each bin are collected according to the annotation tags in the process () method S33.
S34, the collected floor information (floor development information) is stored in a file related to the project.
And S4, automatically registering the automatically collected floors to the floor manager.
S5, floor manager (floor manager performs parameter information processing for each floor successfully registered automatically).
And S6, page rendering.
And S7, loading the floor by the floor manager.
It can be understood that the development codes of all floors are marked by using a floor annotator, and the floors are collected; the collected floors are automatically registered in a floor manager, page rendering and information loading are finally carried out, and the floor codes are registered in an automatic registration mode, so that the floor codes can be placed at any place in a development project, and the flexibility of floor development is improved.
An embodiment of the present invention provides an apparatus for automatically registering a hierarchical code, as shown in fig. 10, fig. 10 is a schematic structural diagram of the apparatus for automatically registering a hierarchical code according to the embodiment of the present invention, where the apparatus includes: a floor adding annotation unit 1001, an automatic floor collecting unit 1002, a floor automatic registration unit 1003, a floor manager unit 1004, a page rendering unit 1005 and a floor manager loading floor unit 1006; wherein the content of the first and second substances,
the floor adding annotation unit 1001 is configured to traverse the development project of the current page by using a floor annotator, and acquire a floor development code of the current interface for marking;
the automatic floor collecting unit 1002 is configured to determine a unique identifier of a floor according to a floor mark, and acquire a type of the floor;
the floor automatic registration unit 1003 is configured to register the floor development code to a floor manager according to the unique identifier of the floor and the type of the floor when an application constituted by each floor is started;
the floor manager unit 1004 is configured to obtain the processed comprehensive floor development information of each floor;
the page rendering unit 1005 is used for loading and rendering the floor development information through the floor manager;
the floor manager loads a floor unit 1006, configured to display the current page, where the current page includes the function display area of each floor.
In some embodiments of the present invention, the floor addition annotation unit 1001 is further configured to traverse a development project of the current page, and obtain the floor development code of the current interface; and marking the acquired floor development codes through the floor annotating device.
In some embodiments of the present invention, the automatic floor collection unit 1002 is further configured to call a collection method in the added third party library to obtain the type of the floor based on the unique identifier of the floor.
In some embodiments of the present invention, the automatic collection floor unit 1002 is further configured to store the floor development information comprised of the unique identification of the floor and the type of the floor in a file associated with the development project.
In some embodiments of the present invention, the floor automatic registration unit 1003 is further configured to, when the application constituted by the floors is started, read the file, and obtain the unique identifier of the floor and the type of the floor; and calling a registration method in a floor manager to automatically register the floor development code with the mark according to the unique mark of the floor and the type of the floor, and performing parameter information processing on the development information of each floor by using the floor manager when the registration is successful to obtain the comprehensive floor development information processed by each floor.
In some embodiments of the present invention, the floor manager unit 1004 is further configured to rank the floors using the unique identification of the floor; and determining whether each floor is displayed among the floors; and performing data binding on each floor; and processing the development information of each floor by using any parameter information processing method of sequencing each floor, displaying each floor and binding each floor to obtain the processed comprehensive floor development information of each floor.
In some embodiments of the present invention, the page rendering unit 1005 is further configured to render the page when the floor manager loads the information.
In some embodiments of the present invention, the floor manager loads the floor unit 1006, and is further configured to generate a service address corresponding to the development project when the development project is started; and loading the floor development information representing the layout function of each floor by accessing the service address, and combining with rendering to obtain and display the current interface.
In some embodiments of the present invention, the floor manager loads the floor unit 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 to a corresponding control in a layout, so as to obtain the current page.
It can be understood that, in the above device implementation scheme, the floor annotator is used to mark the development codes of each floor and collect the floors; the collected floors are automatically registered in a floor manager, page rendering and information loading are finally carried out, and the floor codes are registered in an automatic registration mode, so that the floor codes can be placed at any place in a development project, and the flexibility of floor development is improved.
Based on the method in the foregoing embodiment, as shown in fig. 11, fig. 11 is a schematic structural diagram of a server according to an embodiment of the present invention, where 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 the one or more programs are executed, the processor 1101 executes an automatic registration of the floorplanning code method corresponding to the server of the aforementioned embodiment.
Based on the resource allocation method of the foregoing embodiment, an embodiment of the present application further provides a computer-readable storage medium, where one or more programs are stored, and the one or more programs are executable by one or more processors, and when the program is executed by the processors, the method for automatically registering the floor-based codes disclosed in the embodiment of the present invention is implemented.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of a hardware embodiment, a software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention 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, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The above description is only a preferred embodiment of the present invention, and is not intended to limit the scope of the present invention.

Claims (11)

1. A method for automatically registering a hierarchal code, comprising:
traversing the development project of the current page by using a floor annotator, acquiring a floor development code of the current interface for marking, 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 to obtain the comprehensive floor development information processed by each floor; wherein the floor development information represents a unique identifier and type of a floor;
and loading and rendering the floor development information through the floor manager, and displaying the current page, wherein the current page comprises the function display areas of all the floors.
2. The method of claim 1, wherein traversing the development project of the current page using the floor annotator, obtaining a floor development code of the current interface for tagging, determining a unique identifier of a floor, and obtaining a type of the floor comprises:
traversing the development project of the current page to acquire the floor development code of the current interface;
marking the acquired floor development codes through the floor annotating device, and determining the unique identification of the floor;
based on the unique identification of the floor, the floor annotator calls a collection method in the added third-party library to acquire the type of the floor.
3. The method according to claim 1 or 2, characterized in that the method further comprises:
storing the floor development information consisting of the unique identification of the floor and the type of the floor in a file associated with the development project.
4. The method of claim 3, wherein the registering the floor development code to a 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 to obtain the processed integrated floor development information of each floor comprises:
when the application composed of all the floors is started, reading the file, and acquiring the unique identifier of the floor and the type of the floor;
and calling a registration method in a floor manager to automatically register a marked floor development code according to the unique identifier of the floor and the type of the floor, and when the registration is successful, performing parameter information processing on the development information of each floor by using the floor manager to obtain the processed comprehensive floor development information of each floor.
5. The method of claim 4, wherein the parameter information processing comprises at least one of:
sequencing the floors by using the unique identification of the floors;
determining whether each floor is displayed among the respective floors;
and carrying out data binding on each floor.
6. The method of claim 5, wherein the performing parameter information processing on the development information of each floor by using the floor manager to obtain the processed integrated floor development information of each floor comprises:
and processing the development information of each floor according to any parameter information processing method of sequencing each floor by using the floor manager, displaying or not displaying each floor and performing data binding on each floor to obtain the comprehensive floor development information processed by each floor.
7. The method of any of claims 1, 2, 4-6, wherein said loading and rendering, by said floor manager, said floor development information, displaying said current page, comprises:
when the development project is started, generating a service address corresponding to the development project;
loading the floor development information representing the layout function of each floor by accessing the service address, and rendering to obtain the current page;
and displaying the current page, wherein the current page comprises the function display areas of all the floors.
8. The method of claim 7, wherein the loading and rendering the floor development information characterizing the layout function of each floor by accessing the service address to obtain the current page comprises:
and loading the floor development information representing the layout function of each floor, and rendering the development information of each floor to a corresponding control in the layout to obtain the current page.
9. An apparatus for automatically registering a hierarchal code, comprising:
the floor adding annotation unit is used for traversing the development project of the current page by using the floor annotator, and acquiring the floor development code of the current interface for marking;
the automatic floor collecting unit is used for determining the unique identifier of the floor according to the floor mark and acquiring the type of the floor;
the floor automatic registration unit is used for registering the floor development code to a floor manager according to the unique identifier of the floor and the type of the floor when an application formed by each floor is started;
the floor manager unit is used for obtaining the comprehensive floor development information after the treatment of each floor;
the page rendering unit is used for loading and rendering the floor development information through the floor manager;
and the floor manager loads a floor unit and is used for displaying the current page, and the current page comprises the function display area of each floor.
10. An apparatus for automatically registering a hierarchal code, comprising:
a memory for storing executable data instructions;
a processor for implementing the method of any one of claims 1 to 8 when executing executable instructions stored in the memory.
11. A computer-readable storage medium having stored thereon executable instructions for causing a processor, when executed, to implement the method of any one of claims 1 to 8.
CN202111295144.0A 2021-11-03 2021-11-03 Method and device for automatically registering hierarchical code and storage medium Pending CN113961191A (en)

Priority Applications (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
PCT/CN2022/115963 WO2023077932A1 (en) 2021-11-03 2022-08-30 Method and apparatus for automatically registering floor code, and storage medium

Applications Claiming Priority (1)

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

Publications (1)

Publication Number Publication Date
CN113961191A true CN113961191A (en) 2022-01-21

Family

ID=79468984

Family Applications (1)

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

Country Status (2)

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

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023077932A1 (en) * 2021-11-03 2023-05-11 北京沃东天骏信息技术有限公司 Method and apparatus for automatically registering floor code, and storage medium

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10540262B2 (en) * 2016-10-17 2020-01-21 Microsoft Technology Licensing, Llc Using edit and continue to dynamically set and unset optimizations in source code while debugging
CN107450922B (en) * 2017-07-27 2020-01-03 武汉斗鱼网络科技有限公司 Method, storage medium, device and system for automatically registering popup events in android
CN112860232A (en) * 2019-11-28 2021-05-28 杭州萤石软件有限公司 Component implementation method and device
CN111045655B (en) * 2019-12-18 2023-04-14 广州市百果园信息技术有限公司 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

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023077932A1 (en) * 2021-11-03 2023-05-11 北京沃东天骏信息技术有限公司 Method and apparatus for automatically registering floor code, and storage medium

Also Published As

Publication number Publication date
WO2023077932A1 (en) 2023-05-11

Similar Documents

Publication Publication Date Title
CN108334387B (en) Dynamic interface rendering method and device
CN102971688B (en) Cross-platform program frame
TWI450107B (en) Method and computer readable storage media for web data usage platform
CN109445783B (en) Method and device for constructing dynamic configuration application driven by service
US20170357487A1 (en) Generation of an application from data
JP2019512816A (en) Method and apparatus for arranging page resources
CN104798036A (en) User interface control framework for stamping out controls using a declarative template
CN103597469A (en) Live browser tooling in an integrated development environment
US8005931B2 (en) Service providing apparatus
CN111068328A (en) Game advertisement configuration table generation method, terminal device and medium
CN113868126A (en) Application debugging method, device and storage medium of equipment
CN107203372A (en) Control shows method and device
US9774691B2 (en) System, method and non-transitory computer readable medium for embedding behavior collection component into application of mobile device automatically
JP2009059317A (en) Server device which distributes advertisement insered in book content
CN116719523A (en) Page rendering method and electronic device
WO2023077932A1 (en) Method and apparatus for automatically registering floor code, and storage medium
US9760381B2 (en) Configurable toolbar
CN108874384B (en) Terminal device, server, web page data processing method, and computer storage medium
CN105739717B (en) Data inputting method and device
CN106233284A (en) The method and system stablizing identifier is generated for the node potentially including main contents in information resources
JP2007041676A (en) Program creating device, program creating method, program, and recording medium
CN110737588A (en) automatic point burying method, device, medium and electronic equipment
CN111831277B (en) Virtual data generation method, system, device and computer readable storage medium
JP5397507B2 (en) Server device that inserts and distributes advertisements in book content
CN115373673A (en) Application page construction method and device, computer equipment and readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination