CN113419796A - Data conversion method, terminal and storage medium - Google Patents

Data conversion method, terminal and storage medium Download PDF

Info

Publication number
CN113419796A
CN113419796A CN202110544922.9A CN202110544922A CN113419796A CN 113419796 A CN113419796 A CN 113419796A CN 202110544922 A CN202110544922 A CN 202110544922A CN 113419796 A CN113419796 A CN 113419796A
Authority
CN
China
Prior art keywords
setting
field
field name
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.)
Pending
Application number
CN202110544922.9A
Other languages
Chinese (zh)
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.)
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information Technology 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 Beijing Jingdong Century Trading Co Ltd, Beijing Wodong Tianjun Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN202110544922.9A priority Critical patent/CN113419796A/en
Publication of CN113419796A publication Critical patent/CN113419796A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Stored Programmes (AREA)

Abstract

The application discloses a data conversion method, a terminal and a storage medium, wherein the data conversion method comprises the following steps: under the condition that a front end of a first application sends a call request to a rear end of the first application, acquiring a view object and a data transmission object related to the call request; converting, by a setting converter, a first field name corresponding to a set field in the data of the view object package and a second field name corresponding to the set field in the data of the data transmission object package, when the first field name is different from the second field name; wherein the setting converter stores a setting correspondence among the setting field, the first field name, and the second field name.

Description

