Page display method and device, equipment and medium
By detecting page interaction and using the data accessor component to determine the target value of the display variable, and generating target instructions to output the second page, the problem of insufficient interface display and interactivity in the prior art is solved, and flexible page display and dynamics are achieved Interactive control improves user experience.
Patent Information
- Application Number
- CN202411347366.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-25
- Publication Date
- 2025-01-14
AI Technical Summary
In the dynamic user interface of the prior art, interface display and interactive flexibility are insufficient, making it difficult to achieve complex dynamic interaction logic and flexible page display.
By detecting page interaction, the page interaction information and data accessor components are used to determine the target value of the display variable, and the target instruction is generated to output the second page to realize dynamic display logic and interactive control.
It improves the flexibility of page display, supports complex dynamic interactive logic, conditional judgment and loop operations, simplifies page display control logic, and improves user experience.
Smart Images

Figure CN119311173A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, in particular to the field of page display and page interaction technology, and specifically to a page display method, device, electronic device, computer-readable storage medium, and computer program product. Background Art
[0002] The client-side user interface dynamic technology aims to dynamically load, update and display the application's user interface at runtime to provide a more flexible, customizable and agile interaction method and improve the user experience. By dynamically adjusting the position, size and arrangement of component elements in the user interface, it can adapt to different screen sizes, directions and content changes. However, conventional dynamic technology only realizes the dynamic display of the interface, and does not involve the interactivity between the user and the interface. The flexibility of interface display and interaction is insufficient.
[0003] The methods described in this section are not necessarily methods that have been previously conceived or employed. Unless otherwise indicated, it should not be assumed that any method described in this section is considered to be prior art simply because it is included in this section. Similarly, unless otherwise indicated, the issues mentioned in this section should not be considered to have been recognized in any prior art. Summary of the invention
[0004] The present disclosure provides a page display method, device, electronic device, computer-readable storage medium and computer program product.
[0005] According to one aspect of the present disclosure, a page display method is provided, comprising: in response to detecting a page interaction operation for a first page, determining target page display information corresponding to the page interaction operation based on page interaction information, wherein the page interaction information includes a correspondence between the page interaction operation and the page display information; in response to determining that the target page display information includes a display variable, determining a target value of the display variable using a data accessor component, wherein the data accessor component is used to determine the target value based on source data of the target page to be displayed; based on the target value, determining a target instruction corresponding to the target page display information; and outputting a second page by executing the target instruction.
[0006] According to another aspect of the present disclosure, a page display device is provided, including: a first determination unit, configured to determine, in response to detecting a page interaction operation for a first page, target page display information corresponding to the page interaction operation based on page interaction information, wherein the page interaction information includes a correspondence between the page interaction operation and the page display information; a second determination unit, configured to determine, in response to determining that the target page display information includes a display variable, a target value of the display variable using a data accessor component, wherein the data accessor component is used to determine the target value based on source data of the target page to be displayed; a third determination unit, configured to determine, based on the target value, a target instruction corresponding to the target page display information; and a first display unit, configured to output a second page by executing the target instruction.
[0007] According to another aspect of the present disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the above-mentioned page display method.
[0008] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute the above-mentioned page display method.
[0009] According to another aspect of the present disclosure, a computer program product is provided, including a computer program, wherein the computer program can implement the above-mentioned page display method when executed by a processor.
[0010] According to one or more embodiments of the present disclosure, the flexibility of page presentation can be improved.
[0011] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] The accompanying drawings exemplarily illustrate the embodiments and constitute a part of the specification, and together with the text description of the specification, are used to explain the exemplary implementation of the embodiments. The embodiments shown are for illustrative purposes only and do not limit the scope of the claims. In all drawings, the same reference numerals refer to similar but not necessarily identical elements.
[0013] Figure 1 A schematic diagram showing an exemplary system in which the various methods described herein may be implemented according to an exemplary embodiment of the present disclosure;
[0014] Figure 2 A flow chart of a page display method according to an exemplary embodiment of the present disclosure is shown;
[0015] Figure 3 A schematic diagram showing page interaction information according to an exemplary embodiment of the present disclosure;
[0016] Figure 4 A structural block diagram of a page display device according to an exemplary embodiment of the present disclosure is shown;
[0017] Figure 5 A structural block diagram of an exemplary electronic device that can be used to implement the embodiments of the present disclosure is shown. DETAILED DESCRIPTION
[0018] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope of the present disclosure. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description.
[0019] In the present disclosure, unless otherwise specified, the use of the terms "first", "second", etc. to describe various elements is not intended to limit the positional relationship, timing relationship, or importance relationship of these elements, and such terms are only used to distinguish one element from another element. In some examples, the first element and the second element may refer to the same instance of the element, and in some cases, based on the description of the context, they may also refer to different instances.
[0020] The terms used in the description of various examples in this disclosure are only for the purpose of describing specific examples and are not intended to be limiting. Unless the context clearly indicates otherwise, if the number of elements is not specifically limited, the element can be one or more. In addition, the term "and / or" used in this disclosure covers any one of the listed items and all possible combinations.
[0021] The embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings.
[0022] Figure 1 FIG. 1 is a schematic diagram of an exemplary system 100 in which various methods and apparatuses described herein may be implemented according to an embodiment of the present disclosure. Figure 1, the system 100 includes one or more client devices 101, 102, 103, 104, 105, and 106, a server 120, and one or more communication networks 110 coupling the one or more client devices to the server 120. The client devices 101, 102, 103, 104, 105, and 106 may be configured to execute one or more applications.
[0023] In an embodiment of the present disclosure, the server 120 may run one or more services or software applications that enable the page presentation method to be performed.
[0024] In some embodiments, server 120 may also provide other services or software applications, which may include non-virtualized environments and virtualized environments. In some embodiments, these services may be provided as web-based services or cloud services, such as provided to users of client devices 101, 102, 103, 104, 105, and / or 106 under a software as a service (SaaS) model.
[0025] exist Figure 1 In the configuration shown, the server 120 may include one or more components that implement the functions performed by the server 120. These components may include software components, hardware components, or a combination thereof that can be executed by one or more processors. Users operating client devices 101, 102, 103, 104, 105, and / or 106 may in turn utilize one or more client applications to interact with the server 120 to utilize the services provided by these components. It should be understood that a variety of different system configurations are possible, which may differ from the system 100. Therefore, Figure 1 is one example of a system for implementing the various methods described herein and is not intended to be limiting.
[0026] The user may use client devices 101, 102, 103, 104, 105 and / or 106 to send a page display request or view a displayed target page. The client device may provide an interface that enables the user of the client device to interact with the client device. The client device may also output information to the user via the interface. Figure 1 Only six client devices are depicted, but one skilled in the art will appreciate that the present disclosure may support any number of client devices.
[0027] Client devices 101, 102, 103, 104, 105 and / or 106 may include various categories of computer devices, such as portable handheld devices, general-purpose computers (such as personal computers and laptop computers), workstation computers, wearable devices, smart screen devices, self-service terminal devices, service robots, game systems, thin clients, various messaging devices, sensors or other sensing devices, etc. These computer devices may run various categories and versions of software applications and operating systems, such as MICROSOFT Windows, APPLE iOS, UNIX-like operating systems, Linux or Linux-like operating systems (such as GOOGLE Chrome OS); or include various mobile operating systems, such as MICROSOFT Windows Mobile OS, iOS, Windows Phone, Android. Portable handheld devices may include cellular phones, smart phones, tablet computers, personal digital assistants (PDAs), etc. Wearable devices may include head-mounted displays (such as smart glasses) and other devices. Game systems may include various handheld game devices, Internet-enabled game devices, etc. The client device is capable of executing a variety of different applications, such as various Internet-related applications, communication applications (eg, email applications), short message service (SMS) applications, and may use various communication protocols.
[0028] The network 110 may be any type of network known to those skilled in the art that may support data communications using any of a variety of available protocols, including but not limited to TCP / IP, SNA, IPX, etc. By way of example only, one or more networks 110 may be a local area network (LAN), an Ethernet-based network, a token ring, a wide area network (WAN), the Internet, a virtual network, a virtual private network (VPN), an intranet, an extranet, a blockchain network, a public switched telephone network (PSTN), an infrared network, a wireless network (e.g., Bluetooth, WIFI), and / or any combination of these and / or other networks.
[0029] Server 120 may include one or more general purpose computers, dedicated server computers (e.g., PC (personal computer) servers, UNIX servers, mid-range servers), blade servers, mainframe computers, server clusters, or any other suitable arrangement and / or combination. Server 120 may include one or more virtual machines running virtual operating systems, or other computing architectures involving virtualization (e.g., one or more flexible pools of logical storage devices that may be virtualized to maintain a server's virtual storage device). In various embodiments, server 120 may run one or more services or software applications that provide the functionality described below.
[0030] The computing units in the server 120 may run one or more operating systems including any of the above operating systems and any commercially available server operating systems. The server 120 may also run any of a variety of additional server applications and / or middle-tier applications, including HTTP servers, FTP servers, CGI servers, JAVA servers, database servers, etc.
[0031] In some implementations, server 120 may include one or more applications to analyze and consolidate data feeds and / or event updates received from users of client devices 101, 102, 103, 104, 105, and 106. Server 120 may also include one or more applications to display data feeds and / or real-time events via one or more display devices of client devices 101, 102, 103, 104, 105, and 106.
[0032] In some embodiments, the server 120 may be a server of a distributed system, or a server combined with a blockchain. The server 120 may also be a cloud server, or an intelligent cloud computing server or intelligent cloud host with artificial intelligence technology. A cloud server is a host product in a cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and virtual private servers (VPS) services.
[0033] The system 100 may also include one or more databases 130. In some embodiments, these databases may be used to store data and other information. For example, one or more of the databases 130 may be used to store information such as audio files and video files. The databases 130 may reside in various locations. For example, the database used by the server 120 may be local to the server 120, or may be remote from the server 120 and may communicate with the server 120 via a network-based or dedicated connection. The databases 130 may be of different categories. In some embodiments, the databases used by the server 120 may be, for example, relational databases. One or more of these databases may store, update, and retrieve data to and from the databases in response to commands.
[0034] In some embodiments, one or more of the databases 130 may also be used by applications to store application data. The databases used by the applications may be different categories of databases, such as a key-value store, an object store, or a conventional store backed by a file system.
[0035] Figure 1The system 100 may be configured and operated in various ways to enable the application of various methods and apparatuses described in the present disclosure.
[0036] In the related technology, one implementation method is to use a virtual operating environment to realize the dynamic user interface. For example, you can use a JavaScript operating environment or run a self-built virtual machine environment on the client. Another implementation method is to realize the dynamic layout based on Web technology, that is, to use cross-end rendering with the help of web page technology. However, the application stability and fluency of the above solution are insufficient, and it is difficult to achieve complex dynamic and flexible interactions. In order to more conveniently and accurately control the dynamic interaction process of the page, the triggering relationship between the user's interactive operation and the page display action can also be predefined. However, this mechanism can only define a simple sequential triggering logic, and the application scenarios are limited.
[0037] Based on this, the present disclosure provides a page display method, which uses page interaction information to trigger page display information and uses a data accessor component to determine the target value of the display variable in the target page display information. The control logic involving variable data is implemented through the cooperation of page interaction information and the data accessor component, thereby improving the flexibility of page display.
[0038] Figure 2 FIG. 2 shows a flow chart of a page display method 200 according to an exemplary embodiment of the present disclosure. Figure 2 As shown, the method 200 includes:
[0039] Step S201: in response to detecting a page interaction operation for a first page, determining target page display information corresponding to the page interaction operation based on page interaction information, wherein the page interaction information includes a correspondence between the page interaction operation and the page display information;
[0040] Step S202: in response to determining that the target page display information includes a display variable, determining a target value of the display variable using a data accessor component, wherein the data accessor component is used to determine the target value based on source data of the target page to be displayed;
[0041] Step S203: determining a target instruction corresponding to the target page display information based on the target value; and
[0042] Step S204: Output the second page by executing the target instruction.
[0043] By applying the above method 200, the page interaction information including the mapping relationship between page interaction operations and page display information can be used to define the dynamic display logic of the page, and the data accessor component can be used to determine the values of the display variables required for the target page display information. The page display is controlled through the cooperation of the page interaction information and the data accessor component, thereby improving the flexibility of the page display.
[0044] By applying the above technical means, the target page display information can be used to define the page display logic involving display variables, and then the display effect of the second page to be displayed can be adjusted by changing the value of the display variable, thereby improving the flexibility of page display. In this case, when the page display effect needs to be adjusted, it is only necessary to modify the definition content of the display variable in the page display information, or the page display effect can be adjusted by adjusting the value of the display variable, so that the page display can be controlled more conveniently.
[0045] In some examples, the page interaction operation can be various types of predefined events. Predefined events can be used to indicate various interaction events or system events triggered by users or operating environments, such as mouse clicks, keyboard inputs, touch screen touches, page loading completion, message reception, etc.
[0046] In some examples, the page display information may indicate various predefined actions, i.e., operations or behaviors performed in response to the above-mentioned page interaction operations, such as modifying the view state, modifying the component style, adjusting the component position, adjusting the component size, sending a network request, updating data, etc. In some examples, the action may also be performed in response to other trigger conditions, such as performing a page display action based on a pre-set timing trigger logic. By applying the above-mentioned technical means, dynamic adjustments can be made based on page interaction operations during the page display process, so that users can achieve dynamic interaction with the page through various types of interaction operations, and more comprehensive and accurate page display logic and dynamic interaction logic can be achieved while simplifying the control logic, thereby improving the user's experience of browsing or interacting with the page and meeting the needs of actual application scenarios.
[0047] Figure 3 A schematic diagram showing page interaction information according to an exemplary embodiment of the present disclosure is shown.
[0048] like Figure 3 As shown, the page interaction information describes the mapping relationship between page interaction operations and page display actions. Specific page interaction operations can trigger action chain data. Action chain data can be graph structure data based on specific trigger timing and nested logic. The nodes in the action chain describe each executable action, and the edges in the action chain describe the trigger logic between each action.
[0049] In some examples, the page interaction information can also be pre-stored based on various data structures, for example, a structured table can be used to store the mapping relationship between page interaction operations and page display information. As long as the page interaction information can be accurately described to facilitate the page display end to determine the mapping relationship between page interaction operations and page display information, the present disclosure does not limit the specific storage form of the page interaction information.
[0050] As mentioned above, page interaction information can define the triggering relationship between the user's page interaction operation and the page display action. However, only using page interaction information to control page display can only implement simple sequential triggering logic, such as Figure 3 The process shown in Figure 2 is that action 2 triggers action 3 and action 4 in sequence. However, this method fails to implement more complex control logic. For example, when the page display process includes conditional judgment operations, since the operation involves the process of obtaining conditional data and conditional branch logic, it is impossible to express Figure 3 For another example, when a page display process includes a loop operation, since the operation involves loop iteration data, Figure 3 The sequentially triggered action chain logic shown cannot effectively transfer iterable data and cannot be applied Figure 3 The page interaction information shown controls the loop process.
[0051] Therefore, in the present application, by applying the method 200 as described above, while using page interaction information to define the page control logic, the data accessor component can be combined to extract the target value of the display variable of the page display action from the source data of the page to be displayed, so that the page display action defined in the action chain can realize the page display based on the target value, thereby improving the flexibility of page display.
[0052] According to some embodiments, the target page display information includes a display operation type, and in step S202, in response to determining that the target page display information includes a display variable, determining the target value of the display variable using a data accessor component includes: in response to determining that the display operation type is a branch operation or a loop operation, determining the target value based on the source data using the data accessor component. Thus, the target value of the display variable can be extracted according to the display operation type included in the target page display information, and the data accessor can be applied to solve the dynamic data involved in the branch logic or loop logic, and control the complex page interaction process to improve the flexibility of page display.
[0053] In some examples, the page display information may include a trigger relationship between a page interaction operation and a page display operation. In this case, the display operation type of the page display operation may be passed to the data accessor component so that the data accessor component can extract and operate source data based on the definition content of the page display operation.
[0054] According to some embodiments, when the display operation type of the target page display information is a branch operation, the target page display information includes a first instruction corresponding to a first value, and the step S203 determines the target instruction corresponding to the target page display information based on the target value, including: in response to determining that the target value is the first value, determining that the first instruction is the target instruction. Thus, instructions for different branches under different conditions can be predefined in the branch operation, so as to determine the instruction branch to be executed based on the target value of the display variable (i.e., branch condition data), so as to implement conditional branch logic in the page display process and improve the flexibility of page display.
[0055] In some examples, the information of the branch operation defined in the page interaction information may include the following fields:
[0056] "type": "if",
[0057] "scopeId": number,
[0058] "args":{
[0059] "condition":# <data-ref>,
[0060] "yes":Action[],
[0061] "no":Action[],
[0062] Among them, the "type" field defines the page display operation type (i.e. using if to indicate a branch operation), the "scopeId" field defines the scope of the page display operation to indicate the component id of the target page on which the page display operation acts, the "condition" field corresponds to conditional data whose return value is a Boolean type, and the "yes" and "no" fields correspond to the page display operation (Action) information that needs to be executed when the condition field return value is true and no, respectively.
[0063] It can be understood that the above branch operation can realize various conditional judgments and branch processes, as long as the conditional data and different action branches are defined as needed. For example, when method 200 is applied to the field of e-commerce, the conditional data can be used to return the judgment information of "whether the user is logged in". If the user is already logged in, the target page can be controlled to further display the user's personal information by defining the action chain of the "yes" branch. If the user is not logged in, the target page can be controlled to display information prompting the user to log in by defining the action chain of the "no" branch.
[0064] According to some embodiments, when the display operation type of the target page display information is a loop operation, the target page display information includes a second instruction, and the second instruction includes an instruction variable. In step S203, based on the target value, determining the target instruction corresponding to the target page display information includes: determining the value of the instruction variable based on the target value to obtain the target instruction. Thus, it is possible to predefine iterable data and instructions to be executed in the loop process in the loop operation, so as to execute predetermined instructions based on the target value of the display variable, so as to implement loop iteration logic in the page display process and improve the flexibility of page display.
[0065] In some examples, the information of the loop operation defined in the page interaction information may include the following fields:
[0066] "type":"for",
[0067] "scopeId":number,
[0068] "args":{
[0069] "items":# <data-ref>,
[0070] "actions":Action[],
[0071] Among them, the "type" field defines the page display operation type (that is, using for to indicate a loop operation), the "scopeId" field defines the scope of the page display operation to indicate the component id of the target page on which the page display operation acts, the "items" field corresponds to the iterable data in the loop process, and the "actions" field corresponds to the page display operation (Action) information that needs to be executed in a loop during the traversal of items. It can be understood that each operation in actions can access the content and subscripts of the data elements in items.
[0072] It can be understood that the above loop operation can realize various loop traversal processes, as long as the iterable data and loop actions therein are defined as needed. For example, when the method 200 is applied to the field of e-commerce and is specifically used to display a user's shopping cart interface, the iterable data can be used to indicate the price and quantity information of all the goods contained in the current shopping cart. On this basis, the price and quantity information of each product can be traversed by defining an action chain, and then the total price of all the products can be calculated, and the calculation result can be displayed on the target page.
[0073] According to some embodiments, the display variable includes at least two sub-variables; the value of the instruction variable includes the value of the sub-variable. Thus, multiple sub-variables can be used to store and transfer iterable data in loop logic, which is more convenient and efficient.
[0074] Referring to the example described above, when method 200 is used to display the user's shopping cart interface, the iterable data includes the price and quantity information of all the goods contained in the current shopping cart. In this case, multiple sub-variables can be used to store the price and / or quantity information of each commodity, and then the price information of each commodity can be accumulated in sequence by traversing the values of multiple sub-variables. In this example, the second instruction can be an instruction for performing cumulative calculations, and the instruction variable included in the second instruction is the data to be accumulated. In this case, multiple target instructions can be determined based on the values of multiple sub-variables (i.e., the price information of multiple commodities), and each target instruction is used to accumulate the price information of a commodity, and then the sum of the prices of multiple commodities can be accumulated in sequence.
[0075] According to some embodiments, the display variable is an array variable, the at least two sub-variables are data elements in the array variable, and the determining the value of the instruction variable based on the target value to obtain the target instruction includes: using the data accessor component to update the subscript of the data element and the value of the data element; the value of the instruction variable includes the updated value of the data element. Thus, the data accessor can be used to update the value and subscript of the data element in the array, and then passed to the action content defined in the loop operation, so that the corresponding action instruction can be executed, and convenient and efficient control is achieved through the cooperation of page interaction information (defining the action chain) and the data accessor.
[0076] According to some embodiments, determining the target value of the display variable by using the data accessor component in step S202 includes: obtaining the original parameters of the display variable by accessing the source data; and determining the target value based on the original parameters. Thus, the data accessor can be used to achieve the adaptation of the original parameters to the target value of the display variable required in the page interaction information, and the interaction process can be effectively controlled through the cooperation of the page interaction information and the data accessor.
[0077] In some examples, the source data of the target page may be structured data (eg, JSON data), in which case the process of accessing the source data of the target page to extract the original parameters may include obtaining list data and object attribute data.
[0078] For example, the process of obtaining list data can be implemented based on the following code to obtain the first item of the list:
[0079] {list:[1,2]}
[0080] list[0]
[0081] For another example, the process of obtaining object properties can be implemented based on the following code to access the a property of the obj object:
[0082] {obj:{a:1}}
[0083] obj.a
[0084] In some examples, determining the target value of the display variable based on the original parameter includes: determining the target value by performing an arithmetic operation or a logical operation on the original parameter. Thus, the necessary arithmetic operation or logical operation can be implemented by using the data accessor component to meet the requirements of the page display operation defined in the page interaction information for the input parameters, so as to achieve accurate control of the page interaction logic.
[0085] According to some embodiments, the display variable is of a target data type, and determining the target value based on the original parameter includes: in response to determining that the original data type of the original parameter is different from the target data type, converting the original parameter to the target data type to obtain the target value. Thus, the data accessor component can be used to convert the data type of the original parameter to match the parameter format definition in the page interaction information.
[0086] In some examples, the preset data type may include at least one of the following: character type, integer type, floating point type, Boolean type.
[0087] Referring to the example described above, when the conditional data defined in the branch operation is of Boolean type, in order to adapt to the definition content of the branch operation, it is necessary to use the data accessor component to convert the non-Boolean original parameter into Boolean type so that the various operations defined in the page display information can be executed correctly.
[0088] In some examples, when the original data type or the preset data type is a Boolean type, the data type conversion operation can be performed based on a preset data type conversion rule to determine the target value of the display variable. Thus, when the data type conversion operation involves a Boolean type, the data type conversion rule can be preset as needed to enable the output result of the data accessor component to be compatible with the parameter format definition in the page interaction information.
[0089] In some examples, the data conversion operation rules may be shown in the following table (in the table, the four types of operations, getBool, getString, getInt, and getDouble, correspond to the operations of converting the original parameters into Boolean, character, integer, and floating point types, respectively)
[0090]
[0091] The table shows the data type conversion rules for converting between four data types: Boolean, character, integer, and floating point. As shown in the table, when integer and floating point data are converted to each other, it is only necessary to perform zero padding or decimal removal operations. When integer and floating point data need to be converted to character data, it is only necessary to change the record format of the digital element without changing the value content.
[0092] When character data needs to be converted to Boolean or numeric data, it can be converted to a predetermined value defined in the data type conversion rule based on whether the character data is empty. According to the data type conversion rules defined in the above table, when the character data is not empty, the predetermined values for converting it to Boolean, integer, and floating-point data are true, 1, and 1.0, respectively. It can be understood that the judgment rules for converting based on whether the character data is empty and the predetermined values for converting based on the judgment results can be pre-defined according to the needs of the actual scenario.
[0093] Similarly, when it is necessary to convert Boolean data to character type, integer type or floating point type, the predetermined values corresponding to the true value and false value of Boolean data can be respectively used in the data type conversion rules. According to the data type conversion rules defined in the above table, when Boolean data is true, the predetermined values for converting it to character type, integer type and floating point type are 'true', 1 and 1.0 respectively. It can be understood that the predetermined values for converting according to the value of Boolean data can be pre-defined according to the needs to meet the needs of actual application scenarios.
[0094] According to some embodiments, method 200 further includes: in response to determining that the target page display information is a non-variable, determining a target instruction corresponding to the target page display information or an instruction sequence consisting of multiple target instructions, wherein in step S204, outputting the second page by executing the target instruction includes: in response to determining that the target page display information includes an instruction sequence consisting of multiple target instructions, sequentially executing each target instruction in the instruction sequence. Thus, flexible control and adjustment of page display can be achieved based on a single instruction or an instruction sequence, that is, dynamic interaction between page interaction operations and page display is achieved.
[0095] It is understandable that multiple target instructions in the instruction sequence can be defined based on a preset timing logic. By using the instruction sequence to control the page display process, the page display operation can be configured in a certain order and logic, and the interaction process can be accurately organized and controlled to meet the needs of actual application scenarios.
[0096] According to some embodiments, method 200 further includes: obtaining a page description file, wherein the page description file includes component description information of the first page and the page interaction information; and displaying the first page based on the component description information, wherein outputting the second page by executing the target instruction in step S204 includes: adjusting the first page to obtain the second page by executing the at least one target instruction. By encapsulating the component description information and the page interaction information in the page description file, the page display end can perform dynamic interaction adjustment based on the page interaction information while parsing the static display component based on the component description information.
[0097] In some examples, page components may include various types of user interface components, such as dialog boxes, buttons, table items, cards, pop-up windows, etc., for displaying information to users or receiving user interaction operations, that is, enabling an interactive process of transmitting information between users and computers.
[0098] In some examples, the component description information of the page component may include information such as the size, style, and position of the component, so that the page display terminal can determine how to render and display each page component by parsing the component description information, that is, it can realize page display. It can be understood that as long as the component description information includes the firmware information of the display device and the relative display position and relative display size of the component on the display device, the page can be adapted to different screen sizes, device orientations, and content changes, and flexible adjustment of page display can be realized to improve user experience.
[0099] In some examples, the page interaction operation can be various types of predefined events. Predefined events can be used to indicate various interaction events or system events triggered by users or operating environments, such as mouse clicks, keyboard inputs, touch screen touches, page loading completion, message reception, etc.
[0100] In some examples, the page description file can be written in various languages, such as XML description language or JSON description language. By applying a structured description language to construct a page description file, the page display terminal can parse the page description file conveniently and quickly, so as to realize flexible page display based on the page display logic and dynamic interaction logic defined in the page description file.
[0101] According to some embodiments, the page description file also includes code data of the data accessor, and the code data includes a data access identifier, and the method 200 further includes: using a parser to parse the component description information and the page interaction information, wherein the parser can identify the code data of the data accessor based on the data access identifier. Thus, by marking the code data of the data accessor with the data access identifier in the page description file, the parser can accurately identify the data accessor component code to avoid confusion with the page interaction information.
[0102] In some examples, the parser may include functional components such as a dynamic layout data parser, an interactive instruction parser, and an event scheduler. The dynamic layout data parser is responsible for parsing the component description information related to each page component in the page description file. As mentioned above, the component description information can be dynamic layout data constructed based on information such as the relative display position and relative display size of the component on the display device, that is, it can make the page adapt to different screen sizes, device orientations, and content changes, and realize flexible adjustment of page display. After parsing the component description information, all view data can be finally assembled into a view tree data.
[0103] On this basis, the interaction instruction data parser can parse the page interaction information in the page description file, and then generate a page interaction information set indicating the mapping relationship between the event and the page display information and save it in the memory.
[0104] The event scheduler is responsible for receiving events from users or the system, such as view interaction events (page interaction operations) and system events, and matching and executing the page interaction information corresponding to the event. In this example, the event scheduler can be bound to the page, that is, each page is configured with a dedicated event scheduler, and the event scheduler can map the received events into event names corresponding to the configuration of the dynamic layout runtime (such as interaction operation names).
[0105] By applying the above-mentioned technical means, when an event (such as a page interaction operation) is received by the event scheduler, the scheduler will convert the event into a predefined event name, and then determine the action chain data to be executed by searching the page interaction information set and execute each action one by one, so as to flexibly control the page display.
[0106] In some examples, the code data used to implement the page display method in each of the above embodiments can be developed using the Kotlin Multiplatform Mobile (Kotlin Mobile Cross-Platform, KMM) solution. By writing business logic in a shared Kotlin code base, the same logic code is run on each platform (such as Android platform and iOS platform), thereby achieving consistency of the logic control unit and ensuring a consistent user experience on different platforms.
[0107] According to one aspect of the present disclosure, a page display device is also provided. Figure 4 FIG. 4 shows a structural block diagram of a page display device 400 according to an exemplary embodiment of the present disclosure. Figure 4 As shown, the page display device 400 includes:
[0108] A first determining unit 401 is configured to, in response to detecting a page interaction operation on a first page, determine target page display information corresponding to the page interaction operation based on page interaction information, wherein the page interaction information includes a correspondence between the page interaction operation and the page display information;
[0109] A second determining unit 402 is configured to determine a target value of the display variable using a data accessor component in response to determining that the target page display information includes a display variable, wherein the data accessor component is used to determine the target value based on source data of the target page to be displayed;
[0110] A third determining unit 403 is configured to determine a target instruction corresponding to the target page display information based on the target value; and
[0111] The first display unit 404 is configured to output the second page by executing the target instruction.
[0112] According to some embodiments, the target page display information includes a display operation type, and the second determination unit is configured to: in response to determining that the display operation type is a branch operation or a loop operation, determine the target value based on the source data using the data accessor component.
[0113] According to some embodiments, the display operation type is a branch operation; the target page display information includes a first instruction corresponding to a first value; and the third determination unit is configured to: in response to determining that the target value is the first value, determine that the first instruction is the target instruction. .
[0114] According to some embodiments, the operation type is a loop operation; the target page display information includes a second instruction, and the second instruction includes an instruction variable; the third determination unit is configured to: determine the value of the instruction variable based on the target value to obtain the target instruction.
[0115] According to some embodiments, the presentation variable includes at least two sub-variables; and the value of the instruction variable includes the values of the sub-variables.
[0116] According to some embodiments, the display variable is an array variable; the at least two sub-variables are data elements in the array variable; the third determination unit is configured to: use the data accessor component to update the subscript of the data element and the value of the data element; the value of the instruction variable includes the updated value of the data element.
[0117] According to some embodiments, the second determination unit includes: an acquisition subunit configured to acquire original parameters of the display variable by accessing the source data; and a determination subunit configured to determine the target value based on the original parameters.
[0118] According to some embodiments, the type of the display variable is a target data type; the determination subunit is configured to: in response to determining that the original data type of the original parameter is different from the target data type, convert the original parameter into the target data type to obtain the target value.
[0119] According to some embodiments, the device 400 also includes: a fourth determination unit, configured to determine a target instruction corresponding to the target page display information or an instruction sequence consisting of multiple target instructions in response to determining that the target page display information is a non-variable, wherein the first display unit is configured to: in response to determining that the target page display information includes an instruction sequence consisting of multiple target instructions, sequentially execute each target instruction in the instruction sequence.
[0120] According to some embodiments, the device 400 also includes: an acquisition unit, configured to acquire a page description file, wherein the page description file includes component description information of the first page and the page interaction information; and a second display unit, configured to display the first page based on the component description information, wherein the first display unit is configured to: adjust the first page to obtain the second page by executing the at least one target instruction.
[0121] According to some embodiments, the page description file also includes code data of the data accessor, and the code data includes a data access identifier, and the device 400 also includes: a parsing unit, configured to use a parser to parse the component description information and the page interaction information, wherein the parser can identify the code data of the data accessor based on the data access identifier.
[0122] It should be understood that Figure 4 The operations of the various units of the page display device 400 shown in FIG. Figure 2 The steps in the described page display method 400 correspond to each other. Therefore, the operations, features and advantages described above for the method 200 are also applicable to the device 400 and the various units included therein. For the sake of brevity, some operations, features and advantages are not repeated here.
[0123] In the technical solution of the present disclosure, the collection, storage, use, processing, transmission, provision and disclosure of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0124] According to another aspect of the present disclosure, an electronic device is also provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the above-mentioned page display method.
[0125] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is also provided, wherein the computer instructions are used to enable the computer to execute the above-mentioned page display method.
[0126] According to another aspect of the present disclosure, a computer program product is also provided, including a computer program, wherein the computer program implements the above-mentioned page display method when executed by a processor.
[0127] refer to Figure 5 , a block diagram of an electronic device 500 that can be used as a server or client of the present disclosure will now be described, which is an example of a hardware device that can be applied to various aspects of the present disclosure. The electronic device is intended to represent various forms of digital electronic computer devices, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.
[0128] like Figure 5 As shown, the device 500 includes a computing unit 501, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 502 or a computer program loaded from a storage unit 508 into a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the device 500 can also be stored. The computing unit 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.
[0129] Multiple components in the device 500 are connected to the I / O interface 505, including: an input unit 506, an output unit 507, a storage unit 508, and a communication unit 509. The input unit 506 can be any type of device that can input information to the device 500. The input unit 506 can receive input digital or character information and generate key signal input related to user settings and / or function control of the electronic device, and can include but is not limited to a mouse, a keyboard, a touch screen, a track pad, a track ball, a joystick, a microphone, and / or a remote controller. The output unit 507 can be any type of device that can present information, and can include but is not limited to a display, a speaker, a video / audio output terminal, a vibrator, and / or a printer. The storage unit 508 can include but is not limited to a disk, an optical disk. The communication unit 509 allows the device 500 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks, and can include but is not limited to a modem, a network card, an infrared communication device, a wireless communication transceiver, and / or a chipset, such as a Bluetooth™ device, an 802.11 device, a WiFi device, a WiMax device, a cellular communication device, and / or the like.
[0130] The computing unit 501 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 501 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 501 performs the various methods and processes described above, such as the page display method. For example, in some embodiments, the page display method may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 508. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 500 via the ROM 502 and / or the communication unit 509. When the computer program is loaded into the RAM 503 and executed by the computing unit 501, one or more steps of the page display method described above may be performed. Alternatively, in other embodiments, the computing unit 501 may be configured to perform the page display method in any other appropriate manner (e.g., by means of firmware).
[0131] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0132] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0133] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0134] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0135] The systems and techniques described herein can be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), the Internet, and a blockchain network.
[0136] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.
[0137] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in this disclosure can be performed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.
[0138] Although the embodiments or examples of the present disclosure have been described with reference to the accompanying drawings, it should be understood that the above-mentioned methods, systems and devices are merely exemplary embodiments or examples, and the scope of the present invention is not limited by these embodiments or examples. Various elements in the embodiments or examples may be omitted or may be replaced by their equivalent elements. In addition, each step may be performed in an order different from that described in the present disclosure. Further, the various elements in the embodiments or examples may be combined in various ways. It is important that with the evolution of technology, many elements described herein may be replaced by equivalent elements that appear after the present disclosure.
Claims
1. A page display method, comprising: In response to detecting a page interaction operation for the first page, determining target page display information corresponding to the page interaction operation based on page interaction information, wherein the page interaction information includes a correspondence between the page interaction operation and the page display information; In response to determining that the target page display information includes a display variable, determining a target value of the display variable using a data accessor component, wherein the data accessor component is used to determine the target value based on source data of the target page to be displayed; Based on the target value, determining a target instruction corresponding to the target page display information; and By executing the target instruction, a second page is output.
2. The method of claim 1, wherein: The target page display information includes a display operation type; In response to determining that the target page display information includes a display variable, determining a target value of the display variable using a data accessor component includes: In response to determining that the display operation type is a branch operation or a loop operation, the target value is determined based on the source data using the data accessor component.
3. The method of claim 2, wherein: The display operation type is a branch operation; The target page display information includes a first instruction corresponding to a first value; The determining, based on the target value, a target instruction corresponding to the target page display information includes: In response to determining that the target value is the first value, the first instruction is determined to be the target instruction.
4. The method of claim 2, wherein: The display operation type is a loop operation; The target page display information includes a second instruction, and the second instruction includes an instruction variable; The determining, based on the target value, a target instruction corresponding to the target page display information includes: The value of the instruction variable is determined based on the target value to obtain the target instruction.
5. The method of claim 4, wherein: The display variable includes at least two sub-variables; The value of the instruction variable includes the value of the sub-variable.
6. The method of claim 5, wherein: The display variable is an array variable; The at least two sub-variables are data elements in the array variable; Determining the value of the instruction variable based on the target value to obtain the target instruction includes: updating the index of the data element and the value of the data element using the data accessor component; The value of the instruction variable includes the updated value of the data element.
7. The method according to any one of claims 1 to 6, wherein: Determining the target value of the display variable by using the data accessor component includes: Obtaining original parameters of the display variables by accessing the source data; and Based on the original parameters, the target value is determined.
8. The method of claim 7, wherein: The type of the display variable is the target data type; The determining the target value based on the original parameter comprises: In response to determining that the original data type of the original parameter is different from the target data type, the original parameter is converted to the target data type to obtain the target value.
9. The method according to any one of claims 1 to 8, further comprising: In response to determining that the target page display information is a non-variable, determining a target instruction or an instruction sequence consisting of a plurality of target instructions corresponding to the target page display information, wherein outputting the second page by executing the target instruction comprises: In response to determining that the target page presentation information includes an instruction sequence consisting of a plurality of target instructions, each target instruction in the instruction sequence is sequentially executed.
10. The method according to any one of claims 1 to 9, further comprising: Acquire a page description file, wherein the page description file includes component description information of the first page and the page interaction information; and Based on the component description information, display the first page, Wherein, outputting the second page by executing the target instruction includes: By executing the at least one target instruction, the first page is adjusted to obtain the second page.
11. The method of claim 10, wherein: The page description file also includes code data of the data accessor, and the code data includes a data access identifier, and the method further includes: The component description information and the page interaction information are parsed using a parser, wherein the parser is capable of identifying code data of the data accessor based on the data access identifier.
12. A page display device, comprising: A first determining unit is configured to, in response to detecting a page interaction operation on a first page, determine target page display information corresponding to the page interaction operation based on page interaction information, wherein the page interaction information includes a correspondence between the page interaction operation and the page display information; a second determining unit, configured to determine a target value of the display variable using a data accessor component in response to determining that the target page display information includes a display variable, wherein the data accessor component is used to determine the target value based on source data of the target page to be displayed; A third determining unit is configured to determine a target instruction corresponding to the target page display information based on the target value; and The first display unit is configured to output a second page by executing the target instruction.
13. The device of claim 12, wherein: The target page display information includes a display operation type, and the second determining unit is configured to: In response to determining that the display operation type is a branch operation or a loop operation, the target value is determined based on the source data using the data accessor component.
14. The device of claim 13, wherein: The display operation type is a branch operation; The target page display information includes a first instruction corresponding to a first value; The third determining unit is configured to: In response to determining that the target value is the first value, the first instruction is determined to be the target instruction.
15. The device of claim 13, wherein: The operation type is a cyclic operation; The target page display information includes a second instruction, and the second instruction includes an instruction variable; The third determining unit is configured to: The value of the instruction variable is determined based on the target value to obtain the target instruction.
16. The device of claim 15, wherein: The display variable includes at least two sub-variables; The value of the instruction variable includes the value of the sub-variable.
17. The device of claim 16, wherein: The display variable is an array variable; The at least two sub-variables are data elements in the array variable; The third determining unit is configured to: updating the index of the data element and the value of the data element using the data accessor component; The value of the instruction variable includes the updated value of the data element.
18. The device according to any one of claims 12 to 17, wherein: The second determining unit includes: an acquisition subunit, configured to acquire original parameters of the display variables by accessing the source data; and The determination subunit is configured to determine the target value based on the original parameter.
19. The device of claim 18, wherein: The type of the display variable is the target data type; The determining subunit is configured as follows: In response to determining that the original data type of the original parameter is different from the target data type, the original parameter is converted to the target data type to obtain the target value.
20. The apparatus of any one of claims 12 to 19, further comprising: a fourth determining unit, configured to, in response to determining that the target page display information is a non-variable, determine a target instruction corresponding to the target page display information or an instruction sequence consisting of a plurality of target instructions, Wherein, the first display unit is configured as: In response to determining that the target page presentation information includes an instruction sequence consisting of a plurality of target instructions, each target instruction in the instruction sequence is sequentially executed.
21. The apparatus of any one of claims 12 to 20, further comprising: an acquisition unit, configured to acquire a page description file, wherein the page description file includes component description information of the first page and the page interaction information; and A second display unit is configured to display the first page based on the component description information. Wherein, the first display unit is configured as: By executing the at least one target instruction, the first page is adjusted to obtain the second page.
22. The device of claim 21, wherein: The page description file also includes code data of the data accessor, and the code data includes a data access identifier, and the device also includes: The parsing unit is configured to parse the component description information and the page interaction information using a parser, wherein the parser can identify code data of the data accessor based on the data access identifier.
23. An electronic device, comprising: at least one processor; as well as a memory communicatively coupled to the at least one processor; in The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 11.
24. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to make a computer execute the method according to any one of claims 1-11.
25. A computer program product comprising a computer program, wherein: The computer program implements the method according to any one of claims 1-11 when executed by a processor.