User interface updating method and device, electronic equipment and readable storage medium

By obtaining and converting the target domain-specific language into the user interface model and sending it to the client, the resource waste problem caused by repeated user interface evaluation is solved, and efficient user interface update is achieved.

CN119512547AInactive Publication Date: 2025-02-25GREE ELECTRIC APPLIANCE INC OF ZHUHAI +1

Patent Information

Application Number
CN202411665315.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-20
Publication Date
2025-02-25
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In existing UI tests, repeated user interface tests lead to waste of resources.

Method used

By obtaining the target domain-specific language, converting it to a user interface model, and calling the server interface to send the model to the target client to achieve user interface update.

Benefits of technology

It realizes dynamic update of the user interface, avoids the dependence of installation packages, reduces resource waste, and improves the efficiency of updates.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119512547A_ABST
    Figure CN119512547A_ABST
Patent Text Reader

Abstract

The invention provides a user interface updating method and device, electronic equipment and a readable storage medium, and the method comprises the steps: obtaining a target domain specific language which indicates the characteristics of a target user interface; converting the target domain specific language into a user interface model; and calling a server interface to send the user interface model to a target client, so that the target client performs user interface updating through the user interface model. The dynamic user interface is realized by converting the target domain specific language into the target interface model, so that updating does not need to be performed depending on an installation package, and meanwhile, the user interface model is sent to the target client by calling the server interface; therefore, pushing of user interface updating can be efficiently achieved on the basis that packaging is not needed, and waste of resources is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of software testing, and in particular to a user interface updating method, device, electronic device and readable storage medium. Background Art

[0002] In existing UI (User Interface) testing, when there are problems with terms, translations, colors or layouts, the test must be re-submitted, resulting in a waste of testing resources and development resources. Summary of the invention

[0003] The main purpose of the present invention is to provide a user interface updating method, device, electronic device and readable storage medium, aiming to solve the problem of resource waste caused by repeated user interface testing in the prior art.

[0004] To achieve the above object, the present invention provides a user interface updating method, the method comprising the steps of:

[0005] Acquire a target domain specific language, wherein the target domain specific language indicates a feature of a target user interface;

[0006] converting the target domain specific language into a user interface model;

[0007] The server interface is called to send the user interface model to the target client, so that the target client updates the user interface through the user interface model.

[0008] Optionally, converting the target domain specific language into a user interface model comprises:

[0009] Determining a target grammar analysis technology corresponding to the target domain specific language;

[0010] Parsing the target domain specific language by the target syntax analysis technology to obtain an abstract syntax tree corresponding to the target domain specific language;

[0011] The abstract syntax tree is converted into the user interface model.

[0012] Optionally, the determining of the target grammar analysis technology corresponding to the target domain specific language includes:

[0013] Parsing the grammatical structure of the target domain specific language to determine a grammatical feature object of the target domain specific language, wherein the grammatical feature object is an independent grammatical structure in the target domain specific language;

[0014] The complexity level corresponding to the target domain specific language is determined according to the grammatical feature object, and the target grammar analysis technology corresponding to the complexity level is matched.

[0015] Optionally, determining the complexity level corresponding to the target domain specific language according to the grammatical feature object comprises:

[0016] Determine the number of complex objects contained in the grammatical feature object, wherein the complex objects include a lookahead, a left recursion, a nested structure, and grammatical sugar;

[0017] The complexity level corresponding to the number of objects is matched, wherein the number of objects is positively correlated with the complexity of the complexity level.

[0018] Optionally, converting the abstract syntax tree into the user interface model comprises:

[0019] Obtaining a preset interface model, and traversing the nodes of the abstract syntax tree;

[0020] For each node of the abstract syntax tree, determining attribute data corresponding to the node;

[0021] Updating the preset interface model according to the attribute data;

[0022] After the preset interface model is updated based on the attribute data, the user interface model is obtained.

[0023] Optionally, converting the abstract syntax tree into the user interface model comprises:

[0024] Converting the abstract syntax tree into the user interface model;

[0025] Serializing the user interface model into JSON format;

[0026] The calling of the server interface to send the user interface model to the target client comprises:

