CN106873952B - Data processing system and method for mobile terminal webpage development and application device - Google Patents

Data processing system and method for mobile terminal webpage development and application device Download PDF

Info

Publication number
CN106873952B
CN106873952B CN201510927486.8A CN201510927486A CN106873952B CN 106873952 B CN106873952 B CN 106873952B CN 201510927486 A CN201510927486 A CN 201510927486A CN 106873952 B CN106873952 B CN 106873952B
Authority
CN
China
Prior art keywords
data
class
reading
remote
cache
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.)
Active
Application number
CN201510927486.8A
Other languages
Chinese (zh)
Other versions
CN106873952A (en
Inventor
危学艳
靳凯
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Aisino Corp
Original Assignee
Aisino Corp
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 Aisino Corp filed Critical Aisino Corp
Priority to CN201510927486.8A priority Critical patent/CN106873952B/en
Publication of CN106873952A publication Critical patent/CN106873952A/en
Application granted granted Critical
Publication of CN106873952B publication Critical patent/CN106873952B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/20Software design
    • G06F8/22Procedural

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a data processing system and method in mobile terminal webpage development and a mobile terminal application device, wherein the data processing method in the mobile terminal webpage development comprises the following steps: establishing a storage mode in an object mode based on a test script language database compatible with multiple platforms, and storing data streams, wherein the object comprises more than one data domain; and establishing a data model for packaging data based on the object, wherein the data model is added with recorded ID attributes, each data domain can be automatically converted into a specified type, and the data is rendered into a webpage. Therefore, the invention can reduce the development workload, the development difficulty and the workload in the aspect of code maintenance, and the development of the application of the mobile terminal is easier, quicker and easier to maintain.

Description

Data processing system and method for mobile terminal webpage development and application device
Technical Field
The present invention relates to the field of web page development, and in particular, to a data processing system and method in mobile-side web page development, and a mobile-side application apparatus.
Background
Along with the popularization of mobile equipment and the gradual maturity of mobile internet technology, the field of mobile application is continuously expanded, the demand of people on mobility is deeper and deeper, and the demand changes more and more quickly. For the current mobile market, the development period of a mobile application is one of the determining factors for whether the application can rapidly occupy the market.
In order to shorten the development period and reduce the working difficulty of application development on different platform devices, cross-platform middleware such as phonegap is developed aiming at different mobile devices and different development platforms, so that the working difficulty of application development on different platform devices is greatly reduced, and the code maintenance work is easier. However, the cross-platform middleware only exposes the native application to the upper layer after encapsulating the native application, and does not provide a corresponding development scheme for the application development of the web layer.
Previously, the development of cross-platform mobile web is more web development technology based on a PC browser and a running environment, and does not consider the characteristics of the mobile device, such as processing capability, storage space size, flow control and the like of a CPU of the mobile device. PC-side based web development is not fully applicable to mobile platforms. Therefore, cross-platform Mobile-side web development arises, for example, jQuery Mobile, and the like are jQuery-based Mobile-side web development libraries. However, it should be noted that these mobile-side web development libraries also have corresponding problems, such as code maintenance, large library file ratio, incomplete component development, and data stream interaction.
Therefore, the web development of the mobile terminal mainly involves two aspects of web page layout and data flow, wherein the data flow processing is mainly limited by data processing capability, storage space, traffic and the like, which is a problem to be solved by those skilled in the art.
Disclosure of Invention
In view of this, an embodiment of the present invention provides a data processing system and method for mobile-side web page development, and a mobile-side application device, which can reduce development workload, development difficulty, and workload in code maintenance, so that mobile-side application is developed more easily, faster, and easier to maintain.
Further, the data processing method in mobile terminal web page development comprises: establishing a storage mode in an object mode based on a test script language database compatible with multiple platforms, and storing data streams, wherein the object comprises more than one data domain; and establishing a data model for packaging data based on the object, wherein the data model is added with recorded ID attributes, each data domain can be automatically converted into a specified type, and the data is rendered into a webpage.
Optionally, in some embodiments, the data processing method in the mobile terminal web page development further includes: creating an instance of a data processing class DataHandler, initializing, and determining and analyzing the data model; distinguishing remote transmission and local transmission and initializing; and creating a transmission class instance according to the distinguished transmission types, and reading, updating and deleting the data.
Optionally, in some embodiments, the creating a transmission class instance according to the differentiated transmission type, and in the reading, updating, and deleting processes of the data, the data processing flow of the local transmission class includes: creating and initializing a local transmission class instance, and filling a local data source into a data set in a data processing class; when a data reading event is triggered, analyzing user configuration information, checking whether filtering, grouping, paging, sequencing and calculation aggregation are needed, and specifying a success callback method and a failure callback method; calling a reading method of a local transmission class, and transmitting the analyzed configuration information as a parameter to the reading method of the local transmission class; after the reading is successful, executing a successful callback method, and returning the read data; processing the read data by using a data analysis class, processing the data by using a query class according to the configuration information, and returning a processing result; establishing a data model for data to be updated, deleted and/or newly added, and when an update event, an event to be deleted and/or a newly added event are triggered, putting each piece of data into an array of corresponding events; if the data is automatically stored, storing the data in the corresponding array into a data set in the data processing class; if the data is not automatically stored, a synchronization method in the data processing class is required to be called to store the data in the corresponding array to the data set in the data processing class.
Optionally, in some embodiments, the data processing method in the mobile terminal web page development further includes: and establishing a cache data model, caching the remotely acquired data in a local memory, and directly reading the data in the cache by a searching method set in the cache data model when a next request is made.
Optionally, in some embodiments, the creating a transmission class instance according to the differentiated transmission types, and in the reading, updating, and deleting processes of the data, the processing procedure of the remote transmission class includes: creating and initializing a remote transmission class instance; traversing the array to determine a remote request type; detecting whether the cache configuration is true, if so, directly reading data in the cache, and otherwise, creating a cache region to store remote data; when a data reading event is triggered, analyzing request parameters, modifying local parameters into remote acceptable parameters by a parameter matching method if the remote acceptable parameters are not matched with the local parameters, and configuring the analyzed parameters into a remote request link url; configuring a success callback method and a failure callback method, and reading data in a cache; if the cache data exist, the reading is successful; if the data is not cached, sending an ajax request, and requesting remote data from a server; calling a successful callback function if the reading is successful, putting the data into a cache class, and calling a failed callback function if the reading is failed; and when a new adding, updating or deleting data event is triggered, directly sending an ajax request to the remote server.
Optionally, in some embodiments, the processing of the remote transmission class further includes: creating a remote transmission class instance and analyzing the data model; when a data reading event is triggered, analyzing user configuration information, checking whether filtering, grouping, paging, sequencing and calculating aggregation operation are needed, and specifying a success callback method and a failure callback method; calling a reading method of the remote transmission class, and transmitting the analyzed configuration information as a parameter to the reading method of the remote transmission class; in the reading method of the remote transmission class, parameters are assembled and a request is sent to a remote server; the remote server receives the request, analyzes the parameters, returns result data to the local according to the requirement, and stores the returned result data in a local memory according to the analyzed data model.
Optionally, in some embodiments, the processing procedure of the remote transmission class further includes: when a data updating event is triggered, a data record is newly built according to the data model, and the newly built data record is put into updating data until the whole data needing to be updated is traversed; appointing a success callback function and a failure callback function, analyzing user configuration information, sending an updating request to a remote server, executing the success callback function if the updating is successful, and executing the failure callback function if the updating is failed; when a newly added data event is triggered, a data record is newly created according to the data model, and the newly created data record is put into newly added data until the whole data needing to be newly added is traversed and completed; appointing a success callback function and a failure callback function, analyzing user configuration information, sending a new request to a remote server, executing the success callback function if the new request is successful, and executing the failure callback function if the new request is failed; when a data deletion event is triggered, a data record is newly created according to a data model, and the newly created data record is placed into data to be deleted until the whole data to be deleted is completely traversed; and specifying a success callback function and a failure callback function, analyzing user configuration information, sending a deletion increase request to the remote server, executing the success callback function if the deletion is successful, and executing the failure callback function if the deletion is failed.
Correspondingly, the invention also provides a data processing system in mobile terminal webpage development, which comprises: the method is compatible with a multi-platform test script language database; the data storage module is used for establishing a storage mode in an object mode and storing the data stream, wherein the object comprises more than one data domain; and the model creating module is used for creating a data model for packaging data based on the object, the data model is added with the recorded ID attribute, each data domain can be automatically converted into a specified type, and the data is rendered into a webpage.
Optionally, in some embodiments, the data processing system in the mobile-side web page development further includes: the query type module is used for performing query operation on the original data and is provided with an array object for storing a query result; the query operation comprises aggregation, grouping, paging, filtering and sorting operations; the cache module is used for establishing a cache data model, caching the remotely acquired data in a local memory and directly reading the data in the cache by a searching method set in the cache data model when requesting next time; the transmission module comprises a local transmission sub-module and a remote transmission sub-module; and the processing module is used for creating data, reading data, updating data and deleting data.
In addition, the invention also provides a mobile terminal application device, which is provided with the webpage manufactured by adopting the data processing method in the mobile terminal webpage development.
Compared with the prior art, the embodiments of the invention have the following advantages:
by adopting the technical scheme of the embodiment of the invention, cross-platform development can be realized, and the data processing method and the system in mobile terminal webpage development can provide data processing capabilities such as data query, data aggregation, data conversion, serialization and the like, so that developers can balance data processing capability, storage space limitation and flow limitation, reduce development workload and development difficulty and workload in code maintenance, and make the development of mobile terminal application easier and faster, and easy to learn and maintain. And by creating the corresponding data model, data can be conveniently rendered into the webpage and displayed in the UI component, so that the intermediate process of data processing is greatly reduced, and the webpage development is simpler.
Further features and advantages of embodiments of the present invention will be described in the detailed description which follows.
Drawings
The accompanying drawings, which are included to provide a further understanding of embodiments of the invention, are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the invention and not to limit the invention. In the drawings:
fig. 1 is a block diagram of a class relationship in mobile terminal web page development according to an embodiment of the present invention;
fig. 2 is a schematic view illustrating a query class flow in mobile terminal web page development according to an embodiment of the present invention;
fig. 3 is a schematic diagram illustrating a data transmission flow in mobile-side web page development according to an embodiment of the present invention;
fig. 4 is a schematic view of a data processing class flow in mobile-side web page development according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the features of the embodiments and examples of the present invention may be combined with each other without conflict.
Embodiments of the invention are further described below with reference to the following drawings:
the method comprises the following steps:
in order to meet the above-mentioned data stream development requirement, the present embodiment provides a data processing method in mobile terminal web page development, including the following steps:
s100: establishing a storage mode in an object mode based on a test script language database compatible with multiple platforms, and storing data streams, wherein the object comprises more than one data domain;
s200: and establishing a data model for packaging data based on the object, wherein the data model is added with the recorded ID attribute, each data domain can be automatically converted into a specified type, and the data is rendered into a webpage.
The data processing method in mobile terminal webpage development can provide data processing capabilities such as data query, data aggregation, data conversion and serialization, so that a developer can balance data processing capability, storage space limitation and flow limitation, development workload, development difficulty and workload in code maintenance are reduced, and mobile terminal application development is easier, quicker, easy to learn and easier to maintain. And by creating the corresponding data model, data can be conveniently rendered into the webpage and displayed in the UI component, so that the intermediate process of data processing is greatly reduced, and the webpage development is simpler.
In an optional embodiment, the data processing method in the mobile terminal web page development may further include the following steps:
s300: creating an instance of a data processing class DataHandler, initializing, and determining and analyzing a data model; distinguishing remote transmission and local transmission and initializing; and creating a transmission class instance according to the distinguished transmission types, and reading, updating and deleting the data. Wherein the transmission type comprises remote transmission and local transmission;
in the above embodiment S300, in the process of creating the transmission class instance according to the differentiated transmission type, and reading, updating, and deleting the data, the data processing flow of the local transmission class further includes:
1. creating and initializing a local transmission class instance, and filling a local data source into a data set in a data processing class;
2. when a data reading event is triggered, analyzing user configuration information, checking whether filtering, grouping, paging, sequencing and calculation aggregation are needed, and specifying a success callback method and a failure callback method; calling a reading method of the local transmission class, and transmitting the analyzed configuration information as a parameter to the reading method of the local transmission class; after the reading is successful, executing a successful callback method, and returning the read data; processing the read data by using a data analysis class, processing the data by using a query class according to the configuration information, and returning a processing result;
3. establishing a data model for data to be updated, deleted and/or newly added, and when an update event, an event to be deleted and/or a newly added event are triggered, putting each piece of data into an array of corresponding events; if the data is automatically stored, storing the data in the corresponding array into a data set in the data processing class; if the data is not automatically stored, a synchronization method in the data processing class is required to be called to store the data in the corresponding array into the data set in the data processing class.
In an optional embodiment, the data processing method in the mobile terminal web page development may further include the following steps:
s400: and establishing a cache data model, caching the remotely acquired data in a local memory, and directly reading the data in the cache by a searching method set in the cache data model when a next request is made.
As an optional implementation manner, in the foregoing embodiment, in the process of creating the transmission class instance according to the differentiated transmission types, and reading, updating, and deleting the data, the processing flow of the remote transmission class includes the following steps:
1. creating and initializing a remote transmission class instance, and analyzing a data model; traversing the array to determine a remote request type; detecting whether the cache configuration is true, if so, directly reading data in the cache, and otherwise, creating a cache region to store remote data;
2. when a data reading event is triggered, analyzing request parameters, modifying local parameters into remote acceptable parameters by a parameter matching method if the remote acceptable parameters are not matched with the local parameters, and configuring the analyzed parameters into a remote request link url;
3. configuring a success callback method and a failure callback method, and reading data in a cache; if the cache data exist, the reading is successful; if the data is not cached, sending an ajax request, and requesting remote data from a server; calling a successful callback function if the reading is successful, putting the data into a cache class, and calling a failed callback function if the reading is failed;
4. and when a new adding, updating or deleting data event is triggered, directly sending an ajax request to the remote server.
It should be noted that, the processing method of the read, update, add, delete events in the processing process of the remote transmission class includes:
1) read data event
When a data reading event is triggered, analyzing user configuration information, checking whether filtering, grouping, paging, sequencing and calculating aggregation operation are needed, and specifying a success callback method and a failure callback method; calling a reading method of the remote transmission class, and transmitting the analyzed configuration information as a parameter to the reading method of the remote transmission class; in the reading method of the remote transmission class, parameters are assembled and a request is sent to a remote server; the remote server receives the request, analyzes the parameters, returns result data to the local according to the requirement, and stores the returned result data in a local memory according to the analyzed data model.
2) Updating data events
When a data updating event is triggered, a data record is newly built according to the data model, and the newly built data record is put into updating data until the whole data needing to be updated is traversed; appointing a success callback function and a failure callback function, analyzing user configuration information, sending an updating request to a remote server, executing the success callback function if the updating is successful, and executing the failure callback function if the updating is failed;
3) adding data events
When a newly added data event is triggered, a data record is newly created according to the data model, and the newly created data record is put into newly added data until the whole data needing to be newly added is traversed and completed; appointing a success callback function and a failure callback function, analyzing user configuration information, sending a new request to a remote server, executing the success callback function if the new request is successful, and executing the failure callback function if the new request is failed;
4) deleting data events
When a data deletion event is triggered, a data record is newly created according to a data model, and the newly created data record is placed into data to be deleted until the whole data to be deleted is completely traversed; and specifying a success callback function and a failure callback function, analyzing user configuration information, sending a deletion increase request to the remote server, executing the success callback function if the deletion is successful, and executing the failure callback function if the deletion is failed.
The following will illustrate the processing procedures of the data processing method in the mobile terminal web page development with reference to fig. 1 to 4:
referring to fig. 1, it is a schematic diagram of class relationship in mobile terminal web page development. The data processing method applied to the mobile terminal web development mainly includes a data storage mode, a data query process, a data cache mode, a data transmission process, a data processing process and the like.
Relating to data storage objects
The data is stored in an object mode, one or more data domains can be contained in the object, and a set method, a get method, a serialization method, a traversal method, a toJSON method and a wrap method are defined in the storage object aiming at the operation of each data domain. In order to facilitate the automatic processing of the data and reduce the workload of developers, the data model is packaged on the basis of the object. The data model inherits the self-storage object, and the ID attribute of the record is increased; a _ part private method, if the type of the specified data field is number, date, coolean or string, automatically converting each data field into the specified type; a notifyChange private method, a processing method when data is added or deleted.
Second, data query process
Referring to fig. 2, it is a schematic view of a query class flow in mobile terminal web page development. The query operation provided by the query class does not change the original data, and only the query operation is carried out on the original data. The query class itself maintains an array object for storing query results. The operations provided by the query class are:
1) polymerization (aggregate): calculating an aggregation result according to the data field and the aggregation type (average, count, max, min and sum) designated by the user,
2) Grouping (group): grouping according to user-specified data fields,
3) Paging (page): paging according to the page and page size designated by the user,
4) Filtration (filter): filtering according to a data domain, a filtering condition or a regular expression specified by a user;
5) sort (sort): sorting according to a data field and a sorting method specified by a user, and sorting into ascending sorting and descending sorting.
Wherein, the aggregation operation needs to traverse the entire data set dataSet, and perform "average", "count", "max", "min" or "sum" calculation on the specified data field, and finally return the aggregation result.
Further, the grouping, paging, filtering, and sorting processes are as follows:
s1: creating a new query class example and initializing;
s2: if the user designates the filtering operation, filtering the data set dataSet first, and returning a filtering result set; if no filtering operation is specified, no operation is performed;
s3: if the user designates the sorting operation, sorting the result set of the step S2, and returning the sorted result set; if no ordering operation is specified, no operation is performed;
s4, if the user designates the paging operation, paging the result set of the step S3 and returning the paging result; if the paging operation is not specified, no operation is performed;
s5, if the grouping operation is specified by the user, grouping the result set of the step S4 and returning the grouping result; if no grouping operation is specified, no operation is performed;
s6: and returning a query result and finishing the query.
Third, about the data buffer mode
The cache class is an auxiliary class and is used for caching the remotely acquired data in a local memory, and the data in the cache can be directly read by a find method in the cache class when the data are requested next time, so that the data traffic interacting with the server is reduced. The server data can also be acquired each time by canceling the cache.
Fourth, about the data transmission procedure
Referring to fig. 3, a schematic diagram of a data transmission class flow in mobile terminal web page development is shown. The transmission classes are divided into a local transmission class and a remote transmission class, and both comprise new data, read data, update data and delete data. The data format that can be used for transmission is json, xml, object, etc., and the data format can be specified by dataType.
Class of local transmission
The local transmission type is the operation of local data, does not need to interact with a remote server, has relatively simple processing flow, does not interact with the remote server, does not need to consider the problems of data source caching and the like. The treatment process comprises the following steps:
s1: initializing a local transmission class, and directly assigning original data to data in the local transmission class;
s2: when reading data, calling read to read data in the local transmission class instance;
s4: when data is newly added, a new piece of data can be added into the data set by both the add method and the insert method, and the new piece of data is stored by using a data model.
S3: and when the data is updated, calling an update method to update the data. When data updating is carried out, the updated data is cached, and then when a sync method is called, the updated data is replaced into the corresponding data Model in the DataSet. A batch boolean variable is defined to set whether batch processing is required. When a plurality of pieces of data are updated, batch = false can be set, one piece of data is updated each time until all the data to be updated are updated, and batch = true can be set, batch processing is selected, and all the data to be updated are updated at one time;
s5: when the data is deleted, a remove method is called to delete the data, and the processing process of deleting the data is similar to that of updating the data.
(II) remote transmission class
The remote transmission class is a process for the data transmission problem in a remote server and mainly comprises the following contents:
s1: initializing a remote transmission class;
s2: traversing the array loud = [ CREATE, READ, UPDATE, REMOVE ], determining the remote request type;
s3: and detecting whether the cache configuration is true. If yes, directly reading the data in the cache; if not, a buffer area is created so as to store the remote data;
s4: and resolving the request parameter, and if the remote accepted parameter is not matched with the local parameter, modifying the local parameter into the remote accepted parameter by using a parameter matching method parameter map. Configuring the analyzed parameters into a remote request link url;
s5: when data is read, firstly, a success callback method and a failure callback method are configured, and then the data in the cache is read. If the cache data exist, the reading is successful; if the data is not cached, an ajax request is sent, remote data is requested, a callback function is successfully called after reading, the data is placed into a cache class, a callback function is failed to be called after reading, subsequent processing of failure is read, and a user can define according to requirements;
s6: when data is newly added, an ajax request is directly sent to a remote server;
s7: when data is updated, an ajax request is directly sent to a remote server;
s8: and when the data is deleted, directly sending an ajax request to the remote server.
Fifth, data processing flow
Fig. 4 is a schematic diagram illustrating a data processing class flow in mobile-side web page development. The workflow of the data processing class DataHandler mainly comprises the following steps: firstly, an instance of a data processing class DataHandler is created and initialized, and the initialization work comprises the following steps: initializing a data parsing class DataParser; determining and analyzing a data Model, distinguishing remote transmission from local transmission, initializing and the like,
in the case of local transmission, the workflow of the data processing class is as follows:
s1: creating a local transmission class instance, and filling a local data source into a data set dataSet in a data processing class DataHandler;
s2: and reading the data. In this step, the process of reading data may include the following steps:
s21: analyzing the user configuration information, and checking whether operations such as filtering, grouping, paging, sequencing, calculating and aggregating are needed or not;
s22: specifying a successful callback method and a failed callback method;
s23: calling a read method of the local transmission class, and transmitting the analyzed configuration information as a parameter to the read method of the local transmission class;
s24: successfully reading, executing the successful callback method, and returning the read data
S25: processing the read data by using a data parsing class DataParser
S26: and processing the data by using the query class according to the configuration information, and returning a processing result.
S3: and updating the data. In this step, the process of updating data may include the following steps:
s31: newly-built data Model for data to be updated
S32: and triggering an updating event, and putting each piece of data into an updating array.
S33: if the data is automatically saved, the data in the updated array is saved to a data set dataSet in the dataHandler; if the data set is not automatically saved, the sync method in the DataHandler needs to be called to save the data in the update array to the data set dataSet in the DataHandler.
S4: and adding new data. The newly added data is similar to the updated data;
s5: and deleting the data. The deletion data is similar to the update data.
In the case of remote transmission, the workflow of data processing is as follows:
s1: creating a remote transmission example, and analyzing a data Model;
s2: and reading the data. The working process is as follows:
s21: analyzing the user configuration information, and checking whether operations such as filtering, grouping, paging, sequencing, calculating and aggregating are needed or not;
s22: specifying a successful callback method and a failed callback method;
s23: calling a read method of a remote transmission class, and transmitting the analyzed configuration information as a parameter to the read method of the remote transmission class;
s24: in the remote transmission type read method, parameters are assembled, and a request is sent to a remote server;
s25: the remote server receives the request, analyzes the parameters and returns the result to the local according to the requirement;
s26: storing the returned data in a memory according to the data model analyzed in the step S1;
s3: and updating the data. The working process comprises the following steps:
s31: creating a data record according to the data Model;
s32: putting the newly-built data record into the updating data;
s33: repeating the steps S31 and S32 until the traversal is completed for the whole data needing to be updated;
s34: specifying successful callback functions and failed callback functions
S35: and analyzing the user configuration information, sending an updating request to the remote server, executing a successful callback function if the updating is successful, and executing a failed callback function if the updating is failed.
S4: and adding new data. The workflow and update data are similar.
S5: and deleting the data. The workflow and update data are similar.
Here, for ease of understanding, a paging operation is taken as an example, and read data is requested from a remote server. First, request information configured in a data processing class DataHandler by a user is required, wherein the request information includes a server address url, a serverPage, a request page number page, a record number per page pageSize, and a data type dataType. Calling a read method in the DataHandler; and resolving the configuration information and adding the resolved serverPage, page and page size in the url in a parameter form. If the number of records per page parameter that the server can recognize is pageNumber, instead of pageSize, the pageSize needs to be converted into pageNumber by parameterMap and then packaged into url in a parameter form. After the remote transmission class encapsulates the parameters, sending an ajax request to the server, after receiving the request, the server firstly analyzes a request page number page and the number of records of each page, then records the number of pages according to the analyzed page number page, processes server data, converts the processed data into a data format specified by a dataType, and returns the data to a data processing class DataHandler; the data processing class DataHandler caches the returned data locally according to the data Model.
According to the embodiments, the data processing method in mobile terminal webpage development is realized based on jQuery, cross-platform development can be realized, data processing capabilities such as data query, data aggregation, data conversion and serialization are provided, and mobile terminal web development and PC terminal web development are simple and rapid and are easy to learn; the method can balance data processing capacity, storage space limitation and flow limitation in the development process, reduce development workload and development difficulty and workload in code maintenance, and enable development of the mobile terminal application to be easier, quicker and easier to maintain.
Further, the data processing method in the mobile terminal webpage development provides remote interaction capability, for example, under the condition of remote transmission, the application development and maintenance workload is greatly reduced by adopting the package of ajax request, so that when the method interacts with the remote terminal, a large amount of javascript codes are not required to be written, the written javascript codes are reduced, and the required remote data can be obtained only by simply configuring the address of the service, the transmitted parameters and the specific request.
In addition, the data processing method in the mobile terminal webpage development encapsulates the data processing function, a user can list the data field desired by the user and the data type of the data field according to the requirement, the data processing class can be converted into the format required by the user and returned to the user, the workload of a developer is greatly reduced, the code maintenance work is reduced, and the application is simpler.
Particularly, the data processing method in mobile terminal webpage development provides a data model, data in the data model can be conveniently rendered into a webpage and displayed in a UI component, intermediate processes of data processing are greatly reduced, and webpage development is simpler.
It should be noted that the foregoing method embodiments are described as a series of acts or combinations for simplicity in explanation, but it should be understood by those skilled in the art that the present invention is not limited by the order of acts or acts described, as some steps may occur in other orders or concurrently in accordance with the invention. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred and that no particular act is required to implement the invention.
Product example:
example one
Correspondingly, an embodiment of the present invention further provides a data processing system in mobile terminal web page development, where the system includes the following components:
1) the method is compatible with a multi-platform test script language database;
2) the data storage module is used for establishing a storage mode in an object mode and storing the data stream, wherein the object comprises more than one data domain;
3) and the model creating module is used for creating a data model for packaging data based on the object, the data model is added with the recorded ID attribute, each data domain can be automatically converted into a specified type, and the data is rendered into a webpage.
In an optional embodiment, the data processing system in the mobile-side web page development may further include:
4) the query type module is used for performing query operation on the original data and is provided with an array object for storing a query result; the query operation comprises aggregation, grouping, paging, filtering and sorting operations;
5) the cache module is used for establishing a cache data model, caching the remotely acquired data in a local memory and directly reading the data in the cache by a searching method set in the cache data model when requesting next time;
6) the transmission module comprises a local transmission sub-module and a remote transmission sub-module;
7) and the processing module is used for creating data, reading data, updating data and deleting data.
Wherein, the processing module can further comprise:
the creating unit is used for creating and initializing the remote transmission class instance;
the detection unit is used for traversing the array to determine the type of the remote request, detecting whether the cache configuration is true, if so, directly reading data in the cache, and otherwise, creating a cache region to store the remote data;
the reading unit is used for analyzing the request parameters when triggering a data reading event, modifying the local parameters into remote acceptable parameters through a parameter matching method if the remote acceptable parameters are not matched with the local parameters, and configuring the analyzed parameters into a remote request link url; configuring a success callback method and a failure callback method, and reading data in a cache; if the cache data exist, the reading is successful; if the data is not cached, sending an ajax request, and requesting remote data from a server; calling a successful callback function if the reading is successful, putting the data into a cache class, and calling a failed callback function if the reading is failed;
the newly-added unit is used for newly-creating a data record according to the data model, and putting the newly-created data record into newly-added data until the whole data needing to be newly added is traversed; the remote server is used for appointing a success callback function and a failure callback function, analyzing user configuration information and sending a new request to the remote server, wherein the success callback function is executed if the new request is successfully added, and the failure callback function is executed if the new request is failed;
the updating unit is used for creating a data record according to the data model and putting the created data record into the updating data until the whole data needing to be updated is traversed; the remote server is used for appointing a success callback function and a failure callback function, analyzing user configuration information and sending an updating request to the remote server, wherein the success callback function is executed if the updating is successful, and the failure callback function is executed if the updating is failed;
the deleting unit is used for creating a data record according to the data model and placing the created data record into the data to be deleted until the data to be deleted is completely traversed; and the system is used for appointing a success callback function and a failure callback function, analyzing the user configuration information, sending a deletion increase request to the remote server, executing the success callback function if the deletion is successful, and executing the failure callback function if the deletion is failed.
Since the system embodiment corresponds to the data processing method embodiment in the mobile-side web page development, and the data processing method in the mobile-side web page development has the advantages, the data processing system in the mobile-side web page development also has the advantages, and details are not described herein.
Example two
The embodiment of the invention also provides a mobile terminal application device, which is provided with the webpage manufactured by adopting any data processing method in the mobile terminal webpage development. Since the data processing method in any mobile-side web page development has the above advantages, the web page obtained by the data processing method in the mobile-side web page development and the mobile-side application device provided with the web page also have the above advantages, and details are not described here.
It is obvious to those skilled in the art that the modules of the data processing system in mobile-side web page development or the steps of the data processing method in mobile-side web page development of the present invention described above can be implemented by a general-purpose computing device, they can be centralized on a single computing device or distributed on a network formed by a plurality of computing devices, alternatively, they can be implemented by program codes executable by the computing devices, so that they can be stored in a storage device and executed by the computing devices, or they can be respectively made into integrated circuit modules, or a plurality of modules or steps therein can be made into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software. The storage device is a nonvolatile memory, such as: ROM/RAM, flash memory, magnetic disk, optical disk, etc.
The present invention is not limited to the above embodiments, and any modifications, equivalent substitutions, improvements, etc. within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (7)

