CN113504896B - Service data processing method and device of application program and mobile terminal - Google Patents

Service data processing method and device of application program and mobile terminal Download PDF

Info

Publication number
CN113504896B
CN113504896B CN202110783987.9A CN202110783987A CN113504896B CN 113504896 B CN113504896 B CN 113504896B CN 202110783987 A CN202110783987 A CN 202110783987A CN 113504896 B CN113504896 B CN 113504896B
Authority
CN
China
Prior art keywords
data
service
application program
service data
converter
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
CN202110783987.9A
Other languages
Chinese (zh)
Other versions
CN113504896A (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.)
Yunnan Tengyun Information Industry Co ltd
Original Assignee
Yunnan Tengyun Information Industry Co ltd
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 Yunnan Tengyun Information Industry Co ltd filed Critical Yunnan Tengyun Information Industry Co ltd
Priority to CN202110783987.9A priority Critical patent/CN113504896B/en
Publication of CN113504896A publication Critical patent/CN113504896A/en
Application granted granted Critical
Publication of CN113504896B publication Critical patent/CN113504896B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • G06F16/252Integrating or interfacing systems involving database management systems between a Database Management System and a front-end application
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/248Presentation of query results
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • G06F16/258Data format conversion from or to a database
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/36Software reuse
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The embodiment of the application discloses a service data processing method and device of an application program and a mobile terminal, wherein the method comprises the following steps: acquiring service data from a server through an application program interface; performing data conversion on the service data through a converter according to a data mapping relation, and obtaining primary data, wherein the data mapping relation is a corresponding relation between a data format of the service data and a data format of the primary data; and rendering the service view according to the native data. The application program interface and the service view are mutually independent, the service data acquired by the application program interface only needs to be subjected to data conversion once by utilizing the converter, the original data which can be used for generating the service view is acquired, and the low coupling and the high multiplexing are realized in operation. The Model layer is not used any more, the entity class is not required to be created to represent the data, but the original data is adopted, so that the problems of strong business invasiveness and high maintenance cost are avoided.

Description

