WO2022099913A1 - 界面配置方法、装置、设备及介质 - Google Patents

界面配置方法、装置、设备及介质 Download PDF

Info

Publication number
WO2022099913A1
WO2022099913A1 PCT/CN2021/070291 CN2021070291W WO2022099913A1 WO 2022099913 A1 WO2022099913 A1 WO 2022099913A1 CN 2021070291 W CN2021070291 W CN 2021070291W WO 2022099913 A1 WO2022099913 A1 WO 2022099913A1
Authority
WO
WIPO (PCT)
Prior art keywords
configuration file
client
configuration
interface
target
Prior art date
Application number
PCT/CN2021/070291
Other languages
English (en)
French (fr)
Inventor
盛国军
闫宗奎
唐晓庆
王子君
Original Assignee
海尔数字科技(青岛)有限公司
青岛海尔工业智能研究院有限公司
海尔卡奥斯物联生态科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 海尔数字科技(青岛)有限公司, 青岛海尔工业智能研究院有限公司, 海尔卡奥斯物联生态科技有限公司 filed Critical 海尔数字科技(青岛)有限公司
Publication of WO2022099913A1 publication Critical patent/WO2022099913A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • H04L67/025Protocols based on web technology, e.g. hypertext transfer protocol [HTTP] for remote control or remote monitoring of applications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/146Markers for unambiguous identification of a particular session, e.g. session cookie or URL-encoding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/2866Architectures; Arrangements
    • H04L67/30Profiles
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/34Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters 

