WO2012024974A1 - 一种移动终端数据管理的装置和方法 - Google Patents
一种移动终端数据管理的装置和方法 Download PDFInfo
- Publication number
- WO2012024974A1 WO2012024974A1 PCT/CN2011/076225 CN2011076225W WO2012024974A1 WO 2012024974 A1 WO2012024974 A1 WO 2012024974A1 CN 2011076225 W CN2011076225 W CN 2011076225W WO 2012024974 A1 WO2012024974 A1 WO 2012024974A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- data
- control
- interface
- service
- module
- Prior art date
- Legal status (The legal status 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 status listed.)
- Ceased
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
- G06F8/38—Creation or generation of source code for implementing user interfaces
Definitions
- the present invention relates to the field of application development of mobile terminals, and more particularly to an apparatus and method for data management of mobile terminals. Background technique
- Mobile terminal applications include: audio and video applications, call applications, and file manager applications.
- application interface display In the prior art, in the application development of mobile terminals, there is a strong coupling relationship between application interface display, flow control, and business functions. In the case of changes in interface customization or business functions, it is often necessary to make comprehensive changes to the application, resulting in an increase in subsequent maintenance costs.
- the main object of the present invention is to provide a method and apparatus for data management of a mobile terminal, which realizes separation of interface display data and service data, and reduces coupling between data and thereafter. Continue the cost of maintenance and improve the efficiency of application development.
- the present invention provides a device for managing data of a mobile terminal, including: a UI control script configuration module and a data management module;
- the UI control script configuration module is connected to the data management module, configured to configure the service data description information in the configuration file and save, and associate the control ID of the interface window control with the service data identifier, generate a control data association file, and save the control data;
- the data management module is configured to respectively connect the interface window control and the service module, and is configured to obtain a corresponding interface according to the information saved by the UI control script configuration module, and implement data interaction between the interface window control and the service module through the corresponding interface.
- the service data description information includes: a service data type, a service data identifier, and an interface function name;
- the control data association file includes: a control ID of the interface window control and a service data identifier associated with the control window.
- the data management module includes: a data interaction module and a service data management module; and a corresponding data management interface is provided between the data interaction module and the service data management module according to the service data type;
- the data interaction module is configured to obtain, by using the control ID, the service data identifier associated with the service data association file in the UI control script configuration module, and notify the service data management module of the service data identifier, and invoke the corresponding by the control ID.
- a control interface through which the data interaction between the data interaction module and the interface window control is implemented;
- the service data management module is configured to obtain the service data type and the interface function by using the service data identifier in the service data description information in the UI control script configuration module, invoke the service data interface of the corresponding service module, and implement the service through the service data interface.
- the interaction between the interface window control and the service module is implemented by using the corresponding interface, and the specific information includes:
- the data interaction module in the data management module calls the control interface of the corresponding interface window control through the control ID, obtains the interface window data from the corresponding interface window control through the control interface, and sends the interface window data to the service data management module in the data management module through the data management interface. And obtaining the service data identifier associated with the service data association file from the control data association file, and then sending the service data identifier to the service data management module through the data management interface, and the service data management module obtains the corresponding service data in the service data description information by using the service data identifier.
- Type, interface function name call the service data interface of the corresponding service module, and save the acquired interface window data to the corresponding service module through the service data interface; or
- the service data management module obtains the service data from the corresponding service module through the service data interface, and sends the data to the data interaction module through the data management interface, and the data interaction module passes the control
- the ID calls the control interface of the corresponding interface window control, and loads the acquired business data into the corresponding interface window control through the control interface;
- the data interaction module updates the changed data through the data management interface provided by the service data management module, and obtains the control ID through the service data identifier maintained by the data interaction module itself and the associated content of the control ID, through the control
- the ID calls the control interface and loads the updated data into the interface window control that needs to be refreshed.
- the invention also provides a method for data management of a mobile terminal, comprising:
- Configuring the service data description information in the configuration file associating the interface window control with the business data, generating the control data association file, and saving the configuration file and the control data association file in the UI control configuration script file;
- the corresponding interface in the UI control configuration script is used to obtain the corresponding interface, and the data interaction between the interface window control and the business module is realized through the corresponding interface.
- the service data description information includes: a service data type, a service data identifier, and an interface function name;
- the control data association file includes: a control ID of the interface window control and a service data identifier associated therewith.
- the method further includes: establishing a service data interface between the service module and the data management module, and configuring the service data in the configuration file.
- the interaction between the interface window control and the service module is implemented by using the corresponding interface, and the specific information includes:
- the control interface of the corresponding interface window control is called by the control ID, and the interface window data is obtained from the corresponding interface window control through the control interface, and the service data identifier associated with the control data is obtained from the control data association file, and the business data identifier is used in the service.
- the business data is obtained from the corresponding business module through the business data interface, and the control interface of the interface window control is invoked by triggering the control ID specified when the data is loaded, through the control interface. Loading the obtained business data into the corresponding interface window control; or,
- the device and method for data management of a mobile terminal configured service data description information in a configuration file, associate an interface window control with service data, generate a control data association file, and configure the configuration file and the control
- the data association file is saved in the UI control configuration script file; the corresponding interface is obtained through the UI control configuration script, and the corresponding interface is obtained.
- the corresponding interface implements data interaction between the interface window control and the business module.
- the content organization mode and the interface form of the service data can be effectively regulated, and the data interaction between the interface window control and the service module can be flexibly realized.
- the interface design does not need to care about the service.
- the specific interface and implementation content of the data only need to care about the data required by the interface; the business data does not need to understand the type and storage format of the interface data, and only needs to provide the required interface and business data; thus, the interface developer only needs to
- the data provided by the business module uses the interface design tool to design the data required by the interface, and the business developer only needs to provide the business data according to the specified format, thereby enhancing the division of labor, improving the efficiency of the developer, and greatly improving the speed and stability of the code development. , reduce the cost of code maintenance, thereby improving the speed and quality of model development, and promoting rapid customization of mobile terminal models.
- FIG. 1 is a schematic diagram of a prior art application development structure
- FIG. 2 is a schematic structural diagram of an apparatus for data management of a mobile terminal according to the present invention.
- FIG. 3 is a flowchart of a method for data management of a mobile terminal according to the present invention.
- DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS The basic idea of the present invention is: configuring service data description information in a configuration file, associating an interface window control with business data, generating a control data association file, and saving the configuration file and the control data association file in the UI
- the control configuration script file obtain the corresponding interface through the corresponding information in the UI control configuration script, and realize the data interaction between the interface window control and the business module through the corresponding interface.
- the device for managing data of the mobile terminal is as shown in FIG. 2, and the device is located in an application module of the mobile terminal, and includes: a UI control script configuration module and a data management module;
- the UI control script configuration module is connected to the data management module, configured to configure and save the service data description information, and associate the control ID of the interface window control with the service data identifier to generate a control data association file and save the same;
- the data management module is configured to respectively connect the interface window control and the service module, and is configured to obtain a corresponding interface according to the information saved by the UI control script configuration module, and implement data interaction between the interface window control and the service module through the corresponding interface.
- the service data description information includes: a service data type, a service data identifier, an interface function name, and the like;
- the control data association file includes: a control ID of the interface window control and a service data identifier associated therewith.
- the data management module includes: a data interaction module and a service data management module; and a data management interface is provided between the data interaction module and the service data management module according to the service data type;
- the data interaction module is configured to obtain, by using the control ID, the service data identifier associated with the service data association file in the UI control script configuration module, and notify the service data management module of the service data identifier, and invoke the corresponding by the control ID.
- a control interface through which the data interaction between the data interaction module and the interface window control is implemented;
- the service data management module is configured to obtain the service data type and the interface function by using the service data identifier in the service data description information in the UI control script configuration module, invoke the service data interface of the corresponding service module, and implement the service through the service data interface.
- the interaction between the interface window control and the service module is implemented by using the corresponding interface, which specifically includes:
- the data interaction module in the data management module calls the corresponding interface window control through the control ID
- the control interface obtains the interface window data from the corresponding interface window control through the control interface, and sends the data to the business data management module in the data management module through the data management interface, and then obtains the service associated with it from the control data association file through the control ID.
- the service data management module obtains the corresponding service data type, the interface function name, and the like in the service data description information by using the service data identifier, and invokes the service data interface of the corresponding service module. And saving the obtained interface window data to the corresponding service module through the service data interface; or
- the service data management module obtains the service data from the corresponding service module through the service data interface, and sends the data to the data interaction module through the data management interface, and the data interaction module passes the control
- the ID calls the control interface of the corresponding interface window control, and the acquired business data is loaded into the corresponding interface window control through the control interface, and the data interaction between the interface window control and the business module is realized, or
- the data interaction module updates the changed data through the data management interface provided by the service data management module, and obtains the control ID through the service data identifier maintained by the data interaction module itself and the associated content of the control ID, through the control
- the ID calls the control interface and loads the updated data into the interface window control that needs to be refreshed.
- the method for managing data of a mobile terminal provided by the present invention includes the following steps:
- Step 301 Establish a service data interface between the service module and the data management module, and configure service data in the configuration file.
- Step 302 The PC visual interface design tool implements an association between the interface window control and the business data according to the configured business data, and generates a UI control configuration script.
- the configuration file of the foregoing service data is imported into the PC visual interface design tool, and the business data type and the business data identifier in the configuration file of the business data are parsed; the required interface window is constructed, and the required control ID of the interface window is created.
- the business data identifier Associated with the business data identifier, generate a control data association file and save it in the UI control configuration script file; wherein, the control data association file includes the control ID required by the interface window and the service data identifier associated with it.
- Step 303 The event management module triggers the data management module according to the GUI message or the system message.
- the user sends a GUI message by clicking a button, or the system message sent by the system itself triggers the event management module, and the event management module triggers the data management module to start. Work; where the GUI message includes the control ID.
- Step 304 The data management module obtains a corresponding interface through the UI control configuration script file, and implements data interaction between the interface window control and the service module through the corresponding interface.
- the data management module obtains the service data identifier associated with the control ID in the control data file of the UI control configuration script file, and invokes the control interface of the corresponding interface window control through the control ID, and the data management module passes the The control interface loads the business data into the corresponding interface window control, or obtains the interface window data from the corresponding interface window control to implement data interaction between the interface window control and the data management module; and, the data management module configures the script in the UI control After obtaining the service data identifier associated with the control ID in the control data association file in the file, the corresponding service data type, interface function name, and the like are obtained in the data description information, and the service data interface of the corresponding service module is invoked. The management module obtains the corresponding service data from the corresponding service module through the service data interface, or saves the acquired interface window data to the service module, so as to implement data interaction between the data management module and the service module.
- the data management module obtains the boundary from the corresponding interface window control through the control interface. Face window data, and save the acquired interface window data to the corresponding service module through the service data interface; or, the data management module obtains the service data from the corresponding service module through the service data interface, and acquires the service data through the control interface Loaded into the corresponding interface window control to implement data interaction between the interface window control and the business module.
- Embodiment 1 The contact list (PBList, Phone Book List) window initializes data loading:
- Step 1 The service module establishes a service data interface with the data management module according to the specified format of the data management module.
- the developer configures the required service data in the configuration file.
- the contact list service the developer inputs the service data.
- the developer describes the service data description information in the configuration file PBSvrData.xml: where the configuration file PBSvrData.xml includes information such as a service data type (Datatype), a service data identifier (URI), an interface function name, and the like, and the configuration is performed.
- the file is saved in the UI control configuration script file: For record data configuration:
- Step 2 Import the configuration file PBSvrData.xml of the service data description information into the PC visual interface design tool, parse the service data type and the service data identifier in the configuration file, and put the service data identifier into the preparation associated with the interface window control.
- the selection list the association setting of the subsequent control data association file is prepared, wherein the contact list control in the contact list window is used to display the contact list information, and the static text control in the contact list window is used to display the contact.
- PbContacts associates, associates the static text control with the business data identifier PbContactsCount, generates the control data association file PBListWinData.xml, and saves it in the UI control configuration script file.
- Step 3 The window sends an initialization message to the event management module, and the event management module notifies the data management module to initialize the interface window control data padding;
- Step 4 The data management module obtains the service data identifier associated with the control ID from the control data association file PBListWinData.xml according to the control ID in the initialization message, that is, obtains the service data identifier PbContacts associated with the contact list control ID, and according to The static text control ID obtains the business data identifier PbContactsCount associated with it;
- Step 5 The data management module obtains the corresponding service data type, the interface function name, and the like from the configuration file PBSvrData.xml of the service data description information according to the service data identifier, and obtains the service data from the corresponding service module through the corresponding service data interface;
- Step 6 The data management module invokes the contact list control interface according to the contact list control ID, performs necessary type conversion on the business data type, loads the contact list data into the contact list control, and the data management module invokes according to the static text control ID.
- the static text control interface performs the necessary type conversion on the business data type, and loads the total number of contacts into the static text control.
- the PBList window initialization data loading is completed.
- Embodiment 2 After the PBList window initialization data is loaded, the data is loaded when the PBList data changes:
- Step 2 The data management module updates the PBContacts and PBContactsCount maintained by the data management module, and obtains the service data type according to the service data identifier, obtains the service data from the service module through the corresponding service data interface, and then maintains the data according to the data interaction module in the data management module.
- the association information of the identifier and the control ID obtain all the associated control IDs, call the corresponding control interface through the control ID, and load the business data into the interface window control.
- the specific steps are the same as the fifth and sixth steps of the first embodiment.
- Embodiment 3 After the PBList window initialization data is loaded, the contact list control browses and flips the page:
- Step 1 When the contact list control moves to the top or bottom of the current page, if you continue to move up or down and want to view the previous or next contact information, the contact list control sends a refresh to the event management module. a message, and the event management module notifies the data management module to refresh the data of the contact list control;
- Step 2 The data management module obtains the starting point, direction, and quantity of the data to be filled through the corresponding control interface, and fills the contact data that meets the requirements into the contact list control through the necessary type conversion, and thus, the contact list The data is automatically loaded when the control is browsed and paged.
- Embodiment 4 The interface window control saves data to the business module and refreshes the interface window control data:
- Step 1 The interface window control sends a save data message to the event management module in response to the user's save data operation;
- the user clicks the button in the newly created contact interface window to save the current data, and sends a save data message to the event management module.
- Step 2 The event management module triggers the data management module according to the save data message
- Step 3 The data management module parses the UI control configuration script file, and obtains the control data associated file and the service data description information respectively;
- Step 4 The data management module invokes the corresponding control interface according to the control ID, from the interface window.
- the mouth control gets the data that needs to be saved;
- Step 5 The data management module obtains a corresponding service data interface by using the data identifier PBContacts according to the service data description information, and invokes the service data interface to save the newly created contact data in the service module, and the service module returns a save result notification message;
- Step 6 If the save result is a failure, the process ends; if the save result is successful, the business data refresh interface window control data flow is executed, and the process proceeds to step 7, and the service data refresh interface window control data flow is executed;
- Step 8 The service module sends a data change message to the event management module, and the event management module triggers the data management module.
- Step 9 The data management module updates its own maintained PBContacts, and calls the corresponding control interface to update the contact list control data.
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Telephonic Communication Services (AREA)
- Telephone Function (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
本发明公开了一种移动终端数据管理的装置和方法,UI控件脚本配置模块,连接于数据管理模块,用于在配置文件中配置业务数据描述信息并保存,以及将界面窗口控件的控件ID与业务数据标识进行关联,生成控件数据关联文件并保存;数据管理模块,分别连接界面窗口控件和业务模块,用于根据所述UI控件脚本配置模块保存的信息获取相应的接口,通过相应的接口实现界面窗口控件与业务模块之间数据的交互。采用本发明所述的装置和方法,支持PC可视化工具的使用,可以灵活实现界面数据和业务数据间的交互,极大的提高代码开发的速度和稳定性,降低了代码维护的成本,从而提升型号机开发速度和质量,促进移动终端型号机的快速定制。
Description
一种移动终端数据管理的装置和方法 技术领域
本发明涉及移动终端的应用开发领域, 特别是一种移动终端数据管理 的装置和方法。 背景技术
移动终端应用包括: 音视频应用、 通话应用和文件管理器应用等, 现 有技术中, 在移动终端的应用开发中, 应用的界面显示、 流程控制和业务 功能之间存在强烈的耦合关系, 在界面定制或业务功能发生变化的情况下, 往往需要对应用进行全面的更改, 导致后续维护成本的增加。
特别是在嵌入式移动终端如手机的应用开发领域, 由于市场需求变动 大, 导致手机功能和型号更迭频繁。 此时釆用传统的应用开发模式, 如图 1 所示, 任何支撑平台或上层图形用户界面 (GUI, Graphical User Interface ) 的更换, 都需要投入大量的人力和时间去重新设计相关的应用, 降低了代 码的稳定性和应用开发的效率。
归结几乎所有的移动终端应用开发, 最难处理的问题都是数据交互, 开发人员大部分的时间用于处理界面和业务之间的数据交互。 由于界面和 业务之间耦合, 导致界面编码中大量掺杂来自业务的数据和数据操作, 这 就要求开发人员必须同时具有界面和业务编码能力, 最终代码较为凌乱, 使得开发和维护成本过高, 难以扩展。 发明内容
有鉴于此, 本发明的主要目的在于提供一种移动终端数据管理的方法 和装置, 实现界面显示数据和业务数据的分离, 降低数据间的耦合性及后
续维护的成本, 提高应用开发的效率。
为解决上述技术问题, 本发明的技术方案是这样实现的:
本发明提供了一种移动终端数据管理的装置, 包括: UI控件脚本配置 模块和数据管理模块; 其中,
UI控件脚本配置模块, 连接于数据管理模块, 用于在配置文件中配置 业务数据描述信息并保存, 以及将界面窗口控件的控件 ID与业务数据标识 进行关联, 生成控件数据关联文件并保存;
数据管理模块, 分别连接界面窗口控件和业务模块, 用于根据所述 UI 控件脚本配置模块保存的信息获取相应的接口, 通过相应的接口实现界面 窗口控件与业务模块之间数据的交互。
上述方案中, 所述业务数据描述信息中包括: 业务数据类型、 业务数 据标识、 接口函数名; 所述控件数据关联文件中包括: 界面窗口控件的控 件 ID和与其关联的业务数据标识。
上述方案中, 所述数据管理模块, 包括: 数据交互模块和业务数据管 理模块; 在数据交互模块与业务数据管理模块之间根据业务数据类型设有 相应的数据管理接口; 其中,
数据交互模块,用于在 UI控件脚本配置模块中的控件数据关联文件中, 通过控件 ID获取到与其关联的业务数据标识, 并将业务数据标识通知业务 数据管理模块, 以及通过控件 ID调用对应的控件接口, 通过所述控件接口 实现数据交互模块与界面窗口控件之间数据的交互;
业务数据管理模块, 用于在 UI控件脚本配置模块中的业务数据描述信 息中通过业务数据标识获取业务数据类型和接口函数等信息, 调用相应的 业务模块的业务数据接口, 通过业务数据接口实现业务数据管理模块与业 务模块之间数据的交互, 以及根据业务数据类型为数据交互模块提供相应 的数据管理接口。
上述方案中, 所述通过相应的接口实现界面窗口控件与业务模块之间 数据的交互, 具体包括:
数据管理模块中的数据交互模块通过控件 ID调用相应界面窗口控件的 控件接口, 通过控件接口从相应界面窗口控件中获取界面窗口数据, 并通 过数据管理接口发送给数据管理模块中的业务数据管理模块, 再从控件数 据关联文件中通过控件 ID获取到与其关联的业务数据标识后通过数据管理 接口发送给业务数据管理模块, 业务数据管理模块通过业务数据标识在业 务数据描述信息中获取相应的业务数据类型、 接口函数名, 调用相应的业 务模块的业务数据接口, 通过业务数据接口将获取的界面窗口数据保存到 相应的业务模块; 或者,
当用户通过指定控件 ID触发对界面窗口控件的数据加载时, 业务数据 管理模块通过业务数据接口从相应的业务模块中获取业务数据, 并通过数 据管理接口发送给数据交互模块, 数据交互模块通过控件 ID调用相应界面 窗口控件的控件接口, 通过控件接口将获取的业务数据加载到相应界面窗 口控件; 或者,
当业务数据发生变动时, 数据交互模块通过业务数据管理模块提供的 数据管理接口对发生变动的数据进行更新, 通过数据交互模块自身维护的 业务数据标识和控件 ID的关联内容获取控件 ID, 通过控件 ID调用控件接 口, 将更新后的数据加载到需要刷新的界面窗口控件中。
本发明还提供了一种移动终端数据管理的方法, 包括:
在配置文件中配置业务数据描述信息, 将界面窗口控件与业务数据进 行关联, 生成控件数据关联文件, 并将所述配置文件和控件数据关联文件 保存在 UI控件配置脚本文件中;
通过 UI控件配置脚本中相应的信息获取相应的接口, 并通过相应的接 口实现界面窗口控件与业务模块之间数据的交互。
上述方案中, 所述业务数据描述信息中包括: 业务数据类型、 业务数 据标识、 接口函数名; 所述控件数据关联文件中包括: 界面窗口控件的控 件 ID和与其关联的业务数据标识。
上述方案中, 所述界面窗口控件与业务数据之间进行关联之前, 该方 法还包括: 建立业务模块与数据管理模块之间的业务数据接口, 并在配置 文件中配置业务数据。
上述方案中, 所述通过相应的接口实现界面窗口控件与业务模块之间 数据的交互, 具体包括:
通过控件 ID调用相应界面窗口控件的控件接口, 通过控件接口从相应 界面窗口控件中获取界面窗口数据, 从控件数据关联文件中通过控件 ID获 取到与其关联的业务数据标识, 通过业务数据标识在业务数据描述信息中 获取相应的业务数据类型、 接口函数名, 调用相应的业务模块的业务数据 接口, 通过业务数据接口将获取的界面窗口数据保存到相应的业务模块; 或者,
当用户通过指定控件 ID触发对界面窗口控件的数据加载时, 通过业务 数据接口从相应的业务模块中获取业务数据, 通过触发数据加载时指定的 控件 ID调用界面窗口控件的控件接口, 通过控件接口将获取的业务数据加 载到相应界面窗口控件; 或者,
当业务数据发生变动时, 对发生变动的数据进行更新, 通过业务数据 标识和控件 ID的关联内容获取控件 ID , 通过控件 ID调用控件接口, 将更 新后的数据加载到需要刷新的界面窗口控件中。
本发明所提供的一种移动终端数据管理的装置和方法, 在配置文件中 配置业务数据描述信息, 将界面窗口控件与业务数据进行关联, 生成控件 数据关联文件, 并将所述配置文件和控件数据关联文件保存在 UI控件配置 脚本文件中; 通过 UI控件配置脚本中相应的信息获取相应的接口, 并通过
相应的接口实现界面窗口控件与业务模块之间数据的交互。
釆用本发明的方案, 可以有效的规范业务数据的提供内容组织方式和 接口形式, 灵活实现界面窗口控件和业务模块之间数据的交互; 配合 PC可 视化界面设计工具的使用, 界面设计无需关心业务数据的具体提供接口和 实现内容, 只需要关心界面需要哪些数据; 业务数据也不需要了解界面数 据的类型和存储格式, 只需要提供所需要的接口和业务数据; 这样, 界面 开发人员只需根据业务模块提供的数据使用界面设计工具设计界面需要的 数据, 而业务开发人员只需按照规定的格式提供业务数据, 从而可以加强 分工, 提高开发人员效率, 极大的提高代码开发的速度和稳定性, 降低了 代码维护的成本, 从而提升型号机开发速度和质量, 促进移动终端型号机 的快速定制。 附图说明
图 1为现有技术应用开发结构示意图;
图 2为本发明移动终端数据管理的装置结构示意图;
图 3为本发明移动终端数据管理的方法流程图。 具体实施方式 本发明的基本思想是: 在配置文件中配置业务数据描述信息, 将界面 窗口控件与业务数据进行关联, 生成控件数据关联文件, 并将所述配置文 件和控件数据关联文件保存在 UI控件配置脚本文件中; 通过 UI控件配置 脚本中相应的信息获取相应的接口, 并通过相应的接口实现界面窗口控件 与业务模块之间数据的交互。
本发明所提供的移动终端数据管理的装置, 如图 2所示, 该装置位于 移动终端的应用模块中, 包括: UI控件脚本配置模块和数据管理模块; 其 中,
UI控件脚本配置模块, 连接于数据管理模块, 用于配置业务数据描述 信息并保存, 以及将界面窗口控件的控件 ID与业务数据标识进行关联, 生 成控件数据关联文件并保存;
数据管理模块, 分别连接界面窗口控件和业务模块, 用于根据所述 UI 控件脚本配置模块保存的信息获取相应的接口, 通过相应的接口实现界面 窗口控件与业务模块之间数据的交互。
所述业务数据描述信息中包括: 业务数据类型、 业务数据标识、 接口 函数名等信息;
所述控件数据关联文件中包括: 界面窗口控件的控件 ID和与其关联的 业务数据标识。
所述数据管理模块, 包括: 数据交互模块和业务数据管理模块; 在数 据交互模块与业务数据管理模块之间根据业务数据类型设有相应的数据管 理接口; 其中,
数据交互模块,用于在 UI控件脚本配置模块中的控件数据关联文件中, 通过控件 ID获取到与其关联的业务数据标识, 并将业务数据标识通知业务 数据管理模块, 以及通过控件 ID调用对应的控件接口, 通过所述控件接口 实现数据交互模块与界面窗口控件之间数据的交互;
业务数据管理模块, 用于在 UI控件脚本配置模块中的业务数据描述信 息中通过业务数据标识获取业务数据类型和接口函数等信息, 调用相应的 业务模块的业务数据接口, 通过业务数据接口实现业务数据管理模块与业 务模块之间数据的交互, 以及根据业务数据类型为数据交互模块提供相应 的数据管理接口。
所述通过相应的接口实现界面窗口控件与业务模块之间数据的交互, 具体包括:
数据管理模块中的数据交互模块通过控件 ID调用相应界面窗口控件的
控件接口, 通过控件接口从相应界面窗口控件中获取界面窗口数据, 并通 过数据管理接口发送给数据管理模块中的业务数据管理模块, 再从控件数 据关联文件中通过控件 ID获取到与其关联的业务数据标识后通过数据管理 接口发送给业务数据管理模块, 业务数据管理模块通过业务数据标识在业 务数据描述信息中获取相应的业务数据类型、 接口函数名等信息, 调用相 应的业务模块的业务数据接口, 通过业务数据接口将获取的界面窗口数据 保存到相应的业务模块; 或者,
当用户通过指定控件 ID触发对界面窗口控件的数据加载时, 业务数据 管理模块通过业务数据接口从相应的业务模块中获取业务数据, 并通过数 据管理接口发送给数据交互模块, 数据交互模块通过控件 ID调用相应界面 窗口控件的控件接口, 通过控件接口将获取的业务数据加载到相应界面窗 口控件, 实现界面窗口控件与业务模块之间数据的交互, 或者,
当业务数据发生变动时, 数据交互模块通过业务数据管理模块提供的 数据管理接口对发生变动的数据进行更新, 通过数据交互模块自身维护的 业务数据标识和控件 ID的关联内容获取控件 ID, 通过控件 ID调用控件接 口, 将更新后的数据加载到需要刷新的界面窗口控件中。
本发明所提供的移动终端数据管理的方法, 如图 3 所示, 包括以下步 骤:
步骤 301 : 建立业务模块与数据管理模块之间的业务数据接口, 并在配 置文件中配置业务数据;
本步骤中, 业务模块根据数据管理模块的规定格式与数据管理模块建 立业务数据接口后, 可在编译和链接期检查是否已经实现相关接口, 没有 实现则无法通过编译和链接; 开发人员在配置文件中说明业务数据描述信 息, 包括业务数据类型和业务数据标识、 接口函数名等信息, 并将所述配 置文件保存在 UI控件配置脚本文件中。
步骤 302: PC可视化界面设计工具根据配置的业务数据, 实现界面窗 口控件与业务数据之间的关联, 生成 UI控件配置脚本;
本步骤中, 将上述业务数据的配置文件导入 PC 可视化界面设计工具 中, 解析业务数据的配置文件中的业务数据类型和业务数据标识; 构建所 需界面窗口, 并将该界面窗口所需控件 ID与业务数据标识进行关联, 生成 控件数据关联文件并将其保存在 UI控件配置脚本文件中; 其中, 控件数据 关联文件中包括界面窗口所需控件 ID和与其关联的业务数据标识。
步骤 303: 事件管理模块根据 GUI消息或系统消息触发数据管理模块; 本步骤中, 用户通过点击按键发送 GUI消息, 或者系统本身发出的系 统消息触发事件管理模块, 通过事件管理模块触发数据管理模块开始工作; 其中, GUI消息中包括控件 ID。
步骤 304: 数据管理模块通过 UI控件配置脚本文件获取相应的接口, 并通过相应的接口实现界面窗口控件与业务模块之间数据的交互。
本步骤中, 数据管理模块根据 UI控件配置脚本文件中的控件数据关联 文件中的控件 ID获取到与其关联的业务数据标识, 并通过控件 ID调用相 应界面窗口控件的控件接口, 数据管理模块通过所述控件接口将业务数据 加载到相应界面窗口控件, 或者从相应界面窗口控件中获取界面窗口数据 , 以实现界面窗口控件与数据管理模块之间数据的交互; 并且, 数据管理模 块在 UI控件配置脚本文件中的控件数据关联文件中根据控件 ID获取到与 其关联的业务数据标识后, 在数据描述信息中获取到相应的业务数据类型、 接口函数名等信息, 调用相应业务模块的业务数据接口, 数据管理模块通 过所述业务数据接口从相应业务模块中获取相应的业务数据, 或者将获取 的界面窗口数据保存到业务模块, 以实现数据管理模块与业务模块之间的 数据交互。
由此可见, 数据管理模块通过控件接口从相应界面窗口控件中获取界
面窗口数据, 并通过业务数据接口将获取的界面窗口数据保存到相应的业 务模块; 或者, 数据管理模块通过业务数据接口从相应的业务模块中获取 业务数据, 并通过控件接口将获取的业务数据加载到相应界面窗口控件, 从而实现界面窗口控件与业务模块之间数据的交互。
下面通过具体实施例详细说明界面窗口控件与业务模块通过数据管理 模块实现数据的交互流程:
实施例一: 联系人列表( PBList, Phone Book List )窗口初始化数据加 载:
步骤 1 :业务模块根据数据管理模块的规定格式与数据管理模块建立业 务数据接口; 开发人员在配置文件中对所需业务数据进行相关配置, 这里, 在联系人列表业务中, 开发人员将业务数据分为两类: 记录型数据和单一 型数据, 其中, 记录型数据以二维表的形式存在, 用于记录联系人列表信 息; 单一型数据以简单变量形式存在, 用于记录联系人总数; 开发人员在 配置文件 PBSvrData.xml 中说明业务数据描述信息: 其中, 在配置文件 PBSvrData.xml中包括业务数据类型 (Datatype )和业务数据标识(URI )、 接口函数名等信息, 并将所述配置文件保存在 UI控件配置脚本文件中: 对于记录型数据配置为:
<Datatype = "ListData" URI = "PbContacts" >;
对于单一型数据配置为:
<Datatype = "AtomData" URI = "PbContactsCount" >。
步骤 2: 将上述业务数据描述信息的配置文件 PBSvrData.xml导入 PC 可视化界面设计工具中, 解析配置文件中的业务数据类型和业务数据标识, 并将业务数据标识放入与界面窗口控件关联的备选列表中, 以备后续控件 数据关联文件的关联设置, 其中, 联系人列表窗口中的联系人列表控件用 于显示联系人列表信息, 联系人列表窗口中的静态文本控件用于显示联系
人总数信息; 构建联系人列表窗口, 并设置所需界面窗口控件, 包括: 联 系人列表控件和静态文本控件; 将联系人列表控件与业务数据标识
PbContacts进行关联, 将静态文本控件与业务数据标识 PbContactsCount进 行关联, 生成控件数据关联文件 PBListWinData.xml, 并将其保存在 UI控 件配置脚本文件中。
步骤 3: 窗口将初始化消息发给事件管理模块, 事件管理模块通知数据 管理模块进行初始化界面窗口控件数据填充;
步骤 4: 数据管理模块根据初始化消息中的控件 ID从控件数据关联文 件 PBListWinData.xml获取与控件 ID关联的业务数据标识, 即分别根据联 系人列表控件 ID获取与其关联的业务数据标识 PbContacts, 以及根据静态 文本控件 ID获取与其关联的业务数据标识 PbContactsCount;
步骤 5:数据管理模块根据业务数据标识从业务数据描述信息的配置文 件 PBSvrData.xml中获取相应的业务数据类型、接口函数名等信息,通过对 应的业务数据接口从相应的业务模块获取业务数据;
步骤 6: 数据管理模块根据联系人列表控件 ID调用联系人列表控件接 口, 对业务数据类型进行必要的类型转换, 将联系人列表数据加载到联系 人列表控件; 数据管理模块根据静态文本控件 ID调用静态文本控件接口, 对业务数据类型进行必要的类型转换, 将联系人总数加载到静态文本控件 中; 至此, PBList窗口初始化数据加载完成。
实施例二: PBList窗口初始化数据加载完成后, PBList数据发生变化 时数据的加载:
步骤 1 : 当电话簿执行删除联系人操作后,业务数据发生了变化,例如: 联系人列表减少了一个条目、 联系人总数也减少了一个, 则业务模块向事 件管理模块发送消息, 告知 URI=PBContacts和 URI=PBContactsCount的业 务数据发生了变化, 并由事件管理模块通知数据管理模块;
步骤 2:数据管理模块更新自身维护的 PBContacts和 PBContactsCount; 并且, 根据业务数据标识获取业务数据类型, 通过对应的业务数据接口从 业务模块获取业务数据, 再根据数据管理模块中数据交互模块维护的数据 标识和控件 ID的关联信息, 获取所有关联的控件 ID , 通过控件 ID调用对 应的控件接口,将业务数据加载到界面窗口控件,具体步骤同实施例一第 5、 6步。
实施例三: PBList 窗口初始化数据加载完成后, 联系人列表控件浏览 和翻页:
步骤 1 : 当联系人列表控件移动到当前页面的顶端或底端时, 如果继续 执行向上或向下移动, 想查看上一个或者下一个联系人信息时, 联系人列 表控件向事件管理模块发送刷新消息, 并由事件管理模块通知数据管理模 块刷新联系人列表控件的数据;
步骤 2:数据管理模块通过相应的控件接口,获取需要填充数据的起点、 方向和数量, 通过必要的类型转换后, 将符合要求的联系人数据填充到联 系人列表控件中, 至此, 联系人列表控件浏览和翻页时数据自动加载完成。
实施例四: 界面窗口控件向业务模块保存数据及刷新界面窗口控件数 据:
步骤 1 : 界面窗口控件响应用户的保存数据操作, 向事件管理模块发送 保存数据消息;
本步骤中, 用户在新建联系人界面窗口点击按键保存当前数据, 向事 件管理模块发送保存数据消息。
步骤 2: 事件管理模块根据保存数据消息触发数据管理模块;
步骤 3: 数据管理模块解析 UI控件配置脚本文件, 分别获取控件数据 关联文件和业务数据描述信息;
步骤 4: 数据管理模块根据控件 ID, 调用相应的控件接口, 从界面窗
口控件获取需要保存的数据;
步骤 5 : 数据管理模块根据业务数据描述信息, 通过数据标识 PBContacts 获取对应的业务数据接口, 并调用该业务数据接口, 将新建的 联系人数据保存在业务模块, 业务模块返回保存结果通知消息;
步骤 6: 如果保存结果为失败, 则结束流程; 如果保存结果为成功, 则 执行业务数据刷新界面窗口控件数据流程, 进入步骤 7, 执行业务数据刷新 界面窗口控件数据流程;
步骤 7: 业务模块中的数据发生变化后, 置数据更新标识位; 本步骤中, 如果增加联系人数据成功, URI=PBContacts对应的业务数 据发生变化, 则置数据更新标识位为 TRUE。
步骤 8: 业务模块向事件管理模块发送数据变化消息, 由事件管理模块 触发数据管理模块;
步骤 9: 数据管理模块更新自身维护的 PBContacts, 调用相应的控件接 口更新联系人列表控件数据。
以上所述, 仅为本发明的较佳实施例而已, 并非用于限定本发明的保 护范围, 凡在本发明的精神和原则之内所作的任何修改、 等同替换和改进 等, 均应包含在本发明的保护范围之内。
Claims
1、 一种移动终端数据管理的装置, 其特征在于, 包括: UI控件脚本配 置模块和数据管理模块; 其中,
UI控件脚本配置模块, 连接于数据管理模块, 用于在配置文件中配置 业务数据描述信息并保存, 以及将界面窗口控件的控件 ID与业务数据标识 进行关联, 生成控件数据关联文件并保存;
数据管理模块, 分别连接界面窗口控件和业务模块, 用于根据所述 UI 控件脚本配置模块保存的信息获取相应的接口, 通过相应的接口实现界面 窗口控件与业务模块之间数据的交互。
2、 根据权利要求 1所述的装置, 其特征在于,
所述业务数据描述信息中包括: 业务数据类型、 业务数据标识、 接口 函数名;
所述控件数据关联文件中包括: 界面窗口控件的控件 ID和与其关联的 业务数据标识。
3、根据权利要求 1或 2所述的装置,其特征在于, 所述数据管理模块, 包括: 数据交互模块和业务数据管理模块; 在数据交互模块与业务数据管 理模块之间根据业务数据类型设有相应的数据管理接口; 其中,
数据交互模块,用于在 UI控件脚本配置模块中的控件数据关联文件中, 通过控件 ID获取到与其关联的业务数据标识, 并将业务数据标识通知业务 数据管理模块, 以及通过控件 ID调用对应的控件接口, 通过所述控件接口 实现数据交互模块与界面窗口控件之间数据的交互;
业务数据管理模块, 用于在 UI控件脚本配置模块中的业务数据描述信 息中通过业务数据标识获取业务数据类型和接口函数, 调用相应的业务模 块的业务数据接口, 通过业务数据接口实现业务数据管理模块与业务模块 之间数据的交互, 以及根据业务数据类型为数据交互模块提供相应的数据 管理接口。
4、 根据权利要求 3所述的装置, 其特征在于, 所述通过相应的接口实 现界面窗口控件与业务模块之间数据的交互, 具体包括:
数据管理模块中的数据交互模块通过控件 ID调用相应界面窗口控件的 控件接口, 通过控件接口从相应界面窗口控件中获取界面窗口数据, 并通 过数据管理接口发送给数据管理模块中的业务数据管理模块, 再从控件数 据关联文件中通过控件 ID获取到与其关联的业务数据标识后通过数据管理 接口发送给业务数据管理模块, 业务数据管理模块通过业务数据标识在业 务数据描述信息中获取相应的业务数据类型、 接口函数名, 调用相应的业 务模块的业务数据接口, 通过业务数据接口将获取的界面窗口数据保存到 相应的业务模块; 或者,
当用户通过指定控件 ID触发对界面窗口控件的数据加载时, 业务数据 管理模块通过业务数据接口从相应的业务模块中获取业务数据, 并通过数 据管理接口发送给数据交互模块, 数据交互模块通过控件 ID调用相应界面 窗口控件的控件接口, 通过控件接口将获取的业务数据加载到相应界面窗 口控件; 或者,
当业务数据发生变动时, 数据交互模块通过业务数据管理模块提供的 数据管理接口对发生变动的数据进行更新, 通过数据交互模块自身维护的 业务数据标识和控件 ID的关联内容获取控件 ID, 通过控件 ID调用控件接 口, 将更新后的数据加载到需要刷新的界面窗口控件中。
5、 一种移动终端数据管理的方法, 其特征在于, 包括:
在配置文件中配置业务数据描述信息, 将界面窗口控件与业务数据进 行关联, 生成控件数据关联文件, 并将所述配置文件和控件数据关联文件 保存在 UI控件配置脚本文件中;
通过 UI控件配置脚本中相应的信息获取相应的接口, 并通过相应的接 口实现界面窗口控件与业务模块之间数据的交互。
6、 根据权利要求 5所述的方法, 其特征在于,
所述业务数据描述信息中包括: 业务数据类型、 业务数据标识、 接口 函数名;
所述控件数据关联文件中包括: 界面窗口控件的控件 ID和与其关联的 业务数据标识。
7、 根据权利要求 5所述的方法, 其特征在于, 所述界面窗口控件与业 务数据之间进行关联之前, 该方法还包括: 建立业务模块与数据管理模块 之间的业务数据接口, 并在配置文件中配置业务数据。
8、 根据权利要求 5至 7任一所述的方法, 其特征在于, 所述通过相应 的接口实现界面窗口控件与业务模块之间数据的交互, 具体包括:
通过控件 ID调用相应界面窗口控件的控件接口, 通过控件接口从相应 界面窗口控件中获取界面窗口数据, 从控件数据关联文件中通过控件 ID获 取到与其关联的业务数据标识, 通过业务数据标识在业务数据描述信息中 获取相应的业务数据类型、 接口函数名, 调用相应的业务模块的业务数据 接口, 通过业务数据接口将获取的界面窗口数据保存到相应的业务模块; 或者,
当用户通过指定控件 ID触发对界面窗口控件的数据加载时, 通过业务 数据接口从相应的业务模块中获取业务数据, 通过触发数据加载时指定的 控件 ID调用界面窗口控件的控件接口, 通过控件接口将获取的业务数据加 载到相应界面窗口控件; 或者,
当业务数据发生变动时, 对发生变动的数据进行更新, 通过业务数据 标识和控件 ID的关联内容获取控件 ID , 通过控件 ID调用控件接口, 将更 新后的数据加载到需要刷新的界面窗口控件中。
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201010263045.XA CN102375738B (zh) | 2010-08-25 | 2010-08-25 | 一种移动终端数据管理的装置和方法 |
| CN201010263045.X | 2010-08-25 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2012024974A1 true WO2012024974A1 (zh) | 2012-03-01 |
Family
ID=45722870
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2011/076225 Ceased WO2012024974A1 (zh) | 2010-08-25 | 2011-06-23 | 一种移动终端数据管理的装置和方法 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN102375738B (zh) |
| WO (1) | WO2012024974A1 (zh) |
Families Citing this family (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102937923B (zh) * | 2012-10-24 | 2016-04-06 | 浪潮通用软件有限公司 | 一种自动保存用户界面状态的方法 |
| CN103135905A (zh) * | 2013-01-31 | 2013-06-05 | 广东欧珀移动通信有限公司 | 一种显示界面统计信息的方法 |
| CN105677307B (zh) * | 2014-11-19 | 2019-03-01 | 上海烟草集团有限责任公司 | 一种移动终端大数据处理方法及系统 |
| CN106598556B (zh) * | 2015-10-15 | 2020-08-25 | 阿里巴巴集团控股有限公司 | 用户界面生成方法及装置 |
| CN105929838B (zh) * | 2016-05-20 | 2019-04-02 | 腾讯科技(深圳)有限公司 | 一种飞行器的飞行控制方法和移动终端以及飞行控制端 |
| CN108241501A (zh) * | 2018-01-26 | 2018-07-03 | 长春玖佰软件技术有限公司 | 一种移动客户端软件实现及更新方法 |
| CN112328224B (zh) * | 2021-01-06 | 2021-03-30 | 广州市玄武无线科技股份有限公司 | 业务接口的对接方法、装置、存储介质以及电子设备 |
Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1512403A (zh) * | 2002-12-27 | 2004-07-14 | 华为技术有限公司 | 实现维护界面系统的方法 |
| CN101685392A (zh) * | 2008-09-27 | 2010-03-31 | 盛乐信息技术(上海)有限公司 | 实现用户界面与业务逻辑分离的装置 |
| CN101699394A (zh) * | 2009-10-28 | 2010-04-28 | 金蝶软件(中国)有限公司 | 一种自动生成用户界面的方法及装置 |
Family Cites Families (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US7587484B1 (en) * | 2001-10-18 | 2009-09-08 | Microsoft Corporation | Method and system for tracking client software use |
| CN101794217B (zh) * | 2009-02-03 | 2013-06-05 | 天津书生投资有限公司 | 实现应用程序与文档库系统的扩展模块交互的方法及系统 |
-
2010
- 2010-08-25 CN CN201010263045.XA patent/CN102375738B/zh not_active Expired - Fee Related
-
2011
- 2011-06-23 WO PCT/CN2011/076225 patent/WO2012024974A1/zh not_active Ceased
Patent Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1512403A (zh) * | 2002-12-27 | 2004-07-14 | 华为技术有限公司 | 实现维护界面系统的方法 |
| CN101685392A (zh) * | 2008-09-27 | 2010-03-31 | 盛乐信息技术(上海)有限公司 | 实现用户界面与业务逻辑分离的装置 |
| CN101699394A (zh) * | 2009-10-28 | 2010-04-28 | 金蝶软件(中国)有限公司 | 一种自动生成用户界面的方法及装置 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN102375738B (zh) | 2016-03-30 |
| CN102375738A (zh) | 2012-03-14 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2012024974A1 (zh) | 一种移动终端数据管理的装置和方法 | |
| CN102377853B (zh) | 一种移动终端应用、界面窗口及业务的管理装置及方法 | |
| CN103218115B (zh) | 一种通知栏的优化显示方法及移动终端 | |
| CN102710554B (zh) | 分布式消息系统和分布式消息系统的服务状态检测方法 | |
| WO2019153549A1 (zh) | Api接口动态生成方法、装置、计算机设备及存储介质 | |
| CN102523276B (zh) | 一种管理移动宽带设备的方法、设备及系统 | |
| CN103442126A (zh) | 一种基于云服务的手机的通讯方法及系统 | |
| CN103854168A (zh) | 异构流程待办集中处理方法及处理装置 | |
| CN114282760B (zh) | 一种结合动态表单和动态流程的工作流生成方法及装置 | |
| CN102799477A (zh) | 资源访问方法及装置 | |
| CN103237050B (zh) | 智能语音交互方法和系统 | |
| CN102023862B (zh) | 一种移动终端控制方法及系统 | |
| CN101135966A (zh) | 一种基于命令行的图形界面开发方法及系统 | |
| CN103809951A (zh) | 一种基于flex技术图形化服务编排和管理装置 | |
| CN100492284C (zh) | 一种显示菜单的方法、系统及客户端 | |
| CN102014433B (zh) | 多制式移动接入集成网关设备 | |
| CN101355548A (zh) | 一种pc侧对终端数据的处理方法及系统 | |
| CN103049253B (zh) | 一种用于手机客户端开发的系统 | |
| CN102790800A (zh) | 一种移动宽带设备的业务实现方法及装置 | |
| CN102196010A (zh) | 一种终端侧应用开放接口的实现系统及方法 | |
| WO2010048815A1 (zh) | 一种开发及安装业务的网管特性的方法及系统 | |
| CN116719649A (zh) | 会话通知的提示方法、电子设备及可读存储介质 | |
| CN101005487B (zh) | 在即时通信中展示模块消息的装置及方法 | |
| CN116185348A (zh) | 一种基于h5调用原生接口的移动开放方法及系统 | |
| CN114780996A (zh) | 基于标签的权限设置方法、装置、设备及介质 |
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: 11819349 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: 11819349 Country of ref document: EP Kind code of ref document: A1 |