[0027] The user interface model in JSON format is sent to the target client, so that the target client deserializes the user interface model in JSON format and then updates the user interface.

[0028] Optionally, calling the server interface to send the user interface model to the target client includes:

[0029] determining sensitive data within the user interface model;

[0030] Encrypting the sensitive data to obtain an encrypted interface model;

[0031] The server interface is called to send the encrypted interface model to the target client.

[0032] To achieve the above object, the present invention further provides a user interface updating device, the user interface updating device comprising:

[0033] A first acquisition module is used to acquire a target domain specific language, wherein the target domain specific language indicates a feature of a target user interface;

[0034] A first conversion module, configured to convert the target domain specific language into a user interface model;

[0035] The first calling module is used to call the server interface to send the user interface model to the target client, so that the target client updates the user interface through the user interface model.

[0036] To achieve the above objectives, the present invention also provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program implements the steps of the user interface updating method as described above when executed by the processor.

[0037] To achieve the above object, the present invention further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the user interface updating method described above are implemented.

[0038] The present invention proposes a user interface update method, device, electronic device and readable storage medium, which obtains a target domain specific language, wherein the target domain specific language indicates the characteristics of the target user interface; converts the target domain specific language into a user interface model; and calls a server interface to send the user interface model to a target client, so that the target client updates the user interface through the user interface model. The user interface is made dynamic by converting the target domain specific language into a target interface model, so that there is no need to rely on an installation package for updating. At the same time, by calling a server interface to send the user interface model to the target client, the push of the user interface update can be efficiently realized without packaging, thereby reducing the waste of resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0040] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0041] One or more embodiments are exemplarily described by pictures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and unless otherwise stated, the figures in the drawings do not constitute proportional limitations.

[0042] Figure 1 It is a flowchart of a first embodiment of a method for updating a user interface of the present invention;

[0043] Figure 2 It is a schematic diagram of the overall flow of the user interface updating method of the present invention;

[0044] Figure 3 It is a schematic diagram of the module structure of the electronic device of the present invention. DETAILED DESCRIPTION

[0045] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0046] The disclosure below provides many different embodiments or examples to implement different structures of the present invention. In order to simplify the disclosure of the present invention, the parts and settings of specific examples are described below. Of course, they are only examples, and the purpose is not to limit the present invention. In addition, the present invention can repeat reference numbers and / or letters in different examples. This repetition is for the purpose of simplification and clarity, and does not itself indicate the relationship between the various embodiments and / or settings discussed.

[0047] It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. In order to enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only embodiments of a part of the present application, not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work should fall within the scope of protection of the present application.

[0048] The present invention provides a user interface updating method, referring to Figure 1 , Figure 1 This is a flow chart of a first embodiment of a method for updating a user interface according to the present invention. The method comprises the following steps:

[0049] Step S10, acquiring a target domain specific language, wherein the target domain specific language indicates a feature of a target user interface;

[0050] DSL (Domain-Specific Language) refers to a computer language that focuses on a certain application domain. It is a programming language used for a specific purpose or domain, designed to improve development efficiency and expressiveness in a specific domain.

[0051] The domain-specific language in this embodiment is used to describe the structure, style, behavior and other characteristics of the user interface; the target domain-specific language is the domain-specific language corresponding to the relevant settings required for the target user interface; the target domain-specific language can be designed by engineers on the server.

[0052] The target user interface is a user interface that is set based on the expected target.

[0053] Step S20, converting the target domain specific language into a user interface model;

[0054] A UI model indicates the basic structure of a targeted UI; key elements such as layout, styles, and data binding can be included in a UI model.

[0055] It can be understood that by converting the target domain specific language into the user interface model, the expression form of the code language corresponding to the target domain specific language is converted into the indication form for the specific structure of the user interface indicated by the user interface model.

[0056] The specific method of converting the target domain specific language into the user interface model can be set based on actual needs.

[0057] Step S30: calling a server interface to send the user interface model to a target client, so that the target client updates the user interface through the user interface model.

[0058] The server interface is used to connect the server with the target client.

[0059] The target client is a client that needs to be updated based on the target domain specific language; the specific type of the target client can be set based on actual needs.