Service data processing method and device of application program and mobile terminal
Technical Field
The present application relates to the field of computer software development, and in particular, to a method and an apparatus for processing service data of an application program, and a mobile terminal.
Background
In the process of developing mobile terminal software, a situation that one set of service corresponds to a plurality of application program interfaces (Application Programming Interface, API) or a situation that a plurality of sets of services correspond to one API is frequently encountered, but development redundancy, high coupling of programs and low efficiency are still problems which are difficult to solve. There are some problems in the existing application development schemes:
1) Different working layers are divided in the development process of the application program: the API layer, the Model layer and the View layer bind different working layers, so that the coupling performance is high and the multiplexing performance is low;
2) In the process of transmitting JSON data issued by an API layer to a Model layer, the data conversion process consumes resources and has high conversion cost;
3) The Model layer has the problem of strong invasiveness, which results in high maintenance cost.
Disclosure of Invention
Aiming at the defects in the prior art, the application provides a service data processing method and device of an application program and a mobile terminal. High reusability and low coupling are realized, maintenance cost is reduced, and service development efficiency is improved.
In a first aspect, the present application provides a service data processing method of an application program, the method including:
acquiring service data from a server through an application program interface;
performing data conversion on the service data through a converter according to a data mapping relation, and obtaining primary data, wherein the data mapping relation is a corresponding relation between a data format of the service data and a data format of the primary data;
and rendering the service view according to the native data.
Preferably, the obtaining, through the application program interface, service data from the server includes:
acquiring a set of business data from a server through an application program interface;
performing data conversion on the service data by a converter according to a data mapping relation to obtain primary data, including:
respectively inputting a group of service data into at least two converters, and respectively converting the received service data by each converter to obtain at least two corresponding groups of original data;
the rendering of the service view according to the native data comprises:
and rendering the corresponding service views according to the original data of each group.
Preferably, the obtaining, through the application program interface, service data from the server includes:
acquiring a group of service data from a server through at least two application program interfaces respectively, wherein the contents of different groups of service data are different;
performing data conversion on the service data by a converter according to a data mapping relation to obtain primary data, including:
respectively inputting each group of service data into a corresponding converter, respectively carrying out data conversion on the received service data through each converter, and respectively obtaining a corresponding group of original data, wherein the data formats of each group of original data are the same;
the rendering of the service view according to the native data comprises:
and rendering a service view according to the obtained at least two groups of native data with the same format.
Preferably, the data conversion is performed on the service data by a converter according to a data mapping relationship, so as to obtain native data, including:
and inputting the service data into the converter, and converting the service data into original data according to a data mapping relation by the converter, wherein the data format of the service data is a JSON data format, and the format of the original data is a dictionary data format.
Preferably, the method further comprises: when the service data acquired by the application program interface changes, the data mapping relation is adjusted according to the changed service data, and an adjusted data mapping relation is obtained;
and converting the changed business data into the original data according to the adjusted data mapping relation by a converter.
Preferably, the data conversion is performed on the service data by a converter according to a data mapping relationship, so as to obtain native data, including:
determining keywords in the service data according to the data mapping relation;
writing the character string statement of the key word into a header file;
and converting the business data into the original data according to the header file.
Preferably, the rendering the service view according to the native data includes:
acquiring a value of a keyword in the primary data;
and rendering the service view according to the value of the keyword.
In a second aspect, an embodiment of the present application provides a service data processing apparatus for an application, the apparatus including:
the acquisition module is used for acquiring service data from the server through the application program interface;
the conversion module is used for carrying out data conversion on the service data through a converter according to a data mapping relation, so as to obtain the original data, wherein the data mapping relation is a corresponding relation between a data format of the service data and a data format of the original data;
and the generation module is used for rendering the service view according to the primary data.
In a third aspect, an embodiment of the present application provides a mobile terminal, where the mobile terminal includes a memory and a processor, where the memory stores a computer program, and where the computer program executes a service data processing method of any one of the application programs described above when running on the processor.
In a fourth aspect, an embodiment of the present application provides a computer readable storage medium storing a computer program, where the computer program when run on a processor performs a service data processing method of any one of the above application programs.
The application provides a service data processing method of an application program, which comprises the following steps: acquiring service data from a server through an application program interface; performing data conversion on the service data through a converter according to a data mapping relation, and obtaining primary data, wherein the data mapping relation is a corresponding relation between a data format of the service data and a data format of the primary data; and rendering the service view according to the native data. The application program interface and the service view are mutually independent, the service data acquired by the application program interface only needs to be subjected to data conversion once by utilizing the converter, so that the original data which can be used for rendering the service view is acquired, and the low coupling and the high multiplexing are realized in operation. The Model layer is not used any more, the entity class is not required to be created to represent the data, but the original data is adopted, so that the problems of strong business invasiveness and high maintenance cost are avoided.
Drawings
In order to more clearly illustrate the technical solutions of the present application, the drawings that are required for the embodiments will be briefly described, it being understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope of the present application. Like elements are numbered alike in the various figures.
FIG. 1 is a flow chart of a business data processing method of an application program;
FIG. 2 is a schematic diagram showing a conversion relation of a business data processing method of an application program;
FIG. 3 is a schematic diagram showing a conversion relation of a business data processing method of an application program;
FIG. 4 is a diagram showing an example of coding of a service data processing procedure when service data is initiated;
FIG. 5 is a diagram showing an example transcoding of a business data processing method of an application;
FIG. 6 is a diagram showing an example transcoding of a business data processing method of an application;
FIG. 7 illustrates a business view generation code example diagram of a business data processing method of an application;
FIG. 8 is a schematic diagram showing the results of a business data processing method operation test of an application;
fig. 9 shows a block diagram of a service data processing device of an application program.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments.
The components of the embodiments of the present application generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the application, as presented in the figures, is not intended to limit the scope of the application, as claimed, but is merely representative of selected embodiments of the application. All other embodiments, which can be made by a person skilled in the art without making any inventive effort, are intended to be within the scope of the present application.
The terms "comprises," "comprising," "including," or any other variation thereof, are intended to cover a specific feature, number, step, operation, element, component, or combination of the foregoing, which may be used in various embodiments of the present application, and are not intended to first exclude the presence of or increase the likelihood of one or more other features, numbers, steps, operations, elements, components, or combinations of the foregoing.
Furthermore, the terms "first," "second," "third," and the like are used merely to distinguish between descriptions and should not be construed as indicating or implying relative importance.
Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which various embodiments of the application belong. The terms (such as those defined in commonly used dictionaries) will be interpreted as having a meaning that is the same as the context of the relevant art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein in connection with the various embodiments of the application.
The existing technology related to software development of mobile terminals mainly relates to two kinds of technologies, namely, the existing scheme one: the Api layer issues JSON data, the JSON data is converted into a Model layer in a traversing mode, and the View layer is driven to be displayed after service logic processing. The defects of the existing scheme are as follows: 1) Forming the binding of an API layer, a Model layer and a View layer, wherein the coupling and the multiplexing are high and low; 2) The conversion process from JSON data to Model layer is traversal recursion conversion, which consumes resources and has high conversion cost when the data Model is complex or the level nesting is more; 3) The Model layer has strong invasiveness, and when the View layer is rendered, the Model layer data needs to be processed through service logic; 4) The API layer and the View layer can not be independently multiplexed, and can be multiplexed when the service requirements are met at the same time.
The existing scheme II: the API layer transmits JSON data, the JSON data is converted into a Model layer in a traversing way, the Model layer inputs the data into a Viewmodel for conversion, and after conversion, data of another Model layer is generated again, and finally the View layer is driven to be displayed. The defects of the existing scheme II are as follows: 1) The problem of high conversion cost from JSON data to a Model layer is still not solved; 2) Two sets of Model layers are introduced, so that the occupied memory space is improved; 3) The driving of the View layer still passes through the data object Model layer, the invasiveness of the Model layer to the service still exists, the Model layer is difficult to multiplex, the Model layer type explosion is very easy to cause, and the maintenance is difficult; 4) When the service changes and needs to be added, deleted or modified, the files of the two Model layers and the conversion method in the ViewModel file need to be modified simultaneously. The existing scheme cannot realize the development of the mobile terminal with high efficiency and low maintenance cost.
Example 1
Based on the above-mentioned problems, an embodiment of the present application provides a service data processing method of an application, and as shown in fig. 1, a flow chart of the service data processing method of the application is shown, where the method includes:
s101, acquiring service data from a server through an application program interface;
specifically, the application program interface refers to an interface that the server supplies to the service end to perform data processing. The application program interface obtains data required by the specific service of the server, namely service data.
S102, carrying out data conversion on the service data through a converter according to a data mapping relation, and obtaining original data, wherein the data mapping relation is a corresponding relation between a data format of the service data and a data format of the original data;
in a specific embodiment, the converter provides a set of conversion method, the service data acquired from the server by the application program interface in S101 is converted into data available for service views, the service data is converted into the original data by the converter according to the data mapping relation, and the data mapping relation stores a corresponding relation between the data format of the service data and the data format of the original data.
And S103, rendering the service view according to the original data.
Specifically, after the native data available for the service view is acquired in S102, the corresponding service view is rendered according to the acquired native data driver.
In a specific embodiment, the obtaining, by the application program interface, service data from the server includes:
acquiring a set of business data from a server through an application program interface;
the data conversion is carried out on the service data through a converter according to a data mapping relation to obtain the original data, and the method comprises the following steps:
respectively inputting a group of service data into at least two converters, and respectively converting the received service data by each converter to obtain at least two corresponding groups of original data;
the rendering of the service view according to the native data comprises:
and rendering the corresponding service views according to the original data of each group.
Compared with the existing scheme I and the existing scheme II, the embodiment releases the coupling relation between the API and the View, greatly enhances the reusability of the API and the View, can realize that the same API corresponds to a plurality of views, and can also realize that a plurality of APIs correspond to the same View, and is very flexible.
Optionally, the present embodiment provides an application scenario, where one application program interface corresponds to a plurality of different service views. As shown in fig. 2, one application program interface correspondingly generates two different service views. In this embodiment, an application program interface initiates a request to a server to obtain a set of service data, then inputs the set of service data into two different converters, converts the service data by the two converters, outputs corresponding native data respectively, and renders respective corresponding service views driven by the two sets of native data. In implementations, the number of business views that need to be generated can be set according to requirements.
In a specific embodiment, the obtaining, by the application program interface, service data from the server includes:
acquiring a group of service data from a server through at least two application program interfaces respectively, wherein the contents of different groups of service data are different;
the data conversion is carried out on the service data through a converter according to a data mapping relation to obtain the original data, and the method comprises the following steps:
respectively inputting each group of service data into a corresponding converter, respectively carrying out data conversion on the received service data through each converter, and respectively obtaining a corresponding group of original data, wherein the data formats of each group of original data are the same;
the rendering of the service view according to the native data comprises:
and rendering a service view according to the obtained at least two groups of native data with the same format.
Optionally, the present embodiment provides another application scenario, where multiple different application program interfaces correspond to the same service view. As shown in fig. 3, two application program interfaces together generate a service view. Two different application program interfaces initiate requests to the server, two groups of different service data issued by the server are acquired, the two groups of different service data are respectively input into corresponding converters, the original data output by the different converters are data with the same format, and the two groups of the original data with the same format drive and render the same service view. In implementations, the number of application program interfaces may be set as desired.
In a specific embodiment, the data conversion of the service data by the converter according to the data mapping relationship, to obtain the native data, includes:
and inputting the service data into the converter, and converting the service data into original data according to a data mapping relation by the converter, wherein the data format of the service data is a JOSN data format, and the format of the original data is a dictionary data format.
Specifically, in this embodiment, when converting service data into native data required for generating a service view, a converter is used to perform conversion of a data format, first, the service data is input into the converter, a data mapping relationship is preset in the converter, and the service data is converted into the native data according to the data mapping relationship by the converter. The data format of the service data is a JOSN data format, the JOSN data format is converted into a dictionary data format by a converter, and the dictionary data format comprises: the Dict format and the Map format. The Dict format is an apple mobile operating system (iOS) end dictionary data format, and the Map format is an Android end dictionary data format.
Compared with the existing scheme I and the existing scheme II, in the embodiment, JSON data issued by an application program interface is not converted into data objects of a Model layer any more, and the problem of high conversion cost of the part is solved. In the conversion logic, the conversion times are only once, and under the condition of using the Model layer, at least two conversions are needed, the JSON data is mapped into the Model layer data object for the first time, and the Model layer data object is converted into the data which can be used by the service view for the second time. And secondly, the Model layer data object is not used, so that the occupation of the part of space is reduced, and the problem of invasiveness of the Model layer to the service is thoroughly solved.
And the business view and the application program interface are relatively independent, the application program interface has no fixed Model layer entity data object to bind the application program interface, only has an input relation with the converter, the converter only receives the original JSON data of the application program interface to analyze, the application program interface is not referenced, the application program interface is not bound with any object, and the flexibility is higher.
In a specific embodiment, the method further comprises: when the service data acquired by the application program interface changes, the data mapping relation is adjusted according to the changed service data, and an adjusted data mapping relation is obtained;
and converting the changed business data into the original data according to the adjusted data mapping relation by a converter.
Specifically, when the service data changes and the attribute needs to be added, deleted or modified, only the data mapping relation in the converter needs to be modified, and the service data is converted into the original data required by the service view, such as the Dict data or Map data, through the data mapping relation in the converter. Moreover, the logic relationship is quite clear, and the logic relationship can be matched at will under different service requirements, so that the maintenance cost is reduced, and the development efficiency is increased.
An example diagram of the coding of the service data processing procedure when service data is initiated is provided as shown in fig. 4. When the JOSN data acquired by the application program interface changes, the data mapping relation is adjusted according to the changed business data, namely, a conversion method in a Converter (Converter) is changed, and the adjusted data mapping relation is obtained; and converting the changed business data into the original data according to the adjusted data mapping relation through a Converter (Converter), and finally returning an original data result.
In a specific embodiment, the converting, by the converter, the service data into the native data according to the data mapping relationship includes:
determining keywords in the service data according to the data mapping relation;
writing the character string statement of the key word into a header file;
and converting the business data into the original data according to the header file.
Specifically, in this embodiment, in order to remove the invasiveness of the Model layer to the service, reduce the space loss, adopt the de-modeling process, use the native data to drive and render the service view, thus the problem of reduced data readability caused, this embodiment proposes the corresponding solution, confirm the keyword in the said service data according to the data mapping relation, use the string constant to represent the keyword, the value of the string constant is stored in the realization file of the converter, write the exorn statement of the string constant into the header file. The key words of the original data generated by the converter are characterized by using character string constants, and then the header file is referenced each time the application program interface acquires service data which needs to be converted.
An alternative embodiment is provided as shown in fig. 5, where the key is characterized by string constants, the string constant exterm declaration being written into the header file "propertyxxxconverterkeys. As shown in fig. 6, when the application program interface acquires the service data each time, the service data needs to be converted, the header file is referenced to realize data conversion, and finally the original data is acquired, and the original data result is returned.
In a specific embodiment, the generating a service view according to the native data includes:
acquiring a value of a keyword in the primary data;
and rendering the service view according to the value corresponding to the keyword.
Specifically, when the service view is generated according to the rendering of the primary data, the value corresponding to the keyword in the primary data converted by the converter is obtained, and the value is specifically represented as the value of the keyword represented by the character string constant, so that the service view is rendered. The business developer can directly know the meaning of the character string constant representation according to the key words, and the meaning is different from hard coding, so that the readability of the item is improved.
The service view rendering process for rendering the service view according to the value corresponding to the keyword may alternatively be: and calling the template file, and transmitting the values of the keywords represented by the character string constants into the template file to realize the rendering of the service view.
For example, as shown in fig. 7, a coding schematic diagram for generating a service view is provided, rendering of the service view is performed through the dct data, keywords represented by the string constants are obtained, corresponding values are obtained, and then rendering is performed along with the service view.
In order to facilitate understanding of the outstanding effect generated by this embodiment, the same data structure is adopted to perform the comparison of the service data that the existing scheme one, the existing scheme two and this embodiment run the same on the same equipment. As shown in fig. 8, a schematic diagram of a test result of a service data processing method of an application program is shown, in fig. 8, an optimization scheme is the embodiment, a first scheme is an existing scheme, a second scheme is an existing scheme, and comparison shows that: the existing scheme I and scheme II are compared with the optimized scheme, the optimized scheme is 2 times as high as the scheme I in execution efficiency (operation efficiency) and 3 times as high as the scheme II, the operation memory occupation is slightly smaller than that of the scheme I, and the reusability and the decoupling property of the optimized scheme are far greater than those of the scheme I.
According to the business data processing method of the application program, business data are acquired from a server through an application program interface; performing data conversion on the service data through a converter to obtain primary data; and rendering the service view according to the native data. Firstly, the process of rendering and generating the Model layer intrusion service view is stopped, the Dict/Map data format is changed, and the service view can be rendered without referring to the Model layer. Meanwhile, the service data acquired by the application program interface through the converter and the original data form a data mapping relation, so that the one-to-many relation between the application program interface and the service view is realized, the many-to-one relation between the application program interface and the service view is realized, the service view and the application program interface are decoupled in a conversion mapping mode of the converter, the application program interface and the service view are mutually independent, and the reusability of the application program interface and the service view is improved. The method solves the dilemma of high coupling and low multiplexing of the existing scheme. And the data conversion of the application program interface is only used once to achieve the effects of high reusability and low coupling under the same operation efficiency.
Example 2
An embodiment of the present application provides an application service data processing apparatus 200, as shown in fig. 9, a block diagram of the application service data processing apparatus 200, where the apparatus 200 includes:
an acquisition module 201, configured to acquire service data from a server through an application program interface;
the conversion module 202 is configured to perform data conversion on the service data according to a data mapping relationship by using a converter, so as to obtain native data, where the data mapping relationship is a correspondence relationship between a data format of the service data and a data format of the native data;
and the rendering module 203 is used for rendering the service view according to the native data.
Example 3
An embodiment of the present application provides a mobile terminal, where the mobile terminal includes a memory and a processor, where the memory stores a computer program, and the computer program executes a service data processing method of any one of the application programs described above when running on the processor. The mobile terminal may implement the service data processing method of the application program provided in embodiment 1, and in order to avoid repetition, details are not repeated here.
Example 4
An embodiment of the present application provides a computer-readable storage medium storing a computer program that when run on a processor executes a service data processing method of any one of the above-described application programs, the computer program when run on the processor executes the steps of: acquiring service data from a server through an application program interface;
performing data conversion on the service data through a converter to obtain primary data;
and generating a service view according to the native data.
The computer readable storage medium may implement a service data processing method of an application program provided in embodiment 1, and in order to avoid repetition, a description thereof is omitted here.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. The apparatus embodiments described above are merely illustrative, for example, of the flow diagrams and block diagrams in the figures, which illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, functional modules or units in various embodiments of the application may be integrated together to form a single part, or the modules may exist alone, or two or more modules may be integrated to form a single part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a smart phone, a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing is merely illustrative of the present application, and the present application is not limited thereto, and any person skilled in the art will readily recognize that variations or substitutions are within the scope of the present application.

