CN116382776A - Cross-platform API migration method, device, medium and equipment - Google Patents

Cross-platform API migration method, device, medium and equipment Download PDF

Info

Publication number
CN116382776A
CN116382776A CN202310350918.8A CN202310350918A CN116382776A CN 116382776 A CN116382776 A CN 116382776A CN 202310350918 A CN202310350918 A CN 202310350918A CN 116382776 A CN116382776 A CN 116382776A
Authority
CN
China
Prior art keywords
target
api
migration
data
platform
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
CN202310350918.8A
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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen 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 Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN202310350918.8A priority Critical patent/CN116382776A/en
Publication of CN116382776A publication Critical patent/CN116382776A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/76Adapting program code to run in a different environment; Porting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Stored Programmes (AREA)

Abstract

The embodiment of the application provides a cross-platform API migration method, device, medium and equipment, wherein the method comprises the following steps: receiving a data migration request; acquiring target API basic data to be migrated in a data migration request and a target migration platform identification; determining a target data unit, presetting a mark and configuration parameters; and migrating each target data unit to a corresponding target configuration position according to a mapping relation between a preset identifier and the target configuration position in the target migration platform corresponding to the target migration platform identifier, and creating a target API based on the configuration parameters. According to the field information contained in each data unit, the mapping relation between each data unit and the target configuration position of the new platform is established. When the release of the new platform is detected, each data unit of the API data structure is automatically migrated to the target configuration position of the new platform according to the mapping relation to complete the updating of the API data, so that the data migration efficiency is improved, and meanwhile, the consistency with the API in different platforms during coexistence of the new platform and the old platform can be ensured.

Description