[0060] Specifically, when calling the server interface, a communication interface between the server and the target client may be created through a REST API (Representational State Transfer Application Programming Interface), thereby implementing the sending of the user interface model.

[0061] It should be noted that when sending the user interface model, the specific sending method can be determined based on actual needs; for example, MQTT (Message Queuing Telemetry Transport) can be set up, and the target client subscribes to the target domain-specific language corresponding to the specific user interface based on MQTT. When the target domain-specific language in the server is updated, MQTT will publish the update information. After receiving the update information, the subscribed target client requests the user interface model corresponding to the target domain-specific language from the server. After receiving the request, the server sends the user interface model to the target client corresponding to the request; a secure transmission and dynamic update mechanism of the user interface model is implemented, ensuring the security of data transmission and the real-time nature of the user interface.

[0062] After receiving the user interface model, the target client can update its local user interface based on the user interface model. The specific updating method can be set based on actual needs.

[0063] This embodiment realizes the dynamic user interface by converting the target domain-specific language into a target interface model, thereby eliminating the need to rely on an installation package for updates. At the same time, by calling a server interface to send the user interface model to the target client, the user interface update can be pushed efficiently without the need for packaging, thereby reducing the waste of resources.

[0064] Further, see also Figure 2 In the second embodiment of the user interface updating method of the present invention proposed based on the first embodiment of the present invention, the step S20 includes the steps of:

[0065] Step S21, determining a target grammar analysis technology corresponding to the target domain specific language;

[0066] Step S22, parsing the target domain specific language by the target syntax analysis technology to obtain an abstract syntax tree corresponding to the target domain specific language;

[0067] The syntax analysis technology is used to perform syntax analysis on the domain-specific language to construct an AST (Abstract Syntax Tree) corresponding to the domain-specific language; the target syntax analysis technology is the most suitable syntax analysis technology for the target domain-specific language.

[0068] Furthermore, the step S21 comprises the steps of:

[0069] Step S211, parsing the grammatical structure of the target domain specific language to determine a grammatical feature object of the target domain specific language, wherein the grammatical feature object is an independent grammatical structure in the target domain specific language;

[0070] Step S212: determining the complexity level corresponding to the target domain specific language according to the grammatical feature object, and matching the target grammatical analysis technology corresponding to the complexity level.

[0071] The target domain-specific language has different grammatical structures based on the update needs, and different grammatical analysis technologies have different analysis advantages for targets with different grammatical structures; therefore, it is necessary to select a suitable target grammatical analysis technology for the specific target domain-specific language.

[0072] The grammatical feature object is used to indicate the components of the grammatical structure in the target domain specific language; it can be understood that the target domain specific language is composed of multiple independent grammatical feature pairs; for example, the grammatical feature object may include but is not limited to terminal symbols, non-terminal symbols, lookahead symbols, left recursion, nested structures, and grammatical sugar;

[0073] Terminal symbols include keywords such as if and else, identifiers, literals such as numbers and strings, operators such as + and -, etc.

[0074] Non-terminal symbols are building blocks used to represent grammatical structures, such as expressions, input and output, etc.

[0075] Lookaheads are input symbols that the parser needs to look at in order to make decisions when performing grammatical analysis; for example, when parsing an expression, the parser may need to look at the next symbol to decide whether to multiply or add. The number and complexity of lookaheads can affect the design and efficiency of the parser.

[0076] Left recursion is when a nonterminal symbol in a grammar rule directly or indirectly refers to itself in its production, and this reference occurs at the leftmost position of the production. Left recursion can cause the parser to go into an infinite loop, because each application of left recursion generates a new instance.

[0077] A nested structure is a structure that contains another structure of the same or different type.

[0078] Syntactic sugar refers to a grammatical construct that facilitates the writing of program code, increases code readability, and makes the code more concise. It does not provide new functions itself.