1. A data processing method in mobile terminal webpage development is characterized by comprising the following steps:
establishing a storage mode in an object mode based on a test script language database compatible with multiple platforms, and storing data streams, wherein the object comprises more than one data domain;
establishing a data model for encapsulating data based on the object, establishing an instance of a data processing class DataHandler, initializing, determining and analyzing the data model; distinguishing remote transmission and local transmission and initializing; creating a transmission class instance according to the distinguished transmission types, and reading, updating and deleting the data, wherein the data processing flow of the local transmission class comprises the following steps: creating and initializing a local transmission class instance, and filling a local data source into a data set in a data processing class; when a data reading event is triggered, analyzing user configuration information, checking whether filtering, grouping, paging, sequencing and calculation aggregation are needed, and specifying a success callback method and a failure callback method; calling a reading method of a local transmission class, and transmitting the analyzed configuration information as a parameter to the reading method of the local transmission class; after the reading is successful, executing a successful callback method, and returning the read data; processing the read data by using a data analysis class, processing the data by using a query class according to the configuration information, and returning a processing result; establishing a data model for data to be updated, deleted and/or newly added, and when an update event, an event to be deleted and/or a newly added event are triggered, putting each piece of data into an array of corresponding events; if the data is automatically stored, storing the data in the corresponding array into a data set in the data processing class; if the data is not automatically stored, a synchronization method in the data processing class is required to be called to store the data in the corresponding array to a data set in the data processing class; the data model is added with the recorded ID attribute, each data domain can be automatically converted into a specified type, and data are rendered into a webpage.
2. The data processing method in mobile web development according to claim 1, further comprising:
and establishing a cache data model, caching the remotely acquired data in a local memory, and directly reading the data in the cache by a searching method set in the cache data model when a next request is made.
3. The data processing method in mobile-side web page development according to claim 2, wherein the processing procedure of the remote transport class in the creating of the transport class instance according to the differentiated transport type, reading, updating and deleting the data comprises:
creating and initializing a remote transmission class instance;
traversing the array to determine a remote request type;
detecting whether the cache configuration is true, if so, directly reading data in the cache, and otherwise, creating a cache region to store remote data;
when a data reading event is triggered, analyzing request parameters, modifying local parameters into remote acceptable parameters by a parameter matching method if the remote acceptable parameters are not matched with the local parameters, and configuring the analyzed parameters into a remote request link url;
configuring a success callback method and a failure callback method, and reading data in a cache; if the cache data exist, the reading is successful; if the data is not cached, sending an ajax request, and requesting remote data from a server; calling a successful callback function if the reading is successful, putting the data into a cache class, and calling a failed callback function if the reading is failed;
and when a new adding, updating or deleting data event is triggered, directly sending an ajax request to the remote server.
4. The data processing method in mobile-side web page development according to claim 3, wherein the processing procedure of the remote transmission class further comprises:
creating a remote transmission class instance and analyzing the data model;
when a data reading event is triggered, analyzing user configuration information, checking whether filtering, grouping, paging, sequencing and calculating aggregation operation are needed, and specifying a success callback method and a failure callback method; calling a reading method of the remote transmission class, and transmitting the analyzed configuration information as a parameter to the reading method of the remote transmission class; in the reading method of the remote transmission class, parameters are assembled and a request is sent to a remote server; the remote server receives the request, analyzes the parameters, returns result data to the local according to the requirement, and stores the returned result data in a local memory according to the analyzed data model.
5. The data processing method in mobile-side web page development according to claim 4, wherein the processing procedure of the remote transmission class further comprises:
when a data updating event is triggered, a data record is newly built according to the data model, and the newly built data record is put into updating data until the whole data needing to be updated is traversed; appointing a success callback function and a failure callback function, analyzing user configuration information, sending an updating request to a remote server, executing the success callback function if the updating is successful, and executing the failure callback function if the updating is failed;
when a newly added data event is triggered, a data record is newly created according to the data model, and the newly created data record is put into newly added data until the whole data needing to be newly added is traversed and completed; appointing a success callback function and a failure callback function, analyzing user configuration information, sending a new request to a remote server, executing the success callback function if the new request is successful, and executing the failure callback function if the new request is failed;
when a data deletion event is triggered, a data record is newly created according to a data model, and the newly created data record is placed into data to be deleted until the whole data to be deleted is completely traversed; and specifying a success callback function and a failure callback function, analyzing user configuration information, sending a deletion increase request to the remote server, executing the success callback function if the deletion is successful, and executing the failure callback function if the deletion is failed.
6. A data processing system in mobile terminal web page development is characterized by comprising:
the method is compatible with a multi-platform test script language database;
the data storage module is used for establishing a storage mode in an object mode and storing the data stream, wherein the object comprises more than one data domain;
the creation model module is used for creating a data model for packaging data based on the object, the data model is added with recorded ID attributes, each data domain can be automatically converted into an appointed type, and the data is rendered into a webpage;
the query type module is used for performing query operation on the original data and is provided with an array object for storing a query result; the query operation comprises aggregation, grouping, paging, filtering and sorting operations;
the cache module is used for establishing a cache data model, caching the remotely acquired data in a local memory and directly reading the data in the cache by a searching method set in the cache data model when requesting next time;
the transmission module comprises a local transmission sub-module and a remote transmission sub-module;
and the processing module is used for creating data, reading data, updating data and deleting data.
7. A mobile-side application device provided with a web page created by the data processing method for mobile-side web page development according to any one of claims 1 to 5.
CN201510927486.8A 2015-12-14 2015-12-14 Data processing system and method for mobile terminal webpage development and application device Active CN106873952B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510927486.8A CN106873952B (en) 2015-12-14 2015-12-14 Data processing system and method for mobile terminal webpage development and application device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510927486.8A CN106873952B (en) 2015-12-14 2015-12-14 Data processing system and method for mobile terminal webpage development and application device