Definitions

  • the embodiments of the present application relate to computer technologies, for example, to an interface configuration method, apparatus, device, and medium.
  • the use of Flutter technology can realize the cross-platform application, but the layout and order of controls in the application interface are relatively fixed, and cannot be flexibly configured according to user needs. If the application function needs to be updated, the developer needs to rewrite it. The code is reissued, which requires high technical level of developers, and has high development cost and long development cycle.
  • the embodiments of the present application provide an interface configuration method, device, device and medium, through which the dynamic configuration component library engine integrated in the client parses the configuration file written by the developer, completes the interface configuration, and improves the efficiency of the interface configuration.
  • an embodiment of the present application provides an interface configuration method, which is applied to a client, and the interface configuration method includes:
  • interface configuration is performed according to the target configuration file
  • the dynamic configuration component library engine includes a dynamic component library, configuration file parsing rules and interface configuration rules, and the dynamic components in the dynamic component library are obtained by encapsulating the controls in the Flutter platform.
  • an embodiment of the present application further provides an interface configuration method, which is applied to a server, and the interface configuration method includes:
  • a configuration file matching each initial configuration file is generated, and the identifier of the client corresponding to each initial configuration file is stored corresponding to the matching configuration file;
  • a target configuration file corresponding to the identifier of the client is determined, and the target configuration file is sent to the client, so that the client performs interface configuration according to the target configuration file.
  • an embodiment of the present application further provides an interface configuration device, the device comprising:
  • a request sending module configured to send a configuration file request corresponding to the client to the server in response to the operation of the user accessing the client, where the configuration file request includes the identifier of the client;
  • a configuration file receiving module configured to receive the target configuration file fed back by the server and corresponding to the identifier of the client;
  • an interface configuration module configured to perform interface configuration according to the target configuration file through a dynamic configuration component library engine integrated in the client;
  • the dynamic configuration component library engine includes a dynamic component library, configuration file parsing rules and interface configuration rules, and the dynamic components in the dynamic component library are obtained by encapsulating the controls in the Flutter platform.
  • an embodiment of the present application further provides an interface configuration device, the device comprising:
  • the initial configuration file receiving module is set to receive at least one initial configuration file sent by the configuration platform, and the identifier of the client corresponding to each initial configuration file;
  • the configuration file generation module is configured to generate a configuration file matching each initial configuration file according to the pre-configured component library rules and the at least one initial configuration file, and associate the identifier of the client corresponding to each initial configuration file with the The matching configuration file corresponds to the storage;
  • a request receiving module configured to receive a configuration file request sent by a client, where the configuration file request includes an identifier of the client;
  • a configuration file sending module configured to determine a target configuration file corresponding to the identifier of the client, and send the target configuration file to the client, so that the client performs interface configuration according to the target configuration file.
  • an embodiment of the present application further provides an electronic device, the electronic device comprising:
  • processors one or more processors
  • memory arranged to store one or more programs
  • the one or more programs when executed by the one or more processors, cause the one or more processors to implement the interface configuration method provided by any embodiment of the present application.
  • an embodiment of the present application further provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, implements the interface configuration method provided by any embodiment of the present application.
  • FIG. 2 is a flowchart of a method for configuring an interface in Embodiment 2 of the present application
  • FIG. 3 is a flowchart of an interface configuration method in Embodiment 3 of the present application.
  • FIG. 4a is a flowchart of a method for configuring an interface in Embodiment 4 of the present application
  • FIG. 4b is a flowchart of an execution mode of an interface configuration method in Embodiment 4 of the present application.
  • FIG. 5 is a schematic structural diagram of an interface configuration device in Embodiment 5 of the present application.
  • FIG. 6 is a schematic structural diagram of an interface configuration device in Embodiment 6 of the present application.
  • FIG. 7 is a schematic structural diagram of a device provided in Embodiment 7 of the present application.
  • FIG. 1 is a flowchart of an interface configuration method in Embodiment 1 of the present application.
  • the technical solution of this embodiment is applied to the situation where a dynamic component library is used for dynamic interface configuration and configuration, and the method can be executed by an interface configuration device.
  • the device can be realized by at least one of software and hardware, and can be integrated in general computer equipment, and the interface configuration method includes the following steps:
  • Step 110 In response to the user's operation of accessing the client, send a configuration file request corresponding to the client to the server, where the configuration file request includes the identifier of the client.
  • the configuration file request is a request sent by the client to request a configuration file corresponding to the current client from the server, which carries the identifier of the current client.
  • the client is an APP (Application, mobile phone software) installed on the mobile terminal
  • the configuration file request is a request containing an APPID (APP Identity Document, mobile phone software identity) sent by the APP in the mobile terminal to the server.
  • APP Application, mobile phone software
  • the client after the client detects the user's access operation, in order to realize flexible configuration of the interface, it first sends a configuration file request to the server, so that the server feeds back the configuration file corresponding to the client, wherein the configuration file request includes the client ID of the client, the server can determine the configuration file corresponding to the current client according to the ID of the client.
  • the APP detects the click operation of the customer, sends a configuration file request including the APPID to the server, and pulls the configuration file corresponding to the APPID from the server.
  • Step 120 Receive a target configuration file corresponding to the client's identifier fed back by the server.
  • the target configuration file is at least one of an Extensible Markup Language (Extensible Markup Language, XML) file and an Extensible Stylesheet Language (Extensible Stylesheet Language, XSL) file.
  • Extensible Markup Language Extensible Markup Language, XML
  • Extensible Stylesheet Language Extensible Stylesheet Language, XSL
  • the server after receiving the configuration file request sent by the client, the server will feed back to the client a target configuration file corresponding to the identifier of the client, so that the client can complete the interface configuration and rendering.
  • the configuration file is at least one of an XML-formatted file and an XSL-formatted file, and the configuration file is obtained by the server performing further data supplementation on at least one of the initial XML file and the initial XSL file provided by the developer. .
  • Step 130 Perform interface configuration according to the target configuration file through the dynamic configuration component library engine integrated in the client.
  • the dynamic configuration component library engine includes dynamic component library, configuration file parsing rules and interface configuration rules, and the dynamic components in the dynamic component library are encapsulated by the controls in the Flutter platform.
  • the dynamic configuration component library engine is pre-integrated in the client, and the dynamic configuration component library engine includes the dynamic component library, configuration file parsing rules and interface configuration rules.
  • the dynamic components in the dynamic component library are encapsulated by the controls in the Flutter platform get. Taking the text box as an example, the text box control in the Flutter platform does not support dynamic configuration.
  • the text box control in the open source framework (Xcore) component library is repackaged to form the Xcore component, and the APP runs.
  • the Xcore engine can parse the configuration file corresponding to the text box, call the Xcore component, and dynamically configure the text box.
  • the client parses the target configuration file through the integrated dynamic configuration component library engine, and then obtains the dynamic component from the dynamic component library according to the analysis result, thereby completing the interface configuration.
  • the APP parses the target configuration file in XML format through the integrated Xcore engine, calls the Xcore component in the Xcore component library according to the parsing result to construct the page, and performs interface rendering.
  • the technical solutions of the embodiments of the present application in response to the user's operation of accessing the client, send a request for a configuration file corresponding to the client to the server, and then receive a target configuration file corresponding to the identifier of the client fed back by the server, and finally pass the configuration file integrated in the client.
  • Dynamically configure the component library engine configure the interface according to the target configuration file, and solve the problem of re-writing the code when adjusting the interface layout in the related technology, and the development workload is large.
  • the configuration file written by the author completes the dynamic configuration of the interface and improves the efficiency of the interface configuration.
  • FIG. 2 is a flowchart of an interface configuration method in Embodiment 2 of the present application. This embodiment is further refined on the basis of the above-mentioned embodiment, and provides a dynamic configuration component library engine integrated in the client to configure the method according to the target. file to configure the interface.
  • the following describes an interface configuration method provided in Embodiment 2 of the present application with reference to FIG. 2 , including the following steps:
  • Step 210 In response to the user's operation of accessing the client, send a configuration file request corresponding to the client to the server, where the configuration file request includes the identifier of the client.
  • Step 220 Receive a target configuration file corresponding to the identifier of the client fed back by the server.
  • Step 230 parse the target configuration file according to the configuration file parsing rule through the dynamic configuration component library engine integrated in the client.
  • the dynamic configuration component library engine includes dynamic component library, configuration file parsing rules and interface configuration rules, and the dynamic components in the dynamic component library are encapsulated by the controls in the Flutter platform.
  • the dynamic configuration component library engine integrated inside the client parses the target configuration file sent by the server according to the configuration file parsing rules.
  • the Xcore engine integrated on the client side parses the configuration file according to the rules. , to parse the XML file sent by the server and containing the configuration information of the text box (for example, the format of the text box or the default content of the text box).
  • Step 240 Call at least one dynamic component in the dynamic component library to perform interface configuration according to the parsing result of the target configuration file and the interface configuration rule.
  • At least one dynamic component in the dynamic component library can be called to perform interface configuration according to the parsing result and the interface configuration rules stored in the client.
  • the target configuration file is parsed according to the configuration file parsing rules, including:
  • a method for parsing the target configuration file and configuring the interface is provided. First, according to the configuration file parsing rules, the target configuration file is parsed, and the root element contained in the target configuration file is obtained. , and then the dynamically configured component library engine can obtain the implementation class of the component according to the name of the root element, so as to construct a component corresponding to at least one component library, configure and render the interface.
  • the client sends a configuration file request corresponding to the client to the server in response to the user's operation of accessing the client, and receives the target configuration file fed back by the server and corresponds to the identifier of the client, and then sends a request through the client to the server.
  • the integrated dynamic configuration component library engine parses the target configuration file according to the configuration file analysis rules, and finally calls at least one dynamic component in the dynamic component library to perform interface configuration according to the analysis result of the target configuration file and the interface configuration rules.
  • Embodiment 3 is a flowchart of an interface configuration method provided in Embodiment 3 of the present application.
  • the technical solution of this embodiment is applied to the case where a dynamic component library is used for dynamic interface configuration.
  • the method can be executed by an interface configuration device.
  • the apparatus can be implemented by at least one of software and hardware, and can be integrated in various general-purpose computer equipment, including the following steps:
  • Step 310 Receive at least one initial configuration file sent by the configuration platform, and the identifier of the client corresponding to each initial configuration file.
  • the server receives at least one initial configuration file sent by the configuration platform, for example, at least one of an XML file and an XSL file, and an identifier of the corresponding client.
  • the initial configuration file may include the style of the component to be generated. For example, if the target client needs to display a picture, the developer needs to write the corresponding XML file in the configuration platform according to the description of the dynamic component.
  • the XML file may include Whether the image to be displayed has rounded corners, and whether shadow rendering is required for the image to be displayed.
  • Step 320 Generate a configuration file matching each initial configuration file according to the preconfigured component library rules and at least one initial configuration file, and store the identifier of the client corresponding to each initial configuration file in correspondence with the matching configuration file.
  • the server after receiving the initial configuration files sent by the configuration platform and the identifier of the client corresponding to each initial configuration file, the server generates a configuration file corresponding to each initial configuration file according to preconfigured component library rules and at least one initial configuration file.
  • the configuration file corresponding to the file is stored, and then the identifier of the client corresponding to each initial configuration file is stored corresponding to the matching configuration file.
  • a configuration file matching each initial configuration file is generated, including:
  • the component library rule and the at least one initial configuration file obtain from the background database the target data corresponding to at least one item to be filled in the initial configuration file;
  • the target data is added to the corresponding position of the initial configuration file to obtain a configuration file matching the initial configuration file.
  • a method for generating a matching configuration file according to the initial configuration file is provided. First, according to the rules of the component library and at least one initial configuration file, at least one item to be filled in the initial configuration file is obtained from the background database corresponding target data, and then add the acquired target data to the corresponding position of the initial configuration file to obtain a configuration file matching the initial configuration file.
  • the initial configuration file includes whether the image to be displayed has rounded corners, whether the image to be displayed needs to be rendered with shadows and other styles, and the background data interface of the image to be displayed.
  • the background data interface obtains the address of the picture to be displayed from the background database, and adds the address to the corresponding position of the initial configuration file, thereby obtaining the configuration file.
  • Step 330 Receive a configuration file request sent by the client, where the configuration file request includes the identifier of the client.
  • the server after receiving the configuration file request sent by the client, the server first obtains the identification of the client included in the configuration file request, so as to determine the configuration file corresponding to the current configuration file request.
  • Step 340 Determine a target configuration file corresponding to the identifier of the client, and send the target configuration file to the client, so that the client can perform interface configuration according to the target configuration file.
  • the server determines the configuration file corresponding to the identifier as the target configuration file according to the identifier of the client included in the configuration file request, and then sends the target configuration file to the client, so that the client Enables dynamic interface configuration and rendering based on target configuration files.
  • the server first receives at least one initial configuration file sent by the configuration platform, and the identifier of the client corresponding to each initial configuration file, and then generates the generated A configuration file that matches each initial configuration file, and the identifier of the client corresponding to each initial configuration file is stored in correspondence with the matching configuration file, and is determined from at least one configuration file when a configuration file request sent by the client is received.
  • Target configuration file corresponding to the client's identity, and send the target configuration file to the client, so that the client can configure the interface according to the target configuration file, and parse the configuration file written by the developer through the dynamic configuration component library engine integrated by the client , complete the interface configuration, no need to re-develop the front-end program, and improve the efficiency of the interface configuration.
  • Fig. 4a is a flowchart of an interface configuration method in Embodiment 4 of the present application.
  • the configuration platform establishes a connection with a server that is set to generate a configuration file; the server establishes a connection with a client that performs interface configuration.
  • An implementation manner of a configuration interface method in the embodiment is shown in FIG. 4b. The method includes:
  • Step 410 The configuration platform sends at least one initial configuration file written by the developer according to the dynamic component library, and the identifier of the client corresponding to the at least one initial configuration file to the server.
  • Step 420 The server receives at least one initial configuration file sent by the configuration platform, and an identifier of the client corresponding to each initial configuration file.
  • Step 430 The server generates a configuration file matching each initial configuration file according to the preconfigured component library rules and at least one initial configuration file, and stores the identifier of the client corresponding to each initial configuration file corresponding to the matching configuration file.
  • Step 440 In response to the user's operation of accessing the client, the client sends a configuration file request corresponding to the client to the server, where the configuration file request includes the identifier of the client.
  • Step 450 The server receives the configuration file request sent by the client, determines a target configuration file corresponding to the identifier of the client included in the configuration file request, and sends the target configuration file to the client.
  • Step 460 The client receives the target configuration file corresponding to the identifier of the client fed back by the server.
  • Step 470 The client performs interface configuration according to the target configuration file through the dynamic configuration component library engine integrated in the client.
  • the technical solutions of the embodiments of the present application in response to the user's operation of accessing the client, send a request for a configuration file corresponding to the client to the server, and then receive a target configuration file corresponding to the identifier of the client fed back by the server, and finally pass the configuration file integrated in the client.
  • Dynamically configure the component library engine configure the interface according to the target configuration file, and solve the problem of re-writing the code when adjusting the interface layout in the related technology, and the development workload is large.
  • the configuration file written by the author completes the interface configuration and improves the efficiency of the interface configuration.
  • FIG. 5 is a schematic structural diagram of an interface configuration apparatus according to Embodiment 5 of the present application.
  • the interface configuration apparatus includes: a request sending module 510 , a configuration file receiving module 520 , and an interface configuration module 530 .
  • the request sending module 510 is configured to send a configuration file request corresponding to the client to the server in response to the operation of the user accessing the client, where the configuration file request includes the identifier of the client;
  • a configuration file receiving module 520 configured to receive a target configuration file fed back by the server and corresponding to the identifier of the client;
  • the interface configuration module 530 is configured to perform interface configuration according to the target configuration file through the dynamic configuration component library engine integrated in the client;
  • the dynamic configuration component library engine includes a dynamic component library, configuration file parsing rules and interface configuration rules, and the dynamic components in the dynamic component library are obtained by encapsulating the controls in the Flutter platform.
  • the technical solutions of the embodiments of the present application in response to the user's operation of accessing the client, send a request for a configuration file corresponding to the client to the server, and then receive a target configuration file corresponding to the identifier of the client fed back by the server, and finally pass the configuration file integrated in the client.
  • Dynamically configure the component library engine configure the interface according to the target configuration file, and solve the problem of re-writing the code when adjusting the interface layout in the related technology, and the development workload is large.
  • the configuration file written by the author completes the interface configuration and improves the efficiency of the interface configuration.
  • the interface configuration module 530 includes:
  • a file parsing unit configured to parse the target configuration file according to the configuration file parsing rule through a dynamic configuration component library engine integrated in the client;
  • the interface configuration unit is configured to call at least one dynamic component in the dynamic component library to perform interface configuration according to the parsing result of the target configuration file and the interface configuration rule.
  • the file parsing unit is set to:
  • the target configuration file is parsed, and the root element contained in the target configuration file is obtained;
  • the interface configuration unit is set as:
  • At least one component is constructed according to the at least one component implementation class, and interface configuration is performed according to the at least one component.
  • the target configuration file is at least one of an XML file and an XSL file.
  • the interface configuration apparatus provided by the embodiment of the present application can execute the interface configuration method provided by any embodiment of the present application, and has functional modules and beneficial effects corresponding to the execution method.
  • the interface configuration apparatus includes an initial configuration file receiving module 610 , a configuration file generating module 620 , a request receiving module 630 and a configuration file sending module 640 .
  • the initial configuration file receiving module 610 is configured to receive at least one initial configuration file sent by the configuration platform, and the identifier of the client corresponding to each initial configuration file;
  • the configuration file generation module 620 is configured to generate a configuration file matching each initial configuration file according to the pre-configured component library rules and the at least one initial configuration file, and generate the identifier of the client corresponding to each initial configuration file It is stored corresponding to the matching configuration file;
  • a request receiving module 630 configured to receive a configuration file request sent by a client, where the configuration file request includes an identifier of the client;
  • the configuration file sending module 640 is configured to determine a target configuration file corresponding to the identifier of the client, and send the target configuration file to the client, so that the client can perform interface configuration according to the target configuration file .
  • the technical solutions of the embodiments of the present application in response to the user's operation of accessing the client, send a request for a configuration file corresponding to the client to the server, and then receive a target configuration file corresponding to the identifier of the client fed back by the server, and finally pass the configuration file integrated in the client.
  • Dynamically configure the component library engine configure the interface according to the target configuration file, and solve the problem of re-writing the code when adjusting the interface layout in the related technology, and the development workload is large.
  • the configuration file written by the author completes the interface configuration and improves the efficiency of the interface configuration.
  • the configuration file generation module 620 is set to:
  • the component library rule and the at least one initial configuration file obtain from the background database the target data corresponding to at least one item to be filled in the initial configuration file;
  • the target data is added to the corresponding position of the initial configuration file to obtain a configuration file matching the initial configuration file.
  • the interface configuration apparatus provided by the embodiment of the present application can execute the interface configuration method provided by any embodiment of the present application, and has functional modules and beneficial effects corresponding to the execution method.
  • FIG. 7 is a schematic structural diagram of a device according to Embodiment 7 of the present application.
  • the electronic device includes a processor 70 and a memory 71; the number of processors 70 in the device may be one or more, as shown in FIG. 7
  • a processor 70 is taken as an example; the processor 70 and the memory 71 in the device may be connected by a bus or in other ways, and the connection by a bus is taken as an example in FIG. 7 .
  • the memory 71 can be configured to store software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to an interface configuration method in the embodiments of the present application (for example, in the interface configuration device).
  • the processor 70 executes the function application and data processing of the device by running the software programs, instructions and modules stored in the memory 71, that is, the above-mentioned interface configuration method is implemented.
  • the method includes:
  • interface configuration is performed according to the target configuration file
  • the dynamic configuration component library engine includes a dynamic component library, configuration file parsing rules and interface configuration rules, and the dynamic components in the dynamic component library are obtained by encapsulating the controls in the Flutter platform.
  • the method may also include:
  • a configuration file matching each initial configuration file is generated, and the identifier of the client corresponding to each initial configuration file is stored corresponding to the matching configuration file;
  • a target configuration file corresponding to the identifier of the client is determined, and the target configuration file is sent to the client, so that the client performs interface configuration according to the target configuration file.
  • the memory 71 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the terminal, and the like. Additionally, the memory 71 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid-state storage device. In some instances, memory 71 may further include memory located remotely from processor 70, which may be connected to the device through a network. Examples of such networks include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
  • the eighth embodiment of the present application further provides a computer-readable storage medium having a computer program stored thereon, where the computer program is used to execute an interface configuration method when executed by a computer processor, and the method includes:
  • interface configuration is performed according to the target configuration file
  • the dynamic configuration component library engine includes a dynamic component library, configuration file parsing rules and interface configuration rules, and the dynamic components in the dynamic component library are obtained by encapsulating the controls in the Flutter platform.
  • the method may also include:
  • a configuration file matching each initial configuration file is generated, and the identifier of the client corresponding to each initial configuration file is stored corresponding to the matching configuration file;
  • a target configuration file corresponding to the identifier of the client is determined, and the target configuration file is sent to the client, so that the client performs interface configuration according to the target configuration file.
  • the present application can be implemented by software and necessary general-purpose hardware, and can also be implemented by hardware, but in many cases the former is a better implementation.
  • the technical solutions of the present application can be embodied in the form of software products in essence or the parts that make contributions to related technologies, and the computer software products can be stored in a computer-readable storage medium, such as a computer floppy disk, Read-Only Memory (ROM), Random Access Memory (RAM), Flash Memory (FLASH), hard disk or optical disk, etc., including multiple instructions to make a computer device (which can be a personal computer) , server, or network device, etc.) to execute the methods described in the embodiments of the present application.
  • ROM Read-Only Memory
  • RAM Random Access Memory
  • FLASH Flash Memory
  • the included units and modules are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be realized; in addition, The specific names of the functional units are only for the convenience of distinguishing from each other, and are not used to limit the protection scope of the present application.