Cross-platform API migration method, device, medium and equipment
Technical Field
The present disclosure relates to the field of electronic communications technologies, and in particular, to a method, an apparatus, a medium, and a device for migrating an API across platforms.
Background
In the field of open platforms (openApi), service capability is based on unified standard APIs to output external access groups such as individual users, enterprise merchants, ISV servers and the like through the open platform, wherein the life cycle management capability of the APIs is an indispensable part, with expansion of the company service field, personalized requirements of user groups and evolution of technical architecture, iterative upgrade of the open platform functions is a necessary trend, when the existing open platform technical architecture reaches a bottleneck insufficient to support service growth, the API management as a core function of the platform is also subjected to upgrade transformation, and considering service compatibility and service continuity of the new open platform, the existing APIs are required to be migrated from the old platform to the new platform, but based on the existing API level, the existing APIs cannot be migrated by relying on the service side, the service association influence is too large, the migration period is too long, and consistency of the same APIs in different platforms is difficult to be ensured during coexistence of the new and old platforms.
Disclosure of Invention
The embodiment of the application provides a cross-platform API migration method, device, medium and equipment, and by utilizing the cross-platform API migration method provided by the embodiment of the application, through logically splitting an API data structure of an old platform, each data unit forming the API data structure is obtained, and a mapping relation is established between each data unit and a target configuration position of a new platform according to field information contained in each data unit. When the release of the new platform is detected, each data unit of the API data structure is automatically migrated to the target configuration position of the new platform according to the mapping relation to complete the updating of the API data, so that the data migration efficiency is improved, and meanwhile, the consistency with the API in different platforms during coexistence of the new platform and the old platform can be ensured.
An aspect of an embodiment of the present application provides a cross-platform API migration method, where the cross-platform API migration method includes:
receiving a data migration request;
acquiring target API basic data to be migrated in the data migration request and a target migration platform identification;
determining target data units in all data units forming the target API basic data, preset identifiers corresponding to the target data units, and configuration parameters required by creating a target API in a target migration platform corresponding to the target migration platform identifier by using the target data;
and migrating each target data unit to a corresponding target configuration position according to a mapping relation between a pre-established preset identifier and the target configuration position in the target migration platform corresponding to the target migration platform identifier, and establishing the target API based on the configuration parameters.
In the cross-platform API migration method according to the embodiment of the present application, after the receiving the data migration request, the method further includes:
obtaining a migration type of a target API in the data migration request, wherein the migration type comprises newly added data migration or existing data migration;
And if the migration type is newly added data migration, determining all data units forming the basic data of the target API as target data units.
In the cross-platform API migration method according to the embodiment of the present application, after the receiving the data migration request, the method further includes:
if the migration type is the existing data migration, providing a target data unit selection interface;
and determining the selected item in the target data unit selection interface as a target data unit.
In the cross-platform API migration method according to the embodiment of the present application, after the receiving the data migration request, the method further includes:
judging whether the target API is offline push or not;
and if the target API is offline push, deleting the target API in a target migration platform, and rejecting the data migration request.
In the cross-platform API migration method according to the embodiment of the present application, after the receiving the data migration request, the method further includes:
judging the integrity of the basic data of the target API to obtain a judging result;
and if the judging result is that the target API basic data is incomplete, marking the target API basic data as migration failure, and generating record information.
In the cross-platform API migration method according to the embodiment of the present application, the configuration parameters include:
basic information of the API is used for carrying out relation mapping on the target configuration position and the field information;
the AP front-end request parameters are used for defining field information which is opened to a target migration platform;
basic information of an API back-end service interface is used for maintaining the shadow of an interface of an internal service system service side;
the API back-end request parameters are used for defining the parameter entering fields, the front-end field information conversion relation and the back-end field information conversion relation of a target API provider and defining the internal parameters of an open platform;
the API response result parameter is used for defining an original message returned to the target API provider and a final message responded to the target migration platform;
and the API service error code is used for defining the abnormal code returned to the target migration platform by the target API provider and the mapping relation of the abnormal code.
Correspondingly, another aspect of the embodiments of the present application further provides a cross-platform API migration device, where the cross-platform API migration device includes:
the receiving module is used for receiving the data migration request;
the acquisition module is used for acquiring target API basic data to be migrated and target migration platform identification in the data migration request;
The determining module is used for determining target data units in all data units forming the target API basic data, preset identifiers corresponding to the target data units and configuration parameters required by creating a target API in a target migration platform corresponding to the target migration platform identifier;
and the migration module is used for migrating each target data unit to a corresponding target configuration position according to a mapping relation between a preset identifier and the target configuration position in the target migration platform corresponding to the target migration platform identifier, and creating the target API based on the configuration parameters.
In the cross-platform API migration device according to the embodiment of the present application, the configuration parameters include:
basic information of the API is used for carrying out relation mapping on the target configuration position and the field information;
the AP front-end request parameters are used for defining field information which is opened to a target migration platform;
basic information of an API back-end service interface is used for maintaining the shadow of an interface of an internal service system service side;
the API back-end request parameters are used for defining the parameter entering fields, the front-end field information conversion relation and the back-end field information conversion relation of a target API provider and defining the internal parameters of an open platform;
The API response result parameter is used for defining an original message returned to the target API provider and a final message responded to the target migration platform;
and the API service error code is used for defining the abnormal code returned to the target migration platform by the target API provider and the mapping relation of the abnormal code.
Accordingly, another aspect of the embodiments of the present application further provides a storage medium storing a plurality of instructions adapted to be loaded by a processor to perform the cross-platform API migration method described above.
Accordingly, another aspect of the embodiments of the present application further provides a terminal device, including a processor and a memory, where the memory stores a plurality of instructions, and the processor loads the instructions to execute the cross-platform API migration method as described above.
The embodiment of the application provides a cross-platform API migration method, device, medium and equipment, wherein the method comprises the steps of receiving a data migration request; acquiring target API basic data to be migrated in the data migration request and a target migration platform identification; determining target data units in all data units forming the target API basic data, preset identifiers corresponding to the target data units, and configuration parameters required by creating a target API in a target migration platform corresponding to the target migration platform identifier by using the target data; and migrating each target data unit to a corresponding target configuration position according to a mapping relation between a pre-established preset identifier and the target configuration position in the target migration platform corresponding to the target migration platform identifier, and establishing the target API based on the configuration parameters. By utilizing the cross-platform API migration method provided by the embodiment of the application, through logically splitting the API data structure of the old platform, each data unit forming the API data structure is obtained, and a mapping relation is established between each data unit and the target configuration position of the new platform according to field information contained in each data unit. When the release of the new platform is detected, each data unit of the API data structure is automatically migrated to the target configuration position of the new platform according to the mapping relation to complete the updating of the API data, so that the data migration efficiency is improved, and meanwhile, the consistency with the API in different platforms during coexistence of the new platform and the old platform can be ensured.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings that are required to be used in the description of the embodiments will be briefly described below. It is obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained from these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flow chart of a cross-platform API migration method according to an embodiment of the present application.
Fig. 2 is a schematic structural diagram of a cross-platform API migration device according to an embodiment of the present application.
Fig. 3 is another schematic structural diagram of a cross-platform API migration device according to an embodiment of the present application.
Fig. 4 is a schematic structural diagram of a terminal device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. It will be apparent that the described embodiments are only some, but not all, of the embodiments of the present application. All other embodiments, which can be made by a person skilled in the art without any inventive effort, are intended to be within the scope of the present application based on the embodiments herein.
It should be noted that the following is a simple description of the background of the present solution:
it can be understood that in the field of open platform (openApi), service capability is based on unified API to output external access groups such as individual users, enterprise merchants, ISV servers, etc. through the open platform, where the life cycle management capability of the API is an essential part, with expansion of the company service field, personalized requirements of the user group, and evolution of the technology architecture, iterative upgrade of the open platform function is a necessary trend, when the existing open platform technology architecture reaches a bottleneck insufficient to support growth of the service, the API management as a core function of the platform will also face upgrade and transformation, considering compatibility of the service and service continuity in the new open platform, the existing API needs to be migrated from the old platform to the new platform, while based on the existing API level, it is impossible to rely on self migration of the service party, the service association effect is too large, the migration period is too long, and consistency of the same API in different platforms is difficult to be ensured during coexistence of the new and old platforms.
In order to solve the above technical problems, an embodiment of the present application provides a cross-platform API migration method. By utilizing the cross-platform API migration method provided by the embodiment of the application, through logically splitting the API data structure of the old platform, each data unit forming the API data structure is obtained, and a mapping relation is established between each data unit and the target configuration position of the new platform according to field information contained in each data unit. When the release of the new platform is detected, each data unit of the API data structure is automatically migrated to the target configuration position of the new platform according to the mapping relation to complete the updating of the API data, so that the data migration efficiency is improved, and meanwhile, the consistency with the API in different platforms during coexistence of the new platform and the old platform can be ensured.
Referring to fig. 1, fig. 1 is a flow chart of a cross-platform API migration method according to an embodiment of the present application. The cross-platform API migration method is applied to terminal equipment. Optionally, the terminal device is a terminal or a server. Optionally, the server is an independent physical server, or a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDNs (Content Delivery Network, content delivery networks), basic cloud computing services such as big data and artificial intelligence platforms, and the like. Optionally, the terminal is a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart speaker, a smart watch, a smart voice interaction device, a smart home appliance, a vehicle-mounted terminal, and the like, but is not limited thereto.
In an embodiment, the method may comprise the steps of:
step 101, a data migration request is received.
In this embodiment, an event triggering condition for API synchronization may be added to a key link of an old platform, for example, when a terminal device running an API migration method detects that a new API is released online, a data migration request may be automatically sent to a target migration platform, that is, a new platform.
Step 102, obtaining the target API basic data to be migrated and the target migration platform identification in the data migration request.
The target API basic data refers to data required for constructing a target API on a target migration platform. The target migration platform identifies a target migration platform for indicating receipt of target API base data to be migrated.
Step 103, determining a target data unit in each data unit forming the target API basic data, a preset identifier corresponding to each target data unit, and configuration parameters required by creating a target API in a target migration platform corresponding to the target migration platform identifier by using the target data.
It should be noted that the migration types of the target API in the present application are specifically divided into two types, one is new data migration, and the other is existing data migration. The new data migration refers to the migration of data existing away from the new and old platforms. Existing data migration refers to migrating data that already exists on an old platform.
If the migration type is newly added data migration, all data units forming basic data of the target API are determined to be target data units, and the target API is created in a target migration platform corresponding to the target migration platform identifier based on preset identifiers and configuration parameters corresponding to the target data units.
If the migration type is existing data migration, providing a target data unit selection interface, determining selected items in the target data unit selection interface as target data units, and creating target APIs (application program interfaces) in target migration platforms corresponding to target migration platform identifiers based on preset identifiers corresponding to the target data units and configuration parameters. For existing data migration, batch one-time processing is needed, marking can be carried out according to service types or technical dimensions when the target API carries out structural splitting, and existing target data units are manually synchronized in batches according to the marked dimensions.
The target API basic data mainly comprises a target data unit, a preset identifier and configuration parameters.
Illustratively, the target data unit refers to specific data required for building the target API.
The preset identifier refers to field information for indicating attribute characteristics of each target data unit.
Configuration parameters include, but are not limited to, the following:
basic information of the API is used for carrying out relation mapping on the target configuration position and the field information.
The AP front-end request parameters are used for defining field information which is opened to a target migration platform;
basic information of an API back-end service interface is used for maintaining the shadow of an interface of an internal service system service side;
the API back-end request parameters are used for defining the parameter entering fields, the front-end field information conversion relation and the back-end field information conversion relation of a target API provider and defining the internal parameters of an open platform;
the API response result parameter is used for defining an original message returned to the target API provider and a final message responded to the target migration platform;
and the API service error code is used for defining the abnormal code returned to the target migration platform by the target API provider and the mapping relation of the abnormal code.
And 104, migrating each target data unit to a corresponding target configuration position according to a mapping relation between a pre-created preset identifier and the target configuration position in the target migration platform corresponding to the target migration platform identifier, and creating the target API based on the configuration parameters.
The mapping relation between the preset identifier and the target configuration position in the target migration platform corresponding to the target migration platform identifier is created in advance, so that each data unit of the API data structure can be automatically migrated to the target configuration position of the new platform to complete the updating of the API data, the data migration efficiency is improved, and meanwhile, the consistency of the same API in different platforms in the coexistence period of the new platform and the old platform can be ensured.
In some embodiments, after receiving the data migration request, the method further comprises the steps of:
whether the target API is offline pushing is judged, if the target API is offline pushing, the target API is stated to plan offline processing, the target API needs to be deleted in the target migration platform, and the data migration request is refused.
In some embodiments, after receiving the data migration request, the method further comprises the steps of:
and judging the integrity of the basic data of the target API to obtain a judging result, if the judging result is that the basic data of the target API is incomplete, marking the basic data of the target API as migration failure, and generating record information to inform technicians.
Any combination of the above optional solutions may be adopted to form an optional embodiment of the present application, which is not described herein in detail.
In particular, the present application is not limited by the order of execution of the steps described, and certain steps may be performed in other orders or concurrently without conflict.
As can be seen from the above, the cross-platform API migration method provided by the embodiment of the present application receives a data migration request; acquiring target API basic data to be migrated in the data migration request and a target migration platform identification; determining target data units in all data units forming the target API basic data, preset identifiers corresponding to the target data units, and configuration parameters required by creating a target API in a target migration platform corresponding to the target migration platform identifier by using the target data; and migrating each target data unit to a corresponding target configuration position according to a mapping relation between a pre-established preset identifier and the target configuration position in the target migration platform corresponding to the target migration platform identifier, and establishing the target API based on the configuration parameters. By utilizing the cross-platform API migration method provided by the embodiment of the application, through logically splitting the API data structure of the old platform, each data unit forming the API data structure is obtained, and a mapping relation is established between each data unit and the target configuration position of the new platform according to field information contained in each data unit. When the release of the new platform is detected, each data unit of the API data structure is automatically migrated to the target configuration position of the new platform according to the mapping relation to complete the updating of the API data, so that the data migration efficiency is improved, and meanwhile, the consistency with the API in different platforms during coexistence of the new platform and the old platform can be ensured.
The embodiment of the application also provides a cross-platform API migration device, which can be integrated in the terminal equipment.
Referring to fig. 2, fig. 2 is a schematic structural diagram of a cross-platform API migration device according to an embodiment of the present application. The cross-platform API migration device 30 may include:
a receiving module 31, configured to receive a data migration request;
the obtaining module 32 is configured to obtain target API basic data to be migrated and a target migration platform identifier in the data migration request;
a determining module 33, configured to determine a target data unit from data units forming the basic data of the target API, a preset identifier corresponding to each target data unit, and configuration parameters required for creating the target API in a target migration platform corresponding to the target migration platform identifier by using the target data;
and the migration module 34 is configured to migrate each target data unit to a corresponding target configuration location according to a mapping relationship between a pre-created preset identifier and a target configuration location in a target migration platform corresponding to the target migration platform identifier, and create the target API based on the configuration parameter.
In some embodiments, the apparatus further includes a first determining module configured to obtain a migration type of the target API in the data migration request, where the migration type includes a new data migration or an existing data migration; and if the migration type is newly added data migration, determining all data units forming the basic data of the target API as target data units.
In some embodiments, the apparatus further comprises a second determination module configured to provide a target data unit selection interface if the migration type is an existing data migration; and determining the selected item in the target data unit selection interface as a target data unit.
In some embodiments, the apparatus further includes a deletion module configured to determine whether the target API is an offline push; and if the target API is offline push, deleting the target API in a target migration platform, and rejecting the data migration request.
In some embodiments, the device further includes a recording module, configured to determine the integrity of the target API base data, to obtain a determination result; and if the judging result is that the target API basic data is incomplete, marking the target API basic data as migration failure, and generating record information.
In some embodiments, the configuration parameters include:
basic information of the API is used for carrying out relation mapping on the target configuration position and the field information.
The AP front-end request parameters are used for defining field information which is opened to a target migration platform;
basic information of an API back-end service interface is used for maintaining the shadow of an interface of an internal service system service side;
The API back-end request parameters are used for defining the parameter entering fields, the front-end field information conversion relation and the back-end field information conversion relation of a target API provider and defining the internal parameters of an open platform;
the API response result parameter is used for defining an original message returned to the target API provider and a final message responded to the target migration platform;
and the API service error code is used for defining the abnormal code returned to the target migration platform by the target API provider and the mapping relation of the abnormal code.
In specific implementation, each module may be implemented as a separate entity, or may be combined arbitrarily and implemented as the same entity or several entities.
As can be seen from the above, the cross-platform API migration device 30 provided in the embodiments of the present application, where the receiving module 31 is configured to receive a data migration request; the obtaining module 32 is configured to obtain target API basic data to be migrated in the data migration request and a target migration platform identifier; the determining module 33 is configured to determine a target data unit from the data units forming the basic data of the target API, a preset identifier corresponding to each target data unit, and configuration parameters required for creating the target API in the target migration platform corresponding to the target migration platform identifier by using the target data; the migration module 34 is configured to migrate each target data unit to a corresponding target configuration location according to a mapping relationship between a pre-created preset identifier and a target configuration location in a target migration platform corresponding to the target migration platform identifier, and create the target API based on the configuration parameter.
Referring to fig. 3, fig. 3 is another schematic structural diagram of a cross-platform API migration device according to an embodiment of the present application, where the cross-platform API migration device 30 includes a memory 120, one or more processors 180, and one or more application programs, where the one or more application programs are stored in the memory 120 and configured to be executed by the processors 180; the processor 180 may include a receiving module 31, an obtaining module 32, a determining module 33, and a migrating module 34. For example, the structures and connection relationships of the above respective components may be as follows:
memory 120 may be used to store applications and data. The memory 120 stores application programs including executable code. Applications may constitute various functional modules. Processor 180 executes various functional applications and API migration across platforms by running application programs stored in memory 120. In addition, memory 120 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 120 may also include a memory controller to provide access to the memory 120 by the processor 180.
The processor 180 is a control center of the device, connects various parts of the entire terminal using various interfaces and lines, and performs various functions of the device and processes data by running or executing application programs stored in the memory 120 and calling data stored in the memory 120, thereby performing overall monitoring of the device. Optionally, the processor 180 may include one or more processing cores; preferably, the processor 180 may integrate an application processor and a modem processor, wherein the application processor primarily processes an operating system, user interfaces, application programs, and the like.
In particular, in this embodiment, the processor 180 loads executable codes corresponding to the processes of one or more application programs into the memory 120 according to the following instructions, and the processor 180 executes the application programs stored in the memory 120, so as to implement various functions:
a receiving instruction is used for receiving a data migration request;
the acquisition instruction is used for acquiring target API basic data to be migrated in the data migration request and a target migration platform identifier;
determining instructions, which are used for determining target data units in data units forming the target API basic data, preset identifiers corresponding to the target data units, and configuration parameters required by creating a target API in a target migration platform corresponding to the target migration platform identifier by using the target data;
And the migration instruction is used for migrating each target data unit to a corresponding target configuration position according to a mapping relation between a preset identifier and the target configuration position in the target migration platform corresponding to the target migration platform identifier, and creating the target API based on the configuration parameters.
In some embodiments, the program further includes first determining instructions for obtaining a migration type of the target API in the data migration request, wherein the migration type includes a new data migration or an existing data migration; and if the migration type is newly added data migration, determining all data units forming the basic data of the target API as target data units.
In some embodiments, the program further comprises second determining instructions for providing a target data unit selection interface if the migration type is an existing data migration; and determining the selected item in the target data unit selection interface as a target data unit.
In some embodiments, the program further includes a delete instruction to determine whether the target API is a push-to-offline; and if the target API is offline push, deleting the target API in a target migration platform, and rejecting the data migration request.
In some embodiments, the program further includes a record instruction, configured to determine the integrity of the basic data of the target API, to obtain a determination result; and if the judging result is that the target API basic data is incomplete, marking the target API basic data as migration failure, and generating record information.
In some embodiments, the configuration parameters include:
basic information of the API is used for carrying out relation mapping on the target configuration position and the field information.
The AP front-end request parameters are used for defining field information which is opened to a target migration platform;
basic information of an API back-end service interface is used for maintaining the shadow of an interface of an internal service system service side;
the API back-end request parameters are used for defining the parameter entering fields, the front-end field information conversion relation and the back-end field information conversion relation of a target API provider and defining the internal parameters of an open platform;
the API response result parameter is used for defining an original message returned to the target API provider and a final message responded to the target migration platform;
and the API service error code is used for defining the abnormal code returned to the target migration platform by the target API provider and the mapping relation of the abnormal code.
The embodiment of the application also provides terminal equipment. The terminal equipment can be a server, a smart phone, a computer, a tablet personal computer and the like.
Referring to fig. 4, fig. 4 shows a schematic structural diagram of a terminal device provided in an embodiment of the present application, where the terminal device may be used to implement the cross-platform API migration method provided in the foregoing embodiment. The terminal device 1200 may be a smart phone or a tablet computer.
As shown in fig. 4, the terminal device 1200 may include an RF (Radio Frequency) circuit 110, a memory 120 including one or more (only one is shown in the figure) computer readable storage mediums, an input unit 130, a display unit 140, a sensor 150, an audio circuit 160, a transmission module 170, a processor 180 including one or more (only one is shown in the figure) processing cores, and a power supply 190. It will be appreciated by those skilled in the art that the configuration of the terminal device 1200 shown in fig. 4 does not constitute a limitation of the terminal device 1200, and may include more or fewer components than shown, or may combine certain components, or may have a different arrangement of components. Wherein:
the RF circuit 110 is configured to receive and transmit electromagnetic waves, and to perform mutual conversion between the electromagnetic waves and the electrical signals, so as to communicate with a communication network or other devices. RF circuitry 110 may include various existing circuit elements for performing these functions, such as an antenna, a radio frequency transceiver, a digital signal processor, an encryption/decryption chip, a Subscriber Identity Module (SIM) card, memory, and the like. The RF circuitry 110 may communicate with various networks such as the internet, intranets, wireless networks, or other devices via wireless networks.
The memory 120 may be used to store software programs and modules, such as program instructions/modules corresponding to the cross-platform API migration method in the above embodiment, and the processor 180 executes various function applications and cross-platform API migration by running the software programs and modules stored in the memory 120, so that the vibration reminding mode can be automatically selected to update data according to the current scene where the terminal device is located, thereby not only ensuring that the scenes such as a conference are not disturbed, but also ensuring that the user can perceive an incoming call, and improving the intelligence of the terminal device. Memory 120 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, memory 120 may further include memory remotely located relative to processor 180, which may be connected to terminal device 1200 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input unit 130 may be used to receive input numeric or character information and to generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control. In particular, the input unit 130 may comprise a touch sensitive surface 131 and other input devices 132. The touch sensitive surface 131, also referred to as a touch display screen or touch pad, may collect touch operations thereon or thereabout by a user (e.g., operations of the user on the touch sensitive surface 131 or thereabout by any suitable object or accessory such as a finger, stylus, etc.), and actuate the corresponding connection means according to a pre-set program. Alternatively, the touch sensitive surface 131 may comprise two parts, a touch detection device and a touch controller. The touch control detection device detects the touch control direction of a user, detects signals brought by touch control operation and transmits the signals to the touch control controller; the touch controller receives touch information from the touch detection device, converts the touch information into touch coordinates, sends the touch coordinates to the processor 180, and can receive and execute commands sent by the processor 180. In addition, the touch-sensitive surface 131 may be implemented in various types of resistive, capacitive, infrared, surface acoustic wave, and the like. In addition to the touch-sensitive surface 131, the input unit 130 may also comprise other input devices 132. In particular, other input devices 132 may include, but are not limited to, one or more of a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, mouse, joystick, etc.
The display unit 140 may be used to display information input by a user or information provided to the user and various graphical user interfaces of the terminal device 1200, which may be composed of graphics, text, icons, video, and any combination thereof. The display unit 140 may include a display panel 141, and alternatively, the display panel 141 may be configured in the form of an LCD (Liquid Crystal Display ), an OLED (Organic Light-Emitting Diode), or the like. Further, the touch-sensitive surface 131 may cover the display panel 141, and after the touch-sensitive surface 131 detects a touch operation thereon or thereabout, the touch-sensitive surface is transferred to the processor 180 to determine a type of touch event, and then the processor 180 provides a corresponding visual output on the display panel 141 according to the type of touch event. Although in fig. 4 the touch-sensitive surface 131 and the display panel 141 are implemented as two separate components for input and output functions, in some embodiments the touch-sensitive surface 131 may be integrated with the display panel 141 to implement the input and output functions.
The terminal device 1200 may also include at least one sensor 150, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor that may adjust the brightness of the display panel 141 according to the brightness of ambient light, and a proximity sensor that may turn off the display panel 141 and/or the backlight when the terminal device 1200 moves to the ear. As one of the motion sensors, the gravity acceleration sensor can detect the acceleration in all directions (generally three axes), and can detect the gravity and the direction when the mobile phone is stationary, and can be used for applications of recognizing the gesture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer gesture calibration), vibration recognition related functions (such as pedometer and knocking), and the like; other sensors such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc. that may also be configured with the terminal device 1200 are not described in detail herein.
Audio circuitry 160, speaker 161, microphone 162 may provide an audio interface between a user and terminal device 1200. The audio circuit 160 may transmit the received electrical signal converted from audio data to the speaker 161, and the electrical signal is converted into a sound signal by the speaker 161 to be output; on the other hand, the microphone 162 converts the collected sound signal into an electrical signal, receives the electrical signal from the audio circuit 160, converts the electrical signal into audio data, outputs the audio data to the processor 180 for processing, transmits the audio data to, for example, another terminal via the RF circuit 110, or outputs the audio data to the memory 120 for further processing. Audio circuitry 160 may also include an ear bud jack to provide communication of the peripheral headphones with terminal device 1200.
Terminal device 1200 may facilitate user email, web browsing, streaming media access, etc. via a transmission module 170 (e.g., wi-Fi module) that provides wireless broadband internet access to the user. Although fig. 4 shows the transmission module 170, it is understood that it does not belong to the essential constitution of the terminal device 1200, and may be omitted entirely as needed within the scope of not changing the essence of the invention.
The processor 180 is a control center of the terminal device 1200, connects various parts of the entire mobile phone using various interfaces and lines, and performs various functions of the terminal device 1200 and processes data by running or executing software programs and/or modules stored in the memory 120, and calling data stored in the memory 120, thereby performing overall monitoring of the mobile phone. Optionally, the processor 180 may include one or more processing cores; in some embodiments, the processor 180 may integrate an application processor that primarily processes operating systems, user interfaces, applications, etc., with a modem processor that primarily processes wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 180.
The terminal device 1200 also includes a power supply 190 that provides power to the various components, and in some embodiments, may be logically coupled to the processor 180 via a power management system to perform functions such as managing discharge, and managing power consumption via the power management system. The power supply 190 may also include one or more of any of a direct current or alternating current power supply, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and the like.
Although not shown, the terminal device 1200 may further include a camera (such as a front camera, a rear camera), a bluetooth module, etc., which will not be described herein. In particular, in the present embodiment, the display unit 140 of the terminal device 1200 is a touch screen display, the terminal device 1200 further includes a memory 120, and one or more programs, wherein the one or more programs are stored in the memory 120 and configured to be executed by the one or more processors 180, the one or more programs include instructions for:
a receiving instruction is used for receiving a data migration request;
the acquisition instruction is used for acquiring target API basic data to be migrated in the data migration request and a target migration platform identifier;
Determining instructions, which are used for determining target data units in data units forming the target API basic data, preset identifiers corresponding to the target data units, and configuration parameters required by creating a target API in a target migration platform corresponding to the target migration platform identifier by using the target data;
and the migration instruction is used for migrating each target data unit to a corresponding target configuration position according to a mapping relation between a preset identifier and the target configuration position in the target migration platform corresponding to the target migration platform identifier, and creating the target API based on the configuration parameters.
In some embodiments, the program further includes first determining instructions for obtaining a migration type of the target API in the data migration request, wherein the migration type includes a new data migration or an existing data migration; and if the migration type is newly added data migration, determining all data units forming the basic data of the target API as target data units.
In some embodiments, the program further comprises second determining instructions for providing a target data unit selection interface if the migration type is an existing data migration; and determining the selected item in the target data unit selection interface as a target data unit.
In some embodiments, the program further includes a delete instruction to determine whether the target API is a push-to-offline; and if the target API is offline push, deleting the target API in a target migration platform, and rejecting the data migration request.
In some embodiments, the program further includes a record instruction, configured to determine the integrity of the basic data of the target API, to obtain a determination result; and if the judging result is that the target API basic data is incomplete, marking the target API basic data as migration failure, and generating record information.
In some embodiments, the configuration parameters include:
basic information of the API is used for carrying out relation mapping on the target configuration position and the field information.
The AP front-end request parameters are used for defining field information which is opened to a target migration platform;
basic information of an API back-end service interface is used for maintaining the shadow of an interface of an internal service system service side;
the API back-end request parameters are used for defining the parameter entering fields, the front-end field information conversion relation and the back-end field information conversion relation of a target API provider and defining the internal parameters of an open platform;
the API response result parameter is used for defining an original message returned to the target API provider and a final message responded to the target migration platform;
And the API service error code is used for defining the abnormal code returned to the target migration platform by the target API provider and the mapping relation of the abnormal code.
The embodiment of the application also provides a storage medium, in which a computer program is stored, and when the computer program runs on a computer, the computer executes the cross-platform API migration method according to any one of the embodiments.
It should be noted that, for the cross-platform API migration method described in the present application, it will be understood by those skilled in the art that all or part of the flow of implementing the cross-platform API migration method described in the embodiments of the present application may be implemented by controlling related hardware by using a computer program, where the computer program may be stored in a computer readable storage medium, such as a memory of a terminal device, and executed by at least one processor in the terminal device, and the execution process may include the flow of the embodiment of the cross-platform API migration method as described in the embodiments of the present application. The storage medium may be a magnetic disk, an optical disk, a Read Only Memory (ROM), a random access Memory (RAM, random Access Memory), or the like.
For the cross-platform API migration device in the embodiments of the present application, each functional module may be integrated in one processing chip, or each module may exist separately and physically, or two or more modules may be integrated in one module. The integrated modules may be implemented in hardware or in software functional modules. The integrated module, if implemented as a software functional module and sold or used as a stand-alone product, may also be stored in a computer readable storage medium such as read-only memory, magnetic or optical disk, etc.
The method, the device, the medium and the equipment for migrating the API of the cross-platform provided by the embodiment of the application are described in detail. The principles and embodiments of the present application are described herein with specific examples, the above examples being provided only to assist in understanding the methods of the present application and their core ideas; meanwhile, those skilled in the art will have variations in the specific embodiments and application scope in light of the ideas of the present application, and the present description should not be construed as limiting the present application in view of the above.