Publications (2)

Publication Number Publication Date
CN106873952A CN106873952A (en) 2017-06-20
CN106873952B true CN106873952B (en) 2021-07-20

Family

ID=59178615

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510927486.8A Active CN106873952B (en) 2015-12-14 2015-12-14 Data processing system and method for mobile terminal webpage development and application device

Country Status (1)

Country Link
CN (1) CN106873952B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107450912B (en) * 2017-07-07 2021-01-29 北京小米移动软件有限公司 Page layout method, device and terminal
CN107562469B (en) * 2017-08-08 2021-02-02 武汉斗鱼网络科技有限公司 Title bar data display method and system
CN107967369B (en) * 2017-12-29 2021-07-23 北京酷我科技有限公司 Method for converting data in cache into array structure
CN109726026B (en) * 2018-12-29 2021-03-19 北京字节跳动网络技术有限公司 Interactive data processing method, device, equipment and storage medium
CN110413278A (en) * 2019-06-27 2019-11-05 平安科技(深圳)有限公司 The method, apparatus and storage medium, computer equipment of paging display record number
CN110930706A (en) * 2019-11-30 2020-03-27 航天科技控股集团股份有限公司 Rapid directional distribution system for vehicle real-time data
CN116506428B (en) * 2023-06-20 2023-09-08 成都博点科技有限公司 Data off-line uploading method and device based on kotlen

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1499364A (en) * 2002-11-05 2004-05-26 深圳市中兴通讯股份有限公司 Automatic method for converting graphic display
CN101364236A (en) * 2008-09-18 2009-02-11 中兴通讯股份有限公司 Data processing apparatus and processing method of WEB page
CN102955854A (en) * 2012-11-06 2013-03-06 北京中娱在线网络科技有限公司 Webpage presenting method and device based on HTML5 (Hypertext Markup Language 5) protocol
CN103645951A (en) * 2013-12-19 2014-03-19 北京邮电大学 Cross-platform mobile data management system and method
CN103761136A (en) * 2014-02-25 2014-04-30 上海斐讯数据通信技术有限公司 Method for dynamically loading data model based on plug-in
CN105139053A (en) * 2015-10-15 2015-12-09 江苏本能科技有限公司 Radio frequency identification reader-writer interface protocol debugging device and method

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1499364A (en) * 2002-11-05 2004-05-26 深圳市中兴通讯股份有限公司 Automatic method for converting graphic display
CN101364236A (en) * 2008-09-18 2009-02-11 中兴通讯股份有限公司 Data processing apparatus and processing method of WEB page
CN102955854A (en) * 2012-11-06 2013-03-06 北京中娱在线网络科技有限公司 Webpage presenting method and device based on HTML5 (Hypertext Markup Language 5) protocol
CN103645951A (en) * 2013-12-19 2014-03-19 北京邮电大学 Cross-platform mobile data management system and method
CN103761136A (en) * 2014-02-25 2014-04-30 上海斐讯数据通信技术有限公司 Method for dynamically loading data model based on plug-in
CN105139053A (en) * 2015-10-15 2015-12-09 江苏本能科技有限公司 Radio frequency identification reader-writer interface protocol debugging device and method