Abstract

一种界面配置方法、装置、设备及介质。其中,界面配置方法,包括:响应于用户访问所述客户端的操作,向服务器发送与所述客户端对应的配置文件请求,所述配置文件请求中包括所述客户端的标识;接收所述服务器反馈的与所述客户端的标识对应的目标配置文件;通过所述客户端中集成的动态配置组件库引擎,根据所述目标配置文件进行界面配置。

Description

界面配置方法、装置、设备及介质
本申请要求申请日为2020年11月10日、申请号为202011246988.1的中国专利申请的优先权,该申请的全部内容通过引用结合在本申请中。
技术领域
本申请实施例涉及计算机技术,例如涉及一种界面配置方法、装置、设备及介质。
背景技术
随着计算机技术的发展,越来越多的单位和个人会使用移动终端中安装的应用来处理事务,很多应用针对用户使用的移动终端系统,发布了不同版本,例如,包括针对安卓系统的版本,以及针对IOS(iPhone Operation System,苹果移动设备操作系统)的版本,并且随着用户需求的变更,针对各系统的应用界面也需要根据用户的需求进行更改。
相关技术中,采用Flutter技术可以实现应用的跨平台,但应用界面中的布局、控件的顺序是相对固定的,无法根据用户需求进行灵活配置,如果需要进行应用的功能更新,开发者要重写代码并重新发版,对开发者技术水平要求较高,并且开发成本高、开发周期长。
发明内容
本申请实施例提供一种界面配置方法、装置、设备及介质,通过客户端集成的动态配置组件库引擎,解析开发者编写的配置文件,完成界面配置,提高了界面配置的效率。
第一方面,本申请实施例提供了一种界面配置方法,应用于客户端,所述界面配置方法包括:
响应于用户访问所述客户端的操作,向服务器发送与所述客户端对应的配置文件请求,所述配置文件请求中包括所述客户端的标识;
接收所述服务器反馈的与所述客户端的标识对应的目标配置文件;
通过所述客户端中集成的动态配置组件库引擎,根据所述目标配置文件进行界面配置;
其中,所述动态配置组件库引擎中包括动态组件库、配置文件解析规则以及界面配置规则,所述动态组件库中的动态组件由Flutter平台中的控件进行封装得到。
第二方面,本申请实施例还提供了一种界面配置方法,应用于服务器,所述界面配置方法包括:
接收配置平台发送的至少一个初始配置文件,以及与每个初始配置文件对应的客户端的标识;
根据预先配置的组件库规则和所述至少一个初始配置文件,生成与每个初始配置文件匹配的配置文件,并将所述每个初始配置文件对应的客户端的标识与匹配的配置文件对应存储;
接收客户端发送的配置文件请求,所述配置文件请求中包括所述客户端的标识;
确定与所述客户端的标识对应的目标配置文件,并将所述目标配置文件发送至所述客户端,以使所述客户端根据所述目标配置文件进行界面配置。
第三方面,本申请实施例还提供了一种界面配置装置,所述装置包括:
请求发送模块,设置为响应于用户访问所述客户端的操作,向服务器发送与所述客户端对应的配置文件请求,所述配置文件请求中包括所述客户端的标识;
配置文件接收模块,设置为接收所述服务器反馈的与所述客户端的标识对应的目标配置文件;
界面配置模块,设置为通过所述客户端中集成的动态配置组件库引擎,根据所述目标配置文件进行界面配置;
其中,所述动态配置组件库引擎中包括动态组件库、配置文件解析规则以及界面配置规则,所述动态组件库中的动态组件由Flutter平台中的控件进行封装得到。
第四方面,本申请实施例还提供了一种界面配置装置,所述装置包括:
初始配置文件接收模块,设置为接收配置平台发送的至少一个初始配置文件,以及与每个初始配置文件对应的客户端的标识;
配置文件生成模块,设置为根据预先配置的组件库规则和所述至少一个初始配置文件,生成与每个初始配置文件匹配的配置文件,并将所述每个初始配置文件对应的客户端的标识与匹配的配置文件对应存储;
请求接收模块,设置为接收客户端发送的配置文件请求,所述配置文件请求中包括所述客户端的标识;
配置文件发送模块,设置为确定与所述客户端的标识对应的目标配置文件,并将所述目标配置文件发送至所述客户端,以使所述客户端根据所述目标配置文件进行界面配置。
第五方面,本申请实施例还提供了一种电子设备,所述电子设备包括:
一个或多个处理器;
存储器,设置为存储一个或多个程序;
其中,所述一个或多个程序当被所述一个或多个处理器执行时,使得所述一个或多个处理器实现本申请任意实施例提供的界面配置方法。
第六方面,本申请实施例还提供了一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现本申请任意实施例提供的界面配置方法。
附图说明
图1是本申请实施例一中的一种界面配置方法的流程图;
图2是本申请实施例二中的一种界面配置方法的流程图;
图3是本申请实施例三中的一种界面配置方法的流程图;
图4a是本申请实施例四中的一种界面配置方法的流程图;
图4b是本申请实施例四中的一种界面配置方法的执行方式流程图;
图5是本申请实施例五中的一种界面配置装置的结构示意图;
图6是本申请实施例六中的一种界面配置装置的结构示意图;
图7是本申请实施例七提供的一种设备的结构示意图。
具体实施方式
实施例一
图1为本申请实施例一中的一种界面配置方法的流程图,本实施例的技术方案应用于适用于采用动态组件库进行界面动态配置和配置的情况,该方法可以由界面配置装置执行,该装置可以由软件和硬件中的至少一种来实现,并可以集成在通用计算机设备中,界面配置方法包括如下步骤:
步骤110、响应于用户访问客户端的操作,向服务器发送与客户端对应的配 置文件请求,配置文件请求中包括所述客户端的标识。
其中,配置文件请求是客户端发送的用于向服务器请求与当前客户端对应的配置文件的请求,其中携带了当前客户端的标识。示例性的,客户端是安装于移动终端的APP(Application,手机软件),配置文件请求是移动终端中的APP向服务器发送的包含APPID(APP Identity Document,手机软件身份标识)的请求。
本实施例中,客户端检测到用户的访问操作后,为了实现界面灵活配置,首先向服务器发送配置文件请求,以使服务器反馈与该客户端对应的配置文件,其中,配置文件请求中包含客户端的标识,服务器可以根据客户端的标识确定与当前客户端对应的配置文件。示例性的,APP检测到客户点击操作,向服务器发送包含APPID的配置文件请求,从服务器拉取与APPID对应的配置文件。
步骤120、接收服务器反馈的与客户端的标识对应的目标配置文件。
可选的,目标配置文件为可扩展标记语言(Extensible Markup Language,XML)文件和可扩展样式语言(Extensible Stylesheet Language,XSL)文件中的至少一种文件。
本实施例中,服务器接收到客户端发送的配置文件请求后,会向客户端反馈与客户端的标识对应的目标配置文件,以使客户端完成界面配置和渲染。其中,配置文件是XML格式的文件和XSL格式的文件中的至少一种文件,配置文件是服务器对开发者提供的初始XML文件和初始XSL文件中的至少一种文件进行进一步的数据补充得到的。
步骤130、通过客户端中集成的动态配置组件库引擎,根据目标配置文件进行界面配置。
其中,动态配置组件库引擎中包括动态组件库、配置文件解析规则以及界面配置规则,动态组件库中的动态组件由Flutter平台中的控件进行封装得到。
客户端中预先集成了动态配置组件库引擎,并且动态配置组件库引擎中包括动态组件库、配置文件解析规则以及界面配置规则,其中,动态组件库中的动态组件由Flutter平台中的控件进行封装得到。以文本框为例,Flutter平台中的文本框控件并不支持动态配置,为了实现灵活配置,对开源框架(Xcore)组件库中的文本框控件进行了二次封装,形成了Xcore组件,APP运行过程中,Xcore引擎可以对与文本框对应的配置文件进行解析,调用Xcore组件,动态配置文本框。
本实施例中,客户端接收到服务器反馈的目标配置文件后,通过集成的动态配置组件库引擎解析目标配置文件,然后根据解析结果从动态组件库中获取动态组件,从而完成界面配置。示例性的,APP通过集成的Xcore引擎对XML格式的目标配置文件进行解析,根据解析结果调用Xcore组件库中的Xcore组件构建页面,并进行界面渲染。
本申请实施例的技术方案,响应于用户访问客户端的操作,向服务器发送与客户端对应的配置文件请求,然后接收服务器反馈的与客户端的标识对应的目标配置文件,最终通过客户端中集成的动态配置组件库引擎,根据目标配置文件进行界面配置,解决了相关技术中对界面布局进行调整时需要重新编写代码,开发工作量大的问题,通过客户端集成的动态配置组件库引擎,解析开发者编写的配置文件,完成界面动态配置,提高了界面配置的效率。
实施例二
图2为本申请实施例二中的一种界面配置方法的流程图,本实施例在上述实施例的基础上进一步细化,提供了通过客户端中集成的动态配置组件库引擎,根据目标配置文件进行界面配置的步骤。下面结合图2对本申请实施例二提供的一种界面配置方法进行说明,包括以下步骤:
步骤210、响应于用户访问客户端的操作,向服务器发送与客户端对应的配置文件请求,配置文件请求中包括所述客户端的标识。
步骤220、接收服务器反馈的与客户端的标识对应的目标配置文件。
步骤230、通过客户端中集成的动态配置组件库引擎,根据配置文件解析规则对目标配置文件进行解析。
其中,动态配置组件库引擎中包括动态组件库、配置文件解析规则以及界面配置规则,动态组件库中的动态组件由Flutter平台中的控件进行封装得到。
本实施例中,客户端内部集成的动态配置组件库引擎根据配置文件解析规则,对服务器发送的目标配置文件进行解析,以文本框动态配置为例,客户端集成的Xcore引擎根据配置文件解析规则,对服务器发送的包含文本框配置信息(例如,文本框格式或者文本框默认内容)的XML文件进行解析。
步骤240、根据目标配置文件的解析结果以及界面配置规则,调用动态组件库中的至少一个动态组件进行界面配置。
本实施例中,在对目标配置文件进行解析后,可以根据解析结果和客户端 中存储的界面配置规则,调用动态组件库中的至少一个动态组件进行界面配置。
可选的,通过客户端中集成的动态配置组件库引擎,根据配置文件解析规则对目标配置文件进行解析,包括:
根据配置文件解析规则,解析目标配置文件,获取目标配置文件中包含的根元素。
可选的,根据目标配置文件的解析结果以及界面配置规则,调用动态组件库中的至少一个动态组件进行界面配置,包括:
根据根元素的根元素名称,获取动态组件库中与根元素名称对应的至少一个组件实现类;
根据至少一个组件实现类构造至少一个组件,并根据至少一个组件进行界面配置。
上述两个可选的实施例中,提供了一种对目标配置文件进行解析和进行界面配置的方式,首先根据配置文件解析规则,对目标配置文件进行解析,获取目标配置文件中包含的根元素,然后动态配置组件库引擎可以根据根元素的名称获取组件的实现类,从而构建与至少一个组件库对应的组件,配置并渲染界面。
本申请实施例的技术方案,客户端响应于用户访问客户端的操作,向服务器发送与客户端对应的配置文件请求,并接收服务器反馈的与客户端的标识对应的目标配置文件,然后通过客户端中集成的动态配置组件库引擎,根据配置文件解析规则对目标配置文件进行解析,最终根据目标配置文件的解析结果以及界面配置规则,调用动态组件库中的至少一个动态组件进行界面配置,解决了相关技术中对界面布局进行调整时需要重新编写代码,开发工作量大的问题,通过客户端集成的动态配置组件库引擎,解析开发者编写的配置文件,完成界面配置,提高了界面配置的效率。
实施例三
图3为本申请实施例三提供的一种界面配置方法的流程图,本实施例的技术方案应用于适用于采用动态组件库进行界面动态配置的情况,该方法可以由界面配置装置执行,该装置可以由软件和硬件中的至少一种来实现,并可以集成在各种通用计算机设备中,包括如下步骤:
步骤310、接收配置平台发送的至少一个初始配置文件,以及与每个初始配 置文件对应的客户端的标识。
本实施例中,服务器接收配置平台发送的至少一个初始配置文件,例如,XML文件和XSL文件中的至少一种文件,及其对应的客户端的标识。其中,初始配置文件中可以包括需要生成的组件的样式,例如,目标客户端需要显示一幅图片,则开发者需要根据动态组件说明,在配置平台中编写对应的XML文件,XML文件中可以包括待显示的图片是否为圆角,以及待显示的图片是否需要进行阴影渲染等。
步骤320、根据预先配置的组件库规则和至少一个初始配置文件,生成与每个初始配置文件匹配的配置文件,并将每个初始配置文件对应的客户端的标识与匹配的配置文件对应存储。
本实施例中,服务器接收到配置平台发送的初始配置文件,以及与每个初始配置文件对应的客户端的标识后,根据预先配置的组件库规则和至少一个初始配置文件,生成与每个初始配置文件对应的配置文件,然后将每个初始配置文件对应的客户端的标识与匹配的配置文件对应存储。
可选的,根据预先配置的组件库规则和至少一个初始配置文件,生成与每个初始配置文件匹配的配置文件,包括:
根据所述组件库规则和所述至少一个初始配置文件,从后台数据库中获取所述初始配置文件中包含的至少一个待填入项对应的目标数据;
将所述目标数据添加至所述初始配置文件的对应位置,得到与所述初始配置文件匹配的配置文件。
本实施例中,提供了一种根据初始配置文件生成匹配的配置文件的方式,首先根据组件库规则和至少一个初始配置文件,从后台数据库中获取初始配置文件中包含的至少一个待填入项对应的目标数据,然后将获取到的而目标数据添加至初始配置文件的对应位置,得到与初始配置文件匹配的配置文件。
示例性的,初始配置文件中包括了待显示的图片是否为圆角,待显示的图片是否需要进行阴影渲染等样式,以及待显示图片的后台数据接口,则服务器根据预先配置的组件库规则和后台数据接口,从后台数据库中获取待显示图片的地址,并将该地址添加到初始配置文件的对应位置,从而得到配置文件。
步骤330、接收客户端发送的配置文件请求,配置文件请求中包括客户端的标识。
本实施例中,服务器接收到客户端发送的配置文件请求后,首先获取配置 文件请求中包含的客户端的标识,以便于确定当前配置文件请求对应的配置文件。
步骤340、确定与客户端的标识对应的目标配置文件,并将目标配置文件发送至客户端,以使客户端根据目标配置文件进行界面配置。
本实施例中,服务器根据配置文件请求中包含的客户端的标识,然后根据客户端的标识,确定与该标识对应的配置文件为目标配置文件,并将目标配置文件发送至客户端,以使客户端能够根据目标配置文件进行动态界面配置和渲染。
本申请实施例的技术方案,服务器首先接收配置平台发送的至少一个初始配置文件,以及与每个初始配置文件对应的客户端的标识,然后根据预先配置的组件库规则和至少一个初始配置文件,生成与每个初始配置文件匹配的配置文件,并将每个初始配置文件对应的客户端的标识与匹配的配置文件对应存储,在接收到客户端发送的配置文件请求时,从至少一个配置文件中确定与客户端的标识对应的目标配置文件,并将目标配置文件发送至客户端,以使客户端根据目标配置文件进行界面配置,通过客户端集成的动态配置组件库引擎,解析开发者编写的配置文件,完成界面配置,无需重新开发前端程序,提高了界面配置的效率。
实施例四
图4a为本申请实施例四中的一种界面配置方法的流程图,如图4a所示,配置平台与设置为生成配置文件的服务器建立连接;服务器与进行界面配置的客户端建立连接,本实施例中一种配置界面方法的执行方式如图4b所示。该方法包括:
步骤410、配置平台将开发者根据动态组件库编写的至少一个初始配置文件,及至少一个初始配置文件对应的客户端的标识发送至服务器。
步骤420、服务器接收配置平台发送的至少一个初始配置文件,以及与每个初始配置文件对应的客户端的标识。
步骤430、服务器根据预先配置的组件库规则和至少一个初始配置文件,生成与每个初始配置文件匹配的配置文件,并将每个初始配置文件对应的客户端的标识与匹配的配置文件对应存储。
步骤440、客户端响应于用户访问客户端的操作,向服务器发送与客户端对 应的配置文件请求,配置文件请求中包括所述客户端的标识。
步骤450、服务器接收客户端发送的配置文件请求,确定与配置文件请求中包含的客户端的标识对应的目标配置文件,并将目标配置文件发送至客户端。
步骤460、客户端接收服务器反馈的与客户端的标识对应的目标配置文件。
步骤470、客户端通过客户端中集成的动态配置组件库引擎,根据目标配置文件进行界面配置。
本申请实施例的技术方案,响应于用户访问客户端的操作,向服务器发送与客户端对应的配置文件请求,然后接收服务器反馈的与客户端的标识对应的目标配置文件,最终通过客户端中集成的动态配置组件库引擎,根据目标配置文件进行界面配置,解决了相关技术中对界面布局进行调整时需要重新编写代码,开发工作量大的问题,通过客户端集成的动态配置组件库引擎,解析开发者编写的配置文件,完成界面配置,提高了界面配置的效率。
实施例五
图5为本申请实施例五提供的一种界面配置装置的结构示意图,该界面配置装置,包括:请求发送模块510、配置文件接收模块520和界面配置模块530。
请求发送模块510,设置为响应于用户访问所述客户端的操作,向服务器发送与所述客户端对应的配置文件请求,所述配置文件请求中包括所述客户端的标识;
配置文件接收模块520,设置为接收所述服务器反馈的与所述客户端的标识对应的目标配置文件;
界面配置模块530,设置为通过所述客户端中集成的动态配置组件库引擎,根据所述目标配置文件进行界面配置;
其中,所述动态配置组件库引擎中包括动态组件库、配置文件解析规则以及界面配置规则,所述动态组件库中的动态组件由Flutter平台中的控件进行封装得到。
本申请实施例的技术方案,响应于用户访问客户端的操作,向服务器发送与客户端对应的配置文件请求,然后接收服务器反馈的与客户端的标识对应的目标配置文件,最终通过客户端中集成的动态配置组件库引擎,根据目标配置文件进行界面配置,解决了相关技术中对界面布局进行调整时需要重新编写代码,开发工作量大的问题,通过客户端集成的动态配置组件库引擎,解析开发 者编写的配置文件,完成界面配置,提高了界面配置的效率。
可选的,所述界面配置模块530,包括:
文件解析单元,设置为通过所述客户端中集成的动态配置组件库引擎,根据所述配置文件解析规则对所述目标配置文件进行解析;
界面配置单元,设置为根据目标配置文件的解析结果以及界面配置规则,调用所述动态组件库中的至少一个动态组件进行界面配置。
可选的,所述文件解析单元,设置为:
根据所述配置文件解析规则,解析所述目标配置文件,获取所述目标配置文件中包含的根元素;
所述界面配置单元,设置为:
根据所述根元素的根元素名称,获取所述动态组件库中与所述根元素名称对应的至少一个组件实现类;
根据所述至少一个组件实现类构造至少一个组件,并根据所述至少一个组件进行界面配置。
可选的,所述目标配置文件为XML文件和XSL文件中的至少一种。
本申请实施例所提供的界面配置装置可执行本申请任意实施例所提供的界面配置方法,具备执行方法相应的功能模块和有益效果。
实施例六
图6为本申请实施例六提供的一种界面配置装置的结构示意图,该界面配置装置,包括:初始配置文件接收模块610、配置文件生成模块620、请求接收模块630和配置文件发送模块640。
初始配置文件接收模块610,设置为接收配置平台发送的至少一个初始配置文件,以及与每个初始配置文件对应的客户端的标识;
配置文件生成模块620,设置为根据预先配置的组件库规则和所述至少一个初始配置文件,生成与每个初始配置文件匹配的配置文件,并将所述每个初始配置文件对应的客户端的标识与匹配的配置文件对应存储;
请求接收模块630,设置为接收客户端发送的配置文件请求,所述配置文件请求中包括所述客户端的标识;
配置文件发送模块640,设置为确定与所述客户端的标识对应的目标配置文件,并将所述目标配置文件发送至所述客户端,以使所述客户端根据所述目标 配置文件进行界面配置。
本申请实施例的技术方案,响应于用户访问客户端的操作,向服务器发送与客户端对应的配置文件请求,然后接收服务器反馈的与客户端的标识对应的目标配置文件,最终通过客户端中集成的动态配置组件库引擎,根据目标配置文件进行界面配置,解决了相关技术中对界面布局进行调整时需要重新编写代码,开发工作量大的问题,通过客户端集成的动态配置组件库引擎,解析开发者编写的配置文件,完成界面配置,提高了界面配置的效率。
可选的,所述配置文件生成模块620,设置为:
根据所述组件库规则和所述至少一个初始配置文件,从后台数据库中获取所述初始配置文件中包含的至少一个待填入项对应的目标数据;
将所述目标数据添加至所述初始配置文件的对应位置,得到与所述初始配置文件匹配的配置文件。
本申请实施例所提供的界面配置装置可执行本申请任意实施例所提供的界面配置方法,具备执行方法相应的功能模块和有益效果。
实施例七
图7为本申请实施例七提供的一种设备的结构示意图,如图7所示,该电子设备包括处理器70和存储器71;设备中处理器70的数量可以是一个或多个,图7中以一个处理器70为例;设备中的处理器70和存储器71可以通过总线或其它方式连接,图7中以通过总线连接为例。
存储器71作为一种计算机可读存储介质,可设置为存储软件程序、计算机可执行程序以及模块,如本申请实施例中的一种界面配置方法对应的程序指令/模块(例如,界面配置装置中的请求发送模块510、配置文件接收模块520和界面配置模块530,或者初始配置文件接收模块610、配置文件生成模块620、请求接收模块630和配置文件发送模块640)。处理器70通过运行存储在存储器71中的软件程序、指令以及模块,从而执行设备的功能应用以及数据处理,即实现上述的界面配置方法。
该方法包括:
响应于用户访问所述客户端的操作,向服务器发送与所述客户端对应的配置文件请求,所述配置文件请求中包括所述客户端的标识;
接收所述服务器反馈的与所述客户端的标识对应的目标配置文件;
通过所述客户端中集成的动态配置组件库引擎,根据所述目标配置文件进行界面配置;
其中,所述动态配置组件库引擎中包括动态组件库、配置文件解析规则以及界面配置规则,所述动态组件库中的动态组件由Flutter平台中的控件进行封装得到。
该方法还可以包括:
接收配置平台发送的至少一个初始配置文件,以及与每个初始配置文件对应的客户端的标识;
根据预先配置的组件库规则和所述至少一个初始配置文件,生成与每个初始配置文件匹配的配置文件,并将所述每个初始配置文件对应的客户端的标识与匹配的配置文件对应存储;
接收客户端发送的配置文件请求,所述配置文件请求中包括所述客户端的标识;
确定与所述客户端的标识对应的目标配置文件,并将所述目标配置文件发送至所述客户端,以使所述客户端根据所述目标配置文件进行界面配置。
存储器71可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序;存储数据区可存储根据终端的使用所创建的数据等。此外,存储器71可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其它非易失性固态存储器件。在一些实例中,存储器71可进一步包括相对于处理器70远程设置的存储器,这些远程存储器可以通过网络连接至设备。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。
实施例八
本申请实施例八还提供一种其上存储有计算机程序的计算机可读存储介质,所述计算机程序在由计算机处理器执行时用于执行一种界面配置方法,该方法包括:
响应于用户访问所述客户端的操作,向服务器发送与所述客户端对应的配置文件请求,所述配置文件请求中包括所述客户端的标识;
接收所述服务器反馈的与所述客户端的标识对应的目标配置文件;
通过所述客户端中集成的动态配置组件库引擎,根据所述目标配置文件进 行界面配置;
其中,所述动态配置组件库引擎中包括动态组件库、配置文件解析规则以及界面配置规则,所述动态组件库中的动态组件由Flutter平台中的控件进行封装得到。
该方法还可以包括:
接收配置平台发送的至少一个初始配置文件,以及与每个初始配置文件对应的客户端的标识;
根据预先配置的组件库规则和所述至少一个初始配置文件,生成与每个初始配置文件匹配的配置文件,并将所述每个初始配置文件对应的客户端的标识与匹配的配置文件对应存储;
接收客户端发送的配置文件请求,所述配置文件请求中包括所述客户端的标识;
确定与所述客户端的标识对应的目标配置文件,并将所述目标配置文件发送至所述客户端,以使所述客户端根据所述目标配置文件进行界面配置。
通过以上关于实施方式的描述,所属领域的技术人员可以清楚地了解到,本申请可借助软件及必需的通用硬件来实现,也可以通过硬件实现,但很多情况下前者是较好的实施方式。基于这样的理解,本申请的技术方案本质上或者说对相关技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在计算机可读存储介质中,如计算机的软盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、闪存(FLASH)、硬盘或光盘等,包括多个指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请实施例所述的方法。
值得注意的是,上述一种界面配置装置的实施例中,所包括的单元和模块只是按照功能逻辑进行划分的,但并不局限于上述的划分,只要能够实现相应的功能即可;另外,功能单元的具体名称也只是为了便于相互区分,并不用于限制本申请的保护范围。

