Interface editing method and device, equipment, storage medium and program product
Through the independent configuration and application of block components in the interface editing method, the problem of similar structures but different data display and layout details in traditional interface design is solved, and the interface design efficiency and reusability of block components are improved.
Patent Information
- Application Number
- CN202411155053.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-22
- Publication Date
- 2024-11-29
AI Technical Summary
In traditional interface design, areas with similar structures but different data display and layout details need to operate atomic components one by one, resulting in inefficient design, error-prone and time-consuming.
Provide an interface editing method, by displaying the configuration interface of the block component, obtaining target configuration data, configuring the block component based on the data, and adding it to the interface to be edited, realizing the independent configuration and application of the block component, reducing the structure Similar regions of each atomic component operates one by one.
It improves interface design efficiency, enhances the flexibility and scope of application of block components, reduces the operation and time of rebuilding block components due to partial differences, and improves interface design efficiency.
Smart Images

Figure CN119045936A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to an interface editing method, apparatus, computer equipment, computer-readable storage medium, and computer program product. Background Art
[0002] With the wave of digitalization and the widespread popularity of Web applications, the importance of front-end interface design and development efficiency has become increasingly prominent.
[0003] In traditional technology, atomic-level components are first constructed, and then when the page layout is constructed, the atomic-level components are arranged and combined based on actual business needs to form an interface area that meets business needs.
[0004] However, even if there are many areas in the interface with similar structures but different data display and layout details, it is still necessary to operate each atomic-level component one by one and repeatedly. This process is cumbersome, time-consuming, error-prone and inefficient. Summary of the invention
[0005] Based on this, it is necessary to provide an interface editing method, device, computer equipment, computer-readable storage medium and computer program product that can improve interface design efficiency in response to the above technical problems.
[0006] In a first aspect, the present application provides an interface editing method, comprising:
[0007] In response to a block application operation on the interface to be edited, displaying a configuration interface corresponding to the block component to be applied, where the block component to be applied is specified by the block application operation;
[0008] In response to the block configuration operation based on the configuration interface, obtaining target configuration data corresponding to the block component to be applied;
[0009] Configure the application block component based on the target configuration data to obtain the target block component;
[0010] Add the target block component to the editing interface.
[0011] In one embodiment, in response to the block application operation on the interface to be edited, before displaying the configuration interface corresponding to the block component to be applied, the method further includes:
[0012] In response to the layout area selection operation for the to-be-selected interface, extracting the area layout information corresponding to the selected target layout area from the page layout information of the to-be-selected interface;
[0013] Create the block components to be applied based on the regional layout information.
[0014] In one embodiment, creating a block component to be applied based on the regional layout information includes:
[0015] Generate a block data model based on the regional layout information, and map the block data model to block metadata;
[0016] In response to the block information entry operation, obtaining the entered target block information;
[0017] Generate the block components to be applied based on the block metadata and target block information.
[0018] In one embodiment, adding a target block component to the to-be-edited interface includes:
[0019] Obtain the interface data model and interface behavior data of the interface to be edited, as well as the block data model and block behavior data of the target block component;
[0020] When it is detected that there is no conflict between the interface data model and the block data model, and there is no conflict between the interface behavior data and the block behavior data, the target block component is added to the interface to be edited.
[0021] In one embodiment, after obtaining the interface data model and interface behavior data of the interface to be edited, and the block data model and block behavior data of the target block component, the method further includes:
[0022] When the model identification information of the interface data model is consistent with the model identification information of the block data model, and the attribute value of the interface data model is inconsistent with the attribute value of the block data model, it is determined that there is a conflict between the interface data model and the block data model;
[0023] When the model identification information of the interface data model is consistent with the model identification information of the block data model, and the attribute value of the interface data model is consistent with the attribute value of the block data model, it is determined that there is no conflict between the interface data model and the block data model;
[0024] When the model identification information of the interface data model is inconsistent with the model identification information of the block data model, and the name of the interface data model is inconsistent with the name of the block data model, it is determined that there is no conflict between the interface data model and the block data model;
[0025] When the model identification information of the interface data model is inconsistent with the model identification information of the block data model, the name of the interface data model is consistent with the name of the block data model, and the attribute value of the interface data model is inconsistent with the attribute value of the block data model, it is determined that there is a conflict between the interface data model and the block data model;
[0026] When the behavior identification information of the interface behavior data is consistent with the behavior identification information of the block behavior data, and the data value of the interface behavior data is inconsistent with the data value of the block behavior data, it is determined that there is a conflict between the interface behavior data and the block behavior data;
[0027] When the behavior identification information of the interface behavior data is consistent with the behavior identification information of the block behavior data, and the data value of the interface behavior data is consistent with the data value of the block behavior data, it is determined that there is no conflict between the interface behavior data and the block behavior data;
[0028] When the behavior identification information of the interface behavior data is inconsistent with the behavior identification information of the block behavior data, and the name of the interface behavior data is inconsistent with the name of the block behavior data, it is determined that there is no conflict between the interface behavior data and the block behavior data;
[0029] When the behavior identification information of the interface behavior data is inconsistent with the behavior identification information of the block behavior data, the name of the interface behavior data is consistent with the name of the block behavior data, and the data value of the interface behavior data is inconsistent with the data value of the block behavior data, it is determined that there is a conflict between the interface behavior data and the block behavior data.
[0030] In one embodiment, after adding the target block component to the interface to be edited, the method further includes:
[0031] Upon receiving component update data corresponding to the block component to be applied, detecting whether the component update data matches the target configuration data;
[0032] If the component update data does not match the target configuration data, the target block component is updated based on the component update data;
[0033] If the component update data matches the target configuration data, the to-be-updated block component and the target block component corresponding to the component update data are displayed;
[0034] In response to the update selection operation, the target block component is updated based on the component update data.
[0035] In a second aspect, the present application also provides an interface editing device, comprising:
[0036] A display module, for displaying a configuration interface corresponding to the block component to be applied in response to a block application operation on the interface to be edited, where the block component to be applied is specified by the block application operation;
[0037] An acquisition module, used for acquiring target configuration data corresponding to the block component to be applied in response to the block configuration operation based on the configuration interface;
[0038] A configuration module, used to configure the application block component based on the target configuration data to obtain the target block component;
[0039] The adding module is used to add the target block component to the interface to be edited. In a third aspect, the present application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0040] In response to a block application operation on the interface to be edited, displaying a configuration interface corresponding to the block component to be applied, where the block component to be applied is specified by the block application operation;
[0041] In response to the block configuration operation based on the configuration interface, obtaining target configuration data corresponding to the block component to be applied;
[0042] Configure the application block component based on the target configuration data to obtain the target block component;
[0043] Add the target block component to the editing interface.
[0044] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the following steps are implemented:
[0045] In response to a block application operation on the interface to be edited, displaying a configuration interface corresponding to the block component to be applied, where the block component to be applied is specified by the block application operation;
[0046] In response to the block configuration operation based on the configuration interface, obtaining target configuration data corresponding to the block component to be applied;
[0047] Configure the application block component based on the target configuration data to obtain the target block component;
[0048] Add the target block component to the editing interface.
[0049] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:
[0050] In response to a block application operation on the interface to be edited, displaying a configuration interface corresponding to the block component to be applied, where the block component to be applied is specified by the block application operation;
[0051] In response to the block configuration operation based on the configuration interface, obtaining target configuration data corresponding to the block component to be applied;
[0052] Configure the application block component based on the target configuration data to obtain the target block component;
[0053] Add the target block component to the editing interface.
[0054] The above-mentioned interface editing method, device, computer equipment, computer-readable storage medium and computer program product, first, in response to the block application operation for the interface to be edited, display the configuration interface corresponding to the block component to be applied, the block component to be applied is specified by the block application operation, and the block component to be applied is inserted into the interface during the interface editing process; then, by responding to the block configuration operation based on the configuration interface, the target configuration data corresponding to the block component to be applied is obtained, and the block component to be applied is configured based on the target configuration data to obtain the target block component, and the autonomous configuration of the block component in the block component application process is realized; and then, by adding the target block component to the interface to be edited, the configuration and application of the block component in the interface editing process is realized. In this way, regions with similar structures can be generated and stored as block components in advance, and in the interface editing process, the block components can be directly added to the interface without operating each atomic-level component in the region with similar structures one by one, so the interface design efficiency can be effectively improved. On the other hand, for the differences in data display or layout details in the region, adaptive adjustments can be made by configuring the block components, thereby improving the flexibility and scope of application of block component reuse, reducing the operations and time of rebuilding block components due to partial differences, and improving interface design efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0056] Figure 1 A schematic diagram of a flow chart of an interface editing method in one embodiment;
[0057] Figure 2 A schematic diagram of a flow chart of steps for creating a block component to be applied in one embodiment;
[0058] Figure 3 is a flow chart of step S40 in one embodiment;
[0059] Figure 4 A schematic diagram of a flow chart of a component updating step in an embodiment;
[0060] Figure 5 is a structural block diagram of an interface editing device in an embodiment;
[0061] Figure 6FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0062] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0063] In an exemplary embodiment, Figure 1 As shown, an interface editing method is provided. This embodiment takes the method applied to a terminal as an example, wherein the terminal may be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, Internet of Things devices and portable wearable devices. The Internet of Things devices may be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, projection devices, etc. Portable wearable devices may be smart watches, smart bracelets, head-mounted devices, etc. The head-mounted devices may be virtual reality (VR) devices, augmented reality (AR) devices, smart glasses, etc. It is understandable that the method may also be applied to a server, and may also be applied to a system including a terminal and a server, and may be implemented through the interaction between the terminal and the server. In this embodiment, the method includes the following steps S10-S40. Among them:
[0064] Step S10, in response to a block application operation on the interface to be edited, displaying a configuration interface corresponding to the block component to be applied, where the block component to be applied is specified by the block application operation.
[0065] It should be noted that front-end interface design refers to the process of creating a visual interface for interaction between users and digital products, and is a key link in website development and application creation. However, in the daily practice of front-end interface design and development, a common challenge is that although there are many areas in the interface with similar structures but different data display and layout details, they cannot be reused and personalized, further forcing developers to re-customize the design and development interface layout; this process is cumbersome and time-consuming, prone to errors and inefficient, greatly increasing the complexity and cost of operation and maintenance.
[0066] At present, there are mainly two architectural strategies, atomic components and modular components. Atomic components are independent code units that can effectively improve the flexibility and reusability of the code and are suitable for simple business scenarios with a single functional structure. However, when faced with complex and changing business logic, such atomic components will appear to be powerless and it is difficult to independently support the comprehensive needs of complex scenarios. Modular components are a whole composed of multiple atomic components that are carefully arranged and combined, and can work together to achieve a more complex, advanced and feature-rich interface experience; however, designing and implementing modular components requires a certain level of technical skills and experience, and the combination and interaction between the atomic components in the modular components are determined by the developer during the design. The developer's design and writing ability has an important impact on the modular components, and it is usually difficult for other developers to modify or adjust the content they write according to actual business needs, resulting in modular components that can only be reused as a whole. Any differences in details require redesign and layout, such as reuse in different projects; variable data display and interaction requirements in complex businesses; component updates and iterations with the evolution of business logic; possible new features or business changes in the future, etc., modular components are difficult to reuse directly, resulting in reduced efficiency in front-end interface design. On the other hand, even if the coordination between multiple modular components only requires minor adjustments to meet business needs, and the developer has sufficient ability to complete this minor modification, due to the high coupling within the modular components, any modification may trigger a chain reaction, which can easily lead to the modified interface meeting business needs, but with poor performance and requiring a lot of time and labor costs.
[0067] The interface editing method in this embodiment can be applied to a front-end designer deployed on a terminal. The front-end designer is used to assist front-end designers in creating and editing user interface programs, and can provide a visual design environment, allowing designers to build the layout and style of web pages or applications without writing a lot of code.
[0068] Among them, the interface to be edited refers to the interface displayed on the front-end designer, which the designer is currently designing and editing. The block component to be applied refers to the pre-designed and packaged block component. There can be multiple types of block components to be applied. The specific one to be applied on the interface to be edited can be specified by the user based on the current actual needs. The block application operation refers to the operation of specifying the block component to be applied to the interface to be edited, such as a click operation on the block component to be applied, or a drag operation of dragging the block component to be applied in the component bar to the display area of the interface to be edited.
[0069] Exemplarily, when a user is using a front-end designer to edit an interface to be edited, the user can select components from the component bar according to actual needs. When there is a layout area in the interface to be edited that is similar to the block component to be applied, the user can specify the block component to be applied from the component bar to be applied to the interface to be edited. After the front-end designer detects the block application operation of applying the block component to be applied to the interface to be edited, it obtains the initial configuration data of the block component to be applied, loads the initial configuration data into a preset configuration interface, and displays the configuration interface loaded with the initial configuration data of the block component to be applied.
[0070] Step S20, in response to the block configuration operation based on the configuration interface, obtaining target configuration data corresponding to the block component to be applied.
[0071] Among them, the block configuration operation refers to the operation of inputting the configuration data of the block component to be applied through the configuration interface, including operations such as confirming configuration data, deleting configuration data, modifying configuration data, and adding configuration data. The configuration data of the block component to be applied includes at least one of data model, style, page attribute, behavior, etc. The visual block configuration method does not require users to view the underlying data, but only needs to focus on specific business needs, so it can reduce the technical threshold of interface editing. On the other hand, the method of automatically querying and replacing configuration data through the background program to realize configuration data modification can also avoid the situation where users make mistakes when directly editing the underlying data.
[0072] Exemplarily, after displaying the configuration interface corresponding to the block component to be applied, the user can view the initial configuration data of the block component to be applied from the configuration interface, and judge by himself whether the initial configuration data of the block component to be applied meets the current business needs of the interface to be edited. If the initial configuration data of the block component to be applied meets the current business needs of the interface to be edited, the initial configuration data on the configuration interface can be left unchanged, and the configuration data can be confirmed by clicking the OK button on the configuration interface or closing the configuration interface; if the initial configuration data of the block component to be applied does not meet the current business needs of the interface to be edited, one or more data values of the initial configuration data in the configuration interface can be deleted, modified or added according to the current business needs of the interface to be edited, and the modified configuration data can be confirmed by clicking the OK button on the configuration interface or closing the configuration interface. After detecting the operation of confirming the configuration data, the front-end designer obtains the configuration data in the configuration interface, and determines the configuration data in the configuration interface as the target configuration data corresponding to the block component to be applied.
[0073] Step S30, configuring the block component to be applied based on the target configuration data to obtain the target block component.
[0074] For example, after determining the target configuration data, the front-end designer can configure the block component to be applied based on the target configuration data to obtain the target block component that meets the current business needs of the interface to be edited, thereby achieving standardized design and adaptive application of the block component to be applied. In this way, after the block component to be applied is completed, the results can be reused in different projects, different applications or interfaces of the same project. In the case where there is a difference between the block component to be applied and the actual needs, adaptive adjustments can also be made simply and accurately through the configuration interface.
[0075] Step S40, adding the target block component to the interface to be edited.
[0076] Exemplarily, after adaptively adjusting the block component to be applied to obtain a target block component that meets the current business needs of the interface to be edited, the target block component can be merged with the interface to be edited.
[0077] In the above interface editing method, first, in response to the block application operation for the interface to be edited, the configuration interface corresponding to the block component to be applied is displayed, and the block component to be applied is specified by the block application operation, so that the block component is inserted into the interface during the interface editing process; then, by responding to the block configuration operation based on the configuration interface, the target configuration data corresponding to the block component to be applied is obtained, and the block component to be applied is configured based on the target configuration data to obtain the target block component, so that the autonomous configuration of the block component in the block component application process is realized; and then, by adding the target block component to the interface to be edited, the configuration and application of the block component in the interface editing process is realized. In this way, regions with similar structures can be generated and stored as block components in advance, and in the interface editing process, the block components can be directly added to the interface without having to operate each atomic-level component in the region with similar structures one by one, so the interface design efficiency can be effectively improved. On the other hand, for the differences in data display or layout details in the region, adaptive adjustments can be made by configuring the block components, thereby improving the flexibility and scope of application of block component reuse, reducing the operations and time of rebuilding block components due to partial differences, and improving interface design efficiency.
[0078] In an exemplary embodiment, Figure 2 As shown, in response to the block application operation for the interface to be edited, before displaying the configuration interface corresponding to the block component to be applied, steps S01 to S02 are included. Among them:
[0079] Step S01 : in response to a layout area selection operation for a to-be-selected interface, extracting regional layout information corresponding to a selected target layout area from page layout information of the to-be-selected interface.
[0080] It should be noted that the block components to be applied need to be produced and stored before they are actually applied. At present, they can only be produced by designers. If the interface is edited first, or the layout area to be reused appears on the interface designed by other designers, it still needs to be repeated at least once. It is understandable that the production end of the block components to be applied can be the same as or different from the application end, that is, after any block component to be applied is produced, it can be shared with other terminals for use by other terminals in their interface editing process.
[0081] Among them, the interface to be selected can refer to any interface that can be loaded into the front-end designer. The target layout area can be at least a part of the area in the interface to be selected, and the target layout area contains at least one element. The layout area selection operation refers to the operation of selecting a target layout area that can be reused from the interface to be selected, for example, the operation of selecting the target layout area from the interface to be selected, or the operation of entering the boundary coordinates of the target layout area. The regional layout information refers to the data and rules used to define the position, size, alignment and relationship of each element in the area.
[0082] For example, when a user edits any interface or views any interface edited by other users, if a layout area that can be reused or is similar to the actual needs of the current project is found, the currently viewed or edited interface can be used as a candidate interface, and the target layout area can be located and selected from the candidate interfaces. After detecting the layout area selection operation of selecting the target layout area from the candidate interface, the front-end designer can obtain the page layout information of the candidate interface, and based on the location information of the target layout area, parse and extract the regional layout information corresponding to the target layout area from the page layout information.
[0083] Step S02: creating a block component to be applied based on the regional layout information.
[0084] Exemplarily, after determining the regional layout information, the regional layout information can be converted into standardized block metadata of the block component to be applied through a preset block generation program or block generation engine, thereby realizing the creation of the block component to be applied.
[0085] As an example, in response to the block information entry operation, the entered target block information can be obtained, and an association relationship between the target block information and the block metadata can be established. Subsequently, the target block information can be displayed on the front-end designer without displaying the block metadata, which can reduce the technical threshold of interface designers and improve the convenience of making block components. Among them, the target block information can include name, code, etc.
[0086] In this embodiment, through the visual layout area selection operation and the programmatic block component creation steps, it is possible to simplify the block component production operation and lower the technical threshold for interface designers, and to achieve standardization of block metadata, which is beneficial to ensure the accuracy of configuration data modification during subsequent block component application.
[0087] In an exemplary embodiment, based on the regional layout information, creating a block component to be applied includes steps S021 to S023.
[0088] Step S021: Generate a block data model based on the regional layout information, and map the block data model into block metadata.
[0089] Among them, the block data model refers to the abstraction of the data characteristics of at least part of the data in the regional layout information, defining the data source of each element in the block component, the organization of the data, and how the data interacts with the user interface component. The block data model includes but is not limited to a sophisticated business logic model, fixed page constant definitions, dynamically passed in page parameters, and detailed user permission control policies. Each block component can correspond to one or more data models. Block metadata refers to data that describes the properties, functions, dependencies, and other related information of the block component.
[0090] Exemplarily, after obtaining the regional layout information, the role of each element in the layout, the data dependency between them, and the direction of the data flow can be analyzed through the preset layout information parsing algorithm. As an example, the function and purpose of each area or component can be analyzed to identify static content, dynamic content, user input fields, output fields, etc., and then for each element on the page, determine its data type, such as text, number, date, Boolean value, etc., and determine the source of its data, such as database, API, user input, etc. Then, according to the properties of each element in the layout area, build a data model structure, including defining data objects, attributes, associations and constraints, etc.; then describe how data flows between the various components of the page layout, and how users interact with data, and determine the relationship between page elements and data states, and you can get a block data model, and you can also test, verify or otherwise process the block data model according to actual needs. Then, based on the preset conversion rules, the block data model can be mapped to block metadata.
[0091] Step S022, in response to the block information entry operation, obtaining the entered target block information.
[0092] Among them, block information refers to the label information set by users for block components based on actual needs and operational convenience, including name, code, etc. Subsequently, block information can be displayed on the front-end designer without displaying block metadata, which can not only reduce the technical threshold of interface designers, but also improve the convenience of making block components.
[0093] Exemplarily, after detecting an operation of entering block information for a block component to be applied, the target block information entered by the user through the block information entry operation is obtained.
[0094] Step S023: Generate the block component to be applied based on the block metadata and the target block information.
[0095] Exemplarily, after obtaining the block metadata and target area information, an association relationship between the target block information and the block metadata can be established, and the block metadata and the target block information can be stored in the same block component file, thereby realizing the creation of the block component to be applied.
[0096] In this embodiment, a unified conversion rule is used to map block metadata, which can ensure the accuracy and consistency of data, thereby avoiding errors in the process of block component production and editing, and improving the convenience and effectiveness of block component reuse.
[0097] In an exemplary embodiment, Figure 3 As shown, adding the target block component to the interface to be edited includes steps S410 to S420. Among them:
[0098] Step S410, obtaining the interface data model and interface behavior data of the interface to be edited, and the block data model and block behavior data of the target block component.
[0099] It should be noted that since the producer of the block component to be applied and the designer of the interface to be edited may be different, even if they are the same, the production and application of the block component to be applied in different projects or in different scenarios may cause the block component to be applied to conflict with the original content of the interface to be edited when it is applied, resulting in the interface to be edited being unable to be used normally.
[0100] Among them, conflicts include at least one of style conflicts, namespace conflicts, resource loading conflicts, event listener conflicts, and interaction conflicts with existing code or components. The interface data model refers to a data model used to describe the structure and content of the current data in the interface to be edited. The block data model refers to a data model used to describe the structure and content of the data in the target block component. The interface behavior data refers to the response of the interface to be edited when the user interacts with the current content in the interface to be edited, including at least one of event processing, dynamic updates, animations, and transition effects. The block behavior data refers to the response of the interface to be edited when the user interacts with the target block component, including at least one of event processing, dynamic updates, animations, and transition effects.
[0101] Exemplarily, the current interface data model and interface behavior data of the interface to be edited are extracted from the file of the interface to be edited, and the block data model and block behavior data are extracted from the file of the target block component.
[0102] Step S420 , when it is detected that there is no conflict between the interface data model and the block data model, and there is no conflict between the interface behavior data and the block behavior data, the target block component is added to the interface to be edited.
[0103] Exemplarily, it is detected whether there is a conflict between the interface data model and the block data model, and whether there is a conflict between the interface behavior data and the block behavior data. Only when it is detected that there is no conflict between the interface data model and the block data model, and the interface behavior data and the block behavior data do not conflict, it can be determined that there is no conflict between the target block component and the current content of the interface to be edited, and the target block component can be merged into the interface to be edited. When it is detected that there is a conflict between the interface data model and the block data model, or when there is a conflict between the interface behavior data and the block behavior data, the target block component cannot be directly merged into the interface to be edited, and the conflict can be resolved first before merging.
[0104] It is understandable that there may be multiple interface data models, block data models, interface behavior data, and block behavior data. When the number of at least one of the interface data models and block data models is multiple, each interface data model needs to be conflicted with each block data model one by one. When the number of at least one of the interface behavior data and block behavior data is multiple, each interface behavior data needs to be conflicted with each block behavior data one by one.
[0105] As an example, when a conflict is detected between an interface data model and a block data model, or a conflict is detected between interface behavior data and block behavior data, the conflicting interface data and block data can be detected and displayed for the user to compare and view relevant information of the conflict, thereby helping the user resolve the conflict.
[0106] In this embodiment, through conflict detection, it is possible to timely check whether the target block component can be effectively operated after being added to the interface to be edited before the target block component is added to the interface to be edited, thereby resolving the conflict in time, ensuring the effectiveness of the final interface, avoiding the situation where errors are discovered after the entire interface design is completed, and reducing the manpower and time costs required for error correction.
[0107] In an exemplary embodiment, after obtaining the interface data model and interface behavior data of the interface to be edited, and the block data model and block behavior data of the target block component, the method further includes:
[0108] Check whether there is a conflict between the interface data model and the block data model, and check whether there is a conflict between the interface behavior data and the block behavior data.
[0109] Among them, detecting whether there is a conflict between the interface data model and the block data model includes:
[0110] When the model identification information of the interface data model is consistent with the model identification information of the block data model, and the attribute value of the interface data model is inconsistent with the attribute value of the block data model, it is determined that there is a conflict between the interface data model and the block data model;
[0111] When the model identification information of the interface data model is consistent with the model identification information of the block data model, and the attribute value of the interface data model is consistent with the attribute value of the block data model, it is determined that there is no conflict between the interface data model and the block data model;
[0112] When the model identification information of the interface data model is inconsistent with the model identification information of the block data model, and the name of the interface data model is inconsistent with the name of the block data model, it is determined that there is no conflict between the interface data model and the block data model;
[0113] When the model identification information of the interface data model is inconsistent with the model identification information of the block data model, the name of the interface data model is consistent with the name of the block data model, and the attribute value of the interface data model is inconsistent with the attribute value of the block data model, it is determined that there is a conflict between the interface data model and the block data model.
[0114] Exemplarily, the model identification information of the block data model and the model identification information of the interface data model can be obtained first, and the model identification information of the two can be compared to see if they are consistent. If the model identification information of the two is inconsistent, the name of the block data model and the name of the interface data model are obtained, and the names of the two are compared to see if they are consistent; if the names of the two are inconsistent, it can be determined that there is no conflict between the two; if the names of the two are consistent, the attribute value of the block data model and the attribute value of the interface data model are obtained, and the attribute values of the two are compared to see if they are consistent. If the attribute values of the two are consistent, it can be determined that there is a conflict between the two, and the consistent attribute value can also be determined as the conflict attribute value, and conflict resolution prompt information is generated based on the conflict attribute value for the user to resolve the conflict, and if the attribute values of the two are inconsistent, it can be determined that there is no conflict between the two. If the model identification information of the two is consistent, the attribute value of the block data model and the attribute value of the interface data model can be obtained, and the attribute values of the two are compared to see if they are consistent. If the attribute values of the two are consistent, it can be determined that there is a conflict between the two, and the consistent attribute value can also be determined as the conflict attribute value, and conflict resolution prompt information is generated based on the conflict attribute value for the user to resolve the conflict, and if the attribute values of the two are inconsistent, it can be determined that there is no conflict between the two.
[0115] As an example, the data model includes at least one of an input parameter data model, a user permission data model, a page constant data model, a business data model, a style data model, and a page attribute data model. The name of the input parameter data model may be the field corresponding to "parameter name", the name of the user permission data model may be the field corresponding to "authority code", the name of the page constant data model may be the field corresponding to "constant name", the name of the business data model may be the field corresponding to "English name", the name of the style data model may be the field corresponding to "style name", and the name of the page attribute data model may be the field corresponding to "attribute name".
[0116] Among them, detecting whether there is a conflict between the interface behavior data and the block behavior data includes:
[0117] When the behavior identification information of the interface behavior data is consistent with the behavior identification information of the block behavior data, and the data value of the interface behavior data is inconsistent with the data value of the block behavior data, it is determined that there is a conflict between the interface behavior data and the block behavior data;
[0118] When the behavior identification information of the interface behavior data is consistent with the behavior identification information of the block behavior data, and the data value of the interface behavior data is consistent with the data value of the block behavior data, it is determined that there is no conflict between the interface behavior data and the block behavior data;
[0119] When the behavior identification information of the interface behavior data is inconsistent with the behavior identification information of the block behavior data, and the name of the interface behavior data is inconsistent with the name of the block behavior data, it is determined that there is no conflict between the interface behavior data and the block behavior data;
[0120] When the behavior identification information of the interface behavior data is inconsistent with the behavior identification information of the block behavior data, the name of the interface behavior data is consistent with the name of the block behavior data, and the data value of the interface behavior data is inconsistent with the data value of the block behavior data, it is determined that there is a conflict between the interface behavior data and the block behavior data.
[0121] Exemplarily, the behavior identification information of the block behavior data and the behavior identification information of the interface behavior data can be obtained first, and the behavior identification information of the two can be compared to see if they are consistent. If the behavior identification information of the two is inconsistent, the name of the block behavior data and the name of the interface behavior data are obtained, and the names of the two are compared to see if they are consistent; if the names of the two are inconsistent, it can be determined that there is no conflict between the two; if the names of the two are consistent, the data value of the block behavior data and the data value of the interface behavior data are obtained, and the data values of the two are compared to see if the data values of the two are consistent. If the data values of the two are consistent, it can be determined that there is a conflict between the two, and the consistent data value can also be determined as the conflict data value, and conflict resolution prompt information is generated based on the conflict data value for the user to resolve the conflict. If the data values of the two are inconsistent, it can be determined that there is no conflict between the two. If the behavior identification information of the two is consistent, the data value of the block behavior data and the data value of the interface behavior data can be obtained, and the data values of the two are compared to see if the data values of the two are consistent. If the data values of the two are consistent, it can be determined that there is a conflict between the two, and the consistent data value can also be determined as the conflict data value, and conflict resolution prompt information is generated based on the conflict data value for the user to resolve the conflict. If the data values of the two are inconsistent, it can be determined that there is no conflict between the two.
[0122] In an exemplary embodiment, Figure 4 As shown, after adding the target block component to the interface to be edited, the process further includes steps S50 to S80. Among them:
[0123] Step S50, when receiving the component update data corresponding to the block component to be applied, detecting whether the component update data matches the target configuration data.
[0124] It should be noted that with the evolution of business logic, component updates and iterations become complex and time-consuming, especially when there is tight coupling between components, any modification may trigger a chain reaction.
[0125] Among them, component update data refers to configuration data that has been updated compared to the configuration data of the block component to be applied in the previous version. For example, the configuration data of the block component to be applied in the previous version includes A, B, and C. The new version updates configuration data A to configuration data D, then configuration data D is the component update data.
[0126] Exemplarily, the producer or manager of the block component to be applied can perform version updates on the block component to be applied according to actual needs, and send component update data to each application party that has applied the block component to be applied. After receiving the component update data corresponding to the block component to be applied, the application party can first compare the component update data with the target configuration data to determine whether the data required to be updated in the new version has been modified during the application of the block component to be applied. As an example, the data identifiers of the component update data and the target configuration data can be compared to see if they are the same. If they are the same, it can be considered that the two match, and if they are different, it can be considered that the two do not match.
[0127] Step S60: if the component update data does not match the target configuration data, then the target block component is updated based on the component update data.
[0128] Exemplarily, if the component update data does not match the target configuration data, it means that the data required to be updated by the new version has not been modified during the application of the block component to be applied, so the corresponding configuration data in the target block component can be updated based on the component update data.
[0129] As an example, when it is determined that the component update data does not match the target configuration data, the component update information can also be displayed to remind the user that there is a new version of the block component to be applied. After detecting the confirmation update operation for the component update information, the target block component is updated based on the component update data.
[0130] Step S70: If the component update data matches the target configuration data, then the to-be-updated block component and the target block component corresponding to the component update data are displayed.
[0131] Exemplarily, if the component update data matches the target configuration data, it means that the data required to be updated in the new version has been modified during the application of the block component to be applied. In this case, if the update is performed directly, the updated content may not meet the actual needs of the application scenario. Therefore, a new version of the block component to be updated can be rendered based on the component update data, and the block component to be updated can be displayed together with the target block component for users to compare and view, so as to more intuitively and accurately determine whether to update.
[0132] As an example, if the component update data matches the target configuration data, it is possible to first detect whether the update content belongs to a control update within the grid layout or a control type supported by the grid layout based on the component update data. If it is determined that the update content belongs to at least one of a control update within the grid layout and a control type supported by the grid layout, it is not necessary to display the block components to be updated and the target block components corresponding to the component update data, allowing the application to update the target block components based on the component update data, and also allowing other parties such as the management party or the production party to batch update the target block components of the application party based on the component update data; if it is determined that the update content does not belong to an element update within the grid layout and does not belong to an element type supported by the grid layout, then the block components to be updated and the target block components corresponding to the component update data are displayed, and the configuration interface of the target block component can also be displayed, so that the user can adjust the configuration data of the target block component based on the block component to be updated, so that the target block component can be updated smoothly. In this case, other parties such as the management party or the production party are not allowed to batch update the target block components of the application party based on the component update data.
[0133] As an example, if the component update data matches the target configuration data, it is possible to first detect whether the update content belongs to a data model update based on the component update data. If the update content belongs to a data model update, other parties such as managers or producers are not allowed to batch update the target block components of the application based on the component update data.
[0134] Step S80 , in response to the update selection operation, updating the target block component based on the component update data.
[0135] Exemplarily, after detecting that the user selects an update selection operation of the block component to be updated based on the block component to be updated and the target block component, the corresponding configuration data in the target block component can be updated based on the component update data.
[0136] As an example, if it is detected that the user selects the non-update selection operation of the target block component based on the block component to be updated and the target block component, the original configuration data can be retained without updating the block component to be applied.
[0137] In this embodiment, an efficient and flexible seamless upgrade mechanism is provided. When the source block component is changed, the reused block component can be continuously updated iteratively as the source block component is updated, while maintaining the flexibility and controllability of the upgrade process.
[0138] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0139] Based on the same inventive concept, the embodiment of the present application also provides an interface editing device for implementing the interface editing method involved above. The implementation solution provided by the device to solve the problem is similar to the implementation solution recorded in the above method, so the specific limitations in one or more interface editing device embodiments provided below can refer to the limitations of the interface editing method above, and will not be repeated here.
[0140] In an exemplary embodiment, Figure 5 As shown, an interface editing device is provided, including: a display module 502, an acquisition module 504, a configuration module 506 and an adding module 508, wherein:
[0141] A display module 502, for displaying a configuration interface corresponding to a block component to be applied in response to a block application operation on a to-be-edited interface, where the block component to be applied is specified by the block application operation;
[0142] The acquisition module 504 is used to acquire target configuration data corresponding to the block component to be applied in response to the block configuration operation based on the configuration interface;
[0143] A configuration module 506, configured to configure the application block component based on the target configuration data to obtain a target block component;
[0144] The adding module 508 is used to add the target block component to the interface to be edited.
[0145] In an exemplary embodiment, the display module 502 is further configured to:
[0146] In response to the layout area selection operation for the to-be-selected interface, extracting the area layout information corresponding to the selected target layout area from the page layout information of the to-be-selected interface;
[0147] Based on the regional layout information, create the block components to be applied.
[0148] In an exemplary embodiment, the display module 502 is further configured to:
[0149] Generate a block data model based on the regional layout information, and map the block data model to block metadata;
[0150] In response to the block information entry operation, obtaining the entered target block information;
[0151] Generate the block components to be applied based on the block metadata and target block information.
[0152] In an exemplary embodiment, the adding module 508 is further configured to:
[0153] Obtain the interface data model and interface behavior data of the interface to be edited, as well as the block data model and block behavior data of the target block component;
[0154] When it is detected that there is no conflict between the interface data model and the block data model, and there is no conflict between the interface behavior data and the block behavior data, the target block component is added to the interface to be edited.
[0155] In an exemplary embodiment, after obtaining the interface data model and interface behavior data of the interface to be edited, and the block data model and block behavior data of the target block component, the adding module 508 is further used to:
[0156] When the model identification information of the interface data model is consistent with the model identification information of the block data model, and the attribute value of the interface data model is inconsistent with the attribute value of the block data model, it is determined that there is a conflict between the interface data model and the block data model;
[0157] When the model identification information of the interface data model is consistent with the model identification information of the block data model, and the attribute value of the interface data model is consistent with the attribute value of the block data model, it is determined that there is no conflict between the interface data model and the block data model;
[0158] When the model identification information of the interface data model is inconsistent with the model identification information of the block data model, and the name of the interface data model is inconsistent with the name of the block data model, it is determined that there is no conflict between the interface data model and the block data model;
[0159] When the model identification information of the interface data model is inconsistent with the model identification information of the block data model, the name of the interface data model is consistent with the name of the block data model, and the attribute value of the interface data model is inconsistent with the attribute value of the block data model, it is determined that there is a conflict between the interface data model and the block data model;
[0160] When the behavior identification information of the interface behavior data is consistent with the behavior identification information of the block behavior data, and the data value of the interface behavior data is inconsistent with the data value of the block behavior data, it is determined that there is a conflict between the interface behavior data and the block behavior data;
[0161] When the behavior identification information of the interface behavior data is consistent with the behavior identification information of the block behavior data, and the data value of the interface behavior data is consistent with the data value of the block behavior data, it is determined that there is no conflict between the interface behavior data and the block behavior data;
[0162] When the behavior identification information of the interface behavior data is inconsistent with the behavior identification information of the block behavior data, and the name of the interface behavior data is inconsistent with the name of the block behavior data, it is determined that there is no conflict between the interface behavior data and the block behavior data;
[0163] When the behavior identification information of the interface behavior data is inconsistent with the behavior identification information of the block behavior data, the name of the interface behavior data is consistent with the name of the block behavior data, and the data value of the interface behavior data is inconsistent with the data value of the block behavior data, it is determined that there is a conflict between the interface behavior data and the block behavior data.
[0164] In an exemplary embodiment, the interface editing device further includes an updating module, and the updating module is used to:
[0165] Upon receiving component update data corresponding to the block component to be applied, detecting whether the component update data matches the target configuration data;
[0166] If the component update data does not match the target configuration data, the target block component is updated based on the component update data;
[0167] If the component update data matches the target configuration data, the to-be-updated block component and the target block component corresponding to the component update data are displayed;
[0168] In response to the update selection operation, the target block component is updated based on the component update data.
[0169] Each module in the above interface editing device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.
[0170] In an exemplary embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as shown in FIG. Figure 6As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, near field communication (NFC) or other technologies. When the computer program is executed by the processor, an interface editing method is implemented. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.
[0171] Those skilled in the art will understand that Figure 6 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0172] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.
[0173] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0174] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0175] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0176] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0177] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0178] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. An interface editing method, characterized in that: The method comprises: In response to a block application operation on the interface to be edited, displaying a configuration interface corresponding to the block component to be applied, wherein the block component to be applied is specified by the block application operation; In response to the block configuration operation based on the configuration interface, obtaining target configuration data corresponding to the block component to be applied; Configure the block component to be applied based on the target configuration data to obtain a target block component; Add the target block component to the interface to be edited.
2. The method according to claim 1, characterized in that Before displaying the configuration interface corresponding to the block component to be applied in response to the block application operation on the interface to be edited, the method further includes: In response to a layout area selection operation for a to-be-selected interface, extracting regional layout information corresponding to a selected target layout area from page layout information of the to-be-selected interface; Based on the regional layout information, a block component to be applied is created.
3. The method according to claim 2, characterized in that The step of creating a block component to be applied based on the regional layout information includes: Generate a block data model based on the regional layout information, and map the block data model into block metadata; In response to the block information entry operation, obtaining the entered target block information; Based on the block metadata and the target block information, a block component to be applied is generated.
4. The method according to claim 1, characterized in that: The step of adding the target block component to the interface to be edited includes: Acquire the interface data model and interface behavior data of the interface to be edited, and the block data model and block behavior data of the target block component; When it is detected that there is no conflict between the interface data model and the block data model, and that there is no conflict between the interface behavior data and the block behavior data, the target block component is added to the interface to be edited.
5. The method according to claim 4, characterized in that After acquiring the interface data model and interface behavior data of the interface to be edited, and the block data model and block behavior data of the target block component, the method further includes: When the model identification information of the interface data model is consistent with the model identification information of the block data model, and the attribute value of the interface data model is inconsistent with the attribute value of the block data model, it is determined that there is a conflict between the interface data model and the block data model; When the model identification information of the interface data model is consistent with the model identification information of the block data model, and the attribute value of the interface data model is consistent with the attribute value of the block data model, determining that there is no conflict between the interface data model and the block data model; When the model identification information of the interface data model is inconsistent with the model identification information of the block data model, and the name of the interface data model is inconsistent with the name of the block data model, determining that there is no conflict between the interface data model and the block data model; When the model identification information of the interface data model is inconsistent with the model identification information of the block data model, the name of the interface data model is consistent with the name of the block data model, and the attribute value of the interface data model is inconsistent with the attribute value of the block data model, it is determined that there is a conflict between the interface data model and the block data model; When the behavior identification information of the interface behavior data is consistent with the behavior identification information of the block behavior data, and the data value of the interface behavior data is inconsistent with the data value of the block behavior data, it is determined that there is a conflict between the interface behavior data and the block behavior data; When the behavior identification information of the interface behavior data is consistent with the behavior identification information of the block behavior data, and the data value of the interface behavior data is consistent with the data value of the block behavior data, determining that there is no conflict between the interface behavior data and the block behavior data; When the behavior identification information of the interface behavior data is inconsistent with the behavior identification information of the block behavior data, and the name of the interface behavior data is inconsistent with the name of the block behavior data, determining that there is no conflict between the interface behavior data and the block behavior data; When the behavior identification information of the interface behavior data is inconsistent with the behavior identification information of the block behavior data, the name of the interface behavior data is consistent with the name of the block behavior data, and the data value of the interface behavior data is inconsistent with the data value of the block behavior data, it is determined that there is a conflict between the interface behavior data and the block behavior data.
6. The method according to any one of claims 1 to 5, characterized in that: After adding the target block component to the interface to be edited, the method further includes: Upon receiving component update data corresponding to the block component to be applied, detecting whether the component update data matches the target configuration data; If the component update data does not match the target configuration data, updating the target block component based on the component update data; If the component update data matches the target configuration data, then displaying the block component to be updated and the target block component corresponding to the component update data; In response to an update selection operation, the target block component is updated based on the component update data.
7. An interface editing device, characterized in that: The device comprises: A display module, configured to display a configuration interface corresponding to a block component to be applied in response to a block application operation on a to-be-edited interface, wherein the block component to be applied is specified by the block application operation; An acquisition module, configured to acquire target configuration data corresponding to the block component to be applied in response to a block configuration operation based on the configuration interface; A configuration module, configured to configure the block component to be applied based on the target configuration data to obtain a target block component; An adding module is used to add the target block component to the interface to be edited.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