Claims (10)

1. A method for cross-platform API migration, comprising:
receiving a data migration request;
acquiring target API basic data to be migrated in the data migration request and a target migration platform identification;
determining target data units in all data units forming the target API basic data, preset identifiers corresponding to the target data units, and configuration parameters required by creating a target API in a target migration platform corresponding to the target migration platform identifier by using the target data;
and migrating each target data unit to a corresponding target configuration position according to a mapping relation between a pre-established preset identifier and the target configuration position in the target migration platform corresponding to the target migration platform identifier, and establishing the target API based on the configuration parameters.
2. The API migration method of claim 1, wherein after said receiving a data migration request, said method further comprises:
obtaining a migration type of a target API in the data migration request, wherein the migration type comprises newly added data migration or existing data migration;
and if the migration type is newly added data migration, determining all data units forming the basic data of the target API as target data units.
3. The API migration method of claim 2, wherein after said receiving a data migration request, said method further comprises:
if the migration type is the existing data migration, providing a target data unit selection interface;
and determining the selected item in the target data unit selection interface as a target data unit.
4. The API migration method of claim 3, wherein after said receiving a data migration request, said method further comprises:
judging whether the target API is offline push or not;
and if the target API is offline push, deleting the target API in a target migration platform, and rejecting the data migration request.
5. The API migration method of claim 1, wherein after said receiving a data migration request, said method further comprises:
Judging the integrity of the basic data of the target API to obtain a judging result;
and if the judging result is that the target API basic data is incomplete, marking the target API basic data as migration failure, and generating record information.
6. The API migration method of claim 1, wherein said configuration parameters comprise:
basic information of the API is used for carrying out relation mapping on the target configuration position and the field information;
the AP front-end request parameters are used for defining field information which is opened to a target migration platform;
basic information of an API back-end service interface is used for maintaining the shadow of an interface of an internal service system service side;
the API back-end request parameters are used for defining the parameter entering fields, the front-end field information conversion relation and the back-end field information conversion relation of a target API provider and defining the internal parameters of an open platform;
the API response result parameter is used for defining an original message returned to the target API provider and a final message responded to the target migration platform;
and the API service error code is used for defining the abnormal code returned to the target migration platform by the target API provider and the mapping relation of the abnormal code.
7. A cross-platform API migration apparatus, comprising:
The receiving module is used for receiving the data migration request;
the acquisition module is used for acquiring target API basic data to be migrated and target migration platform identification in the data migration request;
the determining module is used for determining target data units in all data units forming the target API basic data, preset identifiers corresponding to the target data units and configuration parameters required by creating a target API in a target migration platform corresponding to the target migration platform identifier;
and the migration module is used for migrating each target data unit to a corresponding target configuration position according to a mapping relation between a preset identifier and the target configuration position in the target migration platform corresponding to the target migration platform identifier, and creating the target API based on the configuration parameters.
8. The API migration apparatus of claim 7, wherein the configuration parameters comprise:
basic information of the API is used for carrying out relation mapping on the target configuration position and the field information;
the AP front-end request parameters are used for defining field information which is opened to a target migration platform;
basic information of an API back-end service interface is used for maintaining the shadow of an interface of an internal service system service side;
The API back-end request parameters are used for defining the parameter entering fields, the front-end field information conversion relation and the back-end field information conversion relation of a target API provider and defining the internal parameters of an open platform;
the API response result parameter is used for defining an original message returned to the target API provider and a final message responded to the target migration platform;
and the API service error code is used for defining the abnormal code returned to the target migration platform by the target API provider and the mapping relation of the abnormal code.
9. A computer readable storage medium storing a plurality of instructions adapted to be loaded by a processor to perform the cross-platform API migration method of any one of claims 1 to 6.
10. A terminal device comprising a processor and a memory, the memory storing a plurality of instructions, the processor loading the instructions to perform the cross-platform API migration method of any one of claims 1-6.
CN202310350918.8A 2023-03-28 2023-03-28 Cross-platform API migration method, device, medium and equipment Pending CN116382776A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310350918.8A CN116382776A (en) 2023-03-28 2023-03-28 Cross-platform API migration method, device, medium and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310350918.8A CN116382776A (en) 2023-03-28 2023-03-28 Cross-platform API migration method, device, medium and equipment