Claims (10)

  1. 一种界面配置方法,应用于客户端,所述界面配置方法包括:
    响应于用户访问所述客户端的操作,向服务器发送与所述客户端对应的配置文件请求,所述配置文件请求中包括所述客户端的标识;
    接收所述服务器反馈的与所述客户端的标识对应的目标配置文件;
    通过所述客户端中集成的动态配置组件库引擎,根据所述目标配置文件进行界面配置;
    其中,所述动态配置组件库引擎中包括动态组件库、配置文件解析规则以及界面配置规则,所述动态组件库中的动态组件由Flutter平台中的控件进行封装得到。
  2. 根据权利要求1所述的方法,其中,通过所述客户端中集成的动态配置组件库引擎,根据所述目标配置文件进行界面配置,包括:
    通过所述客户端中集成的动态配置组件库引擎,根据所述配置文件解析规则对所述目标配置文件进行解析;
    根据目标配置文件的解析结果以及界面配置规则,调用所述动态组件库中的至少一个动态组件进行界面配置。
  3. 根据权利要求2所述的方法,其中,通过所述客户端中集成的动态配置组件库引擎,根据所述配置文件解析规则对所述目标配置文件进行解析,包括:根据所述配置文件解析规则,解析所述目标配置文件,获取所述目标配置文件中包含的根元素;
    根据目标配置文件的解析结果以及界面配置规则,调用所述动态组件库中的至少一个动态组件进行界面配置,包括:
    根据所述根元素的根元素名称,获取所述动态组件库中与所述根元素名称对应的至少一个组件实现类;
    根据所述至少一个组件实现类构造至少一个组件,并根据所述至少一个组件进行界面配置。
  4. 根据权利要求1所述的方法,其中,所述目标配置文件为可扩展标记语言XML文件和可扩展样式语言XSL文件中的至少一种文件。
  5. 一种界面配置方法,应用于服务器,所述界面配置方法包括:
    接收配置平台发送的至少一个初始配置文件,以及与每个初始配置文件对应的客户端的标识;
    根据预先配置的组件库规则和所述至少一个初始配置文件,生成与每个初 始配置文件匹配的配置文件,并将所述每个初始配置文件对应的客户端的标识与匹配的配置文件对应存储;
    接收客户端发送的配置文件请求,所述配置文件请求中包括所述客户端的标识;
    确定与所述客户端的标识对应的目标配置文件,并将所述目标配置文件发送至所述客户端,以使所述客户端根据所述目标配置文件进行界面配置。
  6. 根据权利要求5所述的方法,其中,根据预先配置的组件库规则和所述至少一个初始配置文件,生成与每个初始配置文件匹配的配置文件,包括:
    根据所述组件库规则和所述至少一个初始配置文件,从后台数据库中获取所述初始配置文件中包含的至少一个待填入项对应的目标数据;
    将所述目标数据添加至所述初始配置文件的对应位置,得到与所述初始配置文件匹配的配置文件。
  7. 一种界面配置装置,包括:
    请求发送模块,设置为响应于用户访问所述客户端的操作,向服务器发送与所述客户端对应的配置文件请求,所述配置文件请求中包括所述客户端的标识;
    配置文件接收模块,设置为接收所述服务器反馈的与所述客户端的标识对应的目标配置文件;
    界面配置模块,设置为通过所述客户端中集成的动态配置组件库引擎,根据所述目标配置文件进行界面配置;
    其中,所述动态配置组件库引擎中包括动态组件库、配置文件解析规则以及界面配置规则,所述动态组件库中的动态组件由Flutter平台中的控件进行封装得到。
  8. 一种界面配置装置,包括:
    初始配置文件接收模块,设置为接收配置平台发送的至少一个初始配置文件,以及与每个初始配置文件对应的客户端的标识;
    配置文件生成模块,设置为根据预先配置的组件库规则和所述至少一个初始配置文件,生成与每个初始配置文件匹配的配置文件,并将所述每个初始配置文件对应的客户端的标识与匹配的配置文件对应存储;
    请求接收模块,设置为接收客户端发送的配置文件请求,所述配置文件请求中包括所述客户端的标识;
    配置文件发送模块,设置为确定与所述客户端的标识对应的目标配置文件,并将所述目标配置文件发送至所述客户端,以使所述客户端根据所述目标配置文件进行界面配置。
  9. 一种电子设备,包括:
    一个或多个处理器;
    存储器,设置为存储一个或多个程序,
    其中,所述一个或多个程序当被所述一个或多个处理器执行时,使得所述一个或多个处理器实现如权利要求1-4或权利要求5-6任一所述的界面配置方法。
  10. 一种计算机可读存储介质,其上存储有计算机程序,其中,所述计算机程序被处理器执行时实现如权利要求1-4或权利要求5-6任一所述的界面配置方法。