Claims (8)

1. A business data processing method of an application program, the method comprising:
acquiring service data from a server through an application program interface; determining keywords in the service data according to the data mapping relation through a converter; writing the character string statement of the key word into a header file; converting the service data into original data according to the header file, wherein the data mapping relation is a corresponding relation between a data format of the service data and a data format of the original data; acquiring a value of a keyword in the primary data; and rendering the service view corresponding to the original data according to the value of the key word.
2. The method of claim 1, wherein the obtaining, via the application program interface, the service data from the server comprises:
acquiring a set of business data from a server through an application program interface;
the data conversion is carried out on the service data through a converter according to a data mapping relation to obtain the original data, and the method comprises the following steps:
respectively inputting a group of service data into at least two converters, and respectively converting the received service data according to the data mapping relation by each converter to obtain at least two corresponding groups of original data;
the rendering of the service view according to the native data comprises:
and rendering the corresponding service views according to the original data of each group.
3. The method of claim 1, wherein the obtaining, via the application program interface, the service data from the server comprises:
acquiring a group of service data from a server through at least two application program interfaces respectively, wherein the contents of different groups of service data are different;
the data conversion is carried out on the service data through a converter according to a data mapping relation to obtain the original data, and the method comprises the following steps:
respectively inputting each group of service data into a corresponding converter, respectively carrying out data conversion on the received service data according to the data mapping relation through each converter, and respectively obtaining a corresponding group of original data, wherein the data formats of each group of original data are the same;
the rendering of the service view according to the native data comprises:
and rendering a service view according to the obtained at least two groups of native data with the same format.
4. The method of claim 1, wherein the business data is in a JOSN data format and the native data is in a dictionary data format.
5. The method according to claim 1, wherein the method further comprises: when the service data acquired by the application program interface changes, the data mapping relation is adjusted according to the changed service data, and an adjusted data mapping relation is obtained;
and converting the changed business data into the original data according to the adjusted data mapping relation by a converter.
6. A business data processing apparatus of an application program, the apparatus comprising:
the acquisition module is used for acquiring service data from the server through the application program interface;
the conversion module is used for determining keywords in the service data according to the data mapping relation through the converter; writing the character string statement of the key word into a header file; converting the service data into original data according to the header file, wherein the data mapping relation is a corresponding relation between a data format of the service data and a data format of the original data;
the rendering module is used for acquiring the value of the keyword in the original data; and rendering the service view corresponding to the original data according to the value of the key word.
7. A mobile terminal, characterized in that it comprises a memory and a processor, the memory storing a computer program which, when run on the processor, performs the service data processing method of the application program according to any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that it stores a computer program which, when run on a processor, performs the service data processing method of an application program according to any one of claims 1 to 5.
CN202110783987.9A 2021-07-12 2021-07-12 Service data processing method and device of application program and mobile terminal Active CN113504896B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110783987.9A CN113504896B (en) 2021-07-12 2021-07-12 Service data processing method and device of application program and mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110783987.9A CN113504896B (en) 2021-07-12 2021-07-12 Service data processing method and device of application program and mobile terminal

