Detail page generation method and device, storage medium and electronic device
Patent Information
- Application Number
- CN202210887523.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-26
- Publication Date
- 2026-09-18
- Estimated Expiration
- 2042-07-26
AI Technical Summary
[0004]本申请实施例提供了一种详情页的生成方法和装置、存储介质及电子装置,以至少解决相关技术中,详情页的开发效率低下、开发周期长等问题
[0023]In this embodiment, the loading information corresponding to the generation task initiated on the generator is determined; wherein, the loading information is used to indicate the functional operations allowed for the target object based on the details page to be generated; the loading information is used to match the target file in the database; the target file is parsed to determine the page frame of the details page to be generated, and the sub-content for constructing the details page to be generated is loaded from the database according to the target file; the details page to be generated is generated through the page frame and sub-content; by adopting the above technical solution, the problems of low development efficiency and long development cycle of details pages in related technologies are solved. By determining the generation task for instructing the automatic generation of details pages and the loading information corresponding to the generation task on the generator of the details page development platform, the construction information of the details page can be quickly determined from the preset database according to the generation loading information, and then the corresponding details page is generated. Furthermore, since multiple details page construction templates can be preset in the database, the development efficiency of the details page is greatly improved and the development cycle is shortened. Even if there is a detail page development error, the details page can be updated by retrieving the corresponding loading information.
Smart Images