PCT/CN2021/070291 2020-11-10 2021-01-05 界面配置方法、装置、设备及介质 WO2022099913A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011246988.1 2020-11-10
CN202011246988.1A CN112714148A (zh) 2020-11-10 2020-11-10 一种界面配置方法、装置、设备及介质

Publications (1)

Publication Number Publication Date
WO2022099913A1 true WO2022099913A1 (zh) 2022-05-19

Family

ID=75541852

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/070291 WO2022099913A1 (zh) 2020-11-10 2021-01-05 界面配置方法、装置、设备及介质

Country Status (2)

Country Link
CN (1) CN112714148A (zh)
WO (1) WO2022099913A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114398091B (zh) * 2021-12-03 2024-02-23 贝壳找房(北京)科技有限公司 Flutter组件的配置方法及装置

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106034247A (zh) * 2015-03-12 2016-10-19 Tcl集团股份有限公司 一种智能电视应用的配置方法及装置
US20170185431A1 (en) * 2015-02-03 2017-06-29 Baidu Online Network Technology (Beijing) Co., Ltd . Method and apparatus for dynamically implementing application function
CN107391169A (zh) * 2017-06-09 2017-11-24 口碑控股有限公司 安卓页面的动态更新方法和装置
CN110162305A (zh) * 2019-05-31 2019-08-23 广州华多网络科技有限公司 一种配置活动界面的方法及客户端
CN110597941A (zh) * 2019-09-11 2019-12-20 广州力挚网络科技有限公司 一种地图显示方法与系统
CN111459465A (zh) * 2020-03-27 2020-07-28 北京五八信息技术有限公司 一种Flutter工程文件的生成方法和装置
CN111740948A (zh) * 2020-05-12 2020-10-02 北京沃东天骏信息技术有限公司 数据包发布方法、动态更新方法、装置、设备及介质

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101216838B (zh) * 2008-01-15 2011-08-10 中兴通讯股份有限公司 基于web标记的xml界面配置文件分发系统及方法
US8930901B2 (en) * 2011-08-15 2015-01-06 International Business Machines Corporation Automatic selection of lowest configuration feature level by functionality exploited
CN104484171B (zh) * 2014-12-11 2018-05-29 深圳市路通网络技术有限公司 终端界面设计系统、方法及相关设备
CN108776610A (zh) * 2018-06-27 2018-11-09 中国建设银行股份有限公司 一种界面配置方法和装置
CN109460276A (zh) * 2018-10-25 2019-03-12 北京字节跳动网络技术有限公司 页面和页面配置文件生成方法、装置、终端设备及介质
CN109388399A (zh) * 2018-10-25 2019-02-26 北京字节跳动网络技术有限公司 页面和通用页面配置文件生成方法、装置、设备及介质

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170185431A1 (en) * 2015-02-03 2017-06-29 Baidu Online Network Technology (Beijing) Co., Ltd . Method and apparatus for dynamically implementing application function
CN106034247A (zh) * 2015-03-12 2016-10-19 Tcl集团股份有限公司 一种智能电视应用的配置方法及装置
CN107391169A (zh) * 2017-06-09 2017-11-24 口碑控股有限公司 安卓页面的动态更新方法和装置
CN110162305A (zh) * 2019-05-31 2019-08-23 广州华多网络科技有限公司 一种配置活动界面的方法及客户端
CN110597941A (zh) * 2019-09-11 2019-12-20 广州力挚网络科技有限公司 一种地图显示方法与系统
CN111459465A (zh) * 2020-03-27 2020-07-28 北京五八信息技术有限公司 一种Flutter工程文件的生成方法和装置
CN111740948A (zh) * 2020-05-12 2020-10-02 北京沃东天骏信息技术有限公司 数据包发布方法、动态更新方法、装置、设备及介质