Publications (2)

Publication Number Publication Date
CN113504896A CN113504896A (en) 2021-10-15
CN113504896B true CN113504896B (en) 2023-08-18

Family

ID=78012449

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110783987.9A Active CN113504896B (en) 2021-07-12 2021-07-12 Service data processing method and device of application program and mobile terminal

Country Status (1)

Country Link
CN (1) CN113504896B (en)

Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105159928A (en) * 2015-08-05 2015-12-16 深圳联友科技有限公司 Method and system for converting JSON data into model data
CN105512261A (en) * 2015-12-02 2016-04-20 广州华多网络科技有限公司 Method and system for expressing front end lightweight statistical data
CN108255897A (en) * 2017-02-17 2018-07-06 平安科技(深圳)有限公司 Visual Chart data conversion treatment method and apparatus
CN108446105A (en) * 2018-02-08 2018-08-24 广州亦云信息技术股份有限公司 A kind of Lightweight AP I Server Development Frameworks and development approach
CN108446363A (en) * 2018-03-13 2018-08-24 北京奇安信科技有限公司 A kind of data processing method and device of KV engines
CN109361628A (en) * 2018-10-16 2019-02-19 深圳壹账通智能科技有限公司 Message assemble method, device, computer equipment and storage medium
CN109388670A (en) * 2018-09-18 2019-02-26 重庆航天职业技术学院 A kind of conversion method of XML and relational database
CN110347732A (en) * 2019-05-20 2019-10-18 中国平安人寿保险股份有限公司 A kind of data transfer device and device
CN110704518A (en) * 2019-08-26 2020-01-17 苏宁云计算有限公司 Business data processing method and device based on Flink engine
CN111078224A (en) * 2019-10-12 2020-04-28 中国平安人寿保险股份有限公司 Software package file data processing method and device, computer equipment and storage medium
CN111198859A (en) * 2018-11-16 2020-05-26 北京微播视界科技有限公司 Data processing method and device, electronic equipment and computer readable storage medium
CN111475562A (en) * 2020-04-11 2020-07-31 吴媛媛 Data format optimization method applied to business processing system and business server
CN111580821A (en) * 2019-02-15 2020-08-25 厦门雅基软件有限公司 Script binding method and device, electronic equipment and computer readable storage medium
CN112231278A (en) * 2020-11-03 2021-01-15 百度国际科技(深圳)有限公司 Project engineering file analysis method, device, equipment and storage medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170060893A1 (en) * 2015-08-25 2017-03-02 Xcube Research And Development, Inc. Translating file type aware virtual filesystem and content addressable globally distributed filesystem
JP6762727B2 (en) * 2016-01-26 2020-09-30 キヤノン株式会社 Information processing device, data processing method of information processing device, and program
US11379496B2 (en) * 2019-04-18 2022-07-05 Oracle International Corporation System and method for universal format driven data transformation and key flex fields in a analytic applications environment

