Interface display method and related device
By determining interface data through interface identification and compiling to generate display resources, the problem of low interface display efficiency in the existing technology is solved, and fast and flexible interface display and editing are achieved.
Patent Information
- Application Number
- CN202410353962.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-25
- Publication Date
- 2025-09-26
AI Technical Summary
In the prior art, the interface display method requires waiting for the resources of the entire project to be compiled before the interface can be viewed, resulting in low interface display efficiency and causing processing and storage pressure on computer equipment.
By obtaining the interface identifier of the specified interface, determining the interface data using the mapping relationship between the interface identifier and the interface data, and compiling the data to generate display resources, a single interface can be quickly displayed.
It improves interface display efficiency, reduces data compilation and storage pressure, supports flexible modification of interface data, and improves the freedom of interface editing and display experience.
Smart Images

Figure CN120704676A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to an interface display method and related devices. Background Art
[0002] A wide variety of computer devices have become an integral part of our daily lives. Through the rich and diverse interfaces provided by these devices, various device functions can be realized. Displaying these interfaces typically requires developers to write the underlying data corresponding to the interface. The computer device then compiles this underlying data to generate the corresponding interface resources, which are then used for display.
[0003] In related technologies, for projects composed of multiple interfaces, the computer device responsible for display needs to first compile the underlying data corresponding to the multiple interfaces provided by the developer to form the complete resources required for the project operation. The computer device needs complete resources to be able to display the interfaces involved in the project, so that the developer can view the various interfaces in the project through the computer device.
[0004] It can be seen from this that the interface display method in the relevant technology can only wait until the resources required for the entire project are compiled before the required interface can be viewed. It is unable to quickly display a single interface, and the interface display efficiency is low, which is not conducive to interface development and editing. At the same time, a large amount of resources need to be compiled when the interface is displayed, which will bring a lot of processing pressure and storage pressure to the computer equipment. Summary of the Invention
[0005] In order to solve the above technical problems, the present application provides an interface display method, which can provide a more convenient interface display function and reduce the processing and storage pressure of the data compiler.
[0006] The embodiments of this application disclose the following technical solutions:
[0007] In a first aspect, an embodiment of the present application discloses an interface display method, the method comprising:
[0008] Obtaining a first-interface display request for a first interface, where the first interface is any one of a plurality of interfaces, the plurality of interfaces being used to constitute a target project, the plurality of interfaces respectively having corresponding interface identifiers and interface data, the first-interface display request including a first interface identifier corresponding to the first interface, the first interface identifier being used to identify the first interface;
[0009] According to the first interface identifier, determining first interface data corresponding to the first interface through a mapping relationship between the interface identifier and the interface data, where the first interface data is used to control display content of the first interface;
[0010] The first interface data is compiled to generate target display resources, where the target display resources are used to display the first interface.
[0011] In a second aspect, an embodiment of the present application discloses an interface display method, the method comprising:
[0012] Obtaining a first-interface display request for a first interface, where the first interface is any one of a plurality of interfaces, the plurality of interfaces being used to constitute a target project, the plurality of interfaces respectively having corresponding interface identifiers and interface data, the first-interface display request including a first-interface identifier corresponding to the first interface and a project identifier corresponding to the target project, the first-interface identifier being used to identify the first interface, the first-interface identifier having a mapping relationship with the first-interface data corresponding to the first interface, the mapping relationship being used to determine the first-interface data, and the project identifier being used to identify the target project;
[0013] The first interface display request is sent to a data compiler corresponding to the project identifier, instructing the data compiler to compile the first interface data and generate a target display resource, where the target display resource is used to display the first interface.
[0014] In a third aspect, the embodiment of the present application discloses an interface display device, which includes a first acquisition unit, a first determination unit and a first generation unit.
[0015] The first acquisition unit is configured to acquire a first interface display request for a first interface, where the first interface is any one of a plurality of interfaces, the plurality of interfaces being used to constitute a target project, the plurality of interfaces respectively having corresponding interface identifiers and interface data, the first interface display request including a first interface identifier corresponding to the first interface, the first interface identifier being used to identify the first interface;
[0016] The first determining unit is configured to determine, based on the first interface identifier and a mapping relationship between the interface identifier and the interface data, first interface data corresponding to the first interface, wherein the first interface data is used to control display content of the first interface;
[0017] The first generating unit is configured to compile the first interface data to generate target display resources, where the target display resources are used to display the first interface.
[0018] In a possible implementation, the first interface is composed of an independent interface portion and a common interface portion, the independent interface portion being an interface portion not possessed by an interface other than the first interface among the multiple interfaces, and an interface other than the first interface among the multiple interfaces including the common interface portion;
[0019] The apparatus further includes a second determining unit, a second generating unit, and a first updating unit:
[0020] The second determining unit is configured to determine the universal interface data corresponding to the universal interface portion;
[0021] The second generating unit is configured to compile the universal interface data to generate universal display resources, wherein the universal display resources are used to display the universal interface portion;
[0022] The first updating unit is configured to update the pre-built presentation resource to the general presentation resource;
[0023] The first generating unit is specifically configured to:
[0024] Compiling the first interface data to generate independent display resources, where the independent display resources are used to display the independent interface portion;
[0025] The target presentation resource is determined according to the pre-built presentation resource and the independent presentation resource.
[0026] In a possible implementation, the apparatus further includes a third determining unit:
[0027] The third determining unit is configured to determine, based on obtaining the first interface presentation request, first update time information of the pre-built presentation resource and second update time information corresponding to the universal interface data, wherein the first update time information is used to indicate a first update time corresponding to a last update of the pre-built presentation resource, and the second update time information is used to indicate a second update time corresponding to a last data update of the universal interface data;
[0028] The first generating unit is specifically configured to:
[0029] Based on the fact that the first update time is later than the second update time, the target presentation resource is determined according to the pre-built presentation resource and the independent presentation resource.
[0030] In a possible implementation, the apparatus further includes a second updating unit and a fourth determining unit:
[0031] The second updating unit is configured to update the pre-built presentation resource according to the universal interface data corresponding to the universal interface part based on the first updating time being no later than the second updating time;
[0032] The fourth determining unit is configured to determine the target presentation resource according to the updated pre-built presentation resource and the independent presentation resource.
[0033] In a possible implementation manner, the second determining unit is specifically configured to:
[0034] Based on data update of the universal interface data, the universal interface data corresponding to the universal interface part is determined.
[0035] In one possible implementation, the general interface portion includes a target control corresponding to the second interface, the target control is used to trigger a control function related to the second interface, the second interface is any one of the multiple interfaces, and the general interface data includes target control generation information corresponding to the second interface;
[0036] The general display resource includes a target control resource corresponding to the second interface, and the target control resource is used to display the target control. The second generating unit is specifically configured to:
[0037] Data is compiled on the target control generation information to generate the target control resource.
[0038] In a possible implementation, the second generating unit is specifically configured to:
[0039] Compiling each control generation information included in the general interface data to generate control resources corresponding to each control generation information, wherein each control generation information includes the target control generation information, and the target control generation information corresponds to the target control resource;
[0040] The second determining unit is specifically configured to:
[0041] Based on a change in the control generation information in the universal interface data, universal interface data corresponding to the universal interface portion is determined.
[0042] In a possible implementation, the target control is used to jump to the second interface.
[0043] In one possible implementation, the first interface includes an associated interface portion, the associated interface portion is used to display associated information associated with a third interface, the third interface is any interface among the multiple interfaces except the first interface, the first interface data includes positioning information, and the positioning information is used to locate the associated information;
[0044] The first generating unit is specifically configured to:
[0045] determining the associated information according to the positioning information;
[0046] Data is compiled based on the associated information to generate associated display resources, where the associated display resources are used to display the associated interface portion.
[0047] In a possible implementation, the apparatus further includes a first construction unit and a storage unit:
[0048] The first constructing unit is configured to construct compilation information corresponding to the plurality of interfaces, wherein the compilation information is used to compile interface data corresponding to the plurality of interfaces;
[0049] The storage unit is used to store the compilation information;
[0050] The first generating unit is specifically configured to:
[0051] The first interface data is compiled using the compilation information to generate the target display resource.
[0052] In a possible implementation, the first interface data includes a plurality of sub-data, the target display resource includes sub-display resources corresponding to the plurality of sub-data, and the sub-display resources corresponding to the plurality of sub-data include sub-display resources of different resource types. The first generating unit is specifically configured to:
[0053] Determine a data compilation plug-in corresponding to a target resource type, wherein the target resource type is a resource type corresponding to a target sub-display resource, the target sub-display resource is a sub-display resource corresponding to a target sub-data, and the target sub-data is any one of the plurality of sub-data;
[0054] The target sub-data is compiled by the data compilation plug-in to generate the target sub-display resource.
[0055] In a possible implementation, the target presentation resource is used to enable the interface presenter to present the first interface, and the first determining unit is specifically configured to:
[0056] Based on the absence of a generated resource corresponding to the first interface identifier in the generated resource set, determining the first interface data corresponding to the first interface according to the first interface identifier and a mapping relationship between the interface identifier and the interface data;
[0057] The device further includes a third updating unit, a second acquiring unit and an indicating unit:
[0058] The third updating unit is configured to update the generated resource corresponding to the first interface identifier in the generated resource set to the target display resource;
[0059] The second acquiring unit is configured to acquire a second interface display request for the first interface, where the second interface display request includes the first interface identifier;
[0060] The instructing unit is configured to instruct an interface presenter to present the first interface through the generated resources corresponding to the first interface identifier based on the generated resources in the generated resource set.
[0061] In a possible implementation, the indicating unit is specifically configured to:
[0062] Determine third update time information corresponding to the first interface data, and fourth update time information corresponding to the generated resource corresponding to the first interface identifier, the third update time information being used to represent the third update time corresponding to the last update of the first interface data, and the fourth update time information being used to represent the fourth update time corresponding to the last update of the generated resource corresponding to the first interface identifier;
[0063] Based on the generated resources corresponding to the first interface identifier in the generated resource set, and the fourth update time is later than the third update time, the interface presenter is instructed to display the first interface through the generated resources corresponding to the first interface identifier.
[0064] In a fourth aspect, an embodiment of the present application discloses an interface display device, comprising a third acquisition unit and a first sending unit:
[0065] The third acquisition unit is configured to acquire a first-interface display request for a first interface, where the first interface is any one of a plurality of interfaces, the plurality of interfaces being used to constitute a target project, the plurality of interfaces respectively having corresponding interface identifiers and interface data, the first-interface display request including a first-interface identifier corresponding to the first interface and a project identifier corresponding to the target project, the first-interface identifier being used to identify the first interface, the first-interface identifier and the first-interface data corresponding to the first interface having a mapping relationship, the mapping relationship being used to determine the first-interface data, and the project identifier being used to identify the target project;
[0066] The first sending unit is configured to send the first interface display request to a data compiler corresponding to the project identifier, instructing the data compiler to compile the first interface data to generate a target display resource, where the target display resource is used to display the first interface.
[0067] In one possible implementation, the data compiler is used to construct and store pre-built information corresponding to the target project, and the pre-built information is used to generate interface display resources corresponding to multiple target interfaces in the target project, where the multiple target interfaces are any multiple interfaces among the multiple interfaces;
[0068] The device further includes a second constructing unit and a second sending unit:
[0069] The second construction unit is configured to, based on obtaining the first interface display request and the absence of a data compiler corresponding to the project identifier, construct a data compiler corresponding to the project identifier, and instruct the data compiler to construct and store the pre-constructed information;
[0070] The second sending unit is configured to send the first interface display request to the data compiler.
[0071] In one possible implementation, the pre-built information includes compilation information, where the compilation information is used to compile interface data corresponding to the multiple target interfaces, where the multiple target interfaces include the first interface, and compiling the first interface data to generate target display resources includes:
[0072] The first interface data is compiled using the compilation information to generate the target display resource.
[0073] In one possible implementation, the first interface is composed of an independent interface portion and a common interface portion, the independent interface portion being an interface portion not possessed by an interface other than the first interface among the multiple interfaces, and the common interface portion being an interface portion shared by multiple target interfaces, the pre-built information including the pre-built presentation resource, and the pre-built presentation resource being used to present the common interface portion;
[0074] The compiling the first interface data to generate target display resources includes:
[0075] Compiling the first interface data to generate independent display resources, where the independent display resources are used to display the independent interface portion;
[0076] The target presentation resource is determined according to the pre-built presentation resource and the independent presentation resource.
[0077] In a possible implementation, the third acquiring unit is specifically configured to:
[0078] Acquire multiple interface display requests, where different interface display requests correspond to different requesting parties, the multiple interface display requests include the first interface display request, and the multiple interface display requests all include the project identifier;
[0079] The sending unit is specifically configured to:
[0080] The multiple interface display requests are sent to a data compiler corresponding to the project identifier, instructing the data compiler to synchronously generate display resources corresponding to the multiple interface display requests respectively, and the target display resource is the display resource corresponding to the first interface display request.
[0081] In a fifth aspect, an embodiment of the present application discloses a computer device, comprising a processor and a memory:
[0082] The memory is used to store a computer program and transmit the computer program to the processor;
[0083] The processor is configured to execute the interface display method described in any one of the first aspects, or execute the interface display method described in any one of the second aspects, according to the instructions in the computer program;
[0084] In a sixth aspect, an embodiment of the present application discloses a computer-readable storage medium, wherein the computer-readable storage medium is used to store a computer program, wherein the computer program is used to execute the interface display method described in any one of the first aspects, or execute the interface display method described in any one of the second aspects;
[0085] In the seventh aspect, an embodiment of the present application discloses a computer program product including a computer program, which, when running on a computer device, enables the computer device to execute the interface display method described in any one of the first aspects, or execute the interface display method described in any one of the second aspects.
[0086] As can be seen from the above technical solution, after the interface data corresponding to the multiple interfaces constituting the target project are compiled, all the interface data will not be directly compiled to construct the target project and display multiple interfaces through the target project. Instead, after obtaining an interface display request for a specified interface, the interface data corresponding to the specified interface can be determined based on the interface identifier corresponding to the specified interface included in the interface display request, and the interface data can be compiled to generate display resources, which are used to display the specified interface. That is, the present application can generate display resources based on the interface data of the specified interface in real time when there is a display demand for the specified interface. On the one hand, there is no need to pre-compile all the interface data and generate a large number of display resources, which reduces the storage pressure of the display resources and avoids wasting too much data compilation performance and storage space when a large number of interfaces do not need to be displayed. At the same time, it improves the display speed for the specified interface. On the other hand, since the display resources are generated based on the interface data obtained in real time, the display resources have higher validity. The author of the interface data can freely update the interface data and quickly preview the updated interface based on the updated interface data, which improves the freedom of interface editing and further optimizes the interface display experience. In addition, since this application does not need to run a project consisting of multiple interfaces when displaying the interface, when only a specified interface needs to be displayed, the data writer does not need to write all the interface data required to complete the project, which reduces the pressure of data writing. BRIEF DESCRIPTION OF THE DRAWINGS
[0087] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0088] Figure 1 A schematic diagram of an interface display method in a related art provided in an embodiment of the present application;
[0089] Figure 2 A schematic diagram of an interface display method in a practical application scenario provided by an embodiment of the present application;
[0090] Figure 3 A flowchart of an interface display method provided in an embodiment of the present application;
[0091] Figure 4 A schematic diagram of an interface display method provided in an embodiment of the present application;
[0092] Figure 5 A flowchart of an interface display method provided in an embodiment of the present application;
[0093] Figure 6 A signaling diagram of an interface display method in a practical application scenario provided by an embodiment of the present application;
[0094] Figure 7 A schematic diagram of an interface display method in a practical application scenario provided by an embodiment of the present application;
[0095] Figure 8 A flowchart of an interface display method in a practical application scenario provided by an embodiment of the present application;
[0096] Figure 9 A schematic diagram of an interface display method in a practical application scenario provided by an embodiment of the present application;
[0097] Figure 10 A structural block diagram of an interface display device provided in an embodiment of the present application;
[0098] Figure 11 A structural block diagram of an interface display device provided in an embodiment of the present application;
[0099] Figure 12 A structural diagram of a terminal provided in an embodiment of the present application;
[0100] Figure 13 A structural diagram of a server provided in an embodiment of the present application. DETAILED DESCRIPTION
[0101] The embodiments of the present application are described below with reference to the accompanying drawings.
[0102] In the computer field, a project usually includes multiple displayable interfaces. For example, a project can be a developed program, application, etc. Different program functions can be triggered through different interfaces. In related technologies, if the data writer wants to view the interface in the project, he needs to first complete the interface data corresponding to all interfaces (such as the markdown document corresponding to the interface, etc.). The data compiler compiles the data based on the complete interface data to obtain the complete display resources corresponding to the project. Based on the complete display resources, the project can be run, so that the interface viewer can view the various interfaces in the project by running the project. For example Figure 1As shown, multiple data writers can use a document editor to write Markdown documents corresponding to multiple interfaces. After the Markdown documents corresponding to all interfaces are written, the document server will be triggered to compile the data and build the static resources corresponding to the project. These static resources are resources that do not change dynamically. The project can be run with these static resources, so that interface viewers can view each interface in the project.
[0103] It can be seen that in the related art, viewing the interface requires waiting for the completion of the compilation of the complete interface data. The interface display speed is slow, which requires a large amount of data compilation performance, and requires the data writer to write a large amount of interface data. At the same time, since the complete project needs to be run before the interface can be displayed, a large amount of storage controls are required to store the complete display resources, which puts a lot of storage pressure on the data writer. In addition, if the data writer wants to modify the interface data and view the updated interface, he needs to resubmit the complete interface data and recompile the complete display resources before he can view the updated interface based on the updated project. The update speed of the interface display is too slow, and the interface display experience is poor.
[0104] In order to solve the above technical problems, the present application provides an interface display method. When there is a display demand for a specified interface in a project, the interface data corresponding to the specified interface can be determined through a mapping relationship based on the interface identifier corresponding to the specified interface, and the display resources for displaying the specified interface can be generated by compiling the interface data, thereby realizing the display of the specified interface. First, the present application does not need to run the entire project, so there is no need to write complete interface data, nor is there any need to wait for the complete interface data to be compiled, which improves the efficiency of interface display; second, the present application does not need to compile and store the complete display resources required to run the project, which reduces the pressure of data compilation and data storage; third, the present application can achieve real-time acquisition of interface data for data compilation when there is a display demand, to display the interface corresponding to the interface data with strong timeliness, thereby supporting flexible modification of interface data, and being able to display the updated interface in a timely manner, thereby improving the interface display experience.
[0105] It is understandable that the method can be applied to a computer device, which is a computer device that can participate in the interface display process, for example, a terminal device or a server. The method can be executed independently by a terminal device or a server, and can also be applied to a network scenario in which a terminal device and a server communicate, and is executed in cooperation with a terminal device and a server. Among them, the terminal device can be a mobile phone, a tablet computer, a laptop computer, a desktop computer and other devices. The terminal device can also include a variety of virtual reality devices, for example, it can include augmented reality (AR) devices, such as AR glasses, AR screens and other devices, and can include virtual reality technology (VR) devices, such as head-mounted VR glasses and other devices. The server can be understood as an application server or a web server. In actual deployment, the server can be a standalone server, a cluster server, or a cloud server.
[0106] In order to facilitate understanding of the technical solution provided by this application, the following will introduce an interface display method provided by this application in combination with an actual application scenario.
[0107] See also Figure 2 , Figure 2 This is a schematic diagram of an interface display method in an actual application scenario provided by an embodiment of the present application. In this actual application scenario, the computer device may be a server 101.
[0108] If the data viewer wants to view interface 2 through terminal device 102, he can initiate a first interface display request to server 101 through terminal device 102. The first interface display request includes a first interface identifier, and the first interface identifier is used to identify interface 2. In this actual application scenario, N interfaces, interface 1 to interface N, are used to constitute the target project. After the interface data corresponding to these N interfaces are submitted to server 101, server 101 does not directly construct the target project, but waits for the interface display request. After obtaining the first interface display request, server 101 can obtain the first interface data corresponding to the first interface identifier in the database through the first interface identifier. The first interface data is the interface data corresponding to interface 2, which is used to control the display content of interface 2.
[0109] The server 101 may compile the first interface data to generate a target display resource, which is used to display interface 2. The server 101 may send the target display resource to the terminal device 101, so that the terminal device 101 displays interface 2 to the interface viewer according to the target display resource, thereby meeting the interface viewer's interface viewing needs.
[0110] It can be seen from the above content that while meeting the interface viewing needs of the interface viewers, on the one hand, the server 101 does not need to compile all the interface data corresponding to the N interfaces, but only needs to compile the first interface data to complete the display of interface 2, which improves the interface display efficiency and reduces the data compilation pressure. At the same time, it also does not require the data writer to completely write the interface data corresponding to each interface of the target project; on the other hand, since there is no need to compile the complete interface data of the target project, a large amount of display resources will not be generated, and the storage pressure of the display resources is relatively small; in addition, since the server 101 obtains the interface data from the database for compilation in real time when there is an interface display demand, the data writer can flexibly edit the interface data in the database, which improves the timeliness of the interface display, can display the updated interface, and improves the interface display effect.
[0111] Next, the interface display method provided by this application will be introduced in conjunction with the accompanying drawings.
[0112] See also Figure 3 , Figure 3 This is a flowchart of an interface display method provided in an embodiment of the present application. In this embodiment, the computer device can be any computer device that can participate in the interface display process. For example, when the computer device is a server, it can compile interface data and send the compiled display resources to the terminal device for interface display. When the computer device is a terminal device, it can display the interface based on the obtained display resources while compiling the interface data. The method includes:
[0113] S301: Obtain a first interface display request for a first interface.
[0114] When there is a need to display the first interface, the computer device can obtain a first interface display request for the first interface. The first interface display request can be obtained from another requesting party, or it can be generated by the computer device itself based on certain trigger adjustments, which is not limited here.
[0115] The first interface can be any one of a plurality of interfaces, and the plurality of interfaces are used to constitute a target project. The project can be any project composed of a plurality of interfaces, such as a website, an application, etc. The plurality of interfaces respectively have corresponding interface identifiers and interface data. That is, when the computer device of the present application is able to obtain the interface data corresponding to the plurality of interfaces used to constitute the target project, it will not directly compile all the interface data to construct the resources required for the project operation. Among them, the interface identifier is used to identify the corresponding interface, and the interface data is used to control the display content of the corresponding interface, such as which information to display, the location of the displayed information, which controls to display, etc., that is, the data writer can construct the required interface by writing interface data, and the interface data can include a variety of data types, such as markdown documents, etc.
[0116] In order to enable the computer device to know the interface that needs to be displayed, the first interface display request may include a first interface identifier corresponding to the first interface, and the first interface identifier is used to identify the first interface.
[0117] S302: Determine first interface data corresponding to the first interface according to the first interface identifier and a mapping relationship between the interface identifier and the interface data.
[0118] In the present application, there is a mapping relationship between the interface identifier and the interface data corresponding to the same interface. Thus, through the first interface identifier, the first interface data for controlling the display content of the first interface can be determined according to the mapping relationship, and the first interface data can be used to compile the display resources required for displaying the first interface. Among them, the first interface data can be stored in the computer device itself or in a storage device other than the computer device, which is not limited here. Through the interface identifier, the accuracy of the interface data obtained by the computer device for data compilation can be guaranteed, and the computer device can be prevented from compiling data based on erroneous interface data.
[0119] As can be seen from this, the present application compiles data from the first interface data acquired in real time when there is a need to display the first interface. Therefore, the acquired first interface data has a strong timeliness, thereby supporting the data writer to flexibly modify the interface data. That is, the computer device can obtain the latest edited first interface data for display when it is necessary to display the first interface, so that changes to the interface data by the data writer can be reflected in the displayed interface in a timely manner, thereby improving the timeliness and effectiveness of the interface display, helping the data writer to promptly understand the interface display effect, and thus more reasonably compiling the interface data.
[0120] S303: Compile the first interface data to generate target display resources.
[0121] The computer device can compile the first interface data to generate a corresponding target display resource through the interface display content represented by the first interface data, and the target display resource is used to display the first interface. That is, the first interface data is not data that can be directly used for interface display. The target display resource is a resource that can be directly used by the interface display party. The interface display party uses the target display resource to display the interface, and can display the display content corresponding to the first interface data, that is, display the first interface. For example, the target display resource can be used to display the interface framework of the first interface, the controls in the first interface, various types of information in the first interface, etc. The first interface data may include the storage address of the information used to be displayed in the first interface, and this part of information can be obtained as a display resource through the first interface data.
[0122] Among them, the interface presenter can be the computer device itself, that is, after completing the compilation of the target display resource, the computer device can directly display the first interface based on the target display resource; the interface presenter can also be a presenter other than the computer device. After generating the target display resource, the computer device can send the target display resource to the interface presenter, so that the interface presenter displays the first interface through the target display resource.
[0123] From the above content, it can be seen that compared with the related art, this application has the following beneficial effects:
[0124] First, the computer device does not need to pre-compile all the interface data and generate a large amount of display resources, which reduces the storage pressure of the display resources and avoids wasting too much data compilation performance and storage space when a large number of interfaces do not need to be displayed.
[0125] Secondly, when there is a demand for displaying a specified interface, this application can generate display resources based on the interface data of the specified interface in real time, so that the interface viewer does not need to wait for the data compilation of multiple interface data, thereby improving the display speed for the specified interface.
[0126] Third, since the display resources are generated based on interface data obtained in real time, the display resources are more effective. The author of the interface data can freely update the interface data and quickly preview the updated interface based on the updated interface data, which improves the freedom of interface editing and further optimizes the interface display experience.
[0127] Fourthly, since this application does not need to run a project consisting of multiple interfaces when displaying an interface, when only a specific interface needs to be displayed, the data writer does not need to write all the interface data required to complete the project, which reduces the pressure of data writing. For example, although the above content explains that the first interface can be any one of multiple interfaces, this application can actually be applied to a single interface as long as the interface has the corresponding interface identifier and interface data, so the application scenario is relatively wide.
[0128] Next, we will introduce the technical details displayed on this application interface in detail.
[0129] First, in order to further improve the efficiency of interface display, the computer device can pre-build some reused resources required for the interface display of multiple interfaces, thereby eliminating the need to rebuild these reused resources every time the interface is built.
[0130] In this application, multiplexed resources may include multiple types, and different types of multiplexed resources will be introduced in detail below.
[0131] First, it is understandable that different interfaces may share common interface portions. For example, to facilitate quick switching between interfaces, navigation controls may be displayed when displaying different interfaces. Triggering these controls allows users to quickly jump to the corresponding interface. Based on this, in one possible implementation, a computer device may pre-build these display resources that are common to multiple interfaces to increase the speed of generating interface display resources.
[0132] Taking the first interface as an example, in this implementation, the first interface is composed of an independent interface part and a general interface part. The independent interface part is an interface part that is not possessed by the interfaces other than the first interface among the multiple interfaces, that is, the interface part that is only displayed when the first interface is displayed; among the multiple interfaces, in addition to the first interface, there are interfaces that include a general interface part, that is, the interface part that is not only displayed when the first interface is displayed.
[0133] Before receiving a first interface display request for the first interface, i.e., before requesting the display of the first interface, the computer device may first determine the general interface data corresponding to the general interface portion. This general interface data is used to control the display content of the general interface portion. The computer device may then compile the general interface data to generate general display resources, which are used to display the general interface portion.
[0134] The computer device can update pre-built display resources to general display resources. Pre-built display resources are display resources pre-stored by the computer device before the interface display is performed. By updating pre-built display resources to general display resources, the general display resources can be pre-stored. When the display resources corresponding to the interface including the general interface portion need to be compiled, the pre-generated general display resources can be directly obtained without repeated compilation.
[0135] When executing step S303, the computer device may execute steps S3031-S3032 (not shown in the figure). Steps S3031-S3032 are a possible implementation of step S303, including:
[0136] S3031: Compile the first interface data to generate independent display resources.
[0137] Through the first interface data, the computer device can obtain the display content of the independent interface part, so as to perform corresponding data compilation and obtain the display resources required to display the display content, that is, independent display resources, which are used to display the independent interface part.
[0138] S3032: Determine target presentation resources based on pre-built presentation resources and independent presentation resources.
[0139] It can be seen from the above process that the pre-built display resources can be used to display the general interface part of the first interface, and the independent display resources can be used to display the independent interface part of the first interface. Therefore, based on the pre-built display resources and the independent display resources, the target display resources can be determined so that the target display resources can be used to display the complete first interface.
[0140] It can be seen from this that this application only needs to compile data once for the common interface part in multiple interfaces. There is no need to repeatedly compile the common interface data every time the common interface part needs to be displayed. It is only necessary to obtain the compiled pre-built display resources, which further improves the interface display efficiency.
[0141] It is understandable that, since this application supports flexible modification of interface data, the author of the interface data may modify the general interface data. Since the pre-built display resources used in the above method are compiled and generated based on the general interface data determined at the time of the update, when the general interface data is updated, if the pre-built display resources are not updated in a timely manner, the pre-built display resources may not be accurately used to display the general interface part. Based on this, in one possible implementation method, when a computer device displays an interface through a pre-built display resource, it can first determine whether the pre-built display resource has a strong timeliness.
[0142] Based on obtaining the first interface display request, the computer device may determine first update time information for the pre-built display resource and second update time information corresponding to the universal interface data, wherein the first update time information is used to indicate the first update time corresponding to the last update of the pre-built display resource, and the second update time information is used to indicate the second update time corresponding to the last data update of the universal interface data. Specifically, if the pre-built display resource is the display resource corresponding to the universal interface data currently corresponding to the universal interface portion, the update time of the last update of the pre-built display resource should be later than the time corresponding to the last data update of the universal interface data, i.e., the pre-built display resource was updated promptly after the universal interface data was updated. Conversely, if the update time of the last update of the pre-built display resource is not later than the time corresponding to the last data update of the universal interface data, it indicates that the pre-built display resource was not updated promptly after the universal interface data was updated, resulting in the universal interface portion displayed by the pre-built display resource possibly not being consistent with the display content controlled by the universal interface data.
[0143] Based on this, when executing step S3032, the computer device may execute step S30321 (not shown in the figure). Step S30321 is a possible implementation of step S3032, including:
[0144] S30321: Based on the first update time being later than the second update time, determine the target presentation resource according to the pre-built presentation resources and the independent presentation resources.
[0145] From the above analysis, it can be seen that if the first update time is later than the second update time, the pre-built display resource is likely to be the display resource corresponding to the current general interface data, so that the general interface part can be accurately displayed through the pre-built display resource, thereby ensuring the accuracy of the first interface display.
[0146] It can be seen that this implementation method can ensure the accuracy of interface display when performing interface display based on pre-built display resources, and avoid performing interface display based on invalid pre-built display resources.
[0147] Similarly, in one possible implementation, if the first update time is no later than the second update time, i.e., if the pre-built display resource is not updated in a timely manner, to ensure the accuracy of the target display resource, the computer device may update the pre-built display resource based on the general interface data corresponding to the general interface portion, i.e., recompile and generate the general display resource based on the current general interface data, and update the pre-built display resource to the general display resource. This allows the general interface portion displayed based on the updated pre-built display resource to align with the display content controlled by the current general interface data. Furthermore, the computer device can determine the target display resource based on the updated pre-built display resource and the independent display resource, so that the first display interface displayed based on the target display resource conforms to the display content controlled by the current interface data.
[0148] In addition to updating pre-built display resources when there is an interface display requirement, in one possible implementation, the computer device can also proactively update the pre-built display resources when the general interface data is updated. When determining the general interface data corresponding to the general interface portion, the computer device can perform a data update based on the general interface data to determine the general interface data corresponding to the general interface portion, thereby ensuring that the determined general interface data is highly timely. When the pre-built display resources are updated based on this general interface data, the pre-built display resources can meet the control of the current general interface data on the display content of the general interface portion, thereby meeting the interface display requirements of the data author.
[0149] The universal interface portion may include various types, and different universal interface portions may have different interface functions. For example, in one possible implementation, the universal interface portion may be used to trigger control functions related to an interface that is not currently displayed, thereby enabling the interface viewer to obtain information related to other undisplayed interfaces through the universal interface portion while viewing the first interface.
[0150] For example, the general interface portion may include a target control corresponding to the second interface. The target control is used to trigger a control function related to the second interface. The control function may include multiple functions, such as displaying information related to the interface, jumping to a corresponding interface, etc. The second interface is any one of the multiple interfaces, for example, it can be an interface other than the first interface. The second interface can also be the first interface itself. For example, some information related to the first interface can be displayed through the target control, thereby enhancing the interface viewer's understanding of the first interface. In order to display the target control, the general interface data may include target control generation information corresponding to the second interface. The target control generation information is used to control the display of the target control in the general interface portion. Through the target control generation information, the computer device can learn how to compile data to obtain a control resource for displaying the target control. When compiling the general interface data to generate the general display resource, the computer device can compile the target control generation information to generate the target control resource, so that the general display resource can include the target control resource corresponding to the second interface, and the target control resource is used to display the target control.
[0151] It is understandable that in order to further increase the amount of information that can be obtained through the current display interface, controls corresponding to multiple interfaces can be displayed in the general interface part, so as to trigger the control functions related to multiple interfaces respectively through the current interface, thereby understanding the information of multiple interfaces. Therefore, when compiling the target control generation information and generating the target control resources, the computer device can compile the data of each control generation information included in the general interface data and generate the control resources corresponding to each control generation information. Each control generation information includes the target control generation information, that is, the target control generation information can be any one of the control generation information included in the general interface data, and the target control generation information corresponds to the target control resource, that is, the mapping relationship here is that the control generation information corresponds to the control resource generated based on the control generation information.
[0152] Therefore, if the data author wishes to add new control functionality to the general interface portion, allowing viewers to access more information related to the interface through the general interface portion, they can add new control generation information to the general interface data. Based on this, to ensure that the displayed general interface portion is consistent with the display content controlled by the general interface data, the computer device can use changes in the control generation information as a condition to trigger the update of the pre-built display resources.
[0153] When determining the universal interface data corresponding to the universal interface portion, the computer device may determine the universal interface data corresponding to the universal interface portion based on changes to the control generation information in the universal interface data, thereby ensuring that the pre-built display resources updated based on the universal interface data include the controls currently displayed and controlled by the universal interface data. Changes to the control generation information may include the addition, deletion, and editing of information, which are not limited herein.
[0154] Of course, similar to the principle of this implementation, if other information in the universal interface data changes, in order to ensure the timeliness of the pre-built display resources, the computer device can actively obtain new universal interface data to update the pre-built display resources.
[0155] As mentioned above, the control of the present application can have multiple control functions. For example, in one possible implementation, the target control can be used to jump to the second interface, that is, the target control provides a jump function between interfaces. Figure 4 As shown, the general interface section displays controls corresponding to the ten interfaces 1 to 10. When interface 1 is displayed, the displayed interface includes the independent interface section corresponding to interface 1 and the general interface section. Based on the triggering operation on the control corresponding to interface 2, the display of interface 2 can be triggered, including the independent interface section corresponding to interface 2 and the general interface section.
[0156] In this application, combined with the above content, it can be seen that the trigger operation of the control corresponding to interface 2 can be used to initiate an interface display request for interface 2, thereby triggering real-time compilation of display resources of the independent interface part corresponding to interface 2.
[0157] It can be understood that in addition to the general interface part, the displayed interface may also include some information related to other interfaces. For example, the interface address, interface name and other information of other interfaces may be displayed in the first interface. The following will introduce the method of generating the display resources corresponding to this related information.
[0158] In one possible implementation, the first interface includes an associated interface portion, which is used to display associated information associated with a third interface, where the third interface is any interface among the multiple interfaces other than the first interface. In this implementation, since this associated information is information associated with the third interface, it is typically stored in the interface data corresponding to the third interface during data editing. The advantage of this information storage location is that when the data editor modifies the interface data corresponding to the third interface, the information associated with the third interface displayed in other interfaces can be modified simultaneously, eliminating the need for the data editor to edit multiple copies of data, thereby improving the convenience of data editing.
[0159] In order for the computer device to successfully display the associated interface portion when displaying the first interface, the first interface data may include positioning information, which is used to locate the associated information. For example, the positioning information may include an interface identifier corresponding to the third interface, so that the computer device can determine the interface data corresponding to the third interface based on the interface identifier and obtain the required associated information from it.
[0160] When executing step S303, the computer device may execute steps S3033-S3034 (not shown in the figure). Steps S3033-S3034 are a possible implementation of step S303, including:
[0161] S3033: Determine associated information based on the positioning information.
[0162] The computer device can locate the associated information in the third interface data through the positioning information, thereby obtaining the associated information for data compilation. For example, the positioning information can be routing information, which can be used to locate the third interface data and obtain the associated information.
[0163] S3034: Compile data based on the associated information to generate associated display resources, which are used to display the associated interface part.
[0164] It can be seen from the above content that the present application can support the display of information associated with multiple interfaces in one interface, thereby improving the amount of information and richness of the information displayed on the interface. At the same time, since only positioning information needs to be added when writing the first interface data, and the corresponding storage location usually does not change when the associated information changes, even if the associated information changes, the computer device can still determine the associated information through the positioning information. Therefore, for the first interface data, the data writer does not need to change the first interface data when the third interface data changes, which improves the convenience of data editing. At the same time, it also supports the data writer to freely change the associated information in the third interface, which improves the flexibility of data editing. In addition, since the associated information is obtained in real time when there is an interface display demand, it can ensure that the displayed associated information is information with strong timeliness, thereby ensuring the accuracy of the interface display.
[0165] The above content introduces the first type of pre-built information, namely pre-built display resources; next, the second type of pre-built information will be introduced. It is understandable that data compilation usually requires some compilation information, such as dependency libraries, Vue frameworks, Vue routing (Vue-route), etc. These compilation information may have different information contents to be configured in different data compilation scenarios. Therefore, in one possible implementation method, the computer device can pre-build these compilation information to avoid the need to temporarily build the compilation information each time when the actual interface is displayed, which reduces the speed of interface compilation.
[0166] Before obtaining the first interface display request for the first interface, that is, before having an actual interface display requirement, the computer device may first construct compilation information corresponding to multiple interfaces, and the compilation information is used to compile the interface data corresponding to the multiple interfaces. The computer device can store the compilation information, so that when data compilation is required, it can directly obtain the already constructed compilation information without having to re-construct the compilation information. For example, when executing step S303, the computer device can execute step S3035 (not shown in the figure), which is a possible implementation of step S303, including:
[0167] S3035: Compile the first interface data using the compilation information to generate target display resources.
[0168] By compiling the information, the computer device can perform compilation operations such as data reading, data understanding, and data processing on the first interface data, thereby accurately analyzing the display content controlled by the first interface data and accurately generating corresponding target display resources.
[0169] It's understandable that the same interface may involve multiple display resources. For example, a single interface can display multiple display elements, such as controls, images, and text. Different display elements typically correspond to different types of display resources. Furthermore, the compilation methods for interface data corresponding to different types of display resources may vary. For example, the compilation methods for display frameworks (such as the Vue framework) and image resources required for displaying an interface differ.
[0170] In one possible implementation, to support interface presentations that include multiple presentation resources, a computer device may construct multiple data compilation plug-ins, each of which can be used to generate at least one presentation resource. The first interface data may include multiple sub-data, each of which can be used to generate a type of presentation resource. The target presentation resource includes sub-display resources corresponding to the multiple sub-data. The sub-display resources corresponding to the multiple sub-data include sub-display resources of different resource types. The sub-display resources corresponding to the sub-data are presentation resources generated by compiling the sub-data.
[0171] When executing step S303, the computer device may execute steps S3036-S3037 (not shown in the figure). Steps S3036-S3037 are a possible implementation of step S303, including:
[0172] S3036: Determine the data compilation plug-in corresponding to the target resource type.
[0173] The target sub-display resource is the sub-display resource corresponding to the target sub-data. The target sub-data can be any one of multiple sub-data. The target sub-display resource is a display resource generated by compiling the target sub-data. The target resource type is the resource type corresponding to the target sub-display resource. The computer device can call the data compilation plug-in corresponding to the target resource type to compile the target sub-data.
[0174] S3037: Compile the target sub-data through the data compilation plug-in to generate target sub-display resources.
[0175] Through this method, on the one hand, it can support the resource generation of multiple display resources, thereby supporting diversified interface displays and improving the versatility of the interface display method; on the other hand, since different types of display resources are generated by different data compilation plug-ins, it is possible to achieve synchronous generation of multiple types of display resources, further improving the interface display speed and bringing a better interface display experience.
[0176] In addition to real-time generation of display resources, the computer device can also provide other interface display methods. For example, if an interface display request for the first interface has been obtained in a historical period, it means that the first interface is an interface with a higher display demand than other interfaces that have not obtained targeted interface display requests. Therefore, in one possible implementation method, in order to provide a more efficient interface display experience for these interfaces with higher display demands, the computer device can also store these display resources after generating the display resources for this part of the interface, so that it can be directly displayed when there is a display demand for this part of the interface in the future.
[0177] In this implementation, the target display resource is specifically used to enable the interface presenter to display the first interface. The interface presenter can be the computer device itself or a device other than the computer device. When executing step S302, the computer device can execute step S3021 (not shown in the figure). Step S3021 is a possible implementation of step S302, including:
[0178] S3021: Based on the generated resource set that does not have a generated resource corresponding to the first interface identifier, determine the first interface data corresponding to the first interface according to the first interface identifier and through the mapping relationship between the interface identifier and the interface data.
[0179] The computer device can construct a generated resource set, which is used to store display resources generated in a historical period, that is, generated resources. Among them, the generated resources have corresponding interface identifiers, so that it can be identified which interface the generated resources are used to display. After obtaining a display request for the first interface, the computer device can first determine whether there are generated resources corresponding to the first interface identifier in the generated resource set. If so, it can directly obtain the generated resources corresponding to the first interface identifier and instruct the interface display party to display the first interface based on the generated resources, without the need to repeatedly compile data for the first interface.
[0180] Based on the fact that there is no generated resource corresponding to the first interface identifier in the generated resource set, according to the first interface identifier, it means that there is no generated display resource for displaying the first interface. At this time, the computer device can further execute the step of determining the first interface data corresponding to the first interface according to the first interface identifier through the mapping relationship between the interface identifier and the interface data, so as to generate the target display resource to display the first interface.
[0181] In addition, in order to ensure the validity of the generated resource set, the computer device can update the generated resource corresponding to the first interface identifier in the generated resource set to the target display resource after generating the target display resource, so that the target display resource can be stored. The update here can include two situations. One is that there is no generated resource corresponding to the first interface identifier in the generated resource set, then the target display resource can be directly used as the generated resource corresponding to the first interface identifier; the other is that there is a generated resource corresponding to the first interface identifier in the generated resource set, but for some reason the generated resource is not used this time. At this time, since the target display resource is a newly generated display resource based on the first interface data obtained in real time, it has stronger real-time and validity than the stored generated resource. Therefore, the computer device can replace the stored generated resource with the target display resource to complete the update.
[0182] The computer device may continue to obtain a second interface display request for the first interface, the second interface display request including the first interface identifier. At this time, the computer device may again determine whether the generated resource set includes a generated resource corresponding to the first interface identifier. Based on the generated resource set including the generated resource corresponding to the first interface identifier, the computer device may instruct the interface presenter to display the first interface using the generated resource corresponding to the first interface identifier, without the need for further data compilation.
[0183] As can be seen from the above technical content, this application can store display resources after they are generated for some interfaces with large display requirements. Therefore, when repeatedly obtaining interface display requests for these interfaces, the interface can be displayed directly based on the generated resources without the need for repeated generation, thereby improving the interface display speed. The difference between this implementation method and the related technology is that the related technology does not distinguish whether the interface has a strong display requirement, and will generate and store resources for each interface. Therefore, the resource storage pressure of the implementation method of this application is relatively small, and to a certain extent, it also saves the consumption of data compilation resources.
[0184] Of course, the computer device may also delete the display resources after the display resources are generated and the interface display is completed to save its own storage space.
[0185] Furthermore, as mentioned above, this application supports flexible updates to interface data. However, updating interface data may invalidate stored display resources and render the displayed interface inaccurate. Based on this, in one possible implementation, a computer device may analyze the timeliness of generated resources based on the update times corresponding to the interface data and the generated resources.
[0186] When executing the step of instructing the interface display party to display the first interface through the generated resources corresponding to the first interface identifier based on the generated resources corresponding to the first interface identifier in the generated resource set, the computer device can determine the third update time information corresponding to the first interface data and the fourth update time information corresponding to the generated resources corresponding to the first interface identifier. The third update time information is used to represent the third update time corresponding to the last update of the first interface data, and the fourth update time information is used to represent the fourth update time corresponding to the last update of the generated resources corresponding to the first interface identifier. If the generated resource is a display resource generated based on the first interface data after the last update, the fourth update time should be later than the third update time; if the fourth update time is earlier than the third update time, it means that after the first interface data is updated, the generated resource corresponding to the first interface identifier has not been updated, so the generated resource corresponding to the current first interface identifier is most likely an invalid display resource.
[0187] In summary, the computer device can instruct the interface display party to display the first interface through the generated resources corresponding to the first interface identifier based on the generated resources in the generated resource set, and the fourth update time is later than the third update time, thereby ensuring that the generated resources can fit the display content controlled by the current first interface data, and further ensuring that the first interface can be accurately displayed through the generated resources. Conversely, if the fourth update time is not later than the third update time, the interface display is based on the generated resources, but the first interface data is re-acquired for data compilation. In this way, while improving the efficiency of interface display, the accuracy of interface display is guaranteed.
[0188] In this application, the computer devices participating in the interface display may include not only the computer devices mentioned above that perform data compilation and serve as data compilers, but may also include computer devices that manage the devices used for data compilation. The computer devices will be introduced in detail below.
[0189] See also Figure 5 , Figure 5 A flowchart of an interface display method provided in an embodiment of the present application, the method comprising:
[0190] S501: Obtain a first interface display request for a first interface.
[0191] Among them, the first interface is any one of multiple interfaces, multiple interfaces are used to constitute the target project, and multiple interfaces respectively have corresponding interface identifiers and interface data. The first interface display request includes the first interface identifier corresponding to the first interface and the project identifier corresponding to the target project. The first interface identifier is used to identify the first interface. The first interface identifier and the first interface data corresponding to the first interface have a mapping relationship. The mapping relationship is used to determine the first interface data, and the project identifier is used to identify the target project.
[0192] S502: Sending a first interface display request to a data compiler corresponding to the project identifier, instructing the data compiler to compile the first interface data to generate target display resources.
[0193] After the first interface display request is sent to the data compiler, it can be seen from the above scheme that the data compiler can determine the first interface data through the first interface identifier, so that the first interface data can be compiled to generate the target display resources for displaying the first interface, thereby realizing the display of the first interface.
[0194] That is, in this application, the data compilers used for data compilation can correspond to projects, that is, each data compiler has a project responsible for data compilation, so that the data compilers can perform the corresponding configuration work to generate the display resources for the corresponding project, such as building some compilation information, pre-building display resources, etc. Furthermore, this allows the data compilers to efficiently build the interface display resources for the corresponding project. At the same time, this application can use different data compilers for data compilation for different projects, thereby achieving parallel compilation of multiple projects, and can ensure high data compilation efficiency and accuracy for the display resources of each project, with faster interface display speed in multi-project scenarios.
[0195] Among them, the computer device and the data compiler in the embodiment of the present application can be the same computer device, that is, the data compiler can be a component in the computer device, etc., and the computer device can assign the interface display request to the component for data compilation; the computer device and the data compiler can also be different computer devices, and the interface display request can be sent to the data compiler for data compilation through information transmission between computer devices.
[0196] Next, we will introduce in detail the pre-processing work done by the data compiler for data compilation.
[0197] As can be seen from the above, a computer device acting as a data compiler can pre-build and store a variety of pre-built information, such as compilation information and pre-built display resources. However, for different projects, since the corresponding data compilation environments and included interfaces may vary, the required pre-built information may also vary. Therefore, the data compilers corresponding to different projects will vary. Based on this, in one possible implementation, the computer device can reasonably control the data compilers, ensuring that each project has a designated data compiler responsible for data compilation, thereby enabling the efficient construction of each project's display resources based on the pre-built information from the designated data compiler.
[0198] In this implementation, the data compiler can construct and store pre-built information corresponding to the target project. This pre-built information is used to generate interface display resources corresponding to multiple target interfaces in the target project. This pre-built information is information that has been constructed and stored before data compilation. This eliminates the need to repeatedly construct this information each time data is compiled for a target interface, speeding up interface display. The multiple target interfaces can be any number of interfaces.
[0199] After receiving a request to display a first interface, the computer device may analyze whether the project identifier has a corresponding data compiler. If no corresponding data compiler exists, this indicates that no data compiler has yet constructed and stored the pre-built information corresponding to the target project. Because other data compilers may be unable to quickly compile data for the target project's corresponding interface due to different data compilation environments or interfaces, based on receiving the first interface display request and the absence of a data compiler corresponding to the project identifier, the computer device may construct a data compiler corresponding to the project identifier and instruct the data compiler to construct and store the pre-built information. After constructing the data compiler, the computer device may send a first interface display request to the data compiler, instructing the data compiler to compile the first interface data based on the pre-built information.
[0200] Therefore, on the one hand, it can ensure that the data compiler can generate display resources for the interface of the target project, thereby ensuring that the interface display request can be accurately processed; on the other hand, when the interface display request related to the target project is received subsequently, the interface display speed can be improved based on the pre-built information in the data compiler, providing a better interface display experience.
[0201] Next, we will combine the above content to introduce various pre-built information in detail.
[0202] First, in one possible implementation, the pre-built information may include compilation information, and the compilation information is used to compile interface data corresponding to multiple target interfaces. The multiple target interfaces may include a first interface, that is, the compilation information can be used to compile the first interface data.
[0203] When compiling the first interface data to generate the target display resources, the data compiler can compile the first interface data using the compilation information to generate the target display resources. Different projects may require different compilation information due to differences in data compilation environments. Therefore, compiling the target project's interface data using the compilation information from the target project's corresponding data compiler can ensure a successful data compilation and avoid data compilation failures due to incompatible compilation information.
[0204] In addition, the pre-built information may also include the aforementioned pre-built display resources. Specifically, the first interface may be composed of an independent interface portion and a common interface portion. The independent interface portion is the portion of the interface not present in interfaces other than the first interface, while the common interface portion is the portion of the interface shared by multiple target interfaces. Therefore, when displaying each target interface, display resources corresponding to the common interface portion are required. The computer device may pre-build and store this portion of display resources as pre-built display resources, which are used to display the common interface portion. The specific construction process and resource management methods are described above.
[0205] When compiling the first interface data to generate the target display resource, the data compiler can compile the first interface data to generate an independent display resource, which is used to display the independent interface portion. Thus, the target display resource can be determined based on the pre-built display resource and the independent display resource. The independent display resource can be used to display the independent interface portion, while the pre-built display resource can be used to display the general interface portion. Thus, the first interface can be displayed using the target display resource.
[0206] Because different projects may include different interfaces, the common interface parts of the interfaces included in different projects are usually different. This application uses different data compilers to build and store pre-built display resources, which can ensure that the common interface parts in each project can be accurately displayed, avoiding the problem of abnormal display of the common interface parts. At the same time, there is no need to recompile the data of the pre-built display resources every time the interface is displayed, which improves the interface display speed.
[0207] In addition to the above pre-built information, as can be seen from the above content, this application can also store generated display resources to provide faster interface display functions for interfaces with high display requirements, etc., which will not be described in detail here. It should be emphasized that the above technical solutions related to the computer device as the data compiler can all be applied to the data compiler in this application.
[0208] As mentioned above, by corresponding different data compilers to different projects, this application can realize parallel data compilation for multiple projects, thereby improving the interface display speed in multi-project scenarios; in addition, for multiple interfaces in the same project, the computer device can also provide parallel data compilation functions to support interface viewers to view multiple interfaces in the project at the same time.
[0209] When executing step S501, the computer device may execute step S5011 (not shown in the figure). Step S5011 is a possible implementation of step S501, including:
[0210] S5011: Obtain multiple interface display requests.
[0211] Different interface display requests may correspond to different requesting parties. Alternatively, the same requesting party may initiate multiple interface display requests for multiple interfaces. The multiple interface display requests include the first interface display request, and each of the multiple interface display requests includes a project identifier, meaning that they are all interface display requests for interfaces within the target project.
[0212] When executing step S502, the computer device may execute step S5021 (not shown in the figure), including:
[0213] S5021: Send multiple interface display requests to the data compiler corresponding to the project identifier, instructing the data compiler to synchronously generate display resources corresponding to the multiple interface display requests respectively.
[0214] It can be seen from the above data compilation process that when generating display resources for each interface, it is only necessary to determine the corresponding interface data through the interface identifier for data compilation. Therefore, for multiple interfaces, the display resources corresponding to different interfaces are based on different interface data when they are generated, and when compiling data for the display resources corresponding to a certain interface, it does not require the participation of the data compilation process of other interfaces. They are relatively independent, so the compilation processes of the display resources of multiple interfaces will not conflict with each other. Therefore, under the premise that the data compilation performance of the data compiler allows, the data compiler can realize synchronous data compilation of the display resources corresponding to multiple interfaces respectively, and finally synchronously obtain the display resources corresponding to the display requests of multiple interfaces, wherein the target display resource is the display resource corresponding to the display request of the first interface. In this way, in a scenario with multiple interface display requirements, the computer device can help the data compiler realize the parallel display of multiple interfaces, further improving the efficiency of interface display.
[0215] In order to facilitate understanding of the technical solution provided by this application, the interface display method provided by the embodiment of this application will be introduced in detail below in combination with an actual application scenario.
[0216] See also Figure 6 , Figure 6 This is a signaling diagram of a method for displaying an interface in an actual application scenario provided by an embodiment of the present application. In this actual application scenario, a computer device may include a first device and a second device. The first device serves as a management device for a data compiler included in the second device. The second device may include multiple data compilers, for example, multiple middleware for data compilation, to support the parallel display of multiple project interfaces. The method includes:
[0217] S601: The interface viewer initiates an interface display request for the first interface through a browser.
[0218] The interface viewer can access the interface he wants to view through a browser, thereby triggering an interface display request for the first interface. Figure 7 As shown, the interface viewer can also be the interface data writer, and can use data writing software (such as Fdocs document software) to write the interface data corresponding to each interface, wherein Figure 7 The interface to be displayed can write the first interface data in the writing part of the first interface data. The interface data can be, for example, markdown document data. The display content of the independent interface part of interface 1 controlled by the first interface data can be previewed through the right side of the interface, where interface 1 is the first interface. There is a real-time preview control in the upper right corner of the interface. By performing a trigger operation on the control, an interface display request for interface 1 can be sent to the first device, thereby triggering the display of interface 1, which includes a general interface part and an independent interface part. The general interface part is a navigation interface, which can support the interface viewer to jump between interfaces 1 to 5. The specific operation process of the data writer can be as follows. Figure 8 Shown, including:
[0219] S801: Determine whether the project is a git project.
[0220] If the interface data is a distributed management system (git) project, then it is necessary to execute step S802 to obtain git authorization (git oauth). If not, the project can be created directly.
[0221] S802: Obtain git authorization.
[0222] S803: Create a project.
[0223] When creating a project, the data writer can enter information such as the project name, and the computer device will generate a corresponding project ID.
[0224] S804: Create interface data.
[0225] After creating interface data (such as a markdown document), the creation time of the interface data can be stored to subsequently detect whether the data compiler is invalid (for example, detecting whether the pre-built information in the data compiler is invalid, etc.).
[0226] S805: Modify and submit.
[0227] In this application, directly submitting interface data does not trigger data compilation for the entire project's display resources. Instead, real-time data compilation is performed when there is a display requirement. Every modification to the interface data will update the update time of the interface data, thereby ensuring the timeliness of the data compilation.
[0228] S806: Preview interface.
[0229] When the interface viewer wants to view the interface, the display request corresponding to the interface will be triggered and executed. Figure 7 The data compilation process shown in .
[0230] S602: The first device determines whether there is a data compiler corresponding to the project identifier.
[0231] The first device is configured to manage a data compiler in the second device. A first interface request includes a project identifier for the project corresponding to the first interface, as well as an interface identifier corresponding to the first interface. Based on the project identifier, the first device can determine whether it has a data compiler corresponding to the project identifier. If so, step S604 is executed to directly send the interface display request to the corresponding data compiler. If not, step S603 is executed to instruct the second device to construct the data compiler corresponding to the project identifier, thereby instructing the data compiler to pre-build some pre-built information, such as compilation information and pre-built display resources.
[0232] S603: If not, the first device constructs a data compiler corresponding to the project identifier.
[0233] S604: The first device sends an interface display request to the data compiler corresponding to the project identifier.
[0234] S605: The second device constructs and stores compilation information corresponding to the target project.
[0235] The second device can construct compilation information corresponding to the target project according to information such as the configuration environment of the target project corresponding to the first interface, thereby ensuring that interface data corresponding to the interface in the target project can be effectively compiled.
[0236] S606: The second device constructs and stores pre-constructed presentation resources corresponding to the universal interface portion.
[0237] For the common interface part included in multiple interfaces, the second device can pre-build the corresponding common display resources and update them to the pre-built display resources. Therefore, when generating display resources corresponding to multiple interfaces, there is no need to generate the common display resources multiple times, thereby improving the interface display speed.
[0238] S607: The second device obtains the first interface data according to the first interface identifier based on the fact that the generated resource corresponding to the first interface identifier does not exist or the generated resource is invalid.
[0239] The second device can first determine whether there is a generated resource corresponding to the first interface identifier in the generated resource set. If not, the first interface data is directly obtained based on the first interface identifier for data compilation. If so, based on the update time of the first interface data and the update time of the generated resource corresponding to the first interface identifier, it is determined whether the generated resource has been updated in a timely manner. If it is updated in a timely manner, the generated resource is valid, and the computer device can directly obtain the generated resource as an independent display resource. If the generated resource is not updated in a timely manner, it is determined that the generated resource is invalid, and the computer device can re-obtain the first interface data based on the first interface identifier to perform real-time data compilation.
[0240] S608: The second device compiles the first interface data using the data compilation plug-ins corresponding to the resource types to generate independent display resources.
[0241] Among them, the architecture of the first device and the second device of the present application can be as follows Figure 9 As shown, taking the Vite middleware as an example, the backend is mainly divided into a three-layer architecture: the access layer (router), the service layer (service), and the data layer (data). The access layer is composed of two middlewares. The management middleware (fdocs middleware) in the first device is used to manage the data compilation middleware (Vite middleware), that is, the data compilation party. Vite middleware is the compilation core.
[0242] Among them, the management middleware fdocs middleware supports distribution and provides a service layer interface, that is, it can provide a data interface for obtaining various data. The management middleware has two functions: creating a project (createApp) and creating a middleware (createMiddleware).
[0243] The data compilation middleware (vite middleware) is responsible for compiling all display resources. It consists of built-in middleware and custom plug-ins. The built-in middleware is the basic plug-in of the vite middleware, including the Html index middleware (indexHtmlMiddleware), the transformation middleware (transformMiddleware) and the base middleware (baseMiddleware). The custom plug-in is used to compile various types of display resources, including:
[0244] The vite configuration plug-in (mainPlugin) is used to define the basic configuration of vite compilation, that is, compilation information;
[0245] Image plugin (imagePlugin), used to process git image data compilation and read images from git repositories through the service layer interface;
[0246] Vue compilation plug-in (vuePlugin), used for plug-in compilation of Vue2.0 files to form the framework of the interface;
[0247] The dynamic interface plug-in (pageComponentPlugin) is used to convert pre-built information into dynamic data. On the one hand, it supports dynamic acquisition of interface data (i.e., markdown documents) for data compilation, and on the other hand, it can store pre-built information as data that can be updated in real time, thereby ensuring the timeliness of pre-built information.
[0248] The environment variable plug-in (constReplacementPlugin) is used to replace the environment variables used in the resources in real time, thereby ensuring that the generated display resources conform to the device environment of the interface display device, so that the interface can be successfully displayed.
[0249] md compilation plug-in (markdownPlugin), used for markdown documents, that is, used to compile interface data.
[0250] The service layer (service) provides four service-layer interfaces for middleware to dynamically access data, such as interface data. These interfaces are used to retrieve project configuration, document directory, image content, and document content (i.e., interface data). The data layer provides data and supports both databases and Git repositories. It also supports distributed preview using a remote dictionary (Redis), enabling multiple middleware to simultaneously retrieve data for interface display.
[0251] S609: The second device determines the target display resource corresponding to the first interface according to the independent display resource and the target display resource.
[0252] S610: The second device updates the generated resources corresponding to the first interface identifier according to the target display resource.
[0253] When the target display resource is a display resource generated based on interface data obtained in real time, it indicates that the target display resource is a display resource with strong timeliness, so the second device can update the generated resource corresponding to the first interface identifier based on the target display resource, thereby improving the timeliness of the generated resource.
[0254] S611: The browser displays the first interface to the interface viewer according to the target display resources.
[0255] From the above process, it can be seen that compared with the related art, this application has the following technical effects:
[0256] 1. This application does not need to directly compile data for the entire project. Instead, when there is a need for interface display, it can obtain the interface data of the specified interface in real time and perform real-time data compilation to generate display resources with higher timeliness. On the one hand, it reduces the processing volume of data compilation, and on the other hand, it can provide a faster interface display experience without waiting for the construction of the entire project;
[0257] 2. This application can pre-construct some reuse information to avoid the need to repeatedly construct the reuse information every time the data is compiled, thereby improving the efficiency of interface display.
[0258] 3. This application can store display resources for some interfaces with high display requirements. Without taking up too much storage space, it can achieve faster interface display for interfaces with high display requirements. At the same time, the stored display resources can be reasonably updated to ensure the timeliness of the display resources.
[0259] 4. This application can support parallel interface display. For example, the interface display of multiple projects can be executed in parallel by the data compilers corresponding to each project identifier, and the parallel display of multiple interfaces of the same project can be achieved through the data compilation process of each interface that complements and conflicts.
[0260] Based on the interface display method provided in the above embodiment, this application also provides an interface display device, see Figure 10 , Figure 10 This is a structural block diagram of an interface display device provided in an embodiment of the present application. The device includes a first acquisition unit 1001, a first determination unit 1002, and a first generation unit 1003:
[0261] The first acquisition unit 1001 is configured to acquire a first interface display request for a first interface, where the first interface is any one of a plurality of interfaces, the plurality of interfaces being used to constitute a target project, the plurality of interfaces respectively having corresponding interface identifiers and interface data, the first interface display request including a first interface identifier corresponding to the first interface, the first interface identifier being used to identify the first interface;
[0262] The first determining unit 1002 is configured to determine, based on the first interface identifier and a mapping relationship between the interface identifier and the interface data, first interface data corresponding to the first interface, where the first interface data is used to control display content of the first interface;
[0263] The first generating unit 1003 is configured to compile the first interface data to generate target display resources, where the target display resources are used to display the first interface.
[0264] In a possible implementation, the first interface is composed of an independent interface portion and a common interface portion, the independent interface portion being an interface portion not possessed by an interface other than the first interface among the multiple interfaces, and an interface other than the first interface among the multiple interfaces including the common interface portion;
[0265] The apparatus further includes a second determining unit, a second generating unit, and a first updating unit:
[0266] The second determining unit is configured to determine the universal interface data corresponding to the universal interface portion;
[0267] The second generating unit is configured to compile the universal interface data to generate universal display resources, wherein the universal display resources are used to display the universal interface portion;
[0268] The first updating unit is configured to update the pre-built presentation resource to the general presentation resource;
[0269] The first generating unit 1003 is specifically configured to:
[0270] Compiling the first interface data to generate independent display resources, where the independent display resources are used to display the independent interface portion;
[0271] The target presentation resource is determined according to the pre-built presentation resource and the independent presentation resource.
[0272] In a possible implementation, the apparatus further includes a third determining unit:
[0273] The third determining unit is configured to determine, based on obtaining the first interface presentation request, first update time information of the pre-built presentation resource and second update time information corresponding to the universal interface data, wherein the first update time information is used to indicate a first update time corresponding to a last update of the pre-built presentation resource, and the second update time information is used to indicate a second update time corresponding to a last data update of the universal interface data;
[0274] The first generating unit 1003 is specifically configured to:
[0275] Based on the fact that the first update time is later than the second update time, the target presentation resource is determined according to the pre-built presentation resource and the independent presentation resource.
[0276] In a possible implementation, the apparatus further includes a second updating unit and a fourth determining unit:
[0277] The second updating unit is configured to update the pre-built presentation resource according to the universal interface data corresponding to the universal interface part based on the first updating time being no later than the second updating time;
[0278] The fourth determining unit is configured to determine the target presentation resource according to the updated pre-built presentation resource and the independent presentation resource.
[0279] In a possible implementation manner, the second determining unit is specifically configured to:
[0280] Based on data update of the universal interface data, the universal interface data corresponding to the universal interface part is determined.
[0281] In one possible implementation, the general interface portion includes a target control corresponding to the second interface, the target control is used to trigger a control function related to the second interface, the second interface is any one of the multiple interfaces, and the general interface data includes target control generation information corresponding to the second interface;
[0282] The general display resource includes a target control resource corresponding to the second interface, and the target control resource is used to display the target control. The second generating unit is specifically configured to:
[0283] Data is compiled on the target control generation information to generate the target control resource.
[0284] In a possible implementation, the second generating unit is specifically configured to:
[0285] Compiling each control generation information included in the general interface data to generate control resources corresponding to each control generation information, wherein each control generation information includes the target control generation information, and the target control generation information corresponds to the target control resource;
[0286] The second determining unit is specifically configured to:
[0287] Based on a change in the control generation information in the universal interface data, universal interface data corresponding to the universal interface portion is determined.
[0288] In a possible implementation, the target control is used to jump to the second interface.
[0289] In one possible implementation, the first interface includes an associated interface portion, the associated interface portion is used to display associated information associated with a third interface, the third interface is any interface among the multiple interfaces except the first interface, the first interface data includes positioning information, and the positioning information is used to locate the associated information;
[0290] The first generating unit 1003 is specifically configured to:
[0291] determining the associated information according to the positioning information;
[0292] Data is compiled based on the associated information to generate associated display resources, where the associated display resources are used to display the associated interface portion.
[0293] In a possible implementation, the apparatus further includes a first construction unit and a storage unit:
[0294] The first constructing unit is configured to construct compilation information corresponding to the plurality of interfaces, wherein the compilation information is used to compile interface data corresponding to the plurality of interfaces;
[0295] The storage unit is used to store the compilation information;
[0296] The first generating unit 1003 is specifically configured to:
[0297] The first interface data is compiled using the compilation information to generate the target display resource.
[0298] In a possible implementation, the first interface data includes a plurality of sub-data, the target display resource includes sub-display resources corresponding to the plurality of sub-data, and the sub-display resources corresponding to the plurality of sub-data include sub-display resources of different resource types. The first generating unit 1003 is specifically configured to:
[0299] Determine a data compilation plug-in corresponding to a target resource type, wherein the target resource type is a resource type corresponding to a target sub-display resource, the target sub-display resource is a sub-display resource corresponding to a target sub-data, and the target sub-data is any one of the plurality of sub-data;
[0300] The target sub-data is compiled by the data compilation plug-in to generate the target sub-display resource.
[0301] In a possible implementation, the target display resource is used to enable the interface display party to display the first interface, and the first determining unit 1002 is specifically configured to:
[0302] Based on the absence of a generated resource corresponding to the first interface identifier in the generated resource set, determining the first interface data corresponding to the first interface according to the first interface identifier and a mapping relationship between the interface identifier and the interface data;
[0303] The device further includes a third updating unit, a second acquiring unit and an indicating unit:
[0304] The third updating unit is configured to update the generated resource corresponding to the first interface identifier in the generated resource set to the target display resource;
[0305] The second acquiring unit is configured to acquire a second interface display request for the first interface, where the second interface display request includes the first interface identifier;
[0306] The instructing unit is configured to instruct an interface presenter to present the first interface through the generated resources corresponding to the first interface identifier based on the generated resources in the generated resource set.
[0307] In a possible implementation, the indicating unit is specifically configured to:
[0308] Determine third update time information corresponding to the first interface data, and fourth update time information corresponding to the generated resource corresponding to the first interface identifier, the third update time information being used to represent the third update time corresponding to the last update of the first interface data, and the fourth update time information being used to represent the fourth update time corresponding to the last update of the generated resource corresponding to the first interface identifier;
[0309] Based on the generated resources corresponding to the first interface identifier in the generated resource set, and the fourth update time is later than the third update time, the interface presenter is instructed to display the first interface through the generated resources corresponding to the first interface identifier.
[0310] Based on the interface display method provided in the above embodiment, this application also provides an interface display device, see Figure 11 , Figure 11 This is a structural block diagram of an interface display device provided in an embodiment of the present application, which includes a third acquisition unit 1101 and a first sending unit 1102:
[0311] The third acquisition unit 1101 is configured to acquire a first interface display request for a first interface, where the first interface is any one of a plurality of interfaces, the plurality of interfaces being used to constitute a target project, the plurality of interfaces respectively having corresponding interface identifiers and interface data, the first interface display request including a first interface identifier corresponding to the first interface and a project identifier corresponding to the target project, the first interface identifier being used to identify the first interface, the first interface identifier having a mapping relationship with the first interface data corresponding to the first interface, the mapping relationship being used to determine the first interface data, and the project identifier being used to identify the target project;
[0312] The first sending unit 1102 is configured to send the first interface display request to the data compiler corresponding to the project identifier, instructing the data compiler to compile the first interface data to generate a target display resource, where the target display resource is used to display the first interface.
[0313] In one possible implementation, the data compiler is used to construct and store pre-built information corresponding to the target project, and the pre-built information is used to generate interface display resources corresponding to multiple target interfaces in the target project, where the multiple target interfaces are any multiple interfaces among the multiple interfaces;
[0314] The device further includes a second constructing unit and a second sending unit:
[0315] The second construction unit is configured to, based on obtaining the first interface display request and the absence of a data compiler corresponding to the project identifier, construct a data compiler corresponding to the project identifier, and instruct the data compiler to construct and store the pre-constructed information;
[0316] The second sending unit is configured to send the first interface display request to the data compiler.
[0317] In one possible implementation, the pre-built information includes compilation information, where the compilation information is used to compile interface data corresponding to the multiple target interfaces, where the multiple target interfaces include the first interface, and compiling the first interface data to generate target display resources includes:
[0318] The first interface data is compiled using the compilation information to generate the target display resource.
[0319] In one possible implementation, the first interface is composed of an independent interface portion and a common interface portion, the independent interface portion being an interface portion not possessed by an interface other than the first interface among the multiple interfaces, and the common interface portion being an interface portion shared by multiple target interfaces, the pre-built information including the pre-built presentation resource, and the pre-built presentation resource being used to present the common interface portion;
[0320] The compiling the first interface data to generate target display resources includes:
[0321] Compiling the first interface data to generate independent display resources, where the independent display resources are used to display the independent interface portion;
[0322] The target presentation resource is determined according to the pre-built presentation resource and the independent presentation resource.
[0323] In a possible implementation, the third obtaining unit 1101 is specifically configured to:
[0324] Acquire multiple interface display requests, where different interface display requests correspond to different requesting parties, the multiple interface display requests include the first interface display request, and the multiple interface display requests all include the project identifier;
[0325] The sending unit is specifically configured to:
[0326] The multiple interface display requests are sent to a data compiler corresponding to the project identifier, instructing the data compiler to synchronously generate display resources corresponding to the multiple interface display requests respectively, and the target display resource is the display resource corresponding to the first interface display request.
[0327] The present application also provides a computer device. Figure 12 As shown, the computer device may be a terminal device, taking a mobile phone as an example:
[0328] Figure 12 The block diagram shows a partial structure of a mobile phone related to the terminal device provided in the embodiment of the present application. Figure 12 The mobile phone includes components such as a radio frequency (RF) circuit 710, a memory 720, an input unit 730, a display unit 740, a sensor 750, an audio circuit 760, a wireless fidelity (WiFi) module 770, a processor 780, and a power supply 790. Those skilled in the art will appreciate that Figure 12The mobile phone structure shown in the figure does not constitute a limitation to the mobile phone, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0329] The following combination Figure 12 A detailed introduction to the various components of a mobile phone:
[0330] The RF circuit 710 can be used to receive and send signals during information transmission or calls. In particular, after receiving the downlink information from the base station, it is sent to the processor 780 for processing; in addition, the designed uplink data is sent to the base station. Generally, the RF circuit 710 includes but is not limited to an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier (LNA), a duplexer, etc. In addition, the RF circuit 710 can also communicate with the network and other devices through wireless communication. The above-mentioned wireless communication can use any communication standard or protocol, including but not limited to Global System of Mobile communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Messaging Service (SMS), etc.
[0331] The memory 720 can be used to store software programs and modules. The processor 780 executes the various functional applications and data processing of the mobile phone by running the software programs and modules stored in the memory 720. The memory 720 can mainly include a program storage area and a data storage area. The program storage area can store an operating system and at least one application required for a function (such as a sound playback function, an image playback function, etc.); the data storage area can store data created based on the use of the mobile phone (such as audio data, a phone book, etc.). In addition, the memory 720 can include high-speed random access memory and non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage device.
[0332] The input unit 730 can be used to receive input digital or character information, and to generate key signal input related to the user settings and function control of the mobile phone. Specifically, the input unit 730 may include a touch panel 731 and other input devices 732. The touch panel 731, also known as a touch screen, can collect user touch operations on or near it (such as operations performed by the user using any suitable object or accessory such as a finger, stylus, etc. on or near the touch panel 731) and drive the corresponding connection device according to a pre-set program. Optionally, the touch panel 731 may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch direction and detects the signal caused by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device and converts it into touch point coordinates, which are then sent to the processor 780. It can also receive commands sent by the processor 780 and execute them. In addition, the touch panel 731 can be implemented using various types such as resistive, capacitive, infrared and surface acoustic wave. In addition to the touch panel 731, the input unit 730 may further include other input devices 732. Specifically, the other input devices 732 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick.
[0333] The display unit 740 can be used to display information input by the user or information provided to the user and various menus of the mobile phone. The display unit 740 may include a display panel 741. Optionally, the display panel 741 may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), etc. Further, the touch panel 731 may cover the display panel 741. When the touch panel 731 detects a touch operation on or near it, it is transmitted to the processor 780 to determine the type of touch event. Subsequently, the processor 780 provides corresponding visual output on the display panel 741 according to the type of touch event. Although in Figure 12 In the embodiment, the touch panel 731 and the display panel 741 are used as two independent components to realize the input and output functions of the mobile phone, but in some embodiments, the touch panel 731 and the display panel 741 can be integrated to realize the input and output functions of the mobile phone.
[0334] The mobile phone may also include at least one sensor 750, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 741 according to the brightness of the ambient light, and the proximity sensor may turn off the display panel 741 and / or the backlight when the mobile phone is moved to the ear. As a type of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in all directions (generally three axes), and can detect the magnitude and direction of gravity when stationary. It can be used for applications that identify the posture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as for other sensors that the mobile phone can also be configured with, such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., they will not be described here.
[0335] Audio circuit 760, speaker 761, and microphone 762 provide an audio interface between the user and the phone. Audio circuit 760 converts received audio data into electrical signals and transmits them to speaker 761, which then converts them into sound signals for output. Microphone 762, on the other hand, converts collected sound signals into electrical signals, which are then received by audio circuit 760 and converted into audio data. The audio data is then processed by processor 780 and transmitted to, for example, another phone via RF circuit 710, or stored in memory 720 for further processing.
[0336] WiFi is a short-range wireless transmission technology. The mobile phone can help users send and receive emails, browse the web and access streaming media through the WiFi module 770. It provides users with wireless broadband Internet access. Figure 12 A WiFi module 770 is shown, but it is understandable that it is not an essential component of the mobile phone and can be omitted as needed without changing the essence of the invention.
[0337] Processor 780 is the control center of the phone, connecting all parts of the phone using various interfaces and circuits. By running or executing software programs and / or modules stored in memory 720 and accessing data stored in memory 720, it performs various phone functions and processes data, thereby performing overall phone testing. Optionally, processor 780 may include one or more processing units; preferably, processor 780 may integrate an application processor and a modem processor, where the application processor primarily handles the operating system, user interface, and application programs, while the modem processor primarily handles wireless communications. It is understood that the modem processor may not be integrated into processor 780.
[0338] The mobile phone also includes a power supply 790 (such as a battery) for supplying power to various components. Preferably, the power supply can be logically connected to the processor 780 through a power management system, thereby managing charging, discharging, and power consumption management functions through the power management system.
[0339] Although not shown, the mobile phone may also include a camera, a Bluetooth module, etc., which will not be described in detail here.
[0340] In this embodiment, the processor 780 included in the terminal device further has the following functions:
[0341] Obtaining a first-interface display request for a first interface, where the first interface is any one of a plurality of interfaces, the plurality of interfaces being used to constitute a target project, the plurality of interfaces respectively having corresponding interface identifiers and interface data, the first-interface display request including a first interface identifier corresponding to the first interface, the first interface identifier being used to identify the first interface;
[0342] According to the first interface identifier, determining first interface data corresponding to the first interface through a mapping relationship between the interface identifier and the interface data, where the first interface data is used to control display content of the first interface;
[0343] The first interface data is compiled to generate target display resources, where the target display resources are used to display the first interface.
[0344] Alternatively, the processor 780 included in the terminal device further has the following functions:
[0345] Obtaining a first-interface display request for a first interface, where the first interface is any one of a plurality of interfaces, the plurality of interfaces being used to constitute a target project, the plurality of interfaces respectively having corresponding interface identifiers and interface data, the first-interface display request including a first-interface identifier corresponding to the first interface and a project identifier corresponding to the target project, the first-interface identifier being used to identify the first interface, the first-interface identifier having a mapping relationship with the first-interface data corresponding to the first interface, the mapping relationship being used to determine the first-interface data, and the project identifier being used to identify the target project;
[0346] The first interface display request is sent to a data compiler corresponding to the project identifier, instructing the data compiler to compile the first interface data and generate a target display resource, where the target display resource is used to display the first interface.
[0347] This application embodiment also provides a server, see Figure 13 As shown, Figure 13The structural diagram of the server 800 provided in the embodiment of the present application, the server 800 may have relatively large differences due to different configurations or performances, and may include one or more central processing units (CPUs) 822 (for example, one or more processors) and memories 832, and one or more storage media 830 (for example, one or more mass storage devices) for storing application programs 842 or data 844. Among them, the memories 832 and the storage media 830 can be temporary storage or permanent storage. The program stored in the storage medium 830 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations on the server. Furthermore, the central processing unit 822 can be configured to communicate with the storage medium 830 to execute a series of instruction operations in the storage medium 830 on the server 800.
[0348] The server 800 may also include one or more power supplies 826, one or more wired or wireless network interfaces 850, one or more input and output interfaces 858, and / or one or more operating systems 841, such as Windows Server 2000. TM , Mac OS X TM , Unix TM ,Linux TM , FreeBSD TM etc.
[0349] The steps performed by the server in the above embodiment can be based on Figure 13 The server structure shown.
[0350] An embodiment of the present application also provides a computer-readable storage medium for storing a computer program, which is used to execute any implementation of the interface display method described in the aforementioned embodiments.
[0351] An embodiment of the present application further provides a computer program product including a computer program, which, when executed on a computer device, enables the computer device to execute the interface display method described in any one of the above embodiments.
[0352] It is understandable that in the specific implementation of this application, related data such as user information (such as interface data written by the user) is involved. When the above embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.
[0353] Those skilled in the art will understand that all or part of the steps of implementing the above-mentioned method embodiment can be completed by hardware related to program instructions, and the above-mentioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above-mentioned method embodiment; and the above-mentioned storage medium can be at least one of the following media: read-only memory (English: read-only memory, abbreviated: ROM), RAM, magnetic disk or optical disk, etc., various media that can store program codes.
[0354] It should be noted that the various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device and system embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments. The device and system embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of this embodiment. A person of ordinary skill in the art can understand and implement it without expending creative work.
[0355] The above is merely one specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.
Claims
1. An interface display method, characterized in that: The method comprises: Obtaining a first-interface display request for a first interface, where the first interface is any one of a plurality of interfaces, the plurality of interfaces being used to constitute a target project, the plurality of interfaces respectively having corresponding interface identifiers and interface data, the first-interface display request including a first interface identifier corresponding to the first interface, the first interface identifier being used to identify the first interface; According to the first interface identifier, determining first interface data corresponding to the first interface through a mapping relationship between the interface identifier and the interface data, where the first interface data is used to control display content of the first interface; The first interface data is compiled to generate target display resources, where the target display resources are used to display the first interface.
2. The method according to claim 1, characterized in that The first interface is composed of an independent interface part and a common interface part, the independent interface part is an interface part that is not present in the interfaces other than the first interface among the multiple interfaces, and the interfaces other than the first interface among the multiple interfaces include the common interface part; Before obtaining the first interface display request for the first interface, the method further includes: Determining universal interface data corresponding to the universal interface portion; Compiling the universal interface data to generate universal display resources, wherein the universal display resources are used to display the universal interface portion; Updating the pre-built presentation resource to the general presentation resource; The compiling the first interface data to generate target display resources includes: Compiling the first interface data to generate independent display resources, where the independent display resources are used to display the independent interface portion; The target presentation resource is determined according to the pre-built presentation resource and the independent presentation resource.
3. The method according to claim 2, characterized in that The method further comprises: Determining, based on obtaining the first interface presentation request, first update time information of the pre-built presentation resource and second update time information corresponding to the general interface data, where the first update time information is used to indicate a first update time corresponding to a last update of the pre-built presentation resource, and the second update time information is used to indicate a second update time corresponding to a last data update of the general interface data; The determining the target presentation resource according to the pre-built presentation resource and the independent presentation resource includes: Based on the fact that the first update time is later than the second update time, the target presentation resource is determined according to the pre-built presentation resource and the independent presentation resource.
4. The method according to claim 3, characterized in that The method further comprises: Based on the first update time being no later than the second update time, updating the pre-built presentation resource according to the universal interface data corresponding to the universal interface portion; The target presentation resource is determined according to the updated pre-built presentation resource and the independent presentation resource.
5. The method according to claim 2, characterized in that The determining of the universal interface data corresponding to the universal interface portion includes: Based on data update of the universal interface data, the universal interface data corresponding to the universal interface part is determined.
6. The method according to claim 2, characterized in that The general interface portion includes a target control corresponding to the second interface, the target control is used to trigger a control function related to the second interface, the second interface is any one of the multiple interfaces, and the general interface data includes target control generation information corresponding to the second interface; The general display resource includes a target control resource corresponding to the second interface, and the target control resource is used to display the target control. The compiling of the general interface data to generate the general display resource includes: Data is compiled on the target control generation information to generate the target control resource.
7. The method according to claim 6, characterized in that The step of compiling data of the target control generation information to generate the target control resource includes: Compiling each control generation information included in the general interface data to generate control resources corresponding to each control generation information, wherein each control generation information includes the target control generation information, and the target control generation information corresponds to the target control resource; The determining of the universal interface data corresponding to the universal interface portion includes: Based on a change in the control generation information in the universal interface data, universal interface data corresponding to the universal interface portion is determined.
8. The method according to claim 6, characterized in that The target control is used to jump to the second interface.
9. The method according to claim 1, characterized in that The first interface includes an associated interface portion, the associated interface portion is used to display associated information associated with a third interface, the third interface is any interface among the multiple interfaces except the first interface, the first interface data includes positioning information, and the positioning information is used to locate the associated information; The compiling the first interface data to generate target display resources includes: determining the associated information according to the positioning information; Data is compiled based on the associated information to generate associated display resources, where the associated display resources are used to display the associated interface portion.
10. The method according to claim 1, characterized in that The first interface data includes a plurality of sub-data, the target display resource includes sub-display resources corresponding to the plurality of sub-data, and the sub-display resources corresponding to the plurality of sub-data include sub-display resources of different resource types. Compiling the first interface data to generate the target display resource includes: Determine a data compilation plug-in corresponding to a target resource type, wherein the target resource type is a resource type corresponding to a target sub-display resource, the target sub-display resource is a sub-display resource corresponding to a target sub-data, and the target sub-data is any one of the plurality of sub-data; The target sub-data is compiled by the data compilation plug-in to generate the target sub-display resource.
11. The method according to claim 1, wherein The target display resource is used to enable the interface display party to display the first interface, and determining the first interface data corresponding to the first interface according to the first interface identifier through a mapping relationship between the interface identifier and the interface data includes: Based on the absence of a generated resource corresponding to the first interface identifier in the generated resource set, determining the first interface data corresponding to the first interface according to the first interface identifier and a mapping relationship between the interface identifier and the interface data; The method further comprises: Updating the generated resource corresponding to the first interface identifier in the generated resource set to the target display resource; Obtaining a second interface display request for the first interface, where the second interface display request includes the first interface identifier; Based on the generated resources corresponding to the first interface identifier in the generated resource set, an interface presenter is instructed to present the first interface through the generated resources corresponding to the first interface identifier.
12. The method according to claim 11, characterized in that The instructing an interface presenter to display the first interface through the generated resources corresponding to the first interface identifier based on the generated resources corresponding to the first interface identifier in the generated resource set includes: Determine third update time information corresponding to the first interface data, and fourth update time information corresponding to the generated resource corresponding to the first interface identifier, the third update time information being used to represent the third update time corresponding to the last update of the first interface data, and the fourth update time information being used to represent the fourth update time corresponding to the last update of the generated resource corresponding to the first interface identifier; Based on the generated resources corresponding to the first interface identifier in the generated resource set, and the fourth update time is later than the third update time, the interface presenter is instructed to display the first interface through the generated resources corresponding to the first interface identifier.
13. An interface display method, characterized in that: The method comprises: Obtaining a first-interface display request for a first interface, where the first interface is any one of a plurality of interfaces, the plurality of interfaces being used to constitute a target project, the plurality of interfaces respectively having corresponding interface identifiers and interface data, the first-interface display request including a first-interface identifier corresponding to the first interface and a project identifier corresponding to the target project, the first-interface identifier being used to identify the first interface, the first-interface identifier having a mapping relationship with the first-interface data corresponding to the first interface, the mapping relationship being used to determine the first-interface data, and the project identifier being used to identify the target project; The first interface display request is sent to a data compiler corresponding to the project identifier, instructing the data compiler to compile the first interface data and generate a target display resource, where the target display resource is used to display the first interface.
14. The method according to claim 13, characterized in that The data compiler is used to construct and store pre-built information corresponding to the target project, and the pre-built information is used to generate interface display resources corresponding to multiple target interfaces in the target project, wherein the multiple target interfaces are any multiple interfaces among the multiple interfaces; The method further comprises: Based on obtaining the first interface display request and the absence of a data compiler corresponding to the project identifier, constructing a data compiler corresponding to the project identifier, and instructing the data compiler to construct and store the pre-constructed information; Sending the first interface display request to the data compiler.
15. The method according to claim 13, characterized in that The obtaining of the first interface display request for the first interface includes: Acquire multiple interface display requests, where different interface display requests correspond to different requesting parties, the multiple interface display requests include the first interface display request, and the multiple interface display requests all include the project identifier; The sending the first interface display request to the data compiler corresponding to the project identifier includes: The multiple interface display requests are sent to a data compiler corresponding to the project identifier, instructing the data compiler to synchronously generate display resources corresponding to the multiple interface display requests respectively, and the target display resource is the display resource corresponding to the first interface display request.
16. An interface display device, characterized in that: The device includes a first acquisition unit, a first determination unit and a first generation unit The first acquisition unit is configured to acquire a first interface display request for a first interface, where the first interface is any one of a plurality of interfaces, the plurality of interfaces being used to constitute a target project, the plurality of interfaces respectively having corresponding interface identifiers and interface data, the first interface display request including a first interface identifier corresponding to the first interface, the first interface identifier being used to identify the first interface; The first determining unit is configured to determine, based on the first interface identifier and a mapping relationship between the interface identifier and the interface data, first interface data corresponding to the first interface, wherein the first interface data is used to control display content of the first interface; The first generating unit is configured to compile the first interface data to generate target display resources, where the target display resources are used to display the first interface.
17. An interface display device, characterized in that: The device includes a third acquiring unit and a first sending unit: The third acquisition unit is configured to acquire a first-interface display request for a first interface, where the first interface is any one of a plurality of interfaces, the plurality of interfaces being used to constitute a target project, the plurality of interfaces respectively having corresponding interface identifiers and interface data, the first-interface display request including a first-interface identifier corresponding to the first interface and a project identifier corresponding to the target project, the first-interface identifier being used to identify the first interface, the first-interface identifier and the first-interface data corresponding to the first interface having a mapping relationship, the mapping relationship being used to determine the first-interface data, and the project identifier being used to identify the target project; The first sending unit is configured to send the first interface display request to a data compiler corresponding to the project identifier, instructing the data compiler to compile the first interface data to generate a target display resource, where the target display resource is used to display the first interface.
18. A computer device, characterized in that: The computer device includes a processor and a memory: The memory is used to store a computer program and transmit the computer program to the processor; The processor is used to execute the interface display method described in any one of claims 1-12 according to the instructions in the computer program, or execute the interface display method described in any one of claims 13-15.
19. A computer-readable storage medium, characterized in that The computer-readable storage medium is used to store a computer program, and the computer program is used to execute the interface display method described in any one of claims 1-12, or execute the interface display method described in any one of claims 13-15.
20. A computer program product comprising a computer program, which, when executed on a computer device, enables the computer device to execute the interface display method described in any one of claims 1 to 12, or the interface display method described in any one of claims 13 to 15.