Also Published As

Publication number Publication date
CN112714148A (zh) 2021-04-27

Similar Documents

Publication Publication Date Title
US11461111B2 (en) Method for running applets, and electronic device
EP3399721B1 (en) Interface data displaying method and device
US8856805B2 (en) Virtual channel for embedded process communication
WO2020173128A1 (zh) 软件开发工具包的生成方法、装置及终端设备
WO2018077085A1 (zh) 应用程序处理方法、装置及存储介质
KR102218995B1 (ko) 코드 가상화 및 원격 프로세스 호출 생성을 위한 방법 및 장치
WO2017088509A1 (zh) 一种页面定制化的方法和装置
CN108388515B (zh) 测试数据生成方法、装置、设备以及计算机可读存储介质
CN111045655A (zh) 一种页面渲染的方法、装置、渲染服务器和存储介质
WO2018210096A1 (zh) 一种基于规则引擎的规则配置方法、终端、设备以及存储介质
CN112612452B (zh) 一种api平台实现方法、装置、设备及存储介质
WO2016177341A1 (zh) 接口调用方法、装置及终端
US10908971B1 (en) Method and system for generating a customizable connector
CN106897153B (zh) 调用应用编程接口的方法和系统
CN110727429B (zh) 一种前端页面的生成方法、装置及设备
CN113010827A (zh) 页面渲染方法、装置、电子设备以及存储介质
CN108170430B (zh) 一种界面展示的方法及系统
CN112231379A (zh) 基于微服务架构的api审计方法、装置、设备及存储介质
WO2022099913A1 (zh) 界面配置方法、装置、设备及介质
US20150012819A1 (en) Template-driven decoration engine
CN112416348A (zh) 页面生成方法、系统及计算设备
CN107239265B (zh) Java函数与C函数的绑定方法及装置
US20220284371A1 (en) Method, device and medium for a business function page
CN111857782B (zh) 界面更新方法、装置、计算机设备和存储介质
CN114489603A (zh) 代码生成方法、装置、电子设备、介质和产品

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21890451

Country of ref document: EP

Kind code of ref document: A1