Publications (1)

Publication Number Publication Date
CN116382776A true CN116382776A (en) 2023-07-04

Family

ID=86970613

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310350918.8A Pending CN116382776A (en) 2023-03-28 2023-03-28 Cross-platform API migration method, device, medium and equipment

Country Status (1)

Country Link
CN (1) CN116382776A (en)

Similar Documents

Publication Publication Date Title
US10055220B2 (en) Method, apparatus, and system for processing desktop data of mobile terminal
EP3174253B1 (en) Message withdrawal method and apparatus, computer program and recording medium
US20170316781A1 (en) Remote electronic service requesting and processing method, server, and terminal
CN108039963B (en) Container configuration method and device and storage medium
CN108809805B (en) Information interaction method and system and public account client
CN113141575B (en) Method, device and equipment for updating tracking area list and storage medium
CN111274463B (en) Information display method, device and storage medium based on IM contact person grouping setting
CN110196662B (en) Method, device, terminal and storage medium for displaying synchronization state
CN111359210A (en) Data processing method and device, electronic equipment and storage medium
CN115589432A (en) Message push management method, device, medium and equipment
CN106209601B (en) State update message pushing method and device
CN106210325B (en) Method, device and terminal for setting incoming call ringtone of social application
CN111144845B (en) Mobile terminal meeting reminding method and device
CN111858182B (en) Data reading method and device, storage medium and mobile terminal
CN111027406B (en) Picture identification method and device, storage medium and electronic equipment
CN116382776A (en) Cross-platform API migration method, device, medium and equipment
CN106681845B (en) Method and device for managing communication messages
CN112667868A (en) Data detection method and device
CN116582585B (en) Message pushing method, device, medium and equipment
CN114189436B (en) Multi-cluster configuration deployment method and device, electronic equipment and storage medium
CN113821276B (en) Custom service management method and related device
CN116301578A (en) Parameter configuration method, device, medium and equipment for cache function
CN115599820A (en) Batch data processing method, device, medium and equipment
CN116521308A (en) Target object refreshing method, device, medium and equipment
CN117407010A (en) Software upgrading method, device, medium 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