[0079] It can be understood that the composition of the grammatical feature object indicates the complexity of the target domain-specific language, and different grammatical analysis techniques have different characteristics for domain-specific languages ​​of different complexities. For example, grammatical analysis techniques may include recursive descent parsing, LL(k) analysis techniques, and LR(k) analysis techniques. Among them, recursive descent parsing is easy to manage and maintain, and has high parsing efficiency. However, the parsing effect of recursive descent parsing for domain-specific languages ​​with complex grammatical structures is greatly discounted. Compared with recursive descent parsing, LL(k) analysis technology can process more complex grammatical structures, thereby improving the accuracy and efficiency of parsing. However, when faced with more complex or ambiguous domain-specific languages, such as left recursion or complex nested structures, LL(k) analysis technology is difficult to handle. LR(k) analysis technology can process more complex domain-specific languages, such as left recursion or complex nested structures, but the workload of information processing is large, which reduces efficiency.

[0080] Therefore, the complexity level corresponding to the target domain specific language is determined through the grammatical feature object, so that the most appropriate target grammar analysis technology can be determined based on the complexity level, so that the construction of the abstract syntax tree can ensure accuracy and efficiency as much as possible.

[0081] Furthermore, the step S212 includes the steps of:

[0082] Step S2121, determining the number of complex objects contained in the grammatical feature object, wherein the complex objects include lookahead symbols, left recursion, nested structures, and grammatical sugar;

[0083] Step S2122: Match the complexity level corresponding to the number of objects, wherein the number of objects is positively correlated with the complexity of the complexity level.

[0084] Complex objects are grammatical feature objects that require greater processing power for grammatical analysis, such as lookahead symbols, left recursion, nested structures, and grammatical sugar.

[0085] The number of objects is the number of load objects; it is understandable that there may be multiple complex objects of the same type.

[0086] It can be understood that, when the target domain specific language contains more complex objects, it can be considered that the grammatical structure of the target domain specific language is more complex, and therefore, its corresponding complexity level is higher.

[0087] The correspondence between the specific number of objects and the complexity level can be set based on actual needs. For example, when the number of objects is less than the first object threshold, the corresponding complexity level is the first level, and the target grammatical analysis technology corresponding to the first level is recursive descent parsing; when the number of objects is greater than or equal to the first object threshold and less than the second object threshold, the corresponding complexity level is the second level, and the target grammatical analysis technology corresponding to the second level is the LL(k) analysis technology; when the number of objects is greater than 25 or equal to the second object threshold, the corresponding complexity level is the third level, and the target grammatical analysis technology corresponding to the third level is the LR(k) analysis technology; wherein the first object threshold is less than the second object threshold, and the specific values ​​of the first object threshold and the second object threshold can be set based on actual needs, such as the first object threshold is 0 and the second object threshold is 25.

[0088] It should be noted that the LL(k) analysis technology cannot handle left recursion. Therefore, when left recursion exists in a complex object, the target syntax analysis technology can be set to the LR(k) analysis technology.

[0089] In other embodiments, the target syntax analysis technology can also be determined according to the number of specific types of complex objects. It is understandable that different types of complex objects have different requirements for the processing capabilities of the target syntax analysis technology. For example, left recursion and nested structures require a target syntax analysis technology with more powerful processing capabilities. Therefore, object thresholds can be set for different types of complex objects, and priorities can be set for different target syntax analysis technologies. For example, the priority of the LR(k) analysis technology is set to be higher than the LL(k) analysis technology, and the priority of the LL(k) analysis technology is set to be higher than the recursive descent parsing. The number of different types of complex objects is judged respectively, and the LR(k) analysis technology is adopted only if the number of any complex objects reaches the number requirement for selecting the LR(k) analysis technology. If the number of no complex objects reaches the number requirement for selecting the LR(k) analysis technology, and the number of any complex objects reaches the number requirement for selecting the LL(k) analysis technology, the LL(k) analysis technology is adopted. If all types of complex objects indicate recursive descent parsing, recursive descent parsing is adopted.

[0090] Step S23: converting the abstract syntax tree into the user interface model.

[0091] After the abstract syntax tree is generated, it is determined whether the abstract syntax tree is generated successfully. If not, the abstract syntax tree is regenerated.

[0092] After the abstract syntax tree is successfully generated, the abstract syntax tree can be converted into a user interface model. The specific conversion method can be set based on actual needs.

[0093] Furthermore, the step S23 comprises the steps of:

[0094] Step S231, obtaining a preset interface model, and traversing the nodes of the abstract syntax tree;

[0095] Step S232, for each node of the abstract syntax tree, determining the attribute data corresponding to the node;

[0096] Step S233, updating the preset interface model according to the attribute data;

[0097] Step S234, after the preset interface model is updated based on the attribute data, the user interface model is obtained.

[0098] The preset interface model is a pre-set interface model template.

[0099] After the abstract syntax tree is determined, the parser extracts information and performs type checking and scope analysis to traverse each node of the abstract syntax tree; based on the attribute data of each node, the preset interface model is updated. The attribute data is used to indicate the operation type and parameters corresponding to the node. The attribute data may include attribute extraction, conditional logic judgment, loop processing, style, layout, data binding, UI components, and parent-child relationships.

[0100] If you encounter a UI component attribute node in the interface model, extract the attribute value and set it to the corresponding field of the interface model to implement the update;

[0101] When a conditional logic node is encountered, the logic is stored in the interface model according to the result of the conditional expression to implement the update;

[0102] For loop logic nodes, the operation is repeated until the condition is met.

[0103] Furthermore, in order to simplify the design of the interface model and reduce the nesting level of components, when designing the interface model, combination can be used instead of inheritance to reduce the complexity of the class hierarchy. For example, in the Flutter UI component, a label table bar containing multiple buttons needs to be designed. If the nesting level of the Flutter UI component is not reduced, multiple buttons are required to complete this function. However, if a combination of List.generate and Expanded is used, only one button is needed to implement this function, and the number of buttons required can also be customized.

[0104] Furthermore, the step S23 comprises the steps of:

[0105] Step S235, converting the abstract syntax tree into the user interface model;

[0106] Step S236, serializing the user interface model into JSON format;

[0107] The step S30 comprises:

[0108] Step S31: sending the user interface model in JSON format to the target client, so that the target client deserializes the user interface model in JSON format and then updates the user interface.

[0109] In this embodiment, the user interface model is serialized into JSON format and deserialized on the target client, so that the user interface model generated by the server can be quickly and accurately rendered and updated on the target client.

[0110] After the client receives the user interface model in JSON format, it uses son_serializable to deserialize it, and the rendering engine renders the user interface model to display the user interface.

[0111] In the specific implementation, the rendering engine uses the json_serializable package to automatically generate serialization and deserialization code. At the same time, by accurately defining the Dart data class corresponding to the JSON structure and using the corresponding annotations, the rendering engine ensures that data changes can be reflected in the user interface in real time, providing a smooth and consistent user experience for the target client.

[0112] Further, in a third embodiment of the user interface updating method of the present invention proposed based on the first embodiment of the present invention, step S30 includes the steps of:

[0113] Step S32, determining sensitive data in the user interface model;

[0114] Step S33, encrypting the sensitive data to obtain an encrypted interface model;

[0115] Step S34, calling the server interface to send the encrypted interface model to the target client.

[0116] It is understandable that the sending stage of the user interface model can be the software testing stage or the official software updating stage; therefore, the user interface model may contain some sensitive information involving the manufacturer or the user. Therefore, in order to ensure the security of data transmission, in this embodiment, the sensitive data in the user interface model is encrypted and then sent to the target client, thereby ensuring the security of the data.

[0117] To further ensure data security, you can also use digital certificates to verify the identity of the server and prevent man-in-the-middle attacks.

[0118] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.

[0119] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.

[0120] The present application also provides a user interface updating device for implementing the above user interface updating method, the user interface updating device comprising:

[0121] A first acquisition module is used to acquire a target domain specific language, wherein the target domain specific language indicates a feature of a target user interface;

[0122] A first conversion module, configured to convert the target domain specific language into a user interface model;

[0123] The first calling module is used to call the server interface to send the user interface model to the target client, so that the target client updates the user interface through the user interface model.

[0124] This user interface updating device realizes the dynamic nature of the user interface by converting the target domain-specific language into a target interface model, thereby eliminating the need to rely on an installation package for updating. At the same time, by calling a server interface to send the user interface model to the target client, the push of user interface updates can be efficiently achieved without the need for packaging, thereby reducing waste of resources.

