Page building method and device, equipment and storage medium
By determining the business information and logical relationships, and building pages based on the framework protocol and base classes, the problem of logical coupling of single-list and multiple business pages is solved, and an efficient and easy-to-maintain page building method is realized.
Patent Information
- Application Number
- CN202411096848.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-09
- Publication Date
- 2024-12-03
AI Technical Summary
When developing complex pages with single list and multiple services, the prior art usually couples multiple business logic into the page controller, resulting in excessive complexity of controller code and difficulty in maintaining and expanding.
By determining the business information contained in the page to be built, the framework protocol is determined based on the logical relationship between the business information, and the page is built based on the framework protocol and the base class to achieve loose coupling between the framework and modules, and improve the efficiency, maintenance and scalability of the page. .
By abstracting common framework protocols and base classes, decoupling frameworks and businesses, simplifying the page construction process, improving the maintenance and scalability of the page, and reducing the complexity of the code.
Smart Images

Figure CN119066290A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of cloud service technology, and in particular to a page building method, device, equipment and storage medium. Background Art
[0002] At present, when developing a complex page with multiple services in a single list, the codes of different services are usually directly coupled in the page controller, or the codes in the page controller are simply separated by categories. However, since a complex page with multiple services in a single list generally includes multiple services, and the data display on a complex page with multiple services in a single list often has a linkage relationship, such as a long page with multiple tables in a single list layout. Therefore, if multiple business logics are piled up in the page controller, the controller will have more than 3,000 lines. Summary of the invention
[0003] The present invention provides a page building method, device, equipment and storage medium.
[0004] According to a first aspect of the present disclosure, a page building method is provided, including: determining business information contained in a page to be built; determining a framework protocol of the page to be built based on a logical relationship between the business information; determining a base class corresponding to the framework protocol based on functions and elements contained in the framework protocol; and building the page to be built based on the framework protocol and the base class.
[0005] According to a second aspect of the present disclosure, a page building device is provided, including: a business determination module, configured to determine the business information contained in the page to be built; a protocol determination module, configured to determine the framework protocol of the page to be built based on the logical relationship between the business information; a base class determination module, configured to determine the base class corresponding to the framework protocol based on the functions and elements contained in the framework protocol; and a building module, configured to build the page to be built based on the framework protocol and the base class.
[0006] According to a third aspect of the present disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method described in any implementation manner in the first aspect.
[0007] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, where the computer instructions are used to cause a computer to execute the method described in any implementation manner of the first aspect.
[0008] According to a fifth aspect of the present disclosure, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the computer program implements the method described in any implementation manner in the first aspect.
[0009] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.
[0011] Figure 1 is an exemplary system architecture diagram in which the present disclosure may be applied;
[0012] Figure 2 is a flow chart of a first embodiment of a page building method according to the present disclosure;
[0013] Figure 3 is a flow chart of a second embodiment of a page building method according to the present disclosure;
[0014] Figure 4 is a flow chart of a third embodiment of the page building method according to the present disclosure;
[0015] Figure 5 is a flow chart of a fourth embodiment of the page building method according to the present disclosure;
[0016] Figure 6 is a flow chart of a fifth embodiment of the page building method according to the present disclosure;
[0017] Figure 7 It is an application scenario diagram of the page building method according to the present disclosure;
[0018] Figure 8 is a structural schematic diagram of an embodiment of a page building device according to the present disclosure;
[0019] Fig. 9 It is a block diagram of an electronic device used to implement the page building method of the embodiment of the present disclosure. DETAILED DESCRIPTION
[0020] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0021] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present disclosure may be combined with each other. The present disclosure will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0022] Figure 1 An exemplary system architecture 100 is shown to which an embodiment of the page building method or page building apparatus of the present disclosure can be applied.
[0023] like Figure 1 As shown, the system architecture 100 may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0024] The user can use the terminal devices 101, 102, 103 to interact with the server 105 through the network 104 to receive or send information, etc. Various client applications can be installed on the terminal devices 101, 102, 103.
[0025] The terminal devices 101, 102, 103 may be hardware or software. When the terminal devices 101, 102, 103 are hardware, they may be various electronic devices, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, etc. When the terminal devices 101, 102, 103 are software, they may be installed in the above electronic devices. They may be implemented as multiple software or software modules, or as a single software or software module. No specific limitation is made here.
[0026] The server 105 can provide various services. For example, the server 105 can analyze and process the business information obtained from the terminal devices 101, 102, and 103, and generate a processing result (such as a page to be built).
[0027] It should be noted that the server 105 can be hardware or software. When the server 105 is hardware, it can be implemented as a distributed server cluster consisting of multiple servers, or it can be implemented as a single server. When the server 105 is software, it can be implemented as multiple software or software modules (for example, for providing distributed services), or it can be implemented as a single software or software module. No specific limitation is made here.
[0028] It should be noted that the page building method provided in the embodiment of the present disclosure is generally executed by the server 105 , and accordingly, the page building device is generally disposed in the server 105 .
[0029] It should be understood that Figure 1The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0030] Continue to refer Figure 2 , which shows a process 200 of a first embodiment of a page building method according to the present disclosure. The page building method comprises the following steps:
[0031] Step 201, determine the business information included in the page to be built.
[0032] In this embodiment, the execution body of the page building method (for example Figure 1 The server 105 shown will first determine the business information contained in the page to be built. Here, the page to be built is generally a complex page with a single list and multiple businesses, that is, the list page will contain multiple business modules, and each business module can jump to another page, thus forming a complex page with a single list and multiple businesses. Business refers to the service provided by one entity unit to another entity unit. Business information is the information of specific businesses contained in the page to be built, such as search business, video playback business, etc. For example, the page to be built is the homepage, and the businesses contained in the homepage are: King Kong position full network search service page, video playback details page, etc. It should be noted that the King Kong area is the function entry navigation area below the banner, usually in the form of "icon + text" grid navigation. It is called the "King Kong area" because this area will display different function icons as the business objectives change.
[0033] Step 202: Determine the framework protocol of the page to be built based on the logical relationship between the business information.
[0034] In this embodiment, the above-mentioned execution subject will determine the framework protocol of the page to be built based on the logical relationship and dependency relationship between multiple business information. Here, business refers to the service provided by one entity unit to another entity unit; logic refers to the law of deriving reasonable conclusions based on existing information; and business logic refers to the rules and processes that an entity unit should have in order to provide services to another entity unit. For example, the business module and the UI (UserInterface) view should be registered and bound in advance. For another example, the business logic triggers an event proxy callback. The above-mentioned execution subject will manage the dependency relationship between the business module pool and the UI view pool, and determine the corresponding framework protocol based on the dependency relationship. For example, a module management protocol for managing the business module pool and the UI view pool, a business module logic protocol responsible for communication between modules and container classes, etc.
[0035] Step 203: Determine the base class corresponding to the framework protocol based on the functions and elements included in the framework protocol.
[0036] In this embodiment, the above-mentioned execution entity will determine the base class corresponding to the framework protocol based on the functions and elements contained in the framework protocol. Specifically, since the framework protocol is used to implement the corresponding business functions, the above-mentioned execution entity will determine the core functions implemented by the framework protocol and the UI view elements contained therein, thereby determining the base class corresponding to the framework protocol. It should be noted that in object-oriented design, the class type defined as containing the commonalities of all entities is called a "base class." For example, the above-mentioned execution entity will determine the module management base class corresponding to the module management protocol based on the business functions included in the module management protocol and the view elements corresponding to the business functions. For another example, the above-mentioned execution entity will determine the business module logic base class corresponding to the business module logic protocol based on the data management functions included in the business module logic protocol and the management rules of the view elements.
[0037] Step 204, build the page to be built based on the framework protocol and the base class.
[0038] In this embodiment, the above-mentioned execution subject will build the page to be built based on the framework protocol and the base class. Since the general framework protocol and the general base class have been extracted through the above steps, the module development specifications have been defined, and the module dependencies and internal designs have been reconstructed. Therefore, the above-mentioned execution subject can disassemble the business module corresponding to the page to be built, and build the page to be built based on the framework protocol and the base class corresponding to the business module. The page to be built here may include a homepage to be built and multiple sub-pages to be built (or business pages to be built), thereby completing the module injection solution and connecting the process of this framework in series.
[0039] The page building method provided by the disclosed embodiment first determines the business information contained in the page to be built; then, based on the logical relationship between the business information, determines the framework protocol of the page to be built; then, based on the functions and elements contained in the framework protocol, determines the base class corresponding to the framework protocol; finally, builds the page to be built based on the framework protocol and the base class. The page building method in this embodiment abstracts the communication protocol layer responsible for the communication between the framework and the module from the business dependencies, communicates through the protocol, realizes the loose coupling between the framework and the module, and then realizes the general base class based on the protocol layer, encapsulates the general strategies of the framework (such as animation strategies, refresh strategies, etc.), thereby constraining the responsibilities of the framework at the framework level, decoupling the framework and the business, improving the efficiency of building pages, and improving the maintainability, scalability and reusability of the pages.
[0040] In addition, in the technical solutions involved in this disclosure, the acquisition, storage, use, processing, transportation, provision and disclosure of user personal information (such as the business information involved in this disclosure later) are in compliance with the relevant laws and regulations and do not violate public order and good morals.
[0041] Continue to refer Figure 3 , Figure 3 The process 300 of the second embodiment of the page building method according to the present disclosure is shown. The page building method includes the following steps:
[0042] Step 301, determine the business information included in the page to be built.
[0043] In this embodiment, the execution body of the page building method (for example Figure 1 The server 105 shown in the figure will determine the business information contained in the page to be built. Step 301 is basically the same as step 201 in the above embodiment. The specific implementation method can refer to the above description of step 201, which will not be repeated here.
[0044] Step 302: Determine the business modules corresponding to the business information and the dependencies between the business modules.
[0045] In this embodiment, the above-mentioned execution subject will first determine the module corresponding to the business information, for example, the King Kong position full network search service corresponds to the search module, and the video playback details service corresponds to the video playback module. There is a logical relationship between multiple business modules, or there is a dependency relationship between multiple business modules. For example, the business module and the UI (User Interface) view should be registered and bound in advance. For another example, the business logic triggers an event proxy callback.
[0046] Step 303: Determine the module management protocol of the page to be built based on the dependency relationship.
[0047] In this embodiment, the execution subject determines the module management protocol of the page to be built based on the dependency relationship. That is, the execution subject manages the dependency relationship between the business module pool and the UI view pool, and determines the corresponding framework protocol based on the dependency relationship, that is, the module management protocol for managing the business module pool and the UI view pool.
[0048] In this way, a general module management protocol is abstracted from business dependencies to be responsible for the communication between the framework and the modules. Communication through the protocol achieves loose coupling between the framework and the modules.
[0049] Step 304: determine the business functions included in the module management protocol and the view elements corresponding to the business functions.
[0050] In this embodiment, since the framework protocol is used to implement the corresponding business functions, the execution subject will determine the core functions implemented by the framework protocol and the UI view elements included, thereby determining the base class corresponding to the framework protocol. Specifically, the execution subject will first determine the business functions included in the module management protocol and the view elements corresponding to the business functions.
[0051] Step 305: Determine the module management base class corresponding to the module management protocol based on the view element.
[0052] In this embodiment, after determining the business functions included in the module management protocol and the view elements corresponding to the business functions, the execution subject will determine the module management base class corresponding to the module management protocol based on the view elements. That is, the module management base class is a template management base class containing basic core functions implemented based on the module management protocol.
[0053] Step 306: Build the page to be built based on the module management protocol and the template management base class.
[0054] In this embodiment, the above-mentioned execution subject will build the page to be built based on the module management protocol and the template management base class. Since the module development specifications have been defined through the above steps, the module dependencies and internal designs have been reconstructed. Therefore, the above-mentioned execution subject can build the page to be built based on the module management protocol and the template management base class. The page to be built here may include a homepage to be built and multiple sub-pages to be built (or business pages to be built), thereby completing the module injection solution and connecting the process of this framework in series.
[0055] from Figure 3 It can be seen that Figure 2 Compared with the corresponding embodiments, the page building method in this embodiment highlights the steps of generating a module management protocol and a module management base class based on the dependency relationship between business modules, thereby achieving loose coupling between the framework and the modules, decoupling the framework and the business, improving the efficiency of page building, and improving the maintainability and extensibility of the page.
[0056] Continue to refer Figure 4 , Figure 4 The process 400 of the third embodiment of the page building method according to the present disclosure is shown. The page building method includes the following steps:
[0057] Step 401, determine the business information included in the page to be built.
[0058] In this embodiment, the execution body of the page building method (for example Figure 1 The server 105 shown in the figure will determine the business information contained in the page to be built. Step 401 is basically the same as step 201 in the above embodiment. The specific implementation method can refer to the above description of step 201, which will not be repeated here.
[0059] Step 402: Determine the communication events included in the service module.
[0060] In this embodiment, the execution subject will determine the communication events included in the business module, which generally refers to the communication with the container class, such as the business logic trigger event proxy callback, container class life cycle event distribution and reception, as well as the data management of specific business, display UI view management, etc.
[0061] Step 403: Determine the business module logic protocol of the page to be built based on the information of the communication event.
[0062] In this embodiment, the execution subject determines the business module logic protocol of the page to be built based on the information of the communication event. Specifically, the execution subject determines the business module logic protocol based on the specific information of the business logic trigger event proxy callback, container class life cycle event distribution and reception, etc. The business module logic protocol is responsible for the communication between the module and the container class.
[0063] In this way, a general business module logic protocol is abstracted from the business dependencies to be responsible for the communication between the framework and the modules. Communication through the protocol achieves loose coupling between the framework and the modules.
[0064] Step 404: determine the data management functions included in the business module logic protocol and the management rules of the view elements.
[0065] In this embodiment, the execution entity will determine the data management functions and management rules for UI view elements specifically included in the business module logic protocol.
[0066] Step 405: Determine the business module logic base class corresponding to the business module logic protocol based on the data management function and the management rule.
[0067] In this embodiment, the execution subject determines the business module logic base class corresponding to the business module logic protocol based on the data management function and management rules. That is, the business module logic base class is a base class containing the core logic capabilities of the basic business module based on the business module logic protocol.
[0068] Step 406: Build the page to be built based on the business module logic protocol and the business module logic base class.
[0069] In this embodiment, the above-mentioned execution subject will build the page to be built based on the business module logic protocol and the business module logic base class. Since the module development specifications have been defined through the above steps, the module dependencies and internal designs have been reconstructed. Therefore, the above-mentioned execution subject can build the page to be built based on the business module logic protocol and the business module logic base class. The page to be built here may include a homepage to be built and multiple sub-pages to be built (or business pages to be built), thereby completing the module injection solution and connecting the process of this framework in series.
[0070] from Figure 4 It can be seen that Figure 3 Compared with the corresponding embodiments, the page building method in this embodiment highlights the steps of generating the business module logic protocol based on the communication time contained in the business module and generating the business module logic base class, thereby realizing loose coupling between the framework and the module, decoupling the framework and the business, improving the efficiency of page building, and improving the maintainability and extensibility of the page.
[0071] Continue to refer Figure 5 , Figure 5 The process 500 of the fourth embodiment of the page building method according to the present disclosure is shown. The page building method includes the following steps:
[0072] Step 501, determine the business information included in the page to be built.
[0073] In this embodiment, the execution body of the page building method (for example Figure 1 The server 105 shown in the figure will determine the business information contained in the page to be built. Step 501 is basically the same as step 201 in the above embodiment. The specific implementation method can refer to the above description of step 201, which will not be repeated here.
[0074] Step 502: Determine the view information to be configured corresponding to the business module.
[0075] In this embodiment, the execution entity will determine the view information to be configured corresponding to the business module, wherein the view information to be configured includes at least one of the following: view size, view margin from the container, and data source required for the view to be configured. That is, the execution entity will determine the specific information of the UI view of the business module in the front-end page, such as the view size, view margin from the container, data source required for the view to be configured, whether the view is single-column or multi-column, etc. The view information to be configured can be expanded according to different businesses.
[0076] Step 503: Determine the data source protocol of the business module of the page to be built based on the view information to be configured.
[0077] In this embodiment, the execution subject determines the business module data source protocol of the page to be built based on the view information to be configured. That is, the execution subject determines the business module data source protocol according to the UI view information of the business module, and the business module data source protocol is used to provide basic configuration items for configuring the UI view corresponding to the business.
[0078] In this way, a general business module data source protocol is abstracted from the business dependencies to be responsible for the communication between the framework and the modules. Communication through the protocol achieves loose coupling between the framework and the modules.
[0079] Step 504: determine the elements to be configured in the data source protocol of the business module.
[0080] In this embodiment, the execution subject determines the elements to be configured in the data source protocol of the business module, that is, the execution subject determines the elements to be configured in the front-end page of all business modules, as well as the specific information of the elements to be configured.
[0081] Step 505: Determine the business module data source base class corresponding to the business module data source protocol based on the element to be configured.
[0082] In this embodiment, the execution subject determines the business module data source base class corresponding to the business module data source protocol based on the element to be configured and the information of the element to be configured. That is, the business module data source base class is a base class containing basic configuration elements of the business module data source implemented based on the business module data source protocol.
[0083] Step 506: Build the page to be built based on the business module data source protocol and the business module data source base class.
[0084] In this embodiment, the above-mentioned execution subject will build the page to be built based on the business module data source protocol and the business module data source base class. Since the module development specifications have been defined through the above steps, the module dependencies and internal designs have been reconstructed. Therefore, the above-mentioned execution subject can build the page to be built based on the business module data source protocol and the business module data source base class. The page to be built here may include a homepage to be built and multiple sub-pages to be built (or business pages to be built), thereby completing the module injection solution and connecting the processes of this framework in series.
[0085] from Figure 5 It can be seen that Figure 4 Compared with the corresponding embodiments, the page building method in this embodiment highlights the steps of generating a business module data source protocol and a business module data source base class based on the view information to be configured of the business module in the front-end page, thereby achieving loose coupling between the framework and the module, decoupling the framework and the business, improving the efficiency of page building, and improving the maintainability and extensibility of the page.
[0086] Continue to refer Figure 6 , Figure 6 The fifth embodiment of the page building method according to the present disclosure is shown in process 600. The page building method includes the following steps:
[0087] Step 601, determine the business information included in the page to be built.
[0088] In this embodiment, the execution body of the page building method (for example Figure 1The server 105 shown in the figure will determine the business information contained in the page to be built. Step 601 is basically the same as step 201 in the above embodiment. The specific implementation method can refer to the above description of step 201, which will not be repeated here.
[0089] Step 602: Determine rendering rules for view elements.
[0090] In this embodiment, the above-mentioned execution entity determines the rendering rules of the view elements. The rendering rules refer to the order and method of rendering each view element to the front-end page.
[0091] Step 603: Determine the business module reuse view protocol of the page to be built based on the rendering rules and the communication events.
[0092] In this embodiment, the above-mentioned execution entity determines the business module reuse view protocol of the page to be built based on the rendering rules and communication events between business modules, such as the UI view operation agent; provides business module class configuration or UI update methods to the outside world, etc.
[0093] In this way, a general business module reuse view protocol is abstracted from the business dependencies to be responsible for the communication between the framework and the module. Communication through the protocol achieves loose coupling between the framework and the module.
[0094] Step 604: determine the calling relationship of the view elements in the business module reuse view protocol.
[0095] In this embodiment, the execution subject determines the calling relationship of the view elements in the business module reuse view protocol, such as the proxy callback of the UI view size, the UI view life cycle distribution, etc.
[0096] Step 605: Determine the business module reuse view base class corresponding to the business module reuse view protocol based on the calling relationship.
[0097] In this embodiment, the above-mentioned execution entity will determine the business module reuse view base class corresponding to the business module reuse view protocol based on the calling relationship, that is, the business module reuse view base class is a base class based on the business module reuse view protocol and contains basic configuration elements of the business module data source.
[0098] Step 606: Build the page to be built based on the business module reuse view protocol and the business module reuse view base class.
[0099] In this embodiment, the above-mentioned execution subject will build the page to be built based on the business module reuse view protocol and the business module reuse view base class. Since the module development specifications have been defined through the above steps, the module dependencies and internal designs have been reconstructed. Therefore, the above-mentioned execution subject can build the page to be built based on the business module reuse view protocol and the business module reuse view base class. The page to be built here may include a homepage to be built and multiple sub-pages to be built (or business pages to be built), thereby completing the module injection solution and connecting the process of this framework in series.
[0100] from Figure 6 It can be seen that Figure 5 Compared with the corresponding embodiments, the page building method in this embodiment highlights the steps of generating a business module reuse view protocol based on the rendering rules of the view elements corresponding to the business module and generating a business module reuse view base class, thereby achieving loose coupling between the framework and the module, decoupling the framework and the business, improving the efficiency of page building, and improving the maintainability and extensibility of the page.
[0101] In some optional implementations of this embodiment, the page to be built includes a homepage to be built and a sub-page to be built; and building the page to be built based on the framework protocol and the base class includes: determining the target business modules included in the homepage to be built and the sub-page to be built; and building the homepage to be built and the sub-page to be built based on the framework protocol and the base class corresponding to the target business module.
[0102] In this implementation, the page to be built includes multiple pages, for example, a home page to be built and multiple sub-pages to be built (also referred to as business pages to be built). When building multiple pages to be built, the above-mentioned execution entity will first determine the business modules contained in the home page to be built and the sub-pages to be built, that is, the target business modules. Then, determine the framework protocol and the corresponding base class corresponding to the target business module. Finally, build the home page to be built and the sub-pages to be built based on the determined framework protocol and base class. That is, connect the process of the entire framework in series to form a completed page. Thereby improving the efficiency of page building and improving the reusability of the module.
[0103] For further reference Figure 7 , Figure 7 An application scenario diagram of the page building method of the present disclosure is shown. In this application scenario, a UI framework is first built, where the UI framework includes a protocol and a base class.
[0104] The process of building a UI framework includes: first, clarify the responsibilities of each role in the framework to reduce the burden on the framework. Then, abstract a general communication protocol layer from the business dependencies to be responsible for the communication between the framework and the module, and communicate through the protocol to achieve loose coupling between the framework and the module. Finally, implement a general base class based on the protocol layer to encapsulate the general strategies of the framework (such as animation strategy, refresh strategy, etc.), with the aim of constraining the responsibilities of the framework at the framework level.
[0105] Here, the protocols in the UI framework include module management protocol, business module logic protocol, business module data source protocol and business module reuse view protocol. Correspondingly, the base class includes module management base class, business module logic base class, business module data source base class and business module reuse view base class.
[0106] Specifically, the module management protocol is responsible for the management of the business module and the UI view pool, as well as the registration binding relationship between the business module and the UI view. Accordingly, the module management base class is a module management base class that contains basic core functions based on the module management protocol.
[0107] The business module logic protocol is responsible for communicating with the container class: such as business logic trigger event proxy callback; container class life cycle event distribution and reception; specific business data management, display UI view management. Accordingly, the business module logic base class is a base class based on the business module logic protocol that contains the core logic capabilities of the basic business module.
[0108] The business module data source protocol mainly provides basic configuration items for configuring the business corresponding UI view, such as view size, view margin from container, whether internal margin is required, server (service) data source of UI view, single column or multiple columns, etc. Accordingly, the business module data source base class is a base class based on the business module data source protocol and contains basic configuration elements of the business module data source.
[0109] The business module reuse view protocol is mainly responsible for the UI rendering corresponding to the business and the communication with the module, such as UI view proxy operation, size proxy callback; UI view life cycle distribution; providing external business module class configuration or UI update methods. Accordingly, the business module reuse view base class is a base class based on the business module reuse view protocol that contains the basic configuration elements of the business module data source.
[0110] In addition, the home page and business page can be built based on the completed UI framework. Here, the home page of Baidu Netdisk APP (APPlication) is taken as an example. Specifically, according to the module management protocol and the corresponding module management base class, the framework structure of the home page and the framework structure of the business page can be built. For example, the home page framework includes an interface module, a framework business module and a data module, and the business module layer specifically includes a story module, a recent module, a task module, a King Kong position module, a tool set module, and a general card module. Then, based on the business module data source protocol and the business module data source base class, the framework UI skeleton and the UI styles in each module of the business layer are configured, and the data source of each module in the business layer is configured. After that, the business module logic protocol and the business module logic base class are used to implement the event monitoring function and the business logic of each module in the business layer. Finally, the business module reuse view protocol and the business module reuse view base class are used to realize the rendering of the entire page and the communication between modules. Thus, the process of the entire framework is connected in series to complete the module injection solution.
[0111] Further references Figure 8 As an implementation of the methods shown in the above figures, the present disclosure provides an embodiment of a page building device. Figure 2 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.
[0112] like Figure 8 As shown, the page building device 800 of this embodiment includes: a business determination module 801, a protocol determination module 802, a base class determination module 803 and a building module 804. Among them, the business determination module 801 is configured to determine the business information contained in the page to be built; the protocol determination module 802 is configured to determine the framework protocol of the page to be built based on the logical relationship between the business information; the base class determination module 803 is configured to determine the base class corresponding to the framework protocol based on the functions and elements contained in the framework protocol; the building module 804 is configured to build the page to be built based on the framework protocol and the base class.
[0113] In this embodiment, in the page building device 800, the specific processing of the business determination module 801, the protocol determination module 802, the base class determination module 803 and the building module 804 and the technical effects thereof can be referred to in Figure 2 The relevant descriptions of steps 201 - 204 in the corresponding embodiment are not repeated here.
[0114] In some optional implementations of this embodiment, the protocol determination module includes: a dependency determination sub-module, configured to determine the business modules corresponding to the business information and the dependencies between the business modules; and a management protocol determination sub-module, configured to determine the module management protocol of the page to be built based on the dependency.
[0115] In some optional implementations of this embodiment, the base class determination module includes: a view element determination submodule, configured to determine the business functions included in the module management protocol and the view elements corresponding to the business functions; and a management base class determination submodule, configured to determine the module management base class corresponding to the module management protocol based on the view elements.
[0116] In some optional implementations of this embodiment, the protocol determination module also includes: a communication event determination submodule, which is configured to determine the communication events included in the business module; and a logical protocol determination submodule, which is configured to determine the business module logical protocol of the page to be built based on the information of the communication event.
[0117] In some optional implementations of this embodiment, the base class determination module also includes: a management protocol determination submodule, which is configured to determine the data management functions included in the business module logic protocol and the management rules of the view elements; and a logical base class determination submodule, which is configured to determine the business module logical base class corresponding to the business module logical protocol based on the data management functions and the management rules.
[0118] In some optional implementations of this embodiment, the protocol determination module also includes: a view information determination sub-module, configured to determine the view information to be configured corresponding to the business module, wherein the view information to be configured includes at least one of the following: view size, view margin from the container, and data source required for the view to be configured; a data source protocol determination sub-module, configured to determine the business module data source protocol of the page to be built based on the view information to be configured.
[0119] In some optional implementations of this embodiment, the base class determination module also includes: an element determination submodule, configured to determine the element to be configured in the business module data source protocol; a data source base class determination submodule, configured to determine the business module data source base class corresponding to the business module data source protocol based on the element to be configured.
[0120] In some optional implementations of this embodiment, the protocol determination module also includes: a rendering rule determination sub-module, configured to determine the rendering rules of the view elements; a view protocol determination sub-module, configured to determine the business module reuse view protocol of the page to be built based on the rendering rules and communication events.
[0121] In some optional implementations of this embodiment, the base class determination module also includes: a calling relationship determination sub-module, configured to determine the calling relationship of view elements in the business module reuse view protocol; and a view base class determination sub-module, configured to determine the business module reuse view base class corresponding to the business module reuse view protocol based on the calling relationship.
[0122] In some optional implementations of this embodiment, the page to be built includes a homepage to be built and a sub-page to be built; and the building module is further configured to: determine the target business module included in the homepage to be built and the sub-page to be built; and build the homepage to be built and the sub-page to be built based on the framework protocol and base class corresponding to the target business module.
[0123] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
[0124] Fig. 9 A schematic block diagram of an example electronic device 900 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.
[0125] like Fig. 9 As shown, the device 900 includes a computing unit 901, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 902 or a computer program loaded from a storage unit 908 into a random access memory (RAM) 903. In the RAM 903, various programs and data required for the operation of the device 900 can also be stored. The computing unit 901, the ROM 902, and the RAM 903 are connected to each other via a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.
[0126] A number of components in the device 900 are connected to the I / O interface 905, including: an input unit 906, such as a keyboard, a mouse, etc.; an output unit 907, such as various types of displays, speakers, etc.; a storage unit 908, such as a disk, an optical disk, etc.; and a communication unit 909, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 909 allows the device 900 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0127] The computing unit 901 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 901 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 901 performs the various methods and processes described above, such as a page building method. For example, in some embodiments, the page building method may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 908. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 900 via ROM 902 and / or a communication unit 909. When the computer program is loaded into RAM 903 and executed by the computing unit 901, one or more steps of the page building method described above may be performed. Alternatively, in other embodiments, the computing unit 901 may be configured to execute the page building method in any other appropriate manner (e.g., by means of firmware).
[0128] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0129] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0130] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0131] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0132] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.
[0133] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.
[0134] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.
[0135] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.
Claims
1. A page building method, comprising: Determine the business information contained in the page to be built; Determine the framework agreement of the page to be built based on the logical relationship between the business information; Based on the functions and elements included in the framework agreement, determine the base class corresponding to the framework agreement; The page to be built is built based on the framework protocol and the base class.
2. The method according to claim 1, wherein: The determining of the framework protocol of the page to be built based on the logical relationship between the business information includes: Determine the business modules corresponding to the business information and the dependencies between the business modules; A module management protocol for the page to be built is determined based on the dependency relationship.
3. The method according to claim 2, wherein: The determining of the base class corresponding to the framework protocol based on the functions and elements included in the framework protocol includes: Determine the business functions included in the module management protocol and the view elements corresponding to the business functions; A module management base class corresponding to the module management protocol is determined based on the view element.
4. The method according to claim 3, wherein: The framework protocol for determining the page to be built based on the logical relationship between the business information also includes: Determining the communication events included in the business module; The business module logic protocol of the page to be built is determined based on the information of the communication event.
5. The method according to claim 4, wherein: The determining of the base class corresponding to the framework protocol based on the functions and elements included in the framework protocol also includes: Determining the data management functions included in the business module logic protocol and the management rules of the view elements; The business module logic base class corresponding to the business module logic protocol is determined based on the data management function and the management rule.
6. The method according to claim 3, wherein: The framework protocol for determining the page to be built based on the logical relationship between the business information also includes: Determine the view information to be configured corresponding to the business module, wherein the view information to be configured includes at least one of the following: view size, a margin between the view and the container, and a data source required for the view to be configured; The business module data source protocol of the page to be built is determined based on the view information to be configured.
7. The method according to claim 6, wherein: The determining of the base class corresponding to the framework protocol based on the functions and elements included in the framework protocol also includes: Determine the elements to be configured in the data source protocol of the business module; The business module data source base class corresponding to the business module data source protocol is determined based on the element to be configured.
8. The method according to claim 4, wherein: The framework protocol for determining the page to be built based on the logical relationship between the business information also includes: Determining a rendering rule for the view element; The business module reuse view protocol of the page to be built is determined based on the rendering rules and the communication events.
9. The method according to claim 8, wherein: The determining of the base class corresponding to the framework protocol based on the functions and elements included in the framework protocol also includes: Determining the calling relationship of the view elements in the business module multiplexing view protocol; The business module reuse view base class corresponding to the business module reuse view protocol is determined based on the calling relationship.
10. The method according to any one of claims 1 to 9, wherein: The page to be built includes a homepage to be built and a subpage to be built; as well as The step of building the page to be built based on the framework protocol and the base class includes: Determine the target business modules included in the homepage to be built and the subpage to be built; Based on the framework protocol and the base class corresponding to the target business module, the home page to be built and the sub-page to be built are built.
11. A page building method and device, comprising: A business determination module is configured to determine the business information included in the page to be built; A protocol determination module, configured to determine the framework protocol of the page to be built based on the logical relationship between the business information; A base class determination module, configured to determine a base class corresponding to the framework protocol based on the functions and elements included in the framework protocol; The building module is configured to build the page to be built based on the framework protocol and the base class.
12. The device according to claim 11, wherein: The protocol determination module comprises: A dependency determination submodule, configured to determine the business modules corresponding to the business information and the dependency relationships between the business modules; The management protocol determination submodule is configured to determine the module management protocol of the page to be built based on the dependency relationship.
13. The device according to claim 12, wherein: The base class determination module includes: A view element determination submodule, configured to determine the business functions included in the module management protocol and the view elements corresponding to the business functions; The management base class determination submodule is configured to determine the module management base class corresponding to the module management protocol based on the view element.
14. The device according to claim 13, wherein: The protocol determination module also includes: A communication event determination submodule, configured to determine the communication events included in the service module; The logic protocol determination submodule is configured to determine the business module logic protocol of the page to be built based on the information of the communication event.
15. The device according to claim 14, wherein: The base class determination module also includes: A management protocol determination submodule, configured to determine the data management functions included in the business module logic protocol and the management rules of the view elements; The logic base class determination submodule is configured to determine the business module logic base class corresponding to the business module logic protocol based on the data management function and the management rule.
16. The device according to claim 13, wherein: The protocol determination module also includes: The view information determination submodule is configured to determine the view information to be configured corresponding to the business module, wherein the view information to be configured includes at least one of the following: view size, a margin between the view and the container, and a data source required for the view to be configured; The data source protocol determination submodule is configured to determine the business module data source protocol of the page to be built based on the view information to be configured.
17. The device according to claim 16, wherein: The base class determination module also includes: An element determination submodule, configured to determine an element to be configured in the data source protocol of the business module; The data source base class determination submodule is configured to determine the business module data source base class corresponding to the business module data source protocol based on the element to be configured.
18. The device according to claim 14, wherein: The protocol determination module also includes: A rendering rule determination submodule, configured to determine a rendering rule for the view element; The view protocol determination submodule is configured to determine the business module reuse view protocol of the page to be built based on the rendering rule and the communication event.
19. The device according to claim 18, wherein: The base class determination module also includes: A call relationship determination submodule, configured to determine the call relationship of the view elements in the business module multiplexing view protocol; The view base class determination submodule is configured to determine the business module reuse view base class corresponding to the business module reuse view protocol based on the calling relationship.
20. The device according to any one of claims 11 to 19, wherein: The page to be built includes a home page to be built and a sub-page to be built; and The building blocks are further configured to: Determine the target business modules included in the homepage to be built and the subpage to be built; Based on the framework protocol and the base class corresponding to the target business module, the home page to be built and the sub-page to be built are built.
21. An electronic device comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 10.
22. A non-transitory computer-readable storage medium storing computer instructions, the computer instructions being used to cause the computer to execute the method of any one of claims 1-10.
23. A computer program product comprising a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 10.
Citation Information
Patent Citations
System and method based on page componentization
CN107678745A
Page building processing method, device and system
CN108170428A
Servitization framework based on android system and implementation method
CN114840186A
Business processing method and device, electronic equipment and storage medium
CN116795951A
Page building method and related equipment
CN117131306A