Patent Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105159928A (en) * 2015-08-05 2015-12-16 深圳联友科技有限公司 Method and system for converting JSON data into model data
CN105512261A (en) * 2015-12-02 2016-04-20 广州华多网络科技有限公司 Method and system for expressing front end lightweight statistical data
CN108255897A (en) * 2017-02-17 2018-07-06 平安科技(深圳)有限公司 Visual Chart data conversion treatment method and apparatus
CN108446105A (en) * 2018-02-08 2018-08-24 广州亦云信息技术股份有限公司 A kind of Lightweight AP I Server Development Frameworks and development approach
CN108446363A (en) * 2018-03-13 2018-08-24 北京奇安信科技有限公司 A kind of data processing method and device of KV engines
CN109388670A (en) * 2018-09-18 2019-02-26 重庆航天职业技术学院 A kind of conversion method of XML and relational database
CN109361628A (en) * 2018-10-16 2019-02-19 深圳壹账通智能科技有限公司 Message assemble method, device, computer equipment and storage medium
CN111198859A (en) * 2018-11-16 2020-05-26 北京微播视界科技有限公司 Data processing method and device, electronic equipment and computer readable storage medium
CN111580821A (en) * 2019-02-15 2020-08-25 厦门雅基软件有限公司 Script binding method and device, electronic equipment and computer readable storage medium
CN110347732A (en) * 2019-05-20 2019-10-18 中国平安人寿保险股份有限公司 A kind of data transfer device and device
CN110704518A (en) * 2019-08-26 2020-01-17 苏宁云计算有限公司 Business data processing method and device based on Flink engine
CN111078224A (en) * 2019-10-12 2020-04-28 中国平安人寿保险股份有限公司 Software package file data processing method and device, computer equipment and storage medium
CN111475562A (en) * 2020-04-11 2020-07-31 吴媛媛 Data format optimization method applied to business processing system and business server
CN112231278A (en) * 2020-11-03 2021-01-15 百度国际科技(深圳)有限公司 Project engineering file analysis method, device, equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
增材制造软件框架的研究与设计;杨声浩 等;《电子技术与软件工程》;53-56 *