[0125] It should be noted that the first acquisition module in this embodiment can be used to execute step S10 in the embodiment of the present application, the first conversion module in this embodiment can be used to execute step S20 in the embodiment of the present application, and the first calling module in this embodiment can be used to execute step S30 in the embodiment of the present application.

[0126] Furthermore, the first conversion module includes:

[0127] A first determination submodule is used to determine a target grammar analysis technology corresponding to the target domain specific language;

[0128] A first parsing submodule, configured to parse the target domain specific language by using the target syntax analysis technology to obtain an abstract syntax tree corresponding to the target domain specific language;

[0129] The first conversion submodule is used to convert the abstract syntax tree into the user interface model.

[0130] Furthermore, the first determining submodule includes:

[0131] A first parsing unit, configured to parse the grammatical structure of the target domain specific language to determine a grammatical feature object of the target domain specific language, wherein the grammatical feature object is an independent grammatical structure in the target domain specific language;

[0132] The first determining unit is configured to determine the complexity level corresponding to the target domain specific language according to the grammatical feature object, and match the target grammatical analysis technology corresponding to the complexity level.

[0133] Furthermore, the first determining unit:

[0134] A first determining subunit is used to determine the number of complex objects contained in the grammatical feature object, wherein the complex objects include a lookahead symbol, a left recursion, a nested structure, and grammatical sugar;

[0135] The first matching subunit is configured to match the complexity level corresponding to the number of objects, wherein the number of objects is positively correlated with the complexity of the complexity level.

[0136] Furthermore, the first conversion submodule includes:

[0137] A first acquisition unit, used to acquire a preset interface model and traverse the nodes of the abstract syntax tree;

[0138] A second determining unit, configured to determine, for each node of the abstract syntax tree, attribute data corresponding to the node;

[0139] A first updating unit, configured to update the preset interface model according to the attribute data;

[0140] The first execution unit is used to obtain the user interface model after the preset interface model is updated based on the attribute data.

[0141] Furthermore, the first conversion submodule includes:

[0142] A first conversion unit, configured to convert the abstract syntax tree into the user interface model;

[0143] A first serialization unit, used to serialize the user interface model into JSON format;

[0144] The first calling module includes:

[0145] The first sending submodule is used to send the user interface model in JSON format to the target client, so that the target client deserializes the user interface model in JSON format and then updates the user interface.

[0146] Furthermore, the first calling module includes:

[0147] A second determination submodule, used to determine sensitive data in the user interface model;

[0148] A first encryption submodule, used for encrypting the sensitive data to obtain an encrypted interface model;

[0149] The first calling submodule is used to call the server interface to send the encrypted interface model to the target client.

[0150] Reference Figure 3 In terms of hardware structure, the electronic device may include components such as a communication module 10, a memory 20, and a processor 30. In the electronic device, the processor 30 is connected to the memory 20 and the communication module 10 respectively, and a computer program is stored in the memory 20. The computer program is executed by the processor 30 at the same time, and the steps of the above method embodiment are implemented when the computer program is executed.

[0151] The communication module 10 can be connected to an external communication device through a network. The communication module 10 can receive requests from an external communication device, and can also send requests, instructions and information to the external communication device, which can be other electronic devices, servers or Internet of Things devices, such as televisions, etc.

[0152] The memory 20 can be used to store software programs and various data. The memory 20 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application required for a function (such as obtaining a target domain specific language), etc.; the data storage area can include a database, and the data storage area can store data or information created according to the use of the system, etc. In addition, the memory 20 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0153] The processor 30 is the control center of the electronic device. It uses various interfaces and lines to connect various parts of the entire electronic device. It executes various functions of the electronic device and processes data by running or executing software programs and / or modules stored in the memory 20, and calling data stored in the memory 20, so as to monitor the electronic device as a whole. The processor 30 may include one or more processing units; optionally, the processor 30 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 30.

[0154] although Figure 3 Although not shown, the electronic device may further include a circuit control module, which is used to connect to a power source to ensure the normal operation of other components. Figure 3 The electronic device structure shown in the figure does not constitute a limitation of the electronic device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.