Figure CN115357299B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of smart home technology, and more specifically, to a method and apparatus for generating a details page, a storage medium, and an electronic device. Background Technology
[0002] Currently, the development of the device control details page is done by developers using the IntelliJ IDEA development tool based on front-end programming languages such as Vue and React. This requires certain technical skills and relevant work experience from the developers, and it must also follow the software engineering delivery process, which has a certain delivery cycle. For example, after the device control details page is released, if bugs, feature iterations, or requirement changes occur, the relevant R&D personnel need to modify the relevant code based on the corresponding online code version and go through the version release process again. Therefore, this greatly increases the development cycle of the device control details page, requires developers to have strong coding proficiency, and results in low development efficiency.
[0003] Therefore, no effective solutions have yet been proposed to address the problems of low development efficiency and long development cycles in related technologies for detail pages. Summary of the Invention
[0004] This application provides a method and apparatus for generating a details page, a storage medium, and an electronic device, to at least solve the problems of low development efficiency and long development cycle of details pages in related technologies.
[0005] According to one embodiment of this application, a method for generating a details page is provided, comprising: determining loading information corresponding to a generation task started on a generator; wherein the loading information is used to indicate the functional operations that a target object is allowed to perform based on the details page to be generated; matching a target file in a database using the loading information; parsing the target file, determining the page frame of the details page to be generated, and loading sub-content for constructing the details page to be generated from the database according to the target file; and generating the details page to be generated using the page frame and the sub-content.
[0006] In an exemplary embodiment, before determining the loading information corresponding to the generation task started on the generator, the method further includes: receiving a first instruction sent by the target object to indicate the page type of the details page to be generated; and determining to start the generation task corresponding to the page type on the generator if the page type corresponding to the first instruction exists in multiple preset page types supported by the generator.
[0007] In an exemplary embodiment, before matching a target file in the database using the loading information, the method further includes: obtaining multiple generated historical detail pages and decoupling them to obtain a historical target file and historical sub-content corresponding to each of the multiple generated historical detail pages; and storing the historical target file and the historical sub-content in the database as reference data for data matching with the loading information.
[0008] In an exemplary embodiment, after determining that a generation task corresponding to the page type is started on the generator, the method further includes: receiving a second instruction sent by a target object, wherein the second instruction is used to instruct the target object to perform multiple operation sub-features corresponding to each generation task after starting the generation task; parsing the second instruction, summarizing the multiple operation sub-features in the second instruction, and determining the operation requirements of the generation task, wherein the operation requirements are used to personalize the generation task.
[0009] In an exemplary embodiment, parsing the target file to determine the page frame of the detail page to be generated includes: parsing the target file to obtain the overall structure information of the detail page to be generated and the annotation information of the sub-content to be filled in the overall structure information; loading the overall structure information and the annotation information on a preset display interface to determine the page frame of the detail page to be generated through the loading result.
[0010] In one exemplary embodiment, loading sub-content for constructing the detail page to be generated from the database according to the target file includes: when the sub-content is a component, determining to load at least one of the following information corresponding to the sub-content: component name information, component version information, component event information, component style information, and device function information corresponding to the component; when the sub-content is detail page style data, determining to load at least one of the following information corresponding to the sub-content: detail page font information, detail page color information, and margin information in the detail page.
[0011] In an exemplary embodiment, generating the detail page to be generated using the page frame and the sub-content includes: determining the usage characteristics of the loaded sub-content when it is determined that the page frame is loaded; merging the sub-content and the page frame based on the usage characteristics to obtain a target page; compiling the target page using a preset compilation method to obtain a target resource package; and packaging the target page and the target resource package accordingly to obtain the detail page to be generated.
[0012] In one exemplary embodiment, fusing the sub-content and the page frame based on usage features to obtain a target page includes: when the usage feature is an add feature, filling the corresponding position of the page frame with the sub-content; when the usage feature is an adjust feature, using the sub-content to adjust the overall structure of the page frame; and when the usage feature is a device function feature, verifying whether the device function corresponding to the sub-content is valid, and fusing the valid sub-content into the page frame.
[0013] According to another embodiment of this application, a detail page generation apparatus is also provided, comprising: a determining module, configured to determine loading information corresponding to a generation task initiated on a generator; wherein the loading information is used to indicate the functional operations allowed for a target object based on the detail page to be generated; a matching module, configured to match a target file in a database using the loading information; a loading module, configured to parse the target file, determine the page frame of the detail page to be generated, and load sub-content from the database for constructing the detail page to be generated based on the target file; and a generation module, configured to generate the detail page to be generated using the page frame and the sub-content.
[0014] In one exemplary embodiment, the above apparatus further includes: a first receiving module, configured to receive a first instruction sent by a target object indicating the page type of the details page to be generated; and, if the page type corresponding to the first instruction exists in a plurality of preset page types supported by the generator, determine to start a generation task corresponding to the page type on the generator.
[0015] In one exemplary embodiment, the above apparatus further includes: a decoupling module, configured to decouple multiple generated historical detail pages to obtain a historical target file and historical sub-content corresponding to each of the multiple generated historical detail pages; and to store the historical target file and the historical sub-content in a database as reference data for data matching with the loading information.
[0016] In one exemplary embodiment, the above apparatus further includes: a second receiving module, configured to receive a second instruction sent by a target object, wherein the second instruction is configured to instruct the target object to perform multiple operation sub-features corresponding to each generation task after the generation task is started; parse the second instruction, summarize the multiple operation sub-features in the second instruction, and determine the operation requirements of the generation task, wherein the operation requirements are used to personalize the generation task.
[0017] In an exemplary embodiment, the loading module is further configured to parse the target file to obtain the overall structure information of the details page to be generated and the annotation information of the sub-content to be filled in the overall structure information; load the overall structure information and the annotation information on a preset display interface to determine the page frame of the details page to be generated through the loading result.
[0018] In an exemplary embodiment, the loading module is further configured to, when the sub-content is a component, determine at least one of the following information corresponding to the loading of the sub-content: component name information, component version information, component event information, component style information, and device function information corresponding to the component; and when the sub-content is detail page style data, determine at least one of the following information corresponding to the loading of the sub-content: detail page font information, detail page color information, and margin information in the detail page.
[0019] In an exemplary embodiment, the above-described generation module is further configured to, upon determining that the page frame is loaded, determine the usage characteristics of the loaded sub-content; merge the sub-content and the page frame based on the usage characteristics to obtain a target page; compile the target page using a preset compilation method to obtain a target resource package; and package the target page and the target resource package accordingly to obtain the details page to be generated.
[0020] In an exemplary embodiment, the above-mentioned generation module further includes: a filling unit, configured to fill the sub-content into the corresponding position of the page frame when the usage feature is an addition feature; to adjust the overall structure of the page frame using the sub-content when the usage feature is an adjustment feature; and to verify whether the device function corresponding to the sub-content is valid when the usage feature is a device function feature, and to integrate the valid sub-content into the page frame.
[0021] According to another aspect of the embodiments of this application, a computer-readable storage medium is also provided, wherein a computer program is stored in the computer program, and the computer program is configured to execute the above-described method for generating the details page when it is run.
[0022] According to another aspect of the embodiments of this application, an electronic device is also provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the above-described method for generating a details page through the computer program.
[0023] In this embodiment, the loading information corresponding to the generation task initiated on the generator is determined; wherein, the loading information is used to indicate the functional operations allowed for the target object based on the details page to be generated; the loading information is used to match the target file in the database; the target file is parsed to determine the page frame of the details page to be generated, and the sub-content for constructing the details page to be generated is loaded from the database according to the target file; the details page to be generated is generated through the page frame and sub-content; by adopting the above technical solution, the problems of low development efficiency and long development cycle of details pages in related technologies are solved. By determining the generation task for instructing the automatic generation of details pages and the loading information corresponding to the generation task on the generator of the details page development platform, the construction information of the details page can be quickly determined from the preset database according to the generation loading information, and then the corresponding details page is generated. Furthermore, since multiple details page construction templates can be preset in the database, the development efficiency of the details page is greatly improved and the development cycle is shortened. Even if there is a detail page development error, the details page can be updated by retrieving the corresponding loading information. Attached Figure Description
[0024] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0025] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0026] Figure 1 This is a schematic diagram of the hardware environment for a method of generating a details page according to an embodiment of this application;
[0027] Figure 2 This is a flowchart of a method for generating a details page according to an embodiment of this application;
[0028] Figure 3 This is a schematic diagram of the interface display of the details page development platform according to an embodiment of this application;
[0029] Figure 4 This is a flowchart illustrating a details page packaging process according to an embodiment of this application;
[0030] Figure 5 This is a structural block diagram of a detail page generation apparatus according to an embodiment of this application;
[0031] Figure 6 This is a structural block diagram of an electronic device according to an embodiment of this application. Detailed Implementation
[0032] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present application.
[0033] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0034] According to one aspect of the embodiments of this application, a method for generating a details page is provided. This method is widely applicable to whole-house intelligent digital control application scenarios such as smart homes, smart home ecosystems, smart home device ecosystems, and intelligencehouse ecosystems. Optionally, in this embodiment, the above-mentioned method for generating details pages can be applied to scenarios such as... Figure 1 The hardware environment shown consists of terminal device 102 and server 104. For example... Figure 1 As shown, server 104 is connected to terminal device 102 via a network and can be used to provide services (such as application services) to the terminal or clients installed on the terminal. A database can be set up on the server or independently of the server to provide data storage services for server 104. Cloud computing and / or edge computing services can be configured on the server or independently of the server to provide data processing services for server 104.
[0035] The aforementioned network may include, but is not limited to, at least one of the following: wired network, wireless network. The aforementioned wired network may include, but is not limited to, at least one of the following: wide area network, metropolitan area network, local area network. The aforementioned wireless network may include, but is not limited to, at least one of the following: Wi-Fi (Wireless Fidelity), Bluetooth. The terminal device 102 may not be limited to PC, mobile phone, tablet computer, smart air conditioner, smart range hood, smart refrigerator, smart oven, smart stove, smart washing machine, smart water heater, smart washing equipment, smart dishwasher, smart projector, smart TV, smart clothes rack, smart curtains, smart audio-visual equipment, smart socket, smart speaker, smart speaker box, smart fresh air equipment, smart kitchen and bathroom equipment, smart bathroom equipment, smart robot vacuum cleaner, smart window cleaning robot, smart mopping robot, smart air purifier, smart steam oven, smart microwave oven, smart water heater, smart air purifier, smart water dispenser, smart door lock, etc.
[0036] This embodiment provides a method for generating a details page, applied to the aforementioned computer terminal. Figure 2 This is a flowchart of a method for generating a details page according to an embodiment of this application. The process includes the following steps:
[0037] Step S202: Determine the loading information corresponding to the generation task started on the generator; wherein, the loading information is used to indicate the functional operations that the target object is allowed to perform based on the details page to be generated;
[0038] Step S204: Use the loading information to match the target file in the database;
[0039] Step S206: Parse the target file, determine the page frame of the detail page to be generated, and load the sub-content for constructing the detail page from the database according to the target file;
[0040] It should be noted that the target file mentioned above contains a description of the overall structure of the detail page to be generated. The overall structure includes information such as which component IDs, style IDs, device model IDs, relative positions of components, and relationships between components used in the detail page to be generated. Based on the above overall structure, the page framework of the detail page to be generated can be built, which greatly improves the efficiency of detail page generation.
[0041] Step S208: Generate the details page to be generated using the page frame and the sub-content.
[0042] Through the above steps, the loading information corresponding to the generation task initiated on the generator is determined. This loading information indicates the allowed functional operations of the target object based on the details page to be generated. The loading information is used to match the target file in the database. The target file is parsed to determine the page framework of the details page to be generated, and the sub-content for constructing the details page is loaded from the database based on the target file. The details page to be generated is generated using the page framework and sub-content. This technical solution solves the problems of low development efficiency and long development cycles in related technologies. By determining the generation task for automatically generating the details page and the corresponding loading information on the generator of the details page development platform, the construction information of the details page can be quickly determined from a preset database based on the generation loading information, thereby generating the corresponding details page. Furthermore, since multiple details page construction templates can be pre-set in the database, the development efficiency of the details page is greatly improved, and the development cycle is shortened. Even if errors occur in the details page development, the details page can be updated by retrieving the corresponding loading information.
[0043] In an exemplary embodiment, before determining the loading information corresponding to the generation task started on the generator, the method further includes: receiving a first instruction sent by the target object to indicate the page type of the details page to be generated; and determining to start the generation task corresponding to the page type on the generator if the page type corresponding to the first instruction exists in multiple preset page types supported by the generator.
[0044] It is understandable that since the details page to be generated may have multiple types, and different page types have certain differences, for example, the details page corresponding to device control needs the participation of device model or device corresponding function data, and the details page corresponding to application needs the participation of application function. Therefore, if the generator does not have the corresponding page type generation process, it will not be able to generate the details page quickly.
[0045] As an optional embodiment, before using the loading information to match the target file in the database, the method further includes: obtaining multiple generated historical detail pages and decoupling them to obtain the historical target file and historical sub-content corresponding to each of the multiple generated historical detail pages; and storing the historical target file and the historical sub-content in the database as reference data for data matching with the loading information.
[0046] Understandably, to ensure that the generated detail pages maintain formal consistency with previously generated detail pages and achieve standardization, the database corresponding to the detail page development platform needs to store a certain amount of historical target files and historical sub-content. Specifically, it collects historical detail pages developed through the generator on the detail page development platform and decouples these historical detail pages in reverse according to their generation method. That is, it decomposes the complete historical detail page into historical target files and historical sub-content. The historical target files record the overall structural information of the detail page, while the historical sub-content includes components, styles, and device models on the detail page. In other words, through decoupling, a complete detail page can be decomposed into multiple combined modules. When generating the same detail page again, it is only necessary to flexibly combine the relevant historical target files and historical sub-content to obtain the corresponding detail page.
[0047] In an exemplary embodiment, after determining that a generation task corresponding to the page type is started on the generator, the method further includes: receiving a second instruction sent by a target object, wherein the second instruction is used to instruct the target object to perform multiple operation sub-features corresponding to each generation task after starting the generation task; parsing the second instruction, summarizing the multiple operation sub-features in the second instruction, and determining the operation requirements of the generation task, wherein the operation requirements are used to personalize the generation task.
[0048] After initiating a detail page generation task on the generator corresponding to the detail page development platform, in order to ensure that the generated detail page matches the usage requirements of the target object, the generation task can be adjusted by issuing a second command multiple times. This allows the generation of the detail page to be flexibly adjusted according to the actual usage of the target object, thereby improving the development efficiency of the detail page.
[0049] In an exemplary embodiment, parsing the target file to determine the page frame of the detail page to be generated includes: parsing the target file to obtain the overall structure information of the detail page to be generated and the annotation information of the sub-content to be filled in the overall structure information; loading the overall structure information and the annotation information on a preset display interface to determine the page frame of the detail page to be generated through the loading result.
[0050] In one exemplary embodiment, loading sub-content for constructing the detail page to be generated from the database according to the target file includes: when the sub-content is a component, determining to load at least one of the following information corresponding to the sub-content: component name information, component version information, component event information, component style information, and device function information corresponding to the component; when the sub-content is detail page style data, determining to load at least one of the following information corresponding to the sub-content: detail page font information, detail page color information, and margin information in the detail page.
[0051] In an exemplary embodiment, generating the detail page to be generated using the page frame and the sub-content includes: determining the usage characteristics of the loaded sub-content when it is determined that the page frame is loaded; merging the sub-content and the page frame based on the usage characteristics to obtain a target page; compiling the target page using a preset compilation method to obtain a target resource package; and packaging the target page and the target resource package accordingly to obtain the detail page to be generated.
[0052] For example, the process of generating a detail page is as follows: (1) The target object initiates a generation task for generating a detail page based on the generator on the detail page development platform; (2) The generation task loads the target file applied to describe the overall structure of the detail page. For example, when the detail page is a device control detail page, the overall structure includes information such as which component IDs, component style IDs, device model IDs, relative positions of components, and relationships between components used in the device control detail page; (3) The distribution of different components, styles, and models in the detail page is determined by parsing the target file, and the sub-contents corresponding to different components, styles, and models are filled into the detail page frame corresponding to the current target file to obtain the assembled detail page. It should be noted that during assembly, different components can be initially arranged in the detail page frame according to the component ID, relative position of components, and relationships between components. Furthermore, the display and function of components are adjusted using the component style ID and device model ID so that they can be combined into a complete detail page.
[0053] In one exemplary embodiment, fusing the sub-content and the page frame based on usage features to obtain a target page includes: when the usage feature is an add feature, filling the corresponding position of the page frame with the sub-content; when the usage feature is an adjust feature, using the sub-content to adjust the overall structure of the page frame; and when the usage feature is a device function feature, verifying whether the device function corresponding to the sub-content is valid, and fusing the valid sub-content into the page frame.
[0054] To better understand the process of generating the above-mentioned detail page, the implementation flow of generating the above-mentioned detail page will be described below in conjunction with optional embodiments, but this is not intended to limit the technical solution of the embodiments of this application.
[0055] Currently, the device control details page is developed by developers using the IntelliJ IDEA development tool based on front-end programming languages such as Vue and React. Developers develop relevant front-end code according to the requirements of the details page, and after the code is developed, it needs to be packaged and automatically deployed using Jenkins.
[0056] The current process for developing and packaging device control detail pages is based on front-end development languages such as HTML5, JavaScript, and CSS, then using front-end frameworks like Vue and React, and finally packaging them using tools like Webpack. The drawback of this approach is that detail page developers need to be proficient in the entire packaging and deployment process.
[0057] To improve the development and delivery efficiency of device control detail pages, this embodiment provides a detail page development tool. Through the device control detail page generator (equivalent to the generator summarized in this embodiment) on the detail page development platform, one-click packaging, generation, and publishing of detail pages are provided.
[0058] To better illustrate this invention, it is necessary to refer to the overall description of the detail page development tool for easier understanding. The device control detail page generator depends on a detail page development platform (IDE). Figure 3 This is a schematic diagram of the interface display of the details page development platform according to an embodiment of this application. The details page development platform (IDE) provides developers with a platform that allows them to develop corresponding device control details pages by dragging and dropping. The details page development platform will generate the following content: JSON file, components, styles, and device model of the device control details page;
[0059] As an optional embodiment, Figure 4 This is a flowchart illustrating a detail page packaging process according to an embodiment of this application. The main principle of the above-mentioned detail page generator is as follows:
[0060] Step 1: When a user triggers the generation of the details page, the details page generator will load the corresponding details page JSON, components, styles, and device model; these mainly include the following:
[0061] A. The corresponding JSON file of the device control details page (equivalent to the target file in the embodiment of this invention) is used to describe the overall structure of the device control details page; the overall structure includes information such as which component IDs are used in the device control details page, the style IDs of the components, the device model IDs, the relative positions of the components, and the relationships between the components;
[0062] B. Information about the components used in the device control details page, including component name, component version, component events, component style, and the corresponding device function.
[0063] C. The device control details page uses style data, such as the font, color, and margins of components.
[0064] D. Device functions used in the device control details page;
[0065] E. Images used on the product details page.
[0066] Step 2: After loading, the details page generator generates the corresponding code framework according to the content of the JSON file of the device control details page. The framework assembles the components, styles, and device models used in the details page according to certain rules.
[0067] Step 3: The assembled details page is compiled and run using Node.js to generate the corresponding device control details page resource package.
[0068] It should be noted that when different styles of the same type of detail page need to be generated, the target file and sub-content of the detail page can be adjusted. Changes to the content in the target file complete the overall construction adjustment of the detail page. Changes to the content allow for changes to the different content and styles that need to be displayed within the detail page. Then, the adjusted detail page content is packaged to obtain a new detail page that can be quickly deployed. Therefore, by decoupling the detail page and decomposing it into a first basic module (equivalent to the target file in this embodiment) for recording the overall structure of the detail page, and a second basic module (equivalent to the sub-content in this embodiment) for the sub-content that constitutes the specific content of the detail page, the rapid combination of basic modules enables the rapid generation of detail pages using the same basic modules. This ensures that the detail page can be quickly constructed regardless of any change in any module.
[0069] This embodiment can generate a details page resource package based on the content of the details page JSON file, and then load details page components, styles, and device models. In other words, it decouples the content of the already generated details page through components, styles, and device models. When components, styles, images, or device models change, only repackaging is needed to obtain a new details page. Specifically, it uses a details page generator to dynamically generate details pages from the content of the details page JSON, components, styles, device models, and images, and generates details page resource packages according to certain rules. It improves packaging and publishing efficiency by generating device control details page resource packages with one click; it decouples the basic modules such as components, styles, and device models from the device control details page; and it enables rapid completion of details page construction even if any changes occur in the details page, thus improving the efficiency of details page generation.
[0070] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods of the various embodiments of this application.
[0071] Figure 5 This is a structural block diagram of a detail page generation apparatus according to an embodiment of this application. Figure 5 As shown, it includes:
[0072] The determining module 52 is used to determine the loading information corresponding to the generation task started on the generator; wherein, the loading information is used to indicate the functional operations that the target object is allowed to perform based on the details page to be generated;
[0073] Matching module 54 is used to match target files in the database using the loaded information;
[0074] The loading module 56 is used to parse the target file, determine the page frame of the detail page to be generated, and load the sub-content for constructing the detail page to be generated from the database according to the target file;
[0075] The generation module 58 is used to generate the details page to be generated using the page frame and the sub-content.
[0076] The above-mentioned device determines the loading information corresponding to the generation task initiated on the generator. The loading information indicates the allowed functional operations of the target object based on the details page to be generated. The loading information is used to match the target file in the database. The target file is parsed to determine the page framework of the details page to be generated, and the sub-content for constructing the details page is loaded from the database based on the target file. The details page to be generated is generated using the page framework and sub-content. This technical solution solves the problems of low development efficiency and long development cycles in related technologies. By determining the generation task for automatically generating the details page and the corresponding loading information on the generator of the details page development platform, the construction information of the details page can be quickly determined from a preset database based on the generation loading information, thereby generating the corresponding details page. Furthermore, since multiple details page construction templates can be pre-set in the database, the development efficiency of the details page is greatly improved, and the development cycle is shortened. Even if errors occur in the details page development, the details page can be updated by retrieving the corresponding loading information.
[0077] In one exemplary embodiment, the above apparatus further includes: a first receiving module, configured to receive a first instruction sent by a target object indicating the page type of the details page to be generated; and, if the page type corresponding to the first instruction exists in a plurality of preset page types supported by the generator, determine to start a generation task corresponding to the page type on the generator.
[0078] In one exemplary embodiment, the above apparatus further includes: a second receiving module, configured to receive a second instruction sent by a target object, wherein the second instruction is configured to instruct the target object to perform multiple operation sub-features corresponding to each generation task after the generation task is started; parse the second instruction, summarize the multiple operation sub-features in the second instruction, and determine the operation requirements of the generation task, wherein the operation requirements are used to personalize the generation task.
[0079] In an exemplary embodiment, the loading module is further configured to parse the target file to obtain the overall structure information of the details page to be generated and the annotation information of the sub-content to be filled in the overall structure information; load the overall structure information and the annotation information on a preset display interface to determine the page frame of the details page to be generated through the loading result.
[0080] In an exemplary embodiment, the loading module is further configured to, when the sub-content is a component, determine at least one of the following information corresponding to the loading of the sub-content: component name information, component version information, component event information, component style information, and device function information corresponding to the component; and when the sub-content is detail page style data, determine at least one of the following information corresponding to the loading of the sub-content: detail page font information, detail page color information, and margin information in the detail page.
[0081] In an exemplary embodiment, the above-described generation module is further configured to, upon determining that the page frame is loaded, determine the usage characteristics of the loaded sub-content; merge the sub-content and the page frame based on the usage characteristics to obtain a target page; compile the target page using a preset compilation method to obtain a target resource package; and package the target page and the target resource package accordingly to obtain the details page to be generated.
[0082] In an exemplary embodiment, the above-mentioned generation module further includes: a filling unit, configured to fill the sub-content into the corresponding position of the page frame when the usage feature is an addition feature; to adjust the overall structure of the page frame using the sub-content when the usage feature is an adjustment feature; and to verify whether the device function corresponding to the sub-content is valid when the usage feature is a device function feature, and to integrate the valid sub-content into the page frame.
[0083] Embodiments of this application also provide a storage medium including a stored program, wherein the program executes any of the methods described above when it is run.
[0084] Optionally, in this embodiment, the storage medium may be configured to store program code for performing the following steps:
[0085] S1, determine the loading information corresponding to the generation task started on the generator; wherein, the loading information is used to indicate the functional operations that the target object is allowed to perform based on the details page to be generated;
[0086] S2, Use the loaded information to match the target file in the database;
[0087] S3, parse the target file, determine the page framework of the detail page to be generated, and load the sub-content for constructing the detail page from the database according to the target file;
[0088] S4, generate the details page to be generated using the page frame and the sub-content.
[0089] Embodiments of this application also provide an electronic device including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.
[0090] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor and the input / output device is connected to the processor.
[0091] Optional, such as Figure 6 As shown, the electronic device includes a memory 702 and a processor 704. The memory 702 stores a computer program, and the processor 704 is configured to execute the steps of any of the above method embodiments via the computer program.
[0092] Optionally, in this embodiment, the electronic device may be located in at least one of a plurality of network devices in a computer network.
[0093] Optionally, in this embodiment, the processor can be configured to perform the following steps via a computer program:
[0094] S1, determine the loading information corresponding to the generation task started on the generator; wherein, the loading information is used to indicate the functional operations that the target object is allowed to perform based on the details page to be generated;
[0095] S2, Use the loaded information to match the target file in the database;
[0096] S3, parse the target file, determine the page framework of the detail page to be generated, and load the sub-content for constructing the detail page from the database according to the target file;
[0097] S4, generate the details page to be generated using the page frame and the sub-content.
[0098] Alternatively, as those skilled in the art will understand, Figure 6 The structure shown is for illustrative purposes only. The electronic device can also be a smartphone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, a mobile internet device (MID), a PAD, and other terminal devices. Figure 6 This does not limit the structure of the aforementioned electronic device. For example, the electronic device may also include components that are more... Figure 6 The more or fewer components shown (such as network interfaces, etc.), or having the same Figure 6 The different configurations shown.
[0099] The memory 702 can be used to store software programs and modules, such as the program instructions / modules corresponding to the communication connection method and apparatus in this embodiment. The processor 704 executes various functional applications and data processing by running the software programs and modules stored in the memory 702, thereby realizing the aforementioned communication connection method. The memory 702 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 702 may further include memory remotely located relative to the processor 704, and these remote memories can be connected to the terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof. As an example, such as... Figure 6 As shown, the memory 702 may include, but is not limited to, the determining module 52, matching module 54, loading module 56, and generating module 58 from the communication connection device. Furthermore, it may include, but is not limited to, other module units from the communication connection device, which will not be elaborated upon in this example.
[0100] Optionally, the transmission device 706 described above is used to receive or send data via a network. Specific examples of the network described above may include wired networks and wireless networks. In one example, the transmission device 706 includes a Network Interface Controller (NIC), which can be connected to other network devices and a router via a network cable to communicate with the Internet or a local area network. In one example, the transmission device 1106 is a Radio Frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0101] In addition, the aforementioned electronic device also includes: a display 708 for displaying the aforementioned details page to be generated; and a connection bus 710 for connecting the various module components in the aforementioned electronic device.
[0102] Optionally, in this embodiment, the storage medium may include, but is not limited to, various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0103] Optionally, specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementations, and will not be repeated here.
[0104] Obviously, those skilled in the art should understand that the modules or steps of this application described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. Optionally, they can be implemented using computer-executable program code, thereby storing them in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those presented here, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, this application is not limited to any particular combination of hardware and software.
[0105] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.
Claims
1. A method for generating a details page, characterized in that, include: Determine the loading information corresponding to the generation task started on the generator; Use the loaded information to match the target file in the database; The target file is parsed to determine the page structure framework of the detail page to be generated, and the sub-content for constructing the detail page to be generated is loaded from the database according to the target file; The details page to be generated is generated using the page structure framework and the sub-content; The loading information is used to instruct the user to perform a function operation to control the smart device on the details page to be generated, and the details page to be generated is the device control details page; The page structure framework is used to describe the overall structure information of the details page to be generated. The overall structure information includes component ID, component style ID, device model ID, relative position of components, and the relationship between components.
2. The method for generating a details page according to claim 1, characterized in that, Before determining the loading information corresponding to the generation task started on the generator, the method further includes: Receive the first instruction sent by the target object, which indicates the page type of the details page to be generated; If the page type corresponding to the first instruction exists in multiple preset page types supported by the generator, then the generation task corresponding to the page type is started on the generator.
3. The method for generating a details page according to claim 1, characterized in that, Before using the loaded information to match the target file in the database, the method further includes: Multiple generated historical detail pages are decoupled to obtain the historical target file and historical sub-content corresponding to each of the multiple generated historical detail pages; The historical target file and the historical sub-content are stored in the database as reference data for data matching with the loading information.
4. The method for generating a details page according to claim 1, characterized in that, Parsing the target file to determine the page structure framework of the details page to be generated includes: The target file is parsed to obtain the overall structure information of the details page to be generated and the annotation information of the sub-content to be filled in the overall structure information; The overall structural information and the annotation information are loaded onto a preset display interface to determine the page structure framework of the details page to be generated based on the loading results.
5. The method of claim 1, wherein, Based on the target file, the sub-content used to construct the details page to be generated is loaded from the database, including: When the sub-content is a component, determine at least one of the following information corresponding to the sub-content: component name information, component version information, component event information, component style information, and device function information corresponding to the component; If the sub-content is detail page style data, determine to load at least one of the following information corresponding to the sub-content: font information of the detail page, color information of the detail page, and margin information in the detail page.
6. The method of claim 1, wherein, Generating the details page to be generated using the page structure framework and the sub-content includes: If the page structure framework is determined to be loaded, the usage characteristics of the loaded sub-content are determined; The target page is obtained by fusing the sub-content and the page structure framework based on usage characteristics. The target page is compiled using a preset compilation method to obtain a target resource package; The target page and the target resource package are packaged together to obtain the details page to be generated.
7. The method of claim 6, wherein, The target page is obtained by fusing the sub-content and the page structure framework based on usage characteristics, including: When the feature used is to add a feature, the sub-content is filled into the corresponding position in the page structure frame; When the feature being used is an adjustment feature, the sub-content is used to adjust the overall structure of the page structure framework; When the usage feature is a device function feature, verify whether the device function corresponding to the sub-content is valid, and integrate the valid sub-content into the page structure framework.
8. A detail page generation apparatus, characterized by comprising: include: The determination module is used to determine the loading information corresponding to the generation task started on the generator; The matching module is used to match target files in the database using the loaded information; A loading module is used to parse the target file, determine the page structure framework of the details page to be generated, and load the sub-content from the database to construct the details page to be generated based on the target file; The generation module is used to generate the details page to be generated based on the page structure framework and the sub-content; The loading information is used to instruct the user to perform a function operation to control the smart device on the details page to be generated, and the details page to be generated is the device control details page; The page structure framework is used to describe the overall structure information of the details page to be generated. The overall structure information includes component ID, component style ID, device model ID, relative position of components, and the relationship between components.
9. A computer readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, wherein the program, when executed, performs the method described in any one of claims 1 to 7. 10.An electronic device comprising a memory and a processor, the electronic device characterized by, The memory stores a computer program, and the processor is configured to execute the method described in any one of claims 1 to 7 through the computer program.
Citation Information
Patent Citations
Intelligent device function page configuration method, server and client
CN113590101A
Component identification method and device and electronic equipment
CN114706609A