WO2016131360A1 - 小部件文件生成方法和装置 - Google Patents

小部件文件生成方法和装置 Download PDF

Info

Publication number
WO2016131360A1
WO2016131360A1 PCT/CN2016/071234 CN2016071234W WO2016131360A1 WO 2016131360 A1 WO2016131360 A1 WO 2016131360A1 CN 2016071234 W CN2016071234 W CN 2016071234W WO 2016131360 A1 WO2016131360 A1 WO 2016131360A1
Authority
WO
WIPO (PCT)
Prior art keywords
file
widget
terminal
database information
segment
Prior art date
Application number
PCT/CN2016/071234
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 WO2016131360A1 publication Critical patent/WO2016131360A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • G06F16/252Integrating or interfacing systems involving database management systems between a Database Management System and a front-end application
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/248Presentation of query results

Definitions

  • This application relates to, but is not limited to, the field of computers.
  • the service information display platform commonly used in life is a preset widget (Dashboard Widget) on the terminal device, and the widget can display a plurality of service information according to actual needs.
  • This paper proposes a small part file generation method and device, which aims to solve the problem of manually writing code to generate widget files and generate low-efficiency technical problems.
  • a widget file generation method including:
  • the server Upon receiving the configuration file sent by the terminal, the server extracts configuration parameters in the configuration file based on the configuration file;
  • the step of the server writing the acquired database information to the preset template file to generate the widget file includes:
  • the obtained database information is written into a template file corresponding to the configuration parameter to generate a widget file.
  • the widget file generating method further includes:
  • the server sends the file segment to the terminal, where the terminal receives the file segment and
  • the step of displaying, by the preset interface, the widget corresponding to the file segment includes:
  • the server determines the number of displays of the file segment on the same display interface of the terminal
  • the widget file generating method further includes:
  • the server Upon detecting the download instruction of the widget file, the server sends the generated widget file to the terminal for the terminal to store the received widget file.
  • a widget file generating device comprising:
  • the extracting module is configured to: when receiving the configuration file sent by the terminal, extract configuration parameters in the configuration file based on the configuration file;
  • the obtaining module is configured to: obtain the database information corresponding to the determined configuration parameter according to the mapping relationship between the preset configuration parameter and the database information;
  • Generate a module set to: write the obtained database information to a preset template file to generate Become a widget file.
  • the generating module includes:
  • the obtaining unit is configured to: obtain a template file corresponding to the configuration parameter in a preset template file library;
  • the generating unit is configured to: write the acquired database information into a template file corresponding to the configuration parameter to generate a widget file.
  • the obtaining module is further configured to: acquire a file segment that meets the display requirement in the widget file;
  • the widget file generating apparatus further includes: a first sending module, configured to: send the file segment to the terminal, where the terminal receives the file segment and displays the file segment corresponding to the preset interface Widgets.
  • the first sending module includes:
  • a determining unit configured to: determine a number of displays of the file segment on the same display interface of the terminal;
  • the sending unit is configured to: send the file segment to the terminal, so that the terminal displays the widget corresponding to the number of file segments on the same display interface.
  • the widget file generating apparatus further includes:
  • the second sending module is configured to: when the downloading instruction of the widget file is detected, send the generated widget file to the terminal, so that the terminal stores the received widget file.
  • a computer readable storage medium storing computer executable instructions for performing the method of any of the above.
  • a widget file generation method and apparatus the server according to the received The configuration file extracts the corresponding configuration parameter, and then obtains corresponding database information according to the configuration parameter, and writes the acquired database information to a preset template file to generate a widget file, instead of receiving the terminal to send
  • the configuration file can only generate the widget file by manually writing the code, directly obtain the corresponding database information through the configuration parameters, and write the obtained database information to the preset template file to generate the widget file, thereby improving The efficiency of the generation of widget files.
  • FIG. 1 is a schematic flow chart of a first embodiment of a method for generating a widget file according to the present invention
  • FIG. 2 is a schematic flowchart of an optional embodiment in which the server writes the acquired database information to a preset template file according to the present invention
  • FIG. 3 is a schematic flowchart of a third embodiment of a method for generating a widget file according to the present invention.
  • FIG. 4 is a schematic flowchart of an optional embodiment in which the server in FIG. 3 sends the file fragment to the terminal;
  • FIG. 5 is a schematic flowchart diagram of a fifth embodiment of a method for generating a widget file according to the present invention.
  • FIG. 6 is a schematic diagram of functional modules of a first embodiment of a widget file generating apparatus according to the present invention.
  • FIG. 7 is a schematic diagram of a refinement function module of the generation module in FIG. 6;
  • FIG. 8 is a schematic diagram of functional modules of a third embodiment of a widget file generating apparatus according to the present invention.
  • FIG. 9 is a schematic diagram of a refinement function module of the first sending module in FIG. 8;
  • FIG. 10 is a schematic diagram of functional modules of a fifth embodiment of a widget file generating apparatus according to the present invention.
  • Embodiments of the present invention provide a method for generating a widget file.
  • FIG. 1 is a schematic flowchart diagram of a first embodiment of a method for generating a widget file according to the present invention.
  • This embodiment provides a widget file generation method, where the widget file generation method includes:
  • Step S10 when receiving the configuration file sent by the terminal, the server extracts the configuration parameter in the configuration file based on the configuration file;
  • the configuration file may include multiple configuration parameters, and the configuration parameter may include a type identifier corresponding to the widget file to be generated, a size value corresponding to the widget file to be generated, and identifier information of the database.
  • the data source ID number the query statement corresponding to the query database information, such as SQL (Structured Query Language) statement, data field identifier, and the like.
  • the type identifier is set according to the actual situation. If the widget to be generated is a chart file, the corresponding type identifier is A. When the widget to be generated is a form file, the corresponding type identifier is B or is to be generated.
  • the corresponding type identifier is C or the like;
  • the data source ID number is a unique identifier of each data source in the total database, and is used to distinguish each different data source,
  • the server may include one or more data sources, and different data sources are divided by the data source ID number, so that the classification of each data source in the database is more reasonable, and the data source ID may further include a data source type identifier.
  • the server is configured according to a data field identifier preset in a configuration parameter sent by the terminal, and then the data is obtained by using the SQL statement.
  • the corresponding data field in the source may also be preset to other values according to actual needs.
  • Step S20 The server acquires database information corresponding to the determined configuration parameter according to a mapping relationship between the preset configuration parameter and the database information.
  • a database may include one or more data sources, where the database information is the data source, and the configuration parameter includes a data source ID number.
  • the server may first determine the data source. The ID and the data field are identified, and then the SQL statement corresponding to the configuration parameter in the data source is determined, and finally the determined data field can be extracted according to the SQL statement and the data field identifier.
  • the server pre-stores the database information, and then sends the received terminal.
  • the configuration file extracts the corresponding configuration parameter, and queries the pre-stored database in the server according to the configuration parameter, and acquires database information corresponding to the configuration parameter in the database.
  • the database information may be sent to the server together by the terminal when the configuration file is sent. In this case, when the terminal generates the widget file, the data information of the widget is not stored in the server. In the case, the database information is first configured in the terminal, and when the configuration file is sent to the server, the database information is sent to the server together.
  • Step S30 the server writes the acquired database information into a preset template file to generate a widget file.
  • the template file may include a chart html (Hypertext Markup Language) template file
  • the chart html template file is pre-existing in the server, and each template file defines one type of chart file. Basically, it includes every major data chart file (such as form file, line chart file, etc.), and can also provide a customized chart file according to actual needs.
  • the obtained database information may be written into a preset template file, such as a template file written in a default template file, or written in a template file corresponding to the configuration parameter to generate a widget file.
  • the database information in the server is continuously updated.
  • the database information corresponding to the configuration file is also continuously increased.
  • the The server obtains the database information corresponding to the determined configuration parameter in real time, and writes the database information acquired in real time to the template file corresponding to the configuration parameter, to generate the widget file in real time.
  • the database information recorded in real time is written into a preset template file, and the widget file is generated in real time, thereby realizing the generation of the dynamic file, so that the generated widget file is more accurate.
  • the server extracts corresponding configuration parameters according to the received configuration file, and then obtains corresponding database information according to the configuration parameter, and writes the acquired database information to a preset.
  • the template file to generate the widget file, instead of receiving the configuration file sent by the terminal, the widget file can only be generated by manually writing the code, and the corresponding database information is directly obtained through the configuration parameter, and the acquired database information is obtained. Write the way to generate widget files in the default template file, which improves the efficiency of widget file generation.
  • the step S30 includes:
  • Step S31 The server acquires a template file corresponding to the configuration parameter in a preset template file library.
  • the server stores multiple types of template files, such as a form template file, a line template file, and other types of template files, and the plurality of types of template files form a template file library. User-defined template files can also be added to the template file library.
  • the server may first query the template file in the template file library that matches the configuration parameter according to the configuration parameter.
  • the The configuration parameter includes the type information of the template file and the size value of the template file, and when the server obtains the configuration parameter, the server obtains a matching template file in the template file according to the information in the configuration parameter.
  • the default template file may be obtained as a template file of the widget file to be generated; or the server obtains the template file type in the configuration parameter. If the information of the template file type is inconsistent with the template file type in the template file library preset by the server, you can obtain the default template file as the template file of the widget file to be generated.
  • the obtained template file format may be an xml (Extensible Markup Language) file format.
  • Step S32 The server writes the acquired database information to a template file corresponding to the configuration parameter to generate a widget file.
  • the server extracts a template file corresponding to the configuration parameter in the template file library, that is, a type identifier corresponding to the template file included in the configuration parameter, when the configuration file is received,
  • a template file corresponding to the configuration parameter in the template file library
  • the file format of the widget file to be generated may be determined.
  • the server writes the acquired database information to the template file corresponding to the configuration parameter to generate a widget file.
  • the method of writing the obtained database information to the template file corresponding to the configuration parameter may be: the server writes the acquired database information to the template file according to the parameter mapping relationship between the database information and the template file. In the corresponding position. For example, the server first determines identification information of each location of the template file row and column, such as a row.
  • Corresponding identification information is name, time or price, etc.; then corresponding database information is determined according to the row identification information, such as determining that the database information includes a data field containing the name type, the data field containing the time type, and the identifier including the price type. Data field; finally, the data field in the determined database information is written into the location corresponding to each row identification information to generate a widget file.
  • the widget file is The generation method also includes:
  • Step S40 the server acquires a file segment that meets the display requirement in the widget file
  • Step S50 The server sends the file segment to the terminal, so that the terminal receives the file segment and displays a widget corresponding to the file segment on a preset interface.
  • the server may select the generated widget file to be stored in a preset storage space, where the preset storage space includes a directory specified by the server, such as a default folder of the server; or The default storage space in the template file library, such as the default folder in the template file library directory. It can be understood that the storage space may also be a hard disk or a memory card of the server or the like.
  • the server acquires a file segment that meets the display requirement in the widget file, and the file segment that meets the display requirement may be selected as a preset html code segment or a data segment in the widget file, and the acquired The html code segment or the data segment is sent to the terminal, so that the terminal displays the widget corresponding to the code segment or the data segment on the preset interface.
  • a fourth embodiment of the widget file generation method of the present invention is proposed based on the first embodiment.
  • the step S50 includes:
  • Step S51 the server determines the number of displays of the file segment on the same display interface of the terminal
  • Step S52 the server sends the file fragment to the terminal, so that the terminal is in the same display
  • the display interface displays the widget corresponding to the number of file segments.
  • the optional solution is the number of the display of the server customized file segment on the same display interface, such as the file segment that meets the display requirement in the preset widget file, and the performance of the same display interface is displayed in multiple windows.
  • the component or when receiving the configuration file, according to a preset instruction in the configuration parameter, such as displaying a preset number of widgets at a time on the same display interface, acquiring the file segment corresponding to the quantity, and giving the file fragment to
  • the terminal is configured to display, by the terminal, the widget corresponding to the number of file segments on the same display interface, thereby effectively improving the display efficiency of the widget.
  • the widget file is The generation method also includes:
  • Step S60 When detecting the download instruction of the widget file, the server sends the generated widget file to the terminal, so that the terminal stores the received widget file.
  • the server may be configured to send the generated widget file to the terminal, so that the terminal stores the received widget file, and the terminal sends a configuration file to the server.
  • the final server feeds back the custom generated widget file to the terminal for the terminal to store the widget file fed back by the server.
  • the terminal may display the widget corresponding to the widget file in a preset application, or display the widget corresponding to the widget file in the terminal display interface.
  • Embodiments of the present invention provide a widget file generating apparatus.
  • FIG. 6 is a schematic diagram of functional modules of an embodiment of a widget file generating apparatus according to the present invention.
  • the embodiment provides a widget file generating device, and the widget file generating device includes:
  • the extracting module 10 is configured to: when receiving the configuration file sent by the terminal, based on the configuration The file extracts configuration parameters in the configuration file;
  • the configuration file may include multiple configuration parameters, where the configuration parameters are respectively the type identifier corresponding to the widget file to be generated, the size value corresponding to the widget file to be generated, and the identifier information of the database.
  • the data source ID number the query statement corresponding to the query database information, such as SQL (Structured Query Language) statement, data field identifier, and the like.
  • the type identifier is set according to the actual situation. If the widget to be generated is a chart file, the corresponding type identifier is A. When the widget to be generated is a form file, the corresponding type identifier is B or is to be generated.
  • the corresponding type identifier is C or the like
  • the data source ID number is a unique identifier of each data source in the total database, and is used to distinguish each different data source
  • the widget file generating apparatus may include one or more data sources, and different data sources are divided by the data source ID number, so that the classification of each data source in the database is more reasonable, and the data source ID is further
  • the extraction module 10 identifies the data field according to the preset configuration parameter sent by the terminal, and then passes the The SQL statement can be used to obtain the corresponding data field in the data source.
  • the configuration parameters in the configuration file may also be preset to other values according to actual needs.
  • the obtaining module 20 is configured to: obtain database information corresponding to the determined configuration parameter according to a mapping relationship between the preset configuration parameter and the database information;
  • a database may include one or more data sources, where the database information is the data source, and the configuration parameter includes a data source ID number.
  • the data source ID may be determined first. The number and the data field are identified, and then the SQL statement corresponding to the configuration parameter in the data source is determined.
  • the extraction module 10 can extract the determined data field according to the SQL statement and the data field identifier.
  • the database information is stored in advance, and the extraction module 10 receives the configuration file sent by the terminal, extracts the corresponding configuration parameter, and queries the database pre-stored in the server according to the configuration parameter.
  • the obtaining module 20 acquires database information corresponding to the configuration parameter in the database.
  • the database information is sent to the extraction module 10 together.
  • the terminal wants to generate the widget file, the data information of the widget is not stored in the widget file generating device,
  • the terminal first configures the database information and sends the configuration file to the extraction module 10, the database information is sent to the extraction module 10 together.
  • the generating module 30 is configured to: write the acquired database information into a preset template file to generate a widget file.
  • the template file may optionally include a chart html (Hypertext Markup Language) template file
  • the chart html template file is pre-existing in the server, and each template file defines a type of chart.
  • the file basically includes every major data chart file (such as form file, line chart file, etc.), and can also provide a customized chart file according to actual needs.
  • the obtained database information may be written into a preset template file, for example, written in a default template file of the widget file generating device, or written in a template file corresponding to the configuration parameter, to Generate a widget file.
  • the database information in the widget file generating device is continuously updated.
  • the database information corresponding to the configuration file is also continuously increased, and the database information corresponding to the configuration parameter is
  • the obtaining module 20 acquires the database information corresponding to the determined configuration parameter in real time
  • the generating module 30 writes the database information acquired in real time to the template file corresponding to the configuration parameter to generate a small amount in real time.
  • Part file The database information recorded in real time is written into a preset template file, and the widget file is generated in real time, thereby realizing the generation of the dynamic file, so that the generated widget file is more accurate.
  • the server extracts corresponding configuration parameters according to the received configuration file, and then obtains corresponding database information according to the configuration parameter, and writes the acquired database information to a preset
  • the widget file instead of receiving the configuration file sent by the terminal, the widget file can only be generated by manually writing the code, and the corresponding database information is directly obtained through the configuration parameter, and the acquired database information is obtained. Write the way to generate widget files in the default template file, which improves the efficiency of widget file generation.
  • the generating module 30 includes include:
  • the obtaining unit 31 is configured to: obtain a template file corresponding to the configuration parameter in a preset template file library;
  • the widget file generating device stores a plurality of types of template files, such as a form template file, a line template file, and other types of template files, and the plurality of types of template files form a template.
  • a file library in which a user-defined template file can also be added.
  • the obtaining module 20 may first query the template file in the template file library that matches the configuration parameter according to the configuration parameter, and in this embodiment, When the configuration parameter includes the type information of the template file and the size value of the template file, the obtaining module 20 obtains a matching in the template file according to the information in the configuration parameter when the configuration parameter is acquired. Template file.
  • the obtaining module 20 may obtain the default template file as a template file of the widget file to be generated; or the obtaining module 20 obtains the If the template file type information in the configuration parameter fails (for example, the template file type information included in the configuration parameter is inconsistent with the template file type in the preset template file library), the obtaining module 20 may obtain the default template file as the standby. Generate a template file for the widget file.
  • the obtained template file format may be an xml (Extensible Markup Language) file format.
  • the generating unit 32 is configured to: write the acquired database information into a template file corresponding to the configuration parameter to generate a widget file.
  • the obtaining unit 31 is configured to: when the configuration file is received, the acquiring unit 31 extracts a template file corresponding to the configuration parameter in the template file library, that is, a template file included in the configuration parameter.
  • the type identifier when the obtaining unit 31 obtains the determined template file, can determine the file format to be generated by the widget file.
  • the generating unit 32 writes the acquired database information to the corresponding configuration parameter.
  • the generating unit 32 In the template file, to generate the widget file, the generating unit 32 writes the acquired database information to the template file corresponding to the configuration parameter, and the method may be: the generating unit 32 is configured according to the database information and the template file.
  • the parameter mapping relationship is to write the obtained database information to a corresponding location on the template file.
  • the generating unit 32 first determines identification information of each position of the template file row and the column, such as each corresponding to the row.
  • the identification information is a name, a time or a price, etc.; and then determining corresponding database information according to the row identification information, such as determining a data field in the database information that includes the name type, identifying a data field containing the time type, and identifying a data field including the price type; Finally, the data field in the determined database information is written into the location corresponding to each row identification information to generate a widget file.
  • a third embodiment of the widget file generating apparatus of the present invention is proposed based on the first embodiment.
  • this embodiment referring to FIG.
  • the obtaining module 20 is further configured to: acquire a file segment that meets the display requirement in the widget file;
  • the widget file generating apparatus further includes: a first sending module 40, configured to: send the file segment to the terminal, where the terminal receives the file segment and displays the file segment in a preset interface Corresponding widget.
  • the generated widget file may be first stored in a preset storage space, where the preset storage space includes a directory specified by the server, such as a default folder, or a template file library.
  • the default storage space such as the default folder in the template file library directory. It can be understood that the storage space can also be a hard disk or a memory card or the like.
  • the obtaining module 20 acquires a file segment that meets the display requirement in the widget file, and the file segment that meets the display requirement may be selected as a preset html code segment or data segment in the widget file, and the first sending The module 40 sends the acquired html code segment or data segment to the terminal, so that the terminal displays the widget corresponding to the code segment or the data segment on the preset interface.
  • the first sending module 40 when the widget file satisfies the display requirement
  • the first sending module 40 when the widget file satisfies the display requirement
  • the first sending module 40 when the widget file satisfies the display requirement
  • the first sending module 40 includes:
  • the determining unit 41 is configured to: determine the number of displays of the file segment on the same display interface of the terminal;
  • the sending unit 42 is configured to: send the file fragment to the terminal, so that the terminal is in the same display
  • the display interface displays the widget corresponding to the number of file segments.
  • an optional solution is that the determining unit 41 customizes the number of display of the file segment on the same display interface, and the file segment that meets the display requirement in the preset widget file displays multiple performances in the same display interface.
  • a widget or when receiving a configuration file, according to a preset instruction in the configuration parameter, such as displaying a preset number of widgets at a time on the same display interface, acquiring a file segment corresponding to the quantity, and the sending unit 42: The file segment is sent to the terminal, so that the terminal displays the widget corresponding to the number of file segments on the same display interface, thereby effectively improving the display efficiency of the widget.
  • the widget file generating apparatus further includes:
  • the second sending module 50 is configured to: when the download instruction of the widget file is detected, send the generated widget file to the terminal, so that the terminal stores the received widget file.
  • the second sending module 50 may be configured to send the generated widget file to the terminal, so that the terminal stores the received location.
  • the terminal sends the configuration file to the server for customization
  • the second sending module 50 finally feeds back the customized generated widget file to the terminal, so that the terminal stores the server feedback.
  • Widget file Further, the terminal may display the widget corresponding to the widget file in a preset application, or display the widget corresponding to the widget file in the terminal display interface.
  • all or part of the steps of the above embodiments may also be implemented by using an integrated circuit. These steps may be separately fabricated into individual integrated circuit modules, or multiple modules or steps may be fabricated into a single integrated circuit module. achieve.
  • the devices/function modules/functional units in the above embodiments may be implemented by a general-purpose computing device, which may be centralized on a single computing device or distributed over a network of multiple computing devices.
  • the device/function module/functional unit in the above embodiment When the device/function module/functional unit in the above embodiment is implemented in the form of a software function module and sold or used as a stand-alone product, it can be stored in a computer readable storage medium.
  • the above mentioned computer readable storage medium may be a read only memory, a magnetic disk or an optical disk or the like.
  • the embodiment of the invention improves the generation efficiency of the widget file by adopting the configuration parameter to obtain the corresponding database information, and writing the acquired database information to the preset template file to generate the widget file.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Stored Programmes (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

一种小部件文件生成方法和装置,所述方法包括:在接收到终端发送的配置文件时,服务器基于所述配置文件提取所述配置文件中的配置参数(S10);根据预设的配置参数与数据库信息的映射关系,获取确定的配置参数对应的数据库信息(S20);将获取的数据库信息写到预设的模板文件中,以生成小部件文件(S30)。

Description

小部件文件生成方法和装置 技术领域
本申请涉及但不限于计算机领域。
背景技术
随着信息技术的快速发展,终端设备要显示的业务信息越来越多,而且业务信息的复杂度也随之增加。生活中常用的业务信息显示平台是终端设备上预设的窗口小部件(Dashboard Widget),所述窗口小部件能根据实际需要显示多种的业务信息。
现在大部分的软件应用需要使用越来越多的业务信息,如浏览器应用等通过窗口小部件显示图表信息或报表信息,但是当系统中出现新的图表信息时,或者是图表信息发生变化的时候,窗口小部件对应的小部件文件就需要进行重新设计开发如通过人工编写代码,再根据编写的代码生成新的小部件文件,而这种人工重新编写代码生成小部件文件的方式,小部件文件的生成效率低。
发明内容
以下是对本文详细描述的主题的概述。本概述并非是为了限制权利要求的保护范围。
本文提出一种小部件文件生成方法和装置,旨在解决人工编写代码生成小部件文件的方式,生成效率低的技术问题。
一种小部件文件生成方法,包括:
在接收到终端发送的配置文件时,服务器基于所述配置文件提取所述配置文件中的配置参数;
根据预设的配置参数与数据库信息的映射关系,获取确定的配置参数对应的数据库信息;
将获取的数据库信息写到预设的模板文件中,以生成小部件文件。
可选地,所述服务器将获取的数据库信息写到预设的模板文件中,以生成小部件文件的步骤包括:
所述服务器在预设的模板文件库中获取所述配置参数对应的模板文件;
将获取的数据库信息写到所述配置参数对应的模板文件中,以生成小部件文件。
可选地,所述服务器将获取的数据库信息写到预设的模板文件中,以生成小部件文件的步骤之后,所述小部件文件生成方法还包括:
所述服务器获取所述小部件文件中满足显示要求的文件片段;
将所述文件片段发送给所述终端,以供所述终端接收所述文件片段并在预设界面显示所述文件片段对应的窗口小部件。
可选地,当所述小部件文件中满足显示要求的文件片段包括多个文件片段时,所述服务器将所述文件片段发送给所述终端,以供所述终端接收所述文件片段并在预设界面显示所述文件片段对应的窗口小部件的步骤包括:
所述服务器确定文件片段在所述终端同一个显示界面的显示数量;
将所述文件片段给所述终端,以供终端在同一显示界面显示所述数量的文件片段对应的窗口小部件。
可选地,所述服务器将获取的数据库信息写到预设的模板文件中,以生成小部件文件的步骤之后,所述小部件文件生成方法还包括:
在检测到小部件文件的下载指令时,所述服务器将生成的所述小部件文件发送给所述终端,以供所述终端存储接收到的所述小部件文件。
一种小部件文件生成装置,所述小部件文件生成装置包括:
提取模块,设置为:在接收到终端发送的配置文件时,基于所述配置文件提取所述配置文件中的配置参数;
获取模块,设置为:根据预设的配置参数与数据库信息的映射关系,获取确定的配置参数对应的数据库信息;
生成模块,设置为:将获取的数据库信息写到预设的模板文件中,以生 成小部件文件。
可选地,所述生成模块包括:
获取单元,设置为:在预设的模板文件库中获取所述配置参数对应的模板文件;
生成单元,设置为:将获取的数据库信息写到所述配置参数对应的模板文件中,以生成小部件文件。
可选地,
所述获取模块,还设置为:获取所述小部件文件中满足显示要求的文件片段;
所述小部件文件生成装置还包括:第一发送模块,设置为:将所述文件片段发送给所述终端,以供所述终端接收所述文件片段并在预设界面显示所述文件片段对应的窗口小部件。
可选地,当所述小部件文件中满足显示要求的文件片段包括多个文件片段时,所述第一发送模块包括:
确定单元,设置为:确定文件片段在所述终端同一个显示界面的显示数量;
发送单元,设置为:将所述文件片段给所述终端,以供终端在同一显示界面显示所述数量的文件片段对应的窗口小部件。
可选地,所述小部件文件生成装置还包括:
第二发送模块,设置为:在检测到小部件文件的下载指令时,将生成的所述小部件文件发送给所述终端,以供所述终端存储接收到的所述小部件文件。
一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令用于执行上述任一项的方法。
本发明实施例提出的小部件文件生成方法和装置,服务器根据接收到的 配置文件提取出对应的配置参数,然后根据所述配置参数获取对应的数据库信息,并将获取的所述数据库信息写到预设的模板文件中,以生成小部件文件,而不是接收到终端发送的配置文件时,只能通过人工编写代码的方式生成小部件文件,直接通过配置参数获取对应的数据库信息,并将获取的数据库信息写到预设的模板文件中生成小部件文件的方式,提高了小部件文件的生成效率。
在阅读并理解了附图和详细描述后,可以明白其他方面。
附图概述
图1为本发明小部件文件生成方法第一实施例的流程示意图;
图2为本发明所述服务器将获取的数据库信息写到预设的模板文件中可选实施例的流程示意图;
图3为本发明小部件文件生成方法第三实施例的流程示意图;
图4为图3中所述服务器将所述文件片段发送给所述终端可选实施例的流程示意图;
图5为本发明小部件文件生成方法第五实施例的流程示意图;
图6为本发明小部件文件生成装置第一实施例的功能模块示意图;
图7为图6中生成模块的细化功能模块示意图;
图8为本发明小部件文件生成装置第三实施例的功能模块示意图;
图9为图8中第一发送模块的细化功能模块示意图;
图10为本发明小部件文件生成装置第五实施例的功能模块示意图。
本发明的实施方式
本发明实施例提供一种小部件文件生成方法。
参照图1,图1为本发明小部件文件生成方法第一实施例的流程示意图。
本实施例提出一种小部件文件生成方法,所述小部件文件生成方法包括:
步骤S10,在接收到终端发送的配置文件时,服务器基于所述配置文件提取所述配置文件中的配置参数;
在本实施例中,所述配置文件可包括多个配置参数,所述配置参数可包括为待生成的小部件文件对应的类型标识、待生成的小部件文件对应的大小值、数据库的标识信息如数据源ID号、查询数据库信息对应的查询语句如SQL(Structured Query Language,结构化查询语言)语句、数据字段标识等等。其中,所述类型标识根据实际情况进行设置,如待生成的小部件是图表文件时,对应的类型标识是A、待生成的小部件是表单文件时,对应的类型标识是B或者待生成的小部件是表单文件是折线图文件时,对应的类型标识的是C等等;所述数据源ID号是总数据库中每个数据源的唯一标识,用于区分每个不同的数据源,可以理解的是,服务器中可包含一个或多个数据源,用数据源ID号划分不同的数据源,使得数据库中每个数据源的分类更合理,所述数据源ID还可包括数据源类型标识、数据源IP地址、数据源端口以及连接所述数据源的用户名或密码等;所述服务器根据终端发送的配置参数中预设的数据字段标识,再通过所述SQL语句,即可获取数据源中对应的数据字段。在本实施例中,所述配置文件中的配置参数还可根据实际需要预设为其它值。
步骤S20,根据预设的配置参数与数据库信息的映射关系,所述服务器获取确定的配置参数对应的数据库信息;
在本实施例中,所述配置参数是用户根据需要进行设置的,所述配置参数相当于用户建立小部件文件的索引信息,根据所述配置参数即可获知待生成的小部件的信息。根据上述实施例可知,一个数据库中可包含一个或多个数据源,所述数据库信息即上文所述数据源,配置参数包含数据源ID号,根据所述配置参数,服务器可先确定数据源ID和数据字段标识,然后再确定数据源中所述配置参数对应的SQL语句,最后根据所述SQL语句和所述数据字段标识即可提取确定的数据字段。
在本实施例,所述服务器预先存储好数据库信息,则在接收到终端发送 的配置文件,提取出对应的配置参数,并根据所述配置参数查询所述服务器中预存的数据库,获取数据库中与所述配置参数对应的数据库信息。进一步地,所述数据库信息可以由终端发送配置文件时,一起将所述数据库信息发送给服务器,这种情况下,可以是终端要生成小部件文件时,小部件的数据信息中没有存储在服务器中,则可在终端先配置好数据库信息,并向服务器发送配置文件时,一起将所述数据库信息发送给服务器。
步骤S30,所述服务器将获取的数据库信息写到预设的模板文件中,以生成小部件文件。
在本实施例中,所述模板文件可包括图表html(Hypertext Markup Language,超文本标记语言)模版文件,所述图表html模版文件预存在所述服务器,每个模版文件定义一种类型的图表文件,基本上包括了每种主要的数据图表文件(如表单文件,折线图文件等),还可根据实际需要提供自定义的图表文件。本实施例中,可将获取的数据库信息写到预设的模板文件中,如写到服务器默认的模板文件中,或者写到所述配置参数对应的模板文件中,以生成小部件文件。
可以理解的是,服务器中的数据库信息是不断更新的,当数据库中的信息更新时,所述配置文件对应的数据库信息也不断增加,当所述配置参数对应的数据库信息实时发送变化时,所述服务器实时获取确定的配置参数对应的数据库信息,并将实时获取的的数据库信息写到所述配置参数对应的模板文件中,以实时生成小部件文件。根据实时获取的数据库信息写入预设的模板文件中,实时生成小部件文件,实现了动态文件的生成,使得生成的小部件文件更加准确。
本实施例提出的小部件文件生成方法,服务器根据接收到的配置文件提取出对应的配置参数,然后根据所述配置参数获取对应的数据库信息,并将获取的所述数据库信息写到预设的模板文件中,以生成小部件文件,而不是接收到终端发送的配置文件时,只能通过人工编写代码的方式生成小部件文件,直接通过配置参数获取对应的数据库信息,并将获取的数据库信息写到预设的模板文件中生成小部件文件的方式,提高了小部件文件的生成效率。
为了增加小部件文件生成的灵活性,基于第一实施例提出本发明小部件文件生成方法的第二实施例,在本实施例中,参照图2,所述步骤S30包括:
步骤S31,所述服务器在预设的模板文件库中获取所述配置参数对应的模板文件;
在本实施例中,所述服务器中事先存储多种类型的模板文件,如表单模板文件,折线图模板文件以及其它类型的模板文件,所述多种类型的模板文件组成一个模板文件库,所述模板文件库中还可以加入用户自定义的模板文件。所述服务器在获取到所述配置参数对应的数据库信息时,可先根据所述配置参数,查询所述模板文件库中与所述配置参数匹配的模板文件,本实施例中,可选所述配置参数中包含模板文件的类型信息以及模板文件的大小值,则所述服务器在获取到所述配置参数时,根据所述配置参数中的信息在模板文件了库中获取匹配的模板文件。进一步地,当所述配置参数没有包含所述模板文件的类型信息,可选获取默认的模板文件作为待生成小部件文件的模板文件;或者是所述服务器获取所述配置参数中的模板文件类型信息失败时(如所配置参数包含的模板文件类型信息与所述服务器预设的模板文件库中的模板文件类型不一致),可选获取默认的模板文件作为待生成小部件文件的模板文件。在本实施例中,所述获取的模板文件格式可选为xml(Extensible Markup Language,可扩展的标识语言)文件格式。
步骤S32,所述服务器将获取的数据库信息写到所述配置参数对应的模板文件中,以生成小部件文件。
在本实施例中,可选方案为,在接收到到配置文件时,服务器提取所述模板文件库中与所述配置参数对应的模板文件,即配置参数中包含的模板文件对应的类型标识,在获取确定的模板文件时,即可确定小部件文件待生成的文件格式,此时,所述服务器将获取的数据库信息写到所述配置参数对应的模板文件中,以生成小部件文件,所述将获取的数据库信息写到所述配置参数对应的模板文件中的方式可选为:所述服务器根据数据库信息和模板文件上的参数映射关系,将获取的所述数据库信息写入到模板文件上对应的位置中。例如,所述服务器先确定模板文件行与列每个位置的标识信息,如行 对应的每个标识信息为名称、时间或价格等;然后根据行标识信息确定对应的数据库信息,如确定数据库信息中标识包含名称类型的数据字段、标识包含时间类型的数据字段以及标识包含价格类型的数据字段;最后将确定的数据库信息中的数据字段写入所述每个行标识信息对应的位置中,以生成小部件文件。
为了增加小部件文件生成的灵活性,基于第一实施例提出本发明小部件文件生成方法的第三实施例,在本实施例中,参照图3,所述步骤S30之后,所述小部件文件生成方法还包括:
步骤S40,所述服务器获取所述小部件文件中满足显示要求的文件片段;
步骤S50,所述服务器将所述文件片段发送给所述终端,以供所述终端接收所述文件片段并在预设界面显示所述文件片段对应的窗口小部件。
在本实施例中,可选所述服务器将生成的所述小部件文件存储到预设的存储空间,所述预设的存储空间包括服务器指定的目录,如服务器默认的文件夹中;或者是模板文件库中预设的存储空间,如模板文件库目录下预设的文件夹。可以理解的是,所述存储空间还可以为所述服务器的硬盘或内存卡等等。所述服务器获取所述小部件文件中满足显示要求的文件片段,所述满足显示要求的文件片段可选为所述小部件文件中预设的html代码片段或数据片段,并将获取的所述html代码片段或数据片段发送给所述终端,以供所述终端在预设界面显示所述代码片段或数据片段对应的窗口小部件。
为了增加小部件文件生成的灵活性,基于第一实施例提出本发明小部件文件生成方法的第四实施例,在本实施例中,参照图4,当所述小部件文件中满足显示要求的文件片段包括多个文件片段时,所述步骤S50包括:
步骤S51,所述服务器确定文件片段在所述终端同一个显示界面的显示数量;
步骤S52,所述服务器将所述文件片段给所述终端,以供终端在同一显 示界面显示所述数量的文件片段对应的窗口小部件。
在本实施例中,可选方案为所述服务器自定义文件片段在同一显示界面的显示个数,如预设小部件文件中满足显示要求的文件片段在同一显示界面一次性能显示多个窗口小部件,或者在接收到配置文件时,根据配置参数中预设的指令如在同一显示界面一次性显示预设数量的窗口小部件,获取所述数量对应的文件片段,并将所述文件片段给所述终端,以供终端在同一显示界面显示所述数量的文件片段对应的窗口小部件,有效提高了窗口小部件的显示效率。
为了增加小部件文件生成的灵活性,基于第一实施例提出本发明小部件文件生成方法的第五实施例,在本实施例中,参照图5,所述步骤S30之后,所述小部件文件生成方法还包括:
步骤S60,在检测到小部件文件的下载指令时,所述服务器将生成的所述小部件文件发送给所述终端,以供所述终端存储接收到的所述小部件文件。
在本实施例中,可选所述服务器将生成的所述小部件文件发送给所述终端,以供所述终端存储接收到的所述小部件文件,实现了终端发送配置文件给所述服务器进行定制时,最终服务器将定制生成的所述小部件文件反馈给所述终端,以供终端存储所述服务器反馈的小部件文件。进一步地,所述终端可以在预设的应用中显示所述小部件文件对应的窗口小部件,或者在终端显示界面显示所述小部件文件对应的窗口小部件。
本发明实施例提供一种小部件文件生成装置。
参照图6,图6为本发明小部件文件生成装置实施例的功能模块示意图。
本实施例提出一种小部件文件生成装置,所述小部件文件生成装置包括:
提取模块10,设置为:在接收到终端发送的配置文件时,基于所述配置 文件提取所述配置文件中的配置参数;
在本实施例中,所述配置文件可包括多个配置参数,所述配置参数分别为待生成的小部件文件对应的类型标识、待生成的小部件文件对应的大小值、数据库的标识信息如数据源ID号、查询数据库信息对应的查询语句如SQL(Structured Query Language,结构化查询语言)语句、数据字段标识等等。其中,所述类型标识根据实际情况进行设置,如待生成的小部件是图表文件时,对应的类型标识是A、待生成的小部件是表单文件时,对应的类型标识是B或者待生成的小部件是表单文件是折线图文件时,对应的类型标识的是C等等;所述数据源ID号是总数据库中每个数据源的唯一标识,用于区分每个不同的数据源,可以理解的是,所述小部件文件生成装置中可包含一个或多个数据源,用数据源ID号划分不同的数据源,使得数据库中每个数据源的分类更合理,所述数据源ID还可包括数据源类型标识、数据源IP地址、数据源端口以及连接所述数据源的用户名或密码等;所述提取模块10根据终端发送的配置参数中预设的数据字段标识,再通过所述SQL语句,即可获取数据源中对应的数据字段。在本实施例中,所述配置文件中的配置参数还可根据实际需要预设为其它值。
获取模块20,设置为:根据预设的配置参数与数据库信息的映射关系,获取确定的配置参数对应的数据库信息;
在本实施例中,所述配置参数是用户根据需要进行设置的,所述配置参数相当于用户建立小部件文件的索引信息,根据所述配置参数即可获知待生成的小部件的信息。根据上述实施例可知,一个数据库中可包含一个或多个数据源,所述数据库信息即上文所述数据源,配置参数包含数据源ID号,根据所述配置参数,可先确定数据源ID号和数据字段标识,然后再确定数据源中所述配置参数对应的SQL语句,最后所述提取模块10根据所述SQL语句以及所述数据字段标识即可提取确定的数据字段。
在本实施例,先预先存储好数据库信息,所述提取模块10在接收到终端发送的配置文件,提取出对应的配置参数,并根据所述配置参数查询所述服务器中预存的数据库,所述获取模块20获取数据库中与所述配置参数对应的数据库信息。进一步地,所述数据库信息可以由终端发送配置文件时, 一起将所述数据库信息发送给所述提取模块10,这种情况下,可以是终端要生成小部件文件时,小部件的数据信息中没有存储在所述小部件文件生成装置中,则可在终端先配置好数据库信息,并向所述提取模块10发送配置文件时,一起将所述数据库信息发送给所述提取模块10。
生成模块30,设置为:将获取的数据库信息写到预设的模板文件中,以生成小部件文件。
在本实施例中,所述模板文件可选包括图表html(Hypertext Markup Language,超文本标记语言)模版文件,所述图表html模版文件预存在所述服务器,每个模版文件定义一种类型的图表文件,基本上包括了每种主要的数据图表文件(如表单文件,折线图文件等),还可根据实际需要提供自定义的图表文件。本实施例中,可将获取的数据库信息写到预设的模板文件中,如写到所述小部件文件生成装置默认的模板文件中,或者写到所述配置参数对应的模板文件中,以生成小部件文件。
可以理解的是,所述小部件文件生成装置中的数据库信息是不断更新的,当数据库中的信息更新时,所述配置文件对应的数据库信息也不断增加,当所述配置参数对应的数据库信息实时发送变化时,所述获取模块20实时获取确定的配置参数对应的数据库信息,并且所述生成模块30将实时获取的的数据库信息写到所述配置参数对应的模板文件中,以实时生成小部件文件。根据实时获取的数据库信息写入预设的模板文件中,实时生成小部件文件,实现了动态文件的生成,使得生成的小部件文件更加准确。
本实施例提出的小部件文件生成装置,服务器根据接收到的配置文件提取出对应的配置参数,然后根据所述配置参数获取对应的数据库信息,并将获取的所述数据库信息写到预设的模板文件中,以生成小部件文件,而不是接收到终端发送的配置文件时,只能通过人工编写代码的方式生成小部件文件,直接通过配置参数获取对应的数据库信息,并将获取的数据库信息写到预设的模板文件中生成小部件文件的方式,提高了小部件文件的生成效率。
为了增加小部件文件生成的灵活性,基于第一实施例提出本发明小部件文件生成装置的第二实施例,在本实施例中,参照图7,所述生成模块30包 括:
获取单元31,设置为:在预设的模板文件库中获取所述配置参数对应的模板文件;
在本实施例中,所述小部件文件生成装置事先存储多种类型的模板文件,如表单模板文件,折线图模板文件以及其它类型的种模板文件,所述多种类型的模板文件组成一个模板文件库,所述模板文件库中还可以加入用户自定义的模板文件。所述获取模块20在获取到所述配置参数对应的数据库信息时,可先根据所述配置参数,查询所述模板文件库中与所述配置参数匹配的模板文件,本实施例中,可选所述配置参数中包含模板文件的类型信息以及模板文件的大小值,则所述获取模块20在获取到所述配置参数时,根据所述配置参数中的信息在模板文件了库中获取匹配的模板文件。进一步地,当所述配置参数没有包含所述模板文件的类型信息,可选所述获取模块20获取默认的模板文件作为待生成小部件文件的模板文件;或者是所述获取模块20获取所述配置参数中的模板文件类型信息失败时(如所配置参数包含的模板文件类型信息与预设的模板文件库中的模板文件类型不一致),可选所述获取模块20获取默认的模板文件作为待生成小部件文件的模板文件。在本实施例中,所述获取的模板文件格式可选为xml(Extensible Markup Language,可扩展的标识语言)文件格式。
生成单元32,设置为:将获取的数据库信息写到所述配置参数对应的模板文件中,以生成小部件文件。
在本实施例中,可选方案为,在接收到到配置文件时,所述获取单元31提取所述模板文件库中与所述配置参数对应的模板文件,即配置参数中包含的模板文件对应的类型标识,在所述获取单元31获取确定的模板文件时,即可确定小部件文件待生成的文件格式,此时,所述生成单元32将获取的数据库信息写到所述配置参数对应的模板文件中,以生成小部件文件,所述生成单元32将获取的数据库信息写到所述配置参数对应的模板文件中的方式可选为:所述生成单元32根据数据库信息和模板文件上的参数映射关系,将获取的所述数据库信息写入到模板文件上对应的位置中。例如,所述生成单元32先确定模板文件行与列每个位置的标识信息,如行对应的每个 标识信息为名称、时间或价格等;然后根据行标识信息确定对应的数据库信息,如确定数据库信息中标识包含名称类型的数据字段、标识包含时间类型的数据字段以及标识包含价格类型的数据字段;最后将确定的数据库信息中的数据字段写入所述每个行标识信息对应的位置中,以生成小部件文件。
为了增加小部件文件生成的灵活性,基于第一实施例提出本发明小部件文件生成装置的第三实施例,在本实施例中,参照图8,
所述获取模块20,还设置为:获取所述小部件文件中满足显示要求的文件片段;
所述小部件文件生成装置还包括:第一发送模块40,设置为:将所述文件片段发送给所述终端,以供所述终端接收所述文件片段并在预设界面显示所述文件片段对应的窗口小部件。
在本实施例中,可选先将生成的所述小部件文件存储到预设的存储空间,所述预设的存储空间包括服务器指定的目录,如默认的文件夹中;或者是模板文件库中预设的存储空间,如模板文件库目录下预设的文件夹。可以理解的是,所述存储空间还可以为硬盘或内存卡等等。所述获取模块20获取所述小部件文件中满足显示要求的文件片段,所述满足显示要求的文件片段可选为所述小部件文件中预设的html代码片段或数据片段,并且第一发送模块40将获取的所述html代码片段或数据片段发送给所述终端,以供所述终端在预设界面显示所述代码片段或数据片段对应的窗口小部件。
为了增加小部件文件生成的灵活性,基于第一实施例提出本发明小部件文件生成装置的第四实施例,在本实施例中,参照图9,当所述小部件文件中满足显示要求的文件片段包括多个文件片段时,所述第一发送模块40包括:
确定单元41,设置为:确定文件片段在所述终端同一个显示界面的显示数量;
发送单元42,设置为:将所述文件片段给所述终端,以供终端在同一显 示界面显示所述数量的文件片段对应的窗口小部件。
在本实施例中,可选方案为所述确定单元41自定义文件片段在同一显示界面的显示个数,如预设小部件文件中满足显示要求的文件片段在同一显示界面一次性能显示多个窗口小部件,或者在接收到配置文件时,根据配置参数中预设的指令如在同一显示界面一次性显示预设数量的窗口小部件,获取所述数量对应的文件片段,并且所述发送单元42将所述文件片段给所述终端,以供终端在同一显示界面显示所述数量的文件片段对应的窗口小部件,有效提高了窗口小部件的显示效率。
为了增加小部件文件生成的灵活性,基于第一实施例提出本发明小部件文件生成装置的第五实施例,在本实施例中,参照图10,所述小部件文件生成装置还包括:
第二发送模块50,设置为:在检测到小部件文件的下载指令时,将生成的所述小部件文件发送给所述终端,以供所述终端存储接收到的所述小部件文件。
在本实施例中,在检测到小部件文件的下载指令时,可选所述第二发送模块50将生成的所述小部件文件发送给所述终端,以供所述终端存储接收到的所述小部件文件,实现了终端发送配置文件给所述服务器进行定制时,最终所述第二发送模块50将定制生成的所述小部件文件反馈给所述终端,以供终端存储所述服务器反馈的小部件文件。进一步地,所述终端可以在预设的应用中显示所述小部件文件对应的窗口小部件,或者在终端显示界面显示所述小部件文件对应的窗口小部件。
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其它变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者系统不仅包括那些要素,而且还包括没有明确列出的其它要素,或者是还包括为这种过程、方法、物品或者系统所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过 程、方法、物品或者系统中还存在另外的相同要素。
上述本发明实施例序号仅仅为了描述,不代表实施例的优劣。
本领域普通技术人员可以理解上述实施例的全部或部分步骤可以使用计算机程序流程来实现,所述计算机程序可以存储于一计算机可读存储介质中,所述计算机程序在相应的硬件平台上(如系统、设备、装置、器件等)执行,在执行时,包括方法实施例的步骤之一或其组合。
可选地,上述实施例的全部或部分步骤也可以使用集成电路来实现,这些步骤可以被分别制作成一个个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。
上述实施例中的装置/功能模块/功能单元可以采用通用的计算装置来实现,它们可以集中在单个的计算装置上,也可以分布在多个计算装置所组成的网络上。
上述实施例中的装置/功能模块/功能单元以软件功能模块的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。上述提到的计算机可读取存储介质可以是只读存储器,磁盘或光盘等。
工业实用性
本发明实施例采用通过配置参数获取对应的数据库信息,并将获取的数据库信息写到预设的模板文件中生成小部件文件的方式,提高了小部件文件的生成效率。

Claims (11)

  1. 一种小部件文件生成方法,包括:
    在接收到终端发送的配置文件时,服务器基于所述配置文件提取所述配置文件中的配置参数;
    根据预设的配置参数与数据库信息的映射关系,获取确定的配置参数对应的数据库信息;
    将获取的数据库信息写到预设的模板文件中,以生成小部件文件。
  2. 如权利要求1所述的小部件文件生成方法,其中,所述服务器将获取的数据库信息写到预设的模板文件中,以生成小部件文件的步骤包括:
    所述服务器在预设的模板文件库中获取所述配置参数对应的模板文件;
    将获取的数据库信息写到所述配置参数对应的模板文件中,以生成小部件文件。
  3. 如权利要求1或2所述的小部件文件生成方法,其中,所述服务器将获取的数据库信息写到预设的模板文件中,以生成小部件文件的步骤之后,所述小部件文件生成方法还包括:
    所述服务器获取所述小部件文件中满足显示要求的文件片段;
    将所述文件片段发送给所述终端,以供所述终端接收所述文件片段并在预设界面显示所述文件片段对应的窗口小部件。
  4. 如权利要求3所述的小部件文件生成方法,其中,当所述小部件文件中满足显示要求的文件片段包括多个文件片段时,所述服务器将所述文件片段发送给所述终端,以供所述终端接收所述文件片段并在预设界面显示所述文件片段对应的窗口小部件的步骤包括:
    所述服务器确定文件片段在所述终端同一个显示界面的显示数量;
    将所述文件片段给所述终端,以供终端在同一显示界面显示所述数量的文件片段对应的窗口小部件。
  5. 如权利要求1或2所述的小部件文件生成方法,其中,所述服务器将获取的数据库信息写到预设的模板文件中,以生成小部件文件的步骤之后, 所述小部件文件生成方法还包括:
    在检测到小部件文件的下载指令时,所述服务器将生成的所述小部件文件发送给所述终端,以供所述终端存储接收到的所述小部件文件。
  6. 一种小部件文件生成装置,包括:
    提取模块,设置为:在接收到终端发送的配置文件时,基于所述配置文件提取所述配置文件中的配置参数;
    获取模块,设置为:根据预设的配置参数与数据库信息的映射关系,获取确定的配置参数对应的数据库信息;
    生成模块,设置为:将获取的数据库信息写到预设的模板文件中,以生成小部件文件。
  7. 如权利要求6所述的小部件文件生成装置,其中,所述生成模块包括:
    获取单元,设置为:在预设的模板文件库中获取所述配置参数对应的模板文件;
    生成单元,设置为:将获取的数据库信息写到所述配置参数对应的模板文件中,以生成小部件文件。
  8. 如权利要求6或7所述的小部件文件生成装置,其中,
    所述获取模块,还设置为:获取所述小部件文件中满足显示要求的文件片段;
    所述小部件文件生成装置还包括:第一发送模块,设置为:将所述文件片段发送给所述终端,以供所述终端接收所述文件片段并在预设界面显示所述文件片段对应的窗口小部件。
  9. 如权利要求8所述的小部件文件生成装置,其中,当所述小部件文件中满足显示要求的文件片段包括多个文件片段时,所述第一发送模块包括:
    确定单元,设置为:确定文件片段在所述终端同一个显示界面的显示数量;
    发送单元,设置为:将所述文件片段给所述终端,以供终端在同一显示界面显示所述数量的文件片段对应的窗口小部件。
  10. 如权利要求6或7所述的小部件文件生成装置,所述小部件文件生成装置还包括:
    第二发送模块,设置为:在检测到小部件文件的下载指令时,将生成的所述小部件文件发送给所述终端,以供所述终端存储接收到的所述小部件文件。
  11. 一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令用于执行权利要求1-5任一项的方法。
PCT/CN2016/071234 2015-07-16 2016-01-18 小部件文件生成方法和装置 WO2016131360A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510419220.2A CN106354727B (zh) 2015-07-16 2015-07-16 小部件文件生成方法和装置
CN201510419220.2 2015-07-16

Publications (1)

Publication Number Publication Date
WO2016131360A1 true WO2016131360A1 (zh) 2016-08-25

Family

ID=56692195

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/071234 WO2016131360A1 (zh) 2015-07-16 2016-01-18 小部件文件生成方法和装置

Country Status (2)

Country Link
CN (1) CN106354727B (zh)
WO (1) WO2016131360A1 (zh)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107704479B (zh) * 2017-02-08 2020-06-30 深圳壹账通智能科技有限公司 文件生成方法和装置
CN110727469B (zh) * 2018-06-29 2022-08-16 珠海市魅族科技有限公司 终端设备控制方法及装置、应用程序配置文件的封装方法、终端设备及计算机可读存储介质
CN109614191A (zh) * 2018-12-07 2019-04-12 上海商米科技有限公司 应用的处理方法及装置
CN109766122A (zh) * 2018-12-20 2019-05-17 平安信托有限责任公司 数据传输文件生成方法、装置、计算机设备和存储介质
CN110826080B (zh) * 2019-09-18 2024-03-08 平安科技(深圳)有限公司 多媒体文件生成方法、装置、设备及计算机可读存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102096581A (zh) * 2009-12-10 2011-06-15 华为技术有限公司 生成微件的方法及装置
US20110214078A1 (en) * 2010-02-26 2011-09-01 Amulet Technologies, Llc. Image File as Container for Widgets in GUI Authoring Tool
CN102262538A (zh) * 2011-07-26 2011-11-30 中兴通讯股份有限公司 处理wigdet微件的方法和装置
US20140258972A1 (en) * 2012-10-05 2014-09-11 Box, Inc. System and method for generating embeddable widgets which enable access to a cloud-based collaboration platform
CN104317576A (zh) * 2014-07-04 2015-01-28 北京思特奇信息技术股份有限公司 一种基于eclipse的代码自动生成方法及系统

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8769490B2 (en) * 2008-09-16 2014-07-01 Oracle International Corporation Desktop widget engine emulator component for a rapid application development tool
CN101673199A (zh) * 2009-08-10 2010-03-17 厦门敏讯信息技术股份有限公司 终端参数配置服务器及其软件界面的自动生成方法
CN102163188A (zh) * 2011-04-07 2011-08-24 北京数码大方科技有限公司 应用系统中excel报表的生成方法及装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102096581A (zh) * 2009-12-10 2011-06-15 华为技术有限公司 生成微件的方法及装置
US20110214078A1 (en) * 2010-02-26 2011-09-01 Amulet Technologies, Llc. Image File as Container for Widgets in GUI Authoring Tool
CN102262538A (zh) * 2011-07-26 2011-11-30 中兴通讯股份有限公司 处理wigdet微件的方法和装置
US20140258972A1 (en) * 2012-10-05 2014-09-11 Box, Inc. System and method for generating embeddable widgets which enable access to a cloud-based collaboration platform
CN104317576A (zh) * 2014-07-04 2015-01-28 北京思特奇信息技术股份有限公司 一种基于eclipse的代码自动生成方法及系统

Also Published As

Publication number Publication date
CN106354727A (zh) 2017-01-25
CN106354727B (zh) 2021-01-26

Similar Documents

Publication Publication Date Title
US10466971B2 (en) Generation of an application from data
CN111767057B (zh) 一种数据处理方法及装置
WO2016131360A1 (zh) 小部件文件生成方法和装置
US9268758B2 (en) Method for associating third party content with online document signing
US9910870B2 (en) System and method for creating data models from complex raw log files
CN106462632B (zh) 具有内容规范层的媒体商店
US20150193818A1 (en) Targeted Content Marketing Platform
US9817605B2 (en) Systems and methods of storing data associated with content of a data storage device
CN103729713A (zh) 稽核结果的展示配置方法及装置
WO2019071898A1 (zh) 电子装置、数据库查询脚本生成方法及存储介质
CN110806866A (zh) 一种前端管理系统的生成方法及装置
US9990348B2 (en) System and method for managing data using a spreadsheet model
US20130339834A1 (en) Dynamic presentation of a results set by a form-based software application
US8751946B2 (en) Enhanced display of properties for a program object
US11309065B2 (en) Management and tracking solution for specific patient consent attributes and permissions
US10348811B2 (en) Service to invoke companion applications
CN112685678B (zh) 页面配置方法、装置、计算机设备和存储介质
WO2018206819A1 (en) Data storage method and apparatus
US20220292077A1 (en) Scalable interactive data collection system
US10969931B2 (en) Data mapping service
JP2017083937A (ja) 情報処理装置、情報処理方法、及びプログラム
CN111274263B (zh) 可视化数据库变更语句生成方法、装置及存储介质
CN115357604B (zh) 一种数据查询方法和装置
KR20130019176A (ko) 전자책 상에서 애너테이션이 작성된 항목을 추출 및 제공하는 방법 및 그 시스템
US20140059014A1 (en) Validating system and method

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16751891

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16751891

Country of ref document: EP

Kind code of ref document: A1