[0155] The present invention also provides a computer-readable storage medium on which a computer program is stored. The computer-readable storage medium may be Figure 3 The memory 20 in the electronic device may also be at least one of a ROM (Read-Only Memory) / RAM (Random Access Memory), a magnetic disk, and an optical disk. The computer-readable storage medium includes a number of instructions for enabling a terminal device with a processor (which may be a television, a car, a mobile phone, a computer, a server, a terminal, or a network device, etc.) to execute the methods described in the various embodiments of the present invention.

[0156] In the present invention, the terms "first", "second", "third", "fourth" and "fifth" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0157] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.

[0158] Although the embodiments of the present invention have been shown and described above, the scope of protection of the present invention is not limited thereto. It is understood that the above embodiments are exemplary and cannot be understood as limiting the present invention. A person of ordinary skill in the art can change, modify and replace the above embodiments within the scope of the present invention, and these changes, modifications and replacements should be included in the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be subject to the scope of protection of the claims.

Claims

1. A user interface updating method, characterized in that: The user interface updating method comprises: Acquire a target domain specific language, wherein the target domain specific language indicates a feature of a target user interface; converting the target domain specific language into a user interface model; The server interface is called to send the user interface model to the target client, so that the target client updates the user interface through the user interface model.

2. The user interface updating method according to claim 1, characterized in that: The converting the target domain specific language into a user interface model comprises: Determining a target grammar analysis technology corresponding to the target domain specific language; Parsing the target domain specific language by the target syntax analysis technology to obtain an abstract syntax tree corresponding to the target domain specific language; The abstract syntax tree is converted into the user interface model.

3. The user interface updating method according to claim 2, characterized in that: The target grammar analysis technology for determining the target domain specific language includes: Parsing the grammatical structure of the target domain specific language to determine a grammatical feature object of the target domain specific language, wherein the grammatical feature object is an independent grammatical structure in the target domain specific language; The complexity level corresponding to the target domain specific language is determined according to the grammatical feature object, and the target grammar analysis technology corresponding to the complexity level is matched.

4. The user interface updating method according to claim 3, characterized in that: Determining the complexity level corresponding to the target domain specific language according to the grammatical feature object comprises: Determine the number of complex objects contained in the grammatical feature object, wherein the complex objects include a lookahead, a left recursion, a nested structure, and grammatical sugar; The complexity level corresponding to the number of objects is matched, wherein the number of objects is positively correlated with the complexity of the complexity level.

5. The user interface updating method according to claim 2, characterized in that: The converting the abstract syntax tree into the user interface model comprises: Obtaining a preset interface model, and traversing the nodes of the abstract syntax tree; For each node of the abstract syntax tree, determining attribute data corresponding to the node; Updating the preset interface model according to the attribute data; After the preset interface model is updated based on the attribute data, the user interface model is obtained.

6. The user interface updating method according to claim 2, characterized in that: The converting the abstract syntax tree into the user interface model comprises: Converting the abstract syntax tree into the user interface model; Serializing the user interface model into JSON format; The calling of the server interface to send the user interface model to the target client comprises: The user interface model in JSON format is sent to the target client, so that the target client deserializes the user interface model in JSON format and then updates the user interface.

7. The user interface updating method according to claim 1, characterized in that: The calling of the server interface to send the user interface model to the target client comprises: determining sensitive data within the user interface model; Encrypting the sensitive data to obtain an encrypted interface model; The server interface is called to send the encrypted interface model to the target client.

8. A user interface updating device, characterized in that: The user interface updating device comprises: A first acquisition module is used to acquire a target domain specific language, wherein the target domain specific language indicates a feature of a target user interface; A first conversion module, configured to convert the target domain specific language into a user interface model; The first calling module is used to call the server interface to send the user interface model to the target client, so that the target client updates the user interface through the user interface model.

9. An electronic device, characterized in that: The electronic device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the computer program implements the steps of the user interface updating method according to any one of claims 1 to 7 when executed by the processor.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the user interface updating method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Data processing method, device and system

    CN113791779A

Cited By

  • Method for user interface update, system for the same, and non-transitory computer readable medium storing computer program for the same

    TWI940083B