Also Published As

Publication number Publication date
CN113504896A (en) 2021-10-15

Similar Documents

Publication Publication Date Title
CN108984174A (en) Cross-platform application creation method, device, server and storage medium
CN1794225A (en) File formats, methods, and computer program products for representing documents
CN110362547B (en) Method and device for encoding, analyzing and storing log file
CN109062572B (en) Component calling method, device, equipment and storage medium
CN111143446A (en) Data structure conversion processing method and device of data object and electronic equipment
CN108763546A (en) A kind of conversion method of data format, device, storage medium and terminal
CN112398809B (en) Protocol rule conversion method, device, computer equipment and storage medium
US10114879B2 (en) Systems and methods for generating pluggable domain-specific data types
CN116243919A (en) Interface rendering method, device and medium for interpretation rendering and code rendering
CN113504896B (en) Service data processing method and device of application program and mobile terminal
CN113032275A (en) Method and device for testing field, electronic equipment and storage medium
CN111324645B (en) Block chain data processing method and device
CN113741864B (en) Automatic semantic service interface design method and system based on natural language processing
CN115934093A (en) Applet cross-terminal application method, related device and computer storage medium
US8436753B2 (en) System and method for efficiently translating media files between formats using a universal representation
US11797277B2 (en) Neural network model conversion method server, and storage medium
CN111143450B (en) Method and device for importing data
CN114218175A (en) Resource cross-platform sharing method and device, terminal equipment and storage medium
CN113010666A (en) Abstract generation method, device, computer system and readable storage medium
CN101594480B (en) Method for processing caption data
CN108734149A (en) A kind of text data scan method and device
CN111158661A (en) System interface docking method, device, medium and electronic equipment
CN108932224B (en) Method and apparatus for implementing an attention-independent copy mechanism
US20080294645A1 (en) System, method and computer program product for EDI-to-EDI translations
CN112311931B (en) Method and device for processing contact information at terminal and electronic equipment

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