Data conversion method, terminal and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a data conversion method, a terminal, and a storage medium.
Background
The application program is generally divided into a front end and a back end, and the front end is mainly responsible for displaying pages; the back end is mainly responsible for realizing business logic, thereby providing corresponding service for the front end. In the related art, when the front end requests to acquire data by calling an interface provided by the back end, the data returned by the back end has some differences with the data requested to be acquired by the front end, and for the processing of the difference of the data of the front end and the back end, no unified specification exists at present, so that the maintenance difficulty and the maintenance cost of an application program are increased.
Disclosure of Invention
In view of this, embodiments of the present application provide data conversion, a terminal and a storage medium to solve the technical problems of high maintenance difficulty and high maintenance cost of application programs in the related art.
In order to achieve the purpose, the technical scheme of the application is realized as follows:
the embodiment of the application provides a data conversion method, which comprises the following steps:
under the condition that a front end of a first application sends a call request to a rear end of the first application, acquiring a view object and a data transmission object related to the call request;
converting, by a setting converter, a first field name corresponding to a set field in the data of the view object package and a second field name corresponding to the set field in the data of the data transmission object package, when the first field name is different from the second field name; wherein the setting converter stores a setting correspondence among the setting field, the first field name, and the second field name.
In the above scheme, the obtaining of the view object and the data transmission object related to the call request includes:
determining a first service called by the front end at a logic calling layer of the first application based on the calling request; determining the view object based on the first service;
acquiring a data transmission object sent by the back end to the front end through a first remote process call interface; and the first remote procedure call interface represents the remote procedure call interface of the front end sending the call request.
In the foregoing solution, the converting the first field name or the second field name by setting a converter includes:
determining a corresponding setting converter according to the field type of the setting field;
converting the first field name or the second field name through the determined setting converter; wherein the content of the first and second substances,
the field type includes one of:
an independent field;
fields in an array, pull-down menu, or list;
fields in the paging list.
In the foregoing solution, the converting the first field name or the second field name by setting a converter includes one of:
converting the first field name into a corresponding second field name through a setting converter under the condition that the calling request is used for requesting to store data;
and converting the second field name into a corresponding first field name through a setting converter under the condition that the calling request is used for requesting to acquire data.
In the above scheme, the method further comprises:
intercepting or filtering setting data by the setting converter; the setting data is encapsulated in the view object or the data transmission object.
In the foregoing solution, when the setting data is intercepted or filtered by the setting converter, the method further includes:
in a case where it is detected by the setting converter that there is abnormal data in the view object or the data transmission object, a first prompt is output.
In the above scheme, the method further comprises:
and updating the setting converter when detecting that the application program interface related to the calling request in the back end is changed.
An embodiment of the present application provides a terminal, including:
the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring a view object and a data transmission object related to a call request under the condition that the front end of a first application sends the call request to the back end of the first application;
a conversion unit configured to convert, by a setting converter, a first field name corresponding to a setting field in the data of the view object package and a second field name corresponding to the setting field in the data of the data transmission object package, when the first field name and the second field name are different; wherein the content of the first and second substances,
the setting converter stores the setting corresponding relation among the setting field, the first field name and the second field name.
An embodiment of the present application provides a terminal, including: a processor and a memory for storing a computer program capable of running on the processor,
the processor is configured to execute the steps of the data conversion method when the computer program is run.
The embodiment of the application also provides a storage medium, on which a computer program is stored, and the computer program realizes the steps of the data conversion method when being executed by a processor.
In the embodiment of the application, a setting converter is additionally arranged between a front-end page and a back end of an application program, and when a first field name corresponding to a setting field in data packaged by a view object is different from a second field name corresponding to the setting field in data packaged by a data transmission object, the first field name or the second field name is converted by the setting converter. The setting converter is responsible for realizing data conversion, and the view component is responsible for page rendering, so that view rendering and data conversion are logically decoupled, on one hand, the converter can be set by adopting unified standard constraint, source codes are easy to maintain, and therefore the maintenance difficulty of an application program can be reduced, on the other hand, the source code reuse rate can be improved, and therefore the parallel development efficiency is improved and the maintenance difficulty is reduced.
Drawings
Fig. 1 is a schematic flow chart illustrating an implementation of a data conversion method according to an embodiment of the present application;
fig. 2 is a schematic structural diagram of an application provided in an embodiment of the present application;
fig. 3 is a schematic structural diagram of a terminal according to an embodiment of the present application;
fig. 4 is a schematic diagram of a hardware composition structure of a terminal according to an embodiment of the present application.
Detailed Description
In the related art, when a front end of an application program requests to acquire data by calling an interface provided by a back end, data conversion is usually performed in different view components or pages under the condition that data returned by the back end is different from data requested to be acquired by the front end, and page rendering is performed based on the converted data. Because the source codes for realizing data conversion are dispersed in different view components or pages, view rendering and data conversion logic are strongly coupled, and repeated source code logic cannot be reused, the development cost and the maintenance difficulty of the application program are increased.
In order to solve the above technical problem, an embodiment of the present application provides a data conversion method, where in a case that a front end of a first application sends a call request to a back end of the first application, a view object and a data transmission object related to the call request are obtained; converting, by a setting converter, a first field name corresponding to a setting field in data encapsulated by the view object and a second field name corresponding to the setting field in the data transmission object when the first field name is different from the second field name; wherein the setting converter stores a setting correspondence among the setting field, the first field name, and the second field name. In the embodiment of the application, the setting converter is additionally arranged between the front-end page and the rear end of the application program, data conversion is carried out through the setting converter, view rendering and data conversion logic decoupling is achieved, on one hand, the converter can be set through unified standard constraint, source codes are easy to maintain, the maintenance difficulty of the application program can be reduced, on the other hand, the source code reuse rate can be improved, and therefore parallel development efficiency is improved, and the maintenance difficulty is reduced.
The technical solution of the present application is further described in detail with reference to the drawings and specific embodiments of the specification.
Fig. 1 is a schematic flow chart illustrating an implementation of a data conversion method according to an embodiment of the present application; the execution main body of the process is a mobile phone, a wearable device, a tablet, a computer and other terminals. As shown in fig. 1, the data conversion method includes:
step 101: under the condition that the front end of the first application sends a call request to the back end of the first application, a view object and a data transmission object related to the call request are obtained.
Here, the backend of the first Application interacts with the frontend of the first Application through an Application Programming Interface (API) based on a Hypertext Transfer Protocol (HTTP). The front end of the first application Calls the API of the back end through a Remote Procedure Call (RPC) interface. The View Object (VO, View Object) is used to encapsulate the relevant data of the specified front-end page or View component. All Data required by the RPC is encapsulated in the Data Transfer Object (DTO), which is returned by the back-end of the first application. Wherein, the first application generally refers to any application program in the terminal. The front end of the first application is also called a client; the backend of the first application is also referred to as the server.
In actual application, in the process of running the first application by the terminal, a user can trigger the front end of the first application to send a call request to the back end of the first application through an RPC interface through a View Component (View Component) in a front end page of the first application. The calling request includes an identifier of the called API, a request parameter, and the like.
The terminal acquires a view object related to a call request and acquires a data transmission object under the condition that the terminal detects that the front end of the first application sends the call request to the back end of the first application. The data transmission object is sent to the front end of the first application by the back end of the first application under the condition that a call request sent by the front end of the first application is received.
In this embodiment, a setting converter and a logic calling layer are added in a front end of the first application, and in some embodiments, the obtaining a view object and a data transmission object related to the call request includes:
determining a first service called by the front end at a logic calling layer of the first application based on the calling request; determining the view object based on the first service;
acquiring a data transmission object sent by the back end to the front end through a first remote process call interface; and the first remote procedure call interface represents the remote procedure call interface of the front end sending the call request.
Referring to fig. 2, fig. 2 is a schematic structural diagram of an application program according to an embodiment of the present disclosure, and as shown in fig. 2, the application program includes a front-end page, a logic calling layer, a setting converter, an interface calling layer, and a back-end. Wherein, the front page comprises a plurality of view components; the logic calling layer comprises a plurality of services for front-end page calling; the interface calling layer comprises a plurality of RPC interfaces; the back-end includes a plurality of APIs.
In actual application, a terminal determines a first service called by the front end of a first application in a logic calling layer of the first application on the basis of the called API identifier and request parameters contained in a calling request when detecting that a calling request is triggered by a user through a view component; determining a setting field corresponding to a request parameter contained in the call request based on the first service, determining a first field name corresponding to the setting field at the front end, and encapsulating the setting field corresponding to the request parameter and the first field name corresponding to the setting field at the front end through the first service to obtain a view object related to the call request.
The terminal acquires a data transmission object sent by the rear end of the first application to the front end through the first RPC interface. Wherein the content of the first and second substances,
the method comprises the steps that when a terminal detects that a front end of a first application sends a calling request to a rear end of the first application, a target API called by the front end of the first application is determined based on an identification of the called API included in the calling request, a first PRC interface corresponding to the target API is called, and the calling request is sent to the target API in the rear end of the first application through the first PRC interface. And the back end of the first application responds to the call request when detecting that the target API receives the call request sent by the front end of the first application, and transmits the data transmission object related to the call request to the first PRC interface through the target API so as to return the data transmission object related to the call request to the front end of the first application. In actual application, the terminal can call the first PRC interface corresponding to the target API through the determined first service.
Step 102: converting, by a setting converter, a first field name corresponding to a set field in the data of the view object package and a second field name corresponding to the set field in the data of the data transmission object package, when the first field name is different from the second field name; wherein the setting converter stores a setting correspondence among the setting field, the first field name, and the second field name.
Here, when acquiring the view object and the data transmission object related to the call request, the terminal detects whether a first field name corresponding to the first set field in the data encapsulated by the view object is the same as a second field name corresponding to the first set field in the data encapsulated by the data transmission object, and when the first field name corresponding to the first set field in the data encapsulated by the view object is different from the second field name corresponding to the first set field in the data transmission object, the terminal may convert the first field name corresponding to the first set field by using the setting converter, so that the converted first field name is the same as the corresponding second field name; or, the second field name corresponding to the first setting field is converted by the setting converter, so that the converted second field name is the same as the corresponding first field name. The first setting field generally refers to any corresponding setting field in the data encapsulated by the view object.
In practical applications, when the call request is used to request to acquire user information, the view object and the data transmission object may include field names corresponding to setting fields related to the user information, for example, setting fields representing information such as a user identifier, a user name, a user nickname, a telephone number, a mailbox address, and an address.
And when the first field name of the setting field for representing the user identifier in the view object is the userId and the second field name of the setting field for representing the user identifier in the data transmission object is the user id, converting the field name of the setting field for representing the user identifier through the setting converter.
And when the first field name of the setting field for representing the user name in the view object is the user name and the second field name of the setting field for representing the user name in the data transmission object is the userName, converting the field name of the setting field for representing the user name through the setting converter.
And when the first field name of the setting field for representing the telephone number in the view object is phone and the second field name of the setting field for representing the telephone number in the data transmission object is telphone, converting the field names of the setting fields for representing the telephone number through the setting converter.
It should be noted that the setting switch may be in the form of an interface or a component. The settings converter may be a data converter developed based on TypeScript. TypeScript is an open source programming language.
Considering that there are many field types in practical application, different setting converters can be used to convert field names for different field types, so as to improve data conversion efficiency. In some embodiments, the converting the first field name or the second field name by setting a converter includes:
determining a corresponding setting converter according to the field type of the setting field;
converting the first field name or the second field name through the determined setting converter; wherein the content of the first and second substances,
the field type includes one of:
an independent field;
fields in an array, pull-down menu, or list;
fields in the paging list.
Here, the setting converter includes a first setting converter, which is a Base converter (Base converter), for converting a field name of the independent field, a second setting converter, and a third setting converter; the second setting converter is a List converter (List converter) and is used for converting field names of fields in an array, a pull-down menu or a List; the third setting converter is a Page converter (Page converter), and the third setting converter is used for converting field names of fields in the Page list. The second setting switch inherits the first setting switch, and can meet the conversion requirements related to the list on the basis of the first setting switch. The third setting converter inherits the second setting converter, and can meet the conversion requirements related to the pages on the basis of the second setting converter. Because the second setting converter and the third setting converter can multiplex the related source codes of the first setting converter, and the third setting converter can multiplex the related source codes of the second setting converter, the development efficiency of the application program can be improved, and developers only need to maintain the first setting converter, so that the dimensionality difficulty of the application program is reduced.
In actual application, under the condition that a first field name corresponding to a first set field in data packaged by a view object is different from a second field name corresponding to the first set field in a data transmission object, determining a field type of the first set field, and determining a set converter corresponding to the field type according to the field type of the first set field; and converting the first field name or the second field name through the determined setting converter. When the field type of the first setting field is an independent field, the determined setting converter is the first setting converter; when the field type of the first setting field is a field in an array, a pull-down menu or a list, the determined setting converter is a second setting converter; and when the field type of the first setting field is a field in the paging list, determining that the setting converter is a third setting converter.
Consider that there are two application scenarios in practical applications: the front end of the first application requests to store data to the back end, and the front end of the first application requests to acquire data from the back end, so that the terminal can convert the first field name or the second field name by setting the converter according to different application scenes. In some embodiments, the converting the first field name or the second field name by setting a converter includes one of:
converting the first field name into a corresponding second field name through a setting converter under the condition that the calling request is used for requesting to store data;
and converting the second field name into a corresponding first field name through a setting converter under the condition that the calling request is used for requesting to acquire data.
Here, the terminal determines whether the invocation request is for requesting storage of data or for requesting acquisition of data, based on information included in the invocation request, in a case where the view object and the data transmission object related to the invocation request are acquired.
And under the condition that the calling request is used for requesting to store the data, converting the first field name corresponding to the first setting field into the corresponding second field name through the setting converter so that the back end of the first application stores the data related to the first setting field. At this time, the field name corresponding to the first setting field stored at the back end of the first application is the same as the field name of the first setting field displayed at the front end of the first application.
And in the case that the calling request is used for requesting to acquire data, converting the corresponding second field name of the first setting field into the corresponding first field name through the setting converter so that the view component in the front end of the first application renders and displays the data related to the first setting field. At this time, the field name corresponding to the first setting field displayed at the front end of the first application is the same as the field name corresponding to the first setting field stored at the back end of the first application.
In some embodiments, the method further comprises:
intercepting or filtering setting data by the setting converter; the setting data is encapsulated in the view object or the data transmission object.
Here, in a scenario where the front end of the first application requests to store data, the terminal intercepts or filters the setting data encapsulated in the view object through the setting converter; in the scene that the front end of the first application requests to acquire data, the terminal intercepts or filters the setting data encapsulated in the data transmission object through the setting converter.
In this embodiment, a data monitoring function is extended in the setting converter, the setting converter monitors the view object or the data encapsulated in the data transmission object, and when the setting data is detected in the view object or the data transmission object, the setting data is intercepted or filtered according to the setting processing logic, so as to improve data security. By expanding the function of the setting converter, the front-end data and the back-end data of the first application program can be isolated through the setting converter on the processing logic, and the data reliability is improved.
Considering that abnormal data may be encapsulated in the view object or the data transmission object, in order to avoid that the abnormal data encapsulated in the view object affects the back-end data or the abnormal data encapsulated in the data transmission object affects the front-end data, in some embodiments, when the setting data is intercepted or filtered by the setting converter, the method further includes:
in a case where it is detected by the setting converter that there is abnormal data in the view object or the data transmission object, a first prompt is output.
Here, the setting converter is integrated with a setting rule for identifying abnormal data, and the terminal detects whether the abnormal data exists in the view object or the data transmission object through the setting rule integrated in the setting converter; and in the case that abnormal data exists in the view object or the data transmission object, outputting a first prompt to prompt a user that the abnormal data is currently detected so that the user can decide whether to continue the related operation.
In order to ensure the accuracy of the field names of the setting fields, in some embodiments, in consideration that the API in the backend of the first application may change and when the API changes, the field names of the setting fields related to the service provided by the changed API may change:
and updating the setting converter when detecting that the application program interface related to the calling request in the back end is changed.
Here, the terminal detects whether or not the API relating to the call request is changed in the backend when the call request is acquired, identifies a third field name corresponding to a second setting field relating to a service provided by the changed API based on the changed API when the API relating to the call request is changed in the backend, detects whether or not the third field name corresponding to the second setting field is the same as a second field name corresponding to the second setting field in the setting converter, and updates the second field name corresponding to the second setting field in the setting converter to the third field name corresponding to the second setting field when the corresponding third field name is different from the corresponding second field name.
In some embodiments, when the backend API of the first application is changed, the field names in the setting converter corresponding to the setting fields associated with the services provided by the changed API may be updated by a developer who does not need to modify the source code of the view component or the front-end page. When detecting that the application program interface related to the call request is changed in the back end, the terminal may download the updated setting converter from the server corresponding to the first application, and perform data conversion through the updated setting converter.
In the embodiment of the application, a setting converter is added between the front end page and the back end of the application program, and when a first field name corresponding to a setting field in data packaged by a view object is different from a second field name corresponding to the setting field in a data transmission object, the first field name or the second field name is converted by the setting converter. The setting converter is responsible for realizing data conversion, and the view component is responsible for page rendering, so that view rendering and data conversion are logically decoupled, on one hand, the converter can be set by adopting unified standard constraint, source codes are easy to maintain, and therefore the maintenance difficulty of an application program can be reduced, on the other hand, the source code reuse rate can be improved, and therefore the parallel development efficiency is improved and the maintenance difficulty is reduced.
In order to implement the method of the embodiment of the present application, an embodiment of the present application further provides a terminal, as shown in fig. 3, where the terminal includes:
an obtaining unit 31, configured to obtain, when a front end of a first application sends a call request to a back end of the first application, a view object and a data transmission object related to the call request;
a conversion unit 32 configured to convert, by a setting converter, a first field name corresponding to a setting field in the data of the view object package and a second field name corresponding to the setting field in the data of the data transmission object package, when the first field name and the second field name are different; wherein the content of the first and second substances,
the setting converter stores the setting corresponding relation among the setting field, the first field name and the second field name.
In some embodiments, the obtaining unit 31 is configured to:
determining a first service called by the front end at a logic calling layer of the first application based on the calling request; determining the view object based on the first service;
acquiring a data transmission object sent by the back end to the front end through a first remote process call interface; and the first remote procedure call interface represents the remote procedure call interface of the front end sending the call request.
In some embodiments, the conversion unit 32 is configured to:
determining a corresponding setting converter according to the field type of the setting field;
converting the first field name or the second field name through the determined setting converter; wherein the content of the first and second substances,
the field type includes one of:
an independent field;
fields in an array, pull-down menu, or list;
fields in the paging list.
In some embodiments, the conversion unit 32 is configured to perform one of:
converting the first field name into a corresponding second field name through a setting converter under the condition that the calling request is used for requesting to store data;
and converting the second field name into a corresponding first field name through a setting converter under the condition that the calling request is used for requesting to acquire data.
In some embodiments, the terminal further comprises:
the data monitoring unit is used for intercepting or filtering the set data through the set converter; the setting data is encapsulated in the view object or the data transmission object.
In some embodiments, the terminal further comprises:
a prompt unit configured to output a first prompt in a case where it is detected by the setting converter that there is abnormal data in the view object or the data transmission object.
In some embodiments, the terminal further comprises:
and an updating unit configured to update the setting converter when it is detected that an application program interface related to the call request is changed in the backend.
In practical applications, the above units may be implemented by a Processor in the terminal, such as a Central Processing Unit (CPU), a Digital Signal Processor (DSP), a Micro Control Unit (MCU), or a Programmable Gate Array (FPGA). Of course, the processor needs to run the program stored in the memory to realize the functions of the above-described program modules.
It should be noted that: in the above embodiment, when data conversion is performed in the terminal, only the division of the program modules is taken as an example, and in practical applications, the processing distribution may be completed by different program modules according to needs, that is, the internal structure of the device is divided into different program modules to complete all or part of the processing described above. In addition, the terminal and the data conversion method embodiment provided by the above embodiments belong to the same concept, and the specific implementation process thereof is detailed in the method embodiment and will not be described herein again.
Based on the hardware implementation of the program module, in order to implement the method of the embodiment of the present application, the embodiment of the present application further provides a terminal. Fig. 4 is a schematic diagram of a hardware composition structure of a terminal according to an embodiment of the present application, and as shown in fig. 4, the terminal 4 includes:
a communication interface 41 capable of information interaction with other devices such as network devices and the like;
and the processor 42 is connected with the communication interface 41 to realize information interaction with other devices, and is used for executing a data conversion method provided by one or more technical schemes of the terminal side when running a computer program. And the computer program is stored on the memory 43.
Of course, in practice, the various components in the terminal 4 are coupled together by a bus system 44. It will be appreciated that the bus system 44 is used to enable communications among the components. The bus system 44 includes a power bus, a control bus, and a status signal bus in addition to the data bus. For clarity of illustration, however, the various buses are labeled as bus system 44 in fig. 4.
The memory 43 in the embodiment of the present application is used to store various types of data to support the operation of the terminal 4. Examples of such data include: any computer program for operating on the terminal 4.
It will be appreciated that the memory 43 can be either volatile memory or nonvolatile memory, and can include both volatile and nonvolatile memory. Among them, the nonvolatile Memory may be a Read Only Memory (ROM), a Programmable Read Only Memory (PROM), an Erasable Programmable Read-Only Memory (EPROM), an Electrically Erasable Programmable Read-Only Memory (EEPROM), a magnetic random access Memory (FRAM), a Flash Memory (Flash Memory), a magnetic surface Memory, an optical disk, or a Compact Disc Read-Only Memory (CD-ROM); the magnetic surface storage may be disk storage or tape storage. Volatile Memory can be Random Access Memory (RAM), which acts as external cache Memory. By way of illustration and not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Synchronous Static Random Access Memory (SSRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic Random Access Memory (SDRAM), Double Data Rate Synchronous Dynamic Random Access Memory (DDRSDRAM), Enhanced Synchronous Dynamic Random Access Memory (ESDRAM), Enhanced Synchronous Dynamic Random Access Memory (Enhanced DRAM), Synchronous Dynamic Random Access Memory (SLDRAM), Direct Memory (DRmb Access), and Random Access Memory (DRAM). The memory 43 described in the embodiments of this application is intended to comprise, without being limited to, these and any other suitable types of memory.
The method disclosed in the above embodiments of the present application may be applied to the processor 42, or implemented by the processor 42. The processor 42 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by instructions in the form of hardware, integrated logic circuits, or software in the processor 42. The processor 42 described above may be a general purpose processor, a DSP, or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, or the like. Processor 42 may implement or perform the methods, steps, and logic blocks disclosed in the embodiments of the present application. A general purpose processor may be a microprocessor or any conventional processor or the like. The steps of the method disclosed in the embodiments of the present application may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software modules may be located in a storage medium located in the memory 43, and the processor 42 reads the program in the memory 43 and performs the steps of the aforementioned method in conjunction with its hardware.
Optionally, when the processor 42 executes the program, the corresponding process implemented by the terminal in each method of the embodiment of the present application is implemented, and for brevity, no further description is given here.
In an exemplary embodiment, the present application further provides a storage medium, i.e. a computer storage medium, in particular a computer readable storage medium, for example comprising a first memory 43 storing a computer program, which is executable by a processor 42 of a terminal to perform the steps of the foregoing method. The computer readable storage medium may be Memory such as FRAM, ROM, PROM, EPROM, EEPROM, Flash Memory, magnetic surface Memory, optical disk, or CD-ROM.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described device embodiments are merely illustrative, for example, the division of the unit is only a logical functional division, and there may be other division ways in actual implementation, such as: multiple units or components may be combined, or may be integrated into another system, or some features may be omitted, or not implemented. In addition, the coupling, direct coupling or communication connection between the components shown or discussed may be through some interfaces, and the indirect coupling or communication connection between the devices or units may be electrical, mechanical or other forms.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed on a plurality of network units; some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, all functional units in the embodiments of the present application may be integrated into one processing module, or each unit may be separately regarded as one unit, or two or more units may be integrated into one unit; the integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
Those of ordinary skill in the art will understand that: all or part of the steps for implementing the method embodiments may be implemented by hardware related to program instructions, and the program may be stored in a computer readable storage medium, and when executed, the program performs the steps including the method embodiments; and the aforementioned storage medium includes: a mobile storage device, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The technical means described in the embodiments of the present application may be arbitrarily combined without conflict.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. A method of data conversion, comprising:
under the condition that a front end of a first application sends a call request to a rear end of the first application, acquiring a view object and a data transmission object related to the call request;
converting, by a setting converter, a first field name corresponding to a set field in the data of the view object package and a second field name corresponding to the set field in the data of the data transmission object package, when the first field name is different from the second field name; wherein the content of the first and second substances,
the setting converter stores the setting corresponding relation among the setting field, the first field name and the second field name.
2. The method of claim 1, wherein obtaining the view object and the data transfer object associated with the call request comprises:
determining a first service called by the front end at a logic calling layer of the first application based on the calling request; determining the view object based on the first service;
acquiring a data transmission object sent by the back end to the front end through a first remote process call interface; and the first remote procedure call interface represents the remote procedure call interface of the front end sending the call request.
3. The method according to claim 1 or 2, wherein the converting the first field name or the second field name by setting a converter comprises:
determining a corresponding setting converter according to the field type of the setting field;
converting the first field name or the second field name through the determined setting converter; wherein the content of the first and second substances,
the field type includes one of:
an independent field;
fields in an array, pull-down menu, or list;
fields in the paging list.
4. The method of claim 1, wherein the converting the first field name or the second field name by setting a converter comprises one of:
converting the first field name into a corresponding second field name through a setting converter under the condition that the calling request is used for requesting to store data;
and converting the second field name into a corresponding first field name through a setting converter under the condition that the calling request is used for requesting to acquire data.
5. The method of claim 1, further comprising:
intercepting or filtering setting data by the setting converter; the setting data is encapsulated in the view object or the data transmission object.
6. The method of claim 5, wherein while intercepting or filtering setting data by the setting switcher, the method further comprises:
in a case where it is detected by the setting converter that there is abnormal data in the view object or the data transmission object, a first prompt is output.
7. The method of claim 1, further comprising:
and updating the setting converter when detecting that the application program interface related to the calling request in the back end is changed.
8. A terminal, comprising:
the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring a view object and a data transmission object related to a call request under the condition that the front end of a first application sends the call request to the back end of the first application;
a conversion unit configured to convert, by a setting converter, a first field name corresponding to a setting field in the data of the view object package and a second field name corresponding to the setting field in the data of the data transmission object package, when the first field name and the second field name are different; wherein the content of the first and second substances,
the setting converter stores the setting corresponding relation among the setting field, the first field name and the second field name.
9. A terminal, comprising: a processor and a memory for storing a computer program capable of running on the processor,
wherein the processor is configured to execute the steps of the data conversion method according to any one of claims 1 to 7 when running the computer program.
10. A storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the data conversion method of any one of claims 1 to 7.
CN202110544922.9A 2021-05-19 2021-05-19 Data conversion method, terminal and storage medium Pending CN113419796A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110544922.9A CN113419796A (en) 2021-05-19 2021-05-19 Data conversion method, terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110544922.9A CN113419796A (en) 2021-05-19 2021-05-19 Data conversion method, terminal and storage medium

Publications (1)

Publication Number Publication Date
CN113419796A true CN113419796A (en) 2021-09-21

Family

ID=77712543

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110544922.9A Pending CN113419796A (en) 2021-05-19 2021-05-19 Data conversion method, terminal and storage medium

Country Status (1)

Country Link
CN (1) CN113419796A (en)

Similar Documents

Publication Publication Date Title
CN109002362B (en) Service method, device and system and electronic equipment
CN106375458B (en) Service calling system, method and device
CN110838071B (en) Policy data processing method, device and server
CN111258723B (en) Transaction processing method, device, system, medium and equipment of distributed system
CN104301443A (en) Method and system for calling end capacity ports on web page
CN112054998A (en) Proxy service method, device, equipment and computer readable storage medium
CN115309431B (en) Parameter updating method, readable medium and electronic equipment
CN112491948A (en) Non-invasive monomer application micro-service method and device and computer equipment
CN113032766A (en) Application authority management method and device
CN111338829B (en) Calling method and device for remote procedure call service
CN112835632B (en) Method and equipment for calling end capability and computer storage medium
CN106357654B (en) Remote procedure calling method, device and communication system
CN114547569A (en) Account login processing method and device
CN112235352B (en) Service dependency carding method and device
CN112637126B (en) Service registration method and Pod
JP2005228183A (en) Program execution method and computer system for executing the program
CN112256351B (en) Method for realizing Feign component, method and device for calling micro-service
CN110275701B (en) Data processing method, device, medium and computing equipment
CN113419796A (en) Data conversion method, terminal and storage medium
CN111581576A (en) Development processing method and device based on micro-service and storage medium
CN115237481A (en) Method, device and equipment for driving external equipment and storage medium
CN111367683A (en) Result obtaining method, device and equipment
CN113918245A (en) Data calling method, device, equipment and computer readable storage medium
CN112395023B (en) Operation activity display method, device and system
CN113656091B (en) Method for realizing independent open program process, related device and 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