Also Published As

Publication number Publication date
CN106873952A (en) 2017-06-20

Similar Documents

Publication Publication Date Title
CN106873952B (en) Data processing system and method for mobile terminal webpage development and application device
US10048946B2 (en) Converting visual diagrams into code
KR101665152B1 (en) Extending collaboration capabilities to external data
CN111666526A (en) Page generation method, device, equipment and storage medium
CN103645951A (en) Cross-platform mobile data management system and method
CN105760419A (en) Method And Systme For Join Processing
CN112199086A (en) Automatic programming control system, method, device, electronic device and storage medium
CN106354483B (en) Data processing method and device and electronic equipment
CN114116065B (en) Method and device for acquiring topological graph data object and electronic equipment
CN106372130A (en) Static resource management method
CN104407901A (en) Code adding method and device
WO2023065746A1 (en) Algorithm application element generation method and apparatus, electronic device, computer program product and computer readable storage medium
CN111722873A (en) Code reconstruction method, device, equipment and medium
CN115599386A (en) Code generation method, device, equipment and storage medium
CN113568604B (en) Method and device for updating wind control strategy and computer readable storage medium
CN107391528A (en) Front end assemblies Dependency Specification searching method and equipment
CN107679168B (en) Target website content acquisition method based on java platform
CN107688650A (en) A kind of web page generation method and device
US11977473B2 (en) Providing a pseudo language for manipulating complex variables of an orchestration flow
CN115794858A (en) Query statement processing method, device, equipment and storage medium
CN115794214A (en) Application module metadata management method, device, storage medium and device
CN111367500A (en) Data processing method and device
CN113098961B (en) Component uploading method, device and system, computer equipment and readable storage medium
CN110781430B (en) Novel virtual data center system of internet and construction method thereof
CN114489673A (en) Method and device for deleting invalid codes in application program

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant