Information processing method, device, equipment and storage medium
By receiving the user's modification operations on the target interface, determining the control ID of the control to be modified, and modifying the nested relationship table, the problem of long modification cycles in the existing technology is solved, and more efficient interface modification is achieved.
Patent Information
- Application Number
- CN202110673735.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-06-17
- Publication Date
- 2025-05-16
- Estimated Expiration
- 2041-06-17
AI Technical Summary
When modifying the application interface in the prior art, the entire template file needs to be modified and reloaded, resulting in a long modification cycle.
By receiving the user's modification operation on the target interface, determine the control ID of the control to be modified, and modify the data under the control ID in the corresponding nested relationship table of the target interface, obtain the modified nested relationship table and send it to the client only.
The modification cycle of the interface is shortened, the modification and reloading of the entire template file is avoided, and the modification efficiency is improved.
Smart Images

Figure CN113407276B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of information processing, and relates to but is not limited to an information processing method, apparatus, device and storage medium. Background Art
[0002] Terminal devices (such as mobile phones, tablet computers, etc.) usually have various applications (Application, APP) installed, wherein each APP includes an interface for users to view.
[0003] Currently, when modifying the interface in an APP, the server usually needs to modify the entire template file including the interface, and send the modified template file to the client, which loads it again and then re-initializes the interface to complete the interface refresh.
[0004] In this way, if only the content of the interface is modified, the entire template file needs to be modified, and then the entire template file is binary encoded, loaded, decoded, parsed and rendered before the modified interface can be displayed on the client. This will cause the problem of a long modification cycle for modifying the interface. Summary of the invention
[0005] The embodiments of the present application provide an information processing method, apparatus, device and storage medium to solve at least one problem existing in the related art, which can shorten the modification cycle of modifying the interface.
[0006] The technical solution of this application is implemented as follows:
[0007] In a first aspect, an embodiment of the present application provides an information processing method, the method comprising:
[0008] Receive the user's modification operation on the target interface;
[0009] Determine the control ID of the control to be modified targeted by the modification operation; the control to be modified is a control in the target interface;
[0010] Modify the data under the control ID in the nested relationship table corresponding to the target interface to obtain a modified nested relationship table;
[0011] The modified nested relationship table is sent to the client.
[0012] In a second aspect, an embodiment of the present application provides an information processing method, the method comprising:
[0013] Receive a modified nested relationship table; the modified nested relationship table is obtained by modifying the data under the control ID of the control to be modified in the nested relationship table corresponding to the target interface;
[0014] Based on the modified nested relationship table, a modified target interface is presented; the control to be modified in the modified target interface is changed relative to the control to be modified in the target interface.
[0015] In a third aspect, an embodiment of the present application provides an information processing device, the device comprising:
[0016] A first receiving unit, used to receive a user's modification operation on a target interface;
[0017] A determination unit, used to determine the control ID of the control to be modified targeted by the modification operation; the control to be modified is a control in the target interface;
[0018] A modification unit, used to modify the data under the control ID in the nested relationship table corresponding to the target interface to obtain a modified nested relationship table;
[0019] A sending unit is used to send the modified nested relationship table to the client.
[0020] In a fourth aspect, an embodiment of the present application provides an information processing device, the device comprising:
[0021] The second receiving unit is used to receive a modified nested relationship table; the modified nested relationship table is obtained by modifying the data under the control ID of the control to be modified in the nested relationship table corresponding to the target interface;
[0022] The display unit is used to present a modified target interface based on the modified nested relationship table; the control to be modified in the modified target interface is changed relative to the control to be modified in the target interface.
[0023] In a fifth aspect, an embodiment of the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned information processing method when executing the computer program.
[0024] In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, which implements the above-mentioned information processing method when executed by a processor.
[0025] The embodiment of the present application provides an information processing method, apparatus, device and storage medium, wherein the server receives a modification operation of a target interface by a user, determines the control ID of the control to be modified targeted by the modification operation; the control to be modified is a control in the target interface; the data under the control ID in the nested relationship table corresponding to the target interface is modified to obtain a modified nested relationship table; and the modified nested relationship table is sent to the client. In this way, in the process of modifying the interface, it is only necessary to determine the control ID of the control to be modified in the target interface, and modify the data under the control ID of the control to be modified in the nested relationship table corresponding to the target interface, thereby avoiding modification of the entire template file, thereby shortening the modification cycle of modifying the interface. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 An information processing system provided in an embodiment of the present application;
[0027] Figure 2 An optional flowchart of an information processing method provided in an embodiment of the present application;
[0028] Figure 3 An optional schematic diagram of a control provided in an embodiment of the present application;
[0029] Figure 4 An optional schematic diagram of a target interface provided by an embodiment of the present application;
[0030] Figure 5 An optional flowchart of an information processing method provided in an embodiment of the present application;
[0031] Figure 6 An optional flowchart of an information processing method provided in an embodiment of the present application;
[0032] Figure 7 An optional flowchart of an information processing method provided in an embodiment of the present application;
[0033] Figure 8 An optional structural diagram of an information processing device provided in an embodiment of the present application;
[0034] Fig. 9 An optional structural diagram of an information processing device provided in an embodiment of the present application;
[0035] Fig.10 An optional structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0036] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the specific technical solution of the present application will be further described in detail below in conjunction with the drawings in the embodiments of the present application. The following embodiments are used to illustrate the present application, but are not used to limit the scope of the present application.
[0037] The embodiments of the present application may provide an information processing method and apparatus, a device (eg, an electronic device) and a storage medium (eg, a computer-readable storage medium). In practical applications, the information processing method may be implemented using an information processing device.
[0038] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those generally understood by those skilled in the art to which the present application belongs. The terms used herein in the specification of the present application are only for the purpose of describing specific embodiments and are not intended to limit the present application. The term "and / or" used herein includes any and all combinations of one or more of the related listed items.
[0039] The information processing method of the embodiment of the present application can be applied to Figure 1 The information processing system 100 shown in FIG. Figure 1 As shown, the information processing system 100 includes a server 10 and a client 20. The server 10 and the client 20 communicate with each other via a network 30.
[0040] The server 10 modifies the data under the control ID of the control to be modified in the nested relationship table corresponding to the target interface, and after obtaining the modified nested relationship table, sends the modified nested relationship table to the client 20 through the network 30. After receiving the modified nested relationship table, the client 20 can present the modified target interface based on the modified nested relationship table.
[0041] Next, combine Figure 1 The schematic diagram of the information processing system shown illustrates various embodiments of the information processing method, apparatus, device and storage medium provided in the embodiments of the present application.
[0042] Figure 2 A schematic diagram of an implementation flow of an information processing method provided in an embodiment of the present application, wherein the method is applied to an information processing device as a server, such as Figure 2 As shown, the method may include the following steps:
[0043] S201: The server receives a user's modification operation on a target interface.
[0044] Here, the target interface may include: one or more containers, and a container may include: one or more controls.
[0045] The container may include: a horizontal container and a vertical container, wherein the horizontal container is a container including at least two horizontally arranged controls, and the vertical container is a container including at least two vertically arranged controls. The control may include: an image control and a text control, wherein the image control is used to display an image, and the text control is used to display a text.
[0046] In one example, if Figure 3 As shown, the container includes: a horizontal container 301 and a vertical container 302, and the controls include: a picture control 303 and a text control 304, wherein in the horizontal container 301, two picture controls 303 are horizontally arranged, and in the vertical container 302, two text controls 304 are vertically arranged.
[0047] In an embodiment of the present application, the server may include: an interface configuration system, wherein the interface configuration system is used for configuring a target interface, wherein the configuration of the target interface may include: configuration of controls in the target interface.
[0048] In some embodiments, the configuration of the target interface may further include: configuring a container in the target interface, and after configuring the container, configuring the controls included in the container.
[0049] In one example, if Figure 4 As shown, the target interface 400 includes a vertical container 401, in which a horizontal container 402 and a horizontal container 403 are nested, in which a picture control 402a and a text control 402b are nested, in which a vertical container 404 and a vertical container 405 are nested, in which a picture control 404a and a text control 404b are nested, and in which a picture control 405a and a text control 405b are nested.
[0050] S202: The server determines the control ID of the control to be modified that is targeted by the modification operation.
[0051] Here, the control to be modified is a control in the target interface.
[0052] In actual applications, if the user needs to modify control A in the target interface, the user will perform a modification operation on control A. At this time, the server will receive the user's modification operation and, based on the modification operation, determine that the control to be modified by the user's modification operation is control A, and then determine the control ID of control A.
[0053] Here, the control ID is used to indicate which control in the target interface, and the server can determine the control in the target interface corresponding to the control ID based on the control ID.
[0054] After determining that the user's modification operation targets the control to be modified, the server can determine the control ID of the control to be modified.
[0055] After determining the control ID of the control to be modified, the server can determine which container the control to be modified is included in according to the container ID of the container in the target interface. The container ID is used to indicate which container in the target interface it is. The server can determine the container in the target interface corresponding to the container ID according to the container ID.
[0056] In one example, if Figure 4 As shown, the control ID of picture control 402a is 20001, the control ID of text control 402b is 20002, the control ID of picture control 404a is 20003, the control ID of text control 404b is 20004, the control ID of picture control 405a is 20005, and the control ID of text control 405b is 20006; the container ID of vertical container 401 is 101, the container ID of horizontal container 402 is 1001, the container ID of horizontal container 403 is 1002, the container ID of vertical container 404 is 10001, and the container ID of vertical container 405 is 10002.
[0057] S203: The server modifies the data under the control ID in the nested relationship table corresponding to the target interface to obtain a modified nested relationship table.
[0058] Here, the nested relationship table corresponding to the target interface includes: data under all control IDs in the target interface, wherein the data under the control ID includes: rendering order of the control, layout data and control content.
[0059] The layout data of the control includes information representing the layout of the control, such as the position of the control and the size of the control. The size of the control may include the width and height of the control.
[0060] In one example, Figure 4 For example, the picture control 402a in FIG. 4 has a width of 20, a height of 20, and a rendering order of 3.
[0061] The control content of a control includes information representing the content that needs to be displayed in the control, such as the address of an image and text content.
[0062] In one example, when the control is a picture control, Figure 4 For example, the picture control 402a in the picture control 402a has a control content that is the address of the picture control, for example, heep: / / ***.jpg; in the case where the control is a text control, Figure 4For example, the text control 402b in FIG. 4 is a text control, and the control content of the text control is “This is text”.
[0063] In the embodiment of the present application, the modification operation is used to modify one or both of the layout data and the control content of the control to be modified.
[0064] In an embodiment of the present application, the nested relationship table corresponding to the target interface may also include: data under all container IDs in the target interface, wherein the data under the container ID includes: container ID, container type, container rendering order, container width, container height and container rounding.
[0065] In one example, Figure 4 For example, the container 401 in FIG. 4 is a container ID of 101, the container type is vertical, the rendering order of the container is 1, the width of the container is 200, the height of the container is 180, and the radius of the container is 10.
[0066] S204: The server sends the modified nested relationship table to the client.
[0067] Here, the server sends the modified nested relationship table to the client, so that the modified interface can be displayed in the client.
[0068] An information processing method provided by an embodiment of the present application includes: a server receives a modification operation of a target interface by a user, determines the control ID of the control to be modified targeted by the modification operation; the control to be modified is a control in the target interface; the data under the control ID in the nested relationship table corresponding to the target interface is modified to obtain a modified nested relationship table; and the modified nested relationship table is sent to the client. In this way, in the process of modifying the interface, it is only necessary to determine the control ID of the control to be modified in the target interface, and modify the data under the control ID of the control to be modified in the nested relationship table corresponding to the target interface, thereby avoiding modification of the entire template file, thereby shortening the modification cycle of modifying the interface.
[0069] In some embodiments, the information processing method further includes:
[0070] The server determines the modification data of the control to be modified by the modification operation.
[0071] Here, the modified data includes: one or both of layout data and control content.
[0072] The server determines the type of the modified data;
[0073] Here, the types of modified data include: a first type and a second type, wherein the first type of modified data is layout data, and the second type of modified data is control content.
[0074] If the user modifies the size of the control to be modified, the server can determine that the modification data of the control to be modified targeted by the user's modification operation is the layout data of the control to be modified; if the user modifies the content of the control to be modified, the server can determine that the modification data of the control to be modified targeted by the user's modification operation is the control content of the control to be modified.
[0075] The server determines the nested relationship table including the control ID according to the type of the modified data.
[0076] Here, the type of modified data is different, and the nested relationship table including the control ID determined by the server is different.
[0077] If the layout data of the control is modified, the server only needs to modify the nested relationship table corresponding to the layout data, without modifying all the nested relationship tables associated with the target page; similarly, if the control content of the control is modified, the server only needs to modify the nested relationship table corresponding to the control content, without modifying all the nested relationship tables associated with the target page. In this way, the decoupling of the control layout data modification and the control content modification can be achieved.
[0078] In some embodiments, determining the nested relationship table including the control ID according to the type of the modified data includes:
[0079] If the type of the modification data includes a first type, a first nested relationship table including the control ID is determined; the first type of modification data is layout data.
[0080] Here, if the type of modified data includes layout data, the server may determine a first nested relationship table from a nested relationship table including layout data of a control ID and control content, wherein the data included in the first nested relationship table is layout data under the control ID.
[0081] In one example, the control ID of the picture control is 20001, and the data under the control ID includes: layout data and control content. If the server modifies the layout data of the control, for example, the size of the control, then it can be determined that the type of the modified data is the first type, so that the first nested relationship table can be determined from the nested relationship table including the layout data of the control ID and the control content, wherein the first nested relationship table only includes the layout data of the control ID, and does not include the control content of the control ID.
[0082] Correspondingly, the above S203 includes:
[0083] According to the layout data, the data under the control ID in the first nested relationship table corresponding to the target interface is modified to obtain a modified first nested relationship table.
[0084] Here, if the layout data is to be modified, then after determining the first nested relationship table, the server may modify the data under the control ID in the first nested relationship table to obtain a modified first nested relationship table.
[0085] In some embodiments, after obtaining the modified first nested relationship table, the server may send the modified first nested relationship table to the client through the layout interface.
[0086] In some embodiments, determining the nested relationship table including the control ID according to the type of the modified data includes:
[0087] If the type of the modified data includes a second type, determining a second nested relationship table including the control ID; the second type of modified data is control content;
[0088] Here, if the type of modified data includes control content, the server may determine a second nested relationship table from the nested relationship table including layout data of the control ID and control content, wherein the data included in the second nested relationship table is the control content under the control ID.
[0089] In one example, the control ID of the text control is 20002, and the data under the control ID include: the layout data of the control and the control content of the control. If the server modifies the control content of the control, for example, the content of the control, then the type of the modified data can be determined to be the second type of control, so that the second nested relationship table can be determined from the nested relationship table including the layout data of the control ID and the control content, wherein the second nested relationship table only includes the control content of the control ID, but does not include the layout data of the control ID.
[0090] Correspondingly, the above S203 includes:
[0091] According to the control content, the data under the control ID in the second nested relationship table corresponding to the target interface is modified to obtain a modified second nested relationship table.
[0092] Here, if the control content is modified, then after determining the second nested relationship table, the server can modify the data under the control ID in the second nested relationship table to obtain a modified second nested relationship table.
[0093] In some embodiments, after obtaining the modified second nested relationship table, the server may send the modified second nested relationship table to the client through the content interface.
[0094] In some embodiments, the information processing method further includes:
[0095] The server receives configurations for each control in the target interface; the configurations include: layout configuration and content configuration;
[0096] In an embodiment of the present application, the server may further include: a dynamic server, wherein the dynamic server is used to perform layout configuration and content configuration on each control in the target interface.
[0097] The layout configuration is to set the background color, rounded corners, size, coordinates, etc. of each picture control in the target interface, and to set the text color and text size, etc. of each text control in the target interface.
[0098] The content configuration is the image address of each image control and the text content of each text control in the target interface.
[0099] The server obtains a first nested relationship table based on the layout configuration.
[0100] Here, the server obtains the first nested relationship table based on the data included in the layout configuration.
[0101] The server obtains a second nested relationship table based on the content configuration.
[0102] Here, the server obtains the second nested relationship table based on the data included in the content configuration.
[0103] The server sends the first nested relationship table and the second nested relationship table to the client; the first nested relationship table and the second nested relationship table are used by the client to display the target interface.
[0104] Here, after determining the first nested relationship table including layout configuration and the second nested relationship table including content configuration, the server sends the first nested relationship table and the second nested relationship table to the client, and after receiving the first nested relationship table and the second nested relationship table, the client can display the target interface.
[0105] Figure 5 Schematic diagram of an implementation flow of an information processing method according to an embodiment of the present application, the method is applied to an information processing device as a client, such as Figure 5 As shown, the method may include the following steps:
[0106] S501: The client receives the modified nested relationship table.
[0107] The modified nested relationship table is obtained by modifying the data under the control ID of the control to be modified in the nested relationship table corresponding to the target interface.
[0108] S502: The client presents a modified target interface based on the modified nested relationship table.
[0109] The control to be modified in the modified target interface is changed relative to the control to be modified in the target interface.
[0110] Here, after receiving the modified nested relationship table, the client can parse the layout data in the modified nested relationship table through the software development kit (SDK) in the client to complete the initialization of the interface, parse the content data in the modified nested relationship table to complete the content update of the interface.
[0111] During the initialization of the interface, the client may render containers and controls. During the rendering process, the root container may be rendered first, and then the subcontainers and controls nested in the root container may be rendered in sequence.
[0112] During the process of updating the content of the interface, the client can use the received new control content of the control to replace the original control content of the control.
[0113] In some embodiments, the information processing method further includes:
[0114] The client determines the type of the modified nested relationship table;
[0115] When the type of the modified nested relationship table includes a first type, the client receives the modified first nested relationship table; the modified data of the first type is layout data;
[0116] When the type of the modified nested relationship table includes a second type, the client receives the modified second nested relationship table; the modified data of the second type is control content.
[0117] Here, when the client receives the modified first nested relationship table, the client can parse the layout data in the first nested relationship table to obtain the layout configuration of the target interface; when the client receives the modified second nested relationship table, the client can update the control content in the second nested relationship table to obtain the control content of the target interface.
[0118] In some embodiments, the information processing method further includes:
[0119] The client receives a first nested relationship table obtained based on the layout configuration and a second nested relationship table obtained based on the content configuration;
[0120] Here, after the client receives the first nested relationship table obtained based on the layout configuration and the second nested relationship table obtained based on the content configuration sent by the server, the client can parse the first nested relationship table to obtain information such as the background color, size, and position of each control in the target interface, and update the image content and text content of each control in the target interface according to the second nested relationship table.
[0121] The client displays the target interface according to the order in which the first nested relationship table and the second nested relationship table are received.
[0122] In some embodiments, the client displays the target interface according to the order in which the first nested relationship table and the second nested relationship table are received, including:
[0123] In the case where the first nested relationship table is received first and the second nested relationship table is received later, the layout configuration of each control in the target interface is displayed first, and then the content configuration of each control in the target interface is loaded;
[0124] In the case where the second nested relationship table is received first and the first nested relationship table is received later, the layout configuration and content configuration of each control in the target interface are displayed simultaneously.
[0125] In the embodiment of the present application, if the client receives the first nested relationship table first and then receives the second nested relationship table, then after receiving the first nested relationship table, the client can first initialize the target interface through the layout initialization module, and after receiving the second nested relationship table, assign values to each control in the target interface. Among them, initializing the target interface is to perform layout configuration on each control in the target interface. At this time, each control in the target interface has no control content. After performing layout configuration on each control in the target interface, the client assigns values to each control in the target interface. After the assignment, each control in the target interface has control content.
[0126] In the process of initializing the interface, the container and the control can be rendered to complete the initialization of the interface. In the process of rendering the container, the initialization module can first find the root container, render the root container, then find the subcontainer nested in the root container, render the subcontainer, and then recursively render it layer by layer from the outside to the inside. In the process of rendering the control, you can first find the control nested under the root container, render the control nested under the root container, then find the control nested under the subcontainer and render it, and for the subcontrols nested under a control, you can first render the outer layer control, and then render the subcontrols nested under the control.
[0127] After receiving the second nested relationship table, the client can assign values to the interface content according to the received second nested relationship table. For example, if it is a picture control, a picture is set at the position of the picture control; if it is a text control, a text is set at the position of the text control.
[0128] During the process of initializing the interface, for the picture control, only a blank area is reserved or a default placeholder is displayed. For the text control, only the text display area is reserved, and no text is displayed. Therefore, after the interface is initialized, the content of the interface needs to be updated to complete the final interface display.
[0129] In an embodiment of the present application, if the client first receives the second nested relationship table and then receives the first nested relationship table, then after receiving the first nested relationship table, the client will integrate the layout data and the control content through the data parsing module, and integrate the first nested relationship table and the second nested relationship table into one, thereby completing the initialization of the interface and assigning values to the interface content.
[0130] In some embodiments, if the client receives the first nested relationship table but not the second nested relationship table, or if the client receives the second nested relationship table but not the first nested relationship table, the client will start a retry mechanism to re-receive the nested relationship table sent by the server. The general number of retries is 2. If the data is correctly acquired during the retry process, the information processing method will be executed in the order in which the data is acquired. If the number of retries is exhausted and the data loading still fails, the page will change from the loading prompt state to the page loading abnormality prompt state.
[0131] In some embodiments, Figure 6 As shown, after receiving the modified nested relationship table sent by the server, the client performs the following steps:
[0132] S601: Start rendering and updating the target interface.
[0133] S602: Start interface request.
[0134] The above S602 includes:
[0135] S602a: Start a layout interface request.
[0136] S602b: Start content interface request.
[0137] S602a1. Determine whether the layout data is loaded normally.
[0138] If the loading is normal, S602a2 is executed; if the loading is abnormal, the retry mechanism is started and S603 is executed, wherein S603 is to determine whether the number of retries is greater than 2 times.
[0139] S602a2: Analyze the layout data.
[0140] S602a3: Determine whether there is content data.
[0141] If there is content data, then S602b2 is executed; if there is no content data, then S602a4 is executed. Among them, S602b2 is to parse the content data.
[0142] S602a4. Initialize the root container.
[0143] S602a5. Initialize the child container.
[0144] S602a6. Initialize child controls.
[0145] After executing the above S602a5, S602a7 is executed, and S602a7 is to determine whether there is a sub-container in the sub-container. If there is a sub-container, S602a5 and S602a6 are executed again; if there is no sub-container, S602a8 is executed.
[0146] S602a8. Interface initialization is completed.
[0147] S602a9: Determine whether the control has displayed content.
[0148] If the content has been displayed, S605 is executed; if the content has not been displayed, S602b9 is executed. S605 is to end the interface rendering and updating, and S602b9 is to determine whether there is content data.
[0149] After executing the above S602b, execute the following S602b1.
[0150] S602b1. Determine whether the control content is loaded normally.
[0151] If the loading is normal, execute S602b2; if the loading is abnormal, start the retry mechanism and execute S603.
[0152] S602b2. Analyze the content data.
[0153] S602b3. Determine whether there is layout data.
[0154] If there is layout data, execute S602b4; if there is no layout data, execute S602c.
[0155] S602b4. Integrate layout data and control content.
[0156] S602c, determine whether the target interface has been initialized. If it has been initialized, execute S602b5.
[0157] S602b5. Determine the root container.
[0158] S602b6. Determine the subcontainer.
[0159] S602b7. Update child controls.
[0160] After executing the above S602b6, execute S602b8, which is to determine whether there is a sub-container in the sub-container. If there is a sub-container, re-execute the above S602b6 and S602b7; if there is no sub-container, execute the following S604.
[0161] S604: The target interface is updated.
[0162] The information processing method provided in the embodiments of the present application is as follows: Figure 7 As shown, including:
[0163] S701: The server receives a modification operation of a target interface by a user.
[0164] S702: The server determines the control ID of the control to be modified that is targeted by the modification operation.
[0165] S703: The server modifies the data under the control ID in the nested relationship table corresponding to the target interface to obtain a modified nested relationship table.
[0166] S704: The server sends the modified nested relationship table to the client.
[0167] S705: The client receives the modified nested relationship table.
[0168] S706: The client presents a modified target interface based on the modified nested relationship table.
[0169] Among them, for the description of S701, please refer to the description of S201 in the above embodiment; for the description of S702, please refer to the description of S201 in the above embodiment; for the description of S703, please refer to the description of S203 in the above embodiment; for the description of S704, please refer to the description of S204 in the above embodiment; for the description of S705, please refer to the description of S501 in the above embodiment; for the description of S706, please refer to the description of S502 in the above embodiment.
[0170] The information processing system provided in this application includes three modules, namely, the interface configuration platform, the dynamic service and the mobile client. The interface configuration platform is a visual editing place for the dynamic layout interface, which mainly completes the layout configuration and content configuration, and then associates and binds the layout and content data through the control ID. The dynamic service provides two data services, namely the layout data service and the content data service. It formats the layout information and content information published by the configuration platform respectively, and finally sends it to the mobile terminal in JSON format through the layout interface and the content interface. The mobile terminal is the final place to display the dynamic layout. After obtaining the layout data from the layout interface of the server, the dynamic SDK embedded in the mobile terminal performs data parsing, and then gradually completes the initialization rendering of the container control and its sub-controls from the outside to the inside, and finally updates the content data obtained by the content interface to the control that has just been initialized to complete the display of the entire dynamic interface.
[0171] After completing the configuration of the dynamic layout container nesting relationship, position, and size attributes, you can also set layout attributes such as control radius, color, size, and inner and outer margins as needed. These attributes will be uploaded to the dynamic service for layout data processing when publishing.
[0172] Next is the content data configuration, which is relatively simple. It mainly involves assigning values to the image controls and text controls in the above dynamic interface, setting the image address for the image control, and setting the text content for the text control.
[0173] The main idea of this solution is to decouple dynamic layout data from content data. A corresponding relationship is established between the two through the control ID. After completing the interface configuration on the configuration platform, click Publish. The layout data and content data will be uploaded to the dynamic server separately. The server will format the uploaded layout data and content data separately and keep the same nested relationship between the two, as shown below Figure 4 As shown, standard JSON data is finally generated and sent to the mobile client.
[0174] The mobile client starts the data request module to request data. The interface displays the loading status. Then, the layout data sent by the layout interface completes the interface layout initialization. The content data sent by the content interface completes the content display (interface update). Since the data is decoupled into two interfaces, there are problems such as data first-come-first-served and loading failure, which can be divided into the following four situations:
[0175] 1. Layout data arrives first, content data arrives later;
[0176] 2. The layout data arrives first and the content data fails to load;
[0177] 3. Content data arrives first, layout data arrives later;
[0178] 4. The content data arrives first and the layout data fails to load;
[0179] 1 and 3 are two normal data receiving situations, but their processing methods are quite different. Let's first introduce the situation where 1 layout data arrives first and content data arrives later. In this case, after the client obtains the layout data, in order to make full use of the waiting time for content data loading, the layout initialization module is immediately started. Since the layout data is designed to simulate the nested structure of the real layout, when initializing the interface layout, the initialization module only needs to find the root container first, and then recursively render it layer by layer from the outside to the inside. Each layer of sub-controls will be rendered in order according to the rendering order set in the configuration platform. When there are sub-containers in the sub-container, all layout data after the sub-container node will be passed as parameters to the rendering module to complete the rendering of the sub-sub-controls in the sub-container. It goes on recursively layer by layer until the controls of all leaf nodes are rendered, and the initialization of the interface layout is completed.
[0180] But this step is not over yet. In order to display rich content on the interface, the interface needs to be updated with the content data obtained later. When initializing each control, only the default data is used for display. For example, the picture control only reserves a blank area or displays a default placeholder, and the text control only reserves a text display area without displaying any text. As mentioned above, the content data and layout data are decoupled. They are only connected through the control ID. In order to achieve the purpose of updating the interface content in a recursive way from the outside to the inside when initializing the layout, the content data is also designed to simulate the nested structure of the real layout. When updating the control display content, the update module also finds the root container first, then retrieves the sub-control content data by id, and completes the assignment for the initialized sub-control. If there is a sub-container, all the content data after the sub-container node is passed as a parameter to the update module to complete the assignment of the sub-sub-controls in the sub-container. In this way, after the client executes the layout and content double recursive process, the loading state is removed to complete the display of the entire interface.
[0181] Next, we will introduce the situation where the content data arrives first and the layout data arrives later. In this case, since the layout data has not been obtained yet, the interface continues to display the loading state, and the initialization module will wait for the layout data to arrive. Although the content data has been obtained, the interface has not been initialized, and the update module will not start the update process. When the layout data arrives, the data parsing module will integrate the layout data and the content data into a structure with layout and content data according to the original nested relationship. In short, the above Figure 4 The two parts of data are combined into one, which is equivalent to adding content data to the layout data, as follows Figure 5 As shown, this can merge the original two nested recursive processes into one.
[0182] The following processing flow is the same as the initialization of the interface in case 1. In case 1, there is no content data in the layout data during initialization. Now that there is content data, the control assignment can be completed while initializing each control. Finally, the loading state is removed and the dynamically rendered interface is displayed.
[0183] 2 and 4 are two cases of abnormal data acquisition. In this solution, there is a retry mechanism when data acquisition is abnormal. Whether the layout interface or the content interface fails to acquire data, the retry mechanism will be activated. Generally, the number of retries is set to 2. If the data is correctly acquired during the retry process, the rendering process of 1 or 3 above will be executed in the order in which the data is acquired. If the number of retries is used up and the data loading still fails, the page will change from the loading prompt state to the page loading abnormality prompt state.
[0184] The complete dynamic interface rendering process of the client is as follows Figure 6 As shown:
[0185] If the interface layout does not change later, but the content does, the server will decide whether to send only the content data through the interface input parameter passed in by the client when the client refreshes the interface to pull data. The input parameter will indicate to the server whether the client's data request is only for content refresh or initialization of interface rendering. If it is the latter, the client will execute the entire dynamic interface rendering process; if it is the former, of the two client interfaces, only the content interface will obtain data, and the layout interface will not carry any layout data except for returning a status field that informs the client that the layout data has not changed. After obtaining the refreshed content data and parsing it, the client will complete a recursive process of content update.
[0186] Figure 8 An information processing device provided in an embodiment of the present application is applied to a server, such as Figure 8As shown, the information processing device 800 includes:
[0187] The first receiving unit 801 is used to receive a modification operation of a target interface by a user;
[0188] The determining unit 802 is used to determine the control ID of the control to be modified that the modification operation targets; the control to be modified is a control in the target interface;
[0189] A modification unit 803 is used to modify the data under the control ID in the nested relationship table corresponding to the target interface to obtain a modified nested relationship table;
[0190] The sending unit 804 is configured to send the modified nested relationship table to the client.
[0191] In some embodiments, the apparatus 800 further includes: a determination unit;
[0192] The determination unit 802 is further used to determine the modification data of the modification operation for the control to be modified; the judgment unit is used to judge the type of the modification data; the determination unit 802 is further used to determine the nested relationship table including the control ID according to the type of the modification data.
[0193] In some embodiments, the determination unit 802 is further used to determine a first nested relationship table including the control ID if the type of the modification data includes a first type; the modification data of the first type is layout data; correspondingly, the modification unit 803 is further used to modify the data under the control ID in the first nested relationship table corresponding to the target interface according to the layout data to obtain a modified first nested relationship table.
[0194] In some embodiments, the determination unit 802 is further used to determine a second nested relationship table including the control ID if the type of the modification data includes a second type; the modification data of the second type is the control content; correspondingly, the modification unit 803 is further used to modify the data under the control ID in the second nested relationship table corresponding to the target interface according to the control content, to obtain a modified second nested relationship table.
[0195] In some embodiments, the apparatus 800 further includes: an acquisition unit;
[0196] The first receiving unit 801 is further used to receive configurations for each control in the target interface; the configurations include: layout configuration and content configuration;
[0197] The acquisition unit is used to obtain a first nested relationship table based on the layout configuration; and is also used to obtain a second nested relationship table based on the content configuration;
[0198] The sending unit 804 is further configured to send the first nested relationship table and the second nested relationship table to the client; the first nested relationship table and the second nested relationship table are used by the client to display the target interface.
[0199] Fig. 9 An information processing device provided in an embodiment of the present application is applied to a client, such as Fig. 9 As shown, the information processing device 900 includes:
[0200] The second receiving unit 901 is used to receive a modified nested relationship table; the modified nested relationship table is obtained by modifying the data under the control ID of the control to be modified in the nested relationship table corresponding to the target interface;
[0201] The display unit 902 is used to present a modified target interface based on the modified nested relationship table; the control to be modified in the modified target interface is changed relative to the control to be modified in the target interface.
[0202] In some embodiments, the apparatus 900 further includes: a determination unit, the determination unit being configured to determine the type of the modified nested relationship table;
[0203] The second receiving unit 901 is further configured to receive the modified first nested relationship table when the type of the modified nested relationship table includes the first type of modification data; the first type of modification data is layout data;
[0204] The second receiving unit 901 is further configured to receive a modified second nested relationship table when the type of the modified nested relationship table includes second type of modification data; the second type of modification data is control content.
[0205] In some embodiments, the second receiving unit 901 is further configured to receive a first nested relationship table obtained based on the layout configuration and a second nested relationship table obtained based on the content configuration;
[0206] The display unit 902 is further configured to display the target interface according to the order in which the first nested relationship table and the second nested relationship table are received.
[0207] In some embodiments, the display unit 902 is further configured to first display the layout configuration of each control in the target interface and then display the content configuration of each control in the target interface when the first nested relationship table is received first and the second nested relationship table is received later;
[0208] The display unit 902 is further configured to simultaneously display the layout configuration and content configuration of each control in the target interface when the second nested relationship table is received first and the first nested relationship table is received later.
[0209] An embodiment of the present application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the information processing method described in any of the above embodiments when executing the computer program.
[0210] An embodiment of the present application further provides a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, the information processing method described in any of the above embodiments is implemented.
[0211] It should be noted here that the above description of the electronic and computer readable storage medium is similar to the description of the above method embodiment and has similar beneficial effects as the method embodiment. For technical details not disclosed in the storage medium and device embodiments of this application, please refer to the description of the method embodiment of this application for understanding.
[0212] It should be noted that the various units included in the information processing device provided in the embodiment of the present application can be implemented by a processor in an electronic device; of course, it can also be implemented by a specific logic circuit; in the implementation process, the processor can be a central processing unit (CPU, Central Processing Unit), a microprocessor (MPU, Micro Processor Unit), a digital signal processor (DSP, Digital Signal Processor) or a field programmable gate array (FPGA, Field-Programmable Gate Array), etc.
[0213] The description of the above device embodiment is similar to the description of the above method embodiment, and has similar beneficial effects as the method embodiment. For technical details not disclosed in the device embodiment of the present application, please refer to the description of the method embodiment of the present application for understanding.
[0214] It should be noted that in the embodiment of the present application, if the above-mentioned information processing method is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the relevant technology can be embodied in the form of a software product, which is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a U disk, a mobile hard disk, a read-only memory (ROM), a disk or an optical disk. In this way, the embodiment of the present application is not limited to any specific combination of hardware and software.
[0215] It should be noted that Fig.10 A hardware entity diagram of an electronic device according to an embodiment of the present application is shown in FIG. Fig.10 As shown, the electronic device 1000 includes: a processor 1001, at least one communication bus 1002, at least one external communication interface 1004 and a memory 1005. The communication bus 1002 is configured to realize the connection and communication between these components. In an example, the electronic device 1000 also includes: a user interface 1003, wherein the user interface 1003 may include a display screen, and the external communication interface 1004 may include a standard wired interface and a wireless interface.
[0216] The memory 1005 is configured to store instructions and applications executable by the processor 1001, and can also cache data to be processed or processed by the processor 1001 and various modules in the electronic device (for example, image data, audio data, voice communication data, and video communication data), which can be implemented through flash memory (FLASH) or random access memory (Random Access Memory, RAM).
[0217] It should be understood that "one embodiment" or "an embodiment" mentioned throughout the specification means that specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, "in one embodiment" or "in some embodiments" appearing throughout the specification may not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that in various embodiments of the present application, the size of the sequence number of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present application. The above-mentioned sequence numbers of the embodiments of the present application are for description only and do not represent the advantages and disadvantages of the embodiments.
[0218] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0219] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.
[0220] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units; they may be located in one place or distributed on multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0221] In addition, all functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may be a separate unit, or two or more units may be integrated into one unit; the above-mentioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0222] A person skilled in the art can understand that all or part of the steps of implementing the above method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above method embodiment; and the aforementioned storage medium includes: mobile storage devices, read-only memories (ROM), magnetic disks or optical disks, etc., various media that can store program codes.
[0223] Alternatively, if the above-mentioned integrated unit of the present application is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application can be essentially or partly embodied in the form of a software product that contributes to the relevant technology. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROMs, magnetic disks, or optical disks.
[0224] The above is only an implementation method of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. An information processing method, characterized in that: The method comprises: Receive the user's modification operation on the target interface; Determine the control ID of the control to be modified targeted by the modification operation; the control to be modified is a control in the target interface; Modify the data under the control ID in the nested relationship table corresponding to the target interface to obtain a modified nested relationship table; Sending the modified nested relationship table to the client; Wherein, the method further comprises: Receiving configurations for each control in the target interface; the configurations include: layout configuration and content configuration; Obtaining a first nested relationship table based on the layout configuration; Obtaining a second nested relationship table based on the content configuration; The first nested relationship table and the second nested relationship table are sent to the client; the first nested relationship table and the second nested relationship table are used by the client to first display the layout configuration of each control in the target interface and then load the content configuration of each control in the target interface when the first nested relationship table is received by the client first and then the second nested relationship table is received; and to simultaneously display the layout configuration and content configuration of each control in the target interface when the second nested relationship table is received by the client first and then the first nested relationship table is received.
2. The method according to claim 1, characterized in that The method further comprises: Determine the modification data of the control to be modified targeted by the modification operation; Determining the type of the modified data; According to the type of the modified data, a nested relationship table including the control ID is determined.
3. The method according to claim 2, characterized in that The step of determining the nested relationship table including the control ID according to the type of the modified data includes: If the type of the modified data includes a first type, determining a first nested relationship table including the control ID; the first type of modified data is layout data; Correspondingly, the data under the control ID in the nested relationship table corresponding to the target interface is modified to obtain a modified nested relationship table, including: According to the layout data, the data under the control ID in the first nested relationship table corresponding to the target interface is modified to obtain a modified first nested relationship table.
4. The method according to claim 2, characterized in that: The step of determining the nested relationship table including the control ID according to the type of the modified data includes: If the type of the modified data includes a second type, determining a second nested relationship table including the control ID; the second type of modified data is control content; Correspondingly, the data under the control ID in the nested relationship table corresponding to the target interface is modified to obtain a modified nested relationship table, including: According to the control content, the data under the control ID in the second nested relationship table corresponding to the target interface is modified to obtain a modified second nested relationship table.
5. An information processing method, characterized in that: The method comprises: Receive a modified nested relationship table; the modified nested relationship table is obtained by modifying the data under the control ID of the control to be modified in the nested relationship table corresponding to the target interface; Based on the modified nested relationship table, presenting a modified target interface; the control to be modified in the modified target interface is changed relative to the control to be modified in the target interface; Wherein, the method further comprises: Receiving a first nested relationship table obtained based on the layout configuration and a second nested relationship table obtained based on the content configuration; In the case where the first nested relationship table is received first and the second nested relationship table is received later, the layout configuration of each control in the target interface is displayed first, and then the content configuration of each control in the target interface is loaded; In the case where the second nested relationship table is received first and the first nested relationship table is received later, the layout configuration and content configuration of each control in the target interface are displayed simultaneously.
6. The method according to claim 5, characterized in that The method further comprises: Determine the type of the modified nested relationship table; When the type of the modified nested relationship table includes the first type of modification data, receiving the modified first nested relationship table; the first type of modification data is layout data; When the type of the modified nested relationship table includes the second type of modification data, the modified second nested relationship table is received; the second type of modification data is the control content.
7. An information processing device, characterized in that: The device comprises: A first receiving unit, used to receive a user's modification operation on a target interface; A determination unit, used to determine the control ID of the control to be modified targeted by the modification operation; the control to be modified is a control in the target interface; A modification unit, used to modify the data under the control ID in the nested relationship table corresponding to the target interface to obtain a modified nested relationship table; A sending unit, used for sending the modified nested relationship table to a client; The sending unit is also used to receive configurations for each control in the target interface; the configurations include: layout configuration and content configuration; obtaining a first nested relationship table based on the layout configuration; obtaining a second nested relationship table based on the content configuration; sending the first nested relationship table and the second nested relationship table to the client, the first nested relationship table and the second nested relationship table are used for the client to first display the layout configurations of each control in the target interface and then load the content configurations of each control in the target interface when the client first receives the first nested relationship table and then receives the second nested relationship table, and to simultaneously display the layout configurations and content configurations of each control in the target interface when the client first receives the second nested relationship table and then receives the first nested relationship table.
8. An information processing device, characterized in that: The device comprises: The second receiving unit is used to receive a modified nested relationship table; the modified nested relationship table is obtained by modifying the data under the control ID of the control to be modified in the nested relationship table corresponding to the target interface; A display unit, configured to present a modified target interface based on the modified nested relationship table; the control to be modified in the modified target interface is changed relative to the control to be modified in the target interface; The second receiving unit is further configured to receive a first nested relationship table obtained based on the layout configuration and a second nested relationship table obtained based on the content configuration; The display unit is further used to first display the layout configuration of each control in the target interface and then load the content configuration of each control in the target interface when the first nested relationship table is received first and the second nested relationship table is received later; and to simultaneously display the layout configuration and content configuration of each control in the target interface when the second nested relationship table is received first and the first nested relationship table is received later.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, it implements the information processing method described in any one of claims 1 to 4, or implements the information processing method described in any one of claims 5 to 6.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the information processing method described in any one of claims 1 to 4 is implemented, or the information processing method described in any one of claims 5 to 6 is implemented.
Citation Information
Patent Citations
Page-based data monitoring and processing method, apparatus and equipment and storage medium
CN109446462A
Page generation method and device, storage medium and electronic equipment
CN112487331A