CN108647033B - SDK automatic packaging method for open platform - Google Patents
SDK automatic packaging method for open platform Download PDFInfo
- Publication number
- CN108647033B CN108647033B CN201810288774.7A CN201810288774A CN108647033B CN 108647033 B CN108647033 B CN 108647033B CN 201810288774 A CN201810288774 A CN 201810288774A CN 108647033 B CN108647033 B CN 108647033B
- Authority
- CN
- China
- Prior art keywords
- sdk
- code
- data
- interface
- packaging
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/61—Installation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
- G06F8/31—Programming languages or programming paradigms
- G06F8/315—Object-oriented languages
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/40—Transformation of program code
- G06F8/41—Compilation
- G06F8/44—Encoding
- G06F8/447—Target code generation
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computing Systems (AREA)
- Stored Programmes (AREA)
Abstract
The invention discloses an SDK automatic packaging method of an open platform, relating to the technical field of open platform SDKs and comprising the following steps: s1: the API management center inputs the requirement information of the third-party platform and automatically generates an XML file according to the requirement information; s2: the XML file is read into the memory by the JAVA code to become data which is consistent with the data structure of the automatic generation code engine; s3: transmitting the data in the memory to an automatic code generation engine to generate an SDK interface code; s4: generating an ant packaging script by using Java codes to code part of the SDK interface; s5: an ant packaging script is run by sending an instruction through Java code; s6: and compiling codes contained in the whole SDK framework through an ant script to generate a jar package. S7: and packaging the jar package and the configuration file in the whole SDK framework into a zip package. The invention solves the problems that in the prior art, the development and the update of the SDK each time require a large amount of time and consume a large amount of manpower because the SDK is coded manually.
Description
Technical Field
The invention relates to the technical field of open platform SDKs, in particular to an automatic SDK packaging method for an open platform.
Background
Currently, financial institutions open financial services through an internet open platform, specifically provide for a third-party platform to call in an API form, and realize open sharing of financial services. In order to conveniently and quickly access the open platform, the open platform packages API communication, data transmission and the like through the SDK, so that the difficulty and complexity of third party access are reduced, the third party access time is shortened, the service is quickly developed, and the requirement of the internet products for developing is met. The SDK packaging basic service has large workload, occupies one third of the development time of the service opening, and solves the problem that the work except the business processing development needs to be carried out through automation, configuration and development task parallel processing in order to ensure high quality of product service and rapid production online and shorten the whole product period, so that the product development period time is used for the business processing development, the quality is ensured, and the development requirement of bank business is met.
At present, the SDK codes are not clear enough in layering, and codes such as communication and data encryption and decryption which are not influenced by public use codes, product updating and new addition cause that all the SDK codes need to be tested after updating and new addition, so that the code walkthrough and test work is increased. The SDK development time is too long, the percentage of the total time of product development is too high, the product marketing and use are seriously influenced, and the requirement of Internet development is not met.
Moreover, the existing SDK is formed by manual coding by programmers, so that developers are required to develop and update the SDK each time a new product or a product service interface changes, and processes such as code walkthrough, version management, test review and the like are required. The existing SDK public code and the interface code are maintained together, and joint debugging test on the whole code is required to be carried out every time updating and developing are carried out.
Disclosure of Invention
The invention aims to: in order to solve the problems that in the prior art, the development and the update of the SDK each time require a large amount of time and consume a large amount of manpower because the SDK is coded manually, the invention provides an SDK automatic packaging method of an open platform.
The technical scheme of the invention is as follows:
an SDK automatic packaging method of an open platform comprises the following steps:
s1: the API management center inputs the requirement information of the third-party platform and automatically generates an XML file according to the requirement information;
s2: the XML file is read into the memory by the JAVA code to become data which is consistent with the data structure of the automatic generation code engine;
s3: transmitting the data obtained in the S2 to an automatic code generation engine to generate an SDK interface code;
s4: generating an ant packaging script from the SDK interface code by using Java code;
s5: an ant packaging script is run by sending an instruction through Java code;
s6: and compiling the code contained in the whole SDK architecture through an ant script to generate a jar package, wherein the code contained in the SDK architecture comprises the code of an SDK interface part, a protocol layer code and a data check layer code.
S7: packaging the jar packet and the configuration file in the whole SDK framework into a zip packet; properties, which includes certificate password, APPID, network transmission domain name, certificate transmission type, public key of open platform.
Specifically, the SDK interface code includes an SDK entity class and an SDK interface class, and the SDK entity class is used as a parameter of the SDK interface class method and is called by an accessing third party.
The specific steps of S3 are as follows: generating an import package structure according to the data relation in the S2, and then generating an SDK interface class and an SDK entity class according to the data obtained in the S2;
specifically, the generation method of the SDK interface class includes: generating a calling method and a calling method form parameter of the SDK interface class according to the interface name in the data in the S2;
the SDK entity class generation method comprises the following steps: generating the SDK entity class name according to the interface name in the data in S2 and generating the attribute of the SDK entity class according to the attribute name in the data in S2.
Specifically, the SDK architecture includes:
the SDK interface layer unit is used for realizing the calling of a third-party platform;
the client configuration unit is used for configuring the public information by the third-party platform;
the interface data verification rule engine unit is used for verifying data specifications and service specifications of a third party and input data;
the safety processing unit is used for signing and encrypting data in the transmission process;
the configuration processing unit is used for applying the public information configured by the client configuration unit to the SDK operation;
and the communication processing unit is used for processing the transmission communication between the SDK and the open platform.
After the scheme is adopted, the invention has the following beneficial effects:
(1) the SDK package is updated and newly added in the API without manual coding. After the SDK is automated, no manual coding is needed after the API is newly added and updated, newly added or updated interface information is configured in the API management center, the interface is selected to package the SDK, an SDK package can be immediately generated to provide a test, participation of developers is reduced, and meanwhile, quick test of the interface can be realized. The codes are at least thousands of lines, each sentence of codes is connected, the connectivity among all the codes is very strong, paralysis can be caused by a punctuation error program, the codes are automatically packed without manual modification, a large amount of cost is saved, and the reliability is improved.
(2) The product development cycle is shortened, and more time is given to product development. The automatic generation of the API is carried out after the interface development is finished, the manual coding needs 1-3 weeks for development and completion, and the API can be generated immediately at present, so that the time for non-business process development is reduced, the product development period is shortened, more time can be given for product development and testing, and the high-quality online of the product is ensured.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings needed in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings without creative efforts. The above and other objects, features and advantages of the present invention will become more apparent from the accompanying drawings. Like reference numerals refer to like parts throughout the drawings. The drawings are not necessarily to scale, emphasis instead being placed upon illustrating the principles of the invention.
FIG. 1 is a flow chart of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In order to solve the problems that in the prior art, the total SDK is manually coded, so that a large amount of time is needed for developing and updating the SDK each time and a large amount of manpower is consumed, in the invention, a code automatically analyzes and generates structured xml according to a required excel document, the required document is translated into data (including the dependency relationship and calling relationship among the codes) needed for generating JAVA codes, an API template is constructed, and the codes are automatically generated by utilizing an automatic code generation engine according to the template. According to the automatic generation technical scheme of the automatic code generation engine, the technical realization is the work result of active participation and hard work of developers, and the heart and blood of the developers are condensed. The SDK automatic code generation can quickly adapt to the requirement of the Internet mechanism on the daily change of product iteration, and the generation efficiency and the value output are greatly improved. It should be noted that the java code in the present invention is only one coding method, and the method of the present invention is not limited to java code, and php and python codes can be used in the implementation process, which can also achieve the effect of the present invention.
Specifically, the invention discloses an SDK automatic packaging method of an open platform, which comprises the following steps:
s1: the API management center inputs the requirement information of the third-party platform and automatically generates an XML file according to the requirement information;
s2: the XML file is read into the memory by the JAVA code to become data which is consistent with the data structure of the automatic generation code engine; in specific implementation, the automatic code generation engine can adopt a freemaker template engine;
s3: transmitting the data obtained in the S2 to an automatic code generation engine to generate an SDK interface code;
the SDK interface code comprises an SDK entity class and an SDK interface class, and the SDK entity class is used as a parameter of an SDK interface class method and is called by an accessed third party;
the specific steps of S3 are as follows: generating an import package structure according to the data relation in the S2, and then generating an SDK interface class and an SDK entity class according to the data obtained in the S2;
specifically, the generation method of the SDK interface class includes: generating a calling method and a calling method form parameter of the SDK interface class according to the interface name in the data in the S2;
the SDK entity class generation method comprises the following steps: generating the SDK entity class name according to the interface name in the data in S2 and generating the attribute of the SDK entity class according to the attribute name in the data in S2.
S4: generating an ant packaging script by using Java codes to code part of the SDK interface;
s5: an ant packaging script is run by sending an instruction through Java code;
s6: and compiling the code contained in the whole SDK architecture through an ant script to generate a jar package, wherein the code contained in the SDK architecture comprises the code of an SDK interface part, a protocol layer code and a data check layer code.
The SDK architecture comprises:
the SDK interface layer unit is used for realizing the calling of a third-party platform;
the client configuration unit is used for configuring the public information by the third-party platform;
the interface data verification rule engine unit is used for verifying data specifications and service specifications of a third party and input data;
the safety processing unit is used for signing and encrypting data in the transmission process;
the configuration processing unit is used for applying the public information configured by the client configuration unit to the SDK operation;
and the communication processing unit is used for processing the transmission communication between the SDK and the open platform.
S7: packaging the jar packet and the configuration file in the whole SDK framework into a zip packet; properties, which includes certificate password, APPID, network transmission domain name, certificate transmission type, public key of open platform.
The above description is only an embodiment of the present invention, but the scope of the present invention is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present invention are included in the scope of the present invention.
Claims (4)
1. An SDK automatic packaging method of an open platform is characterized by comprising the following steps:
s1: the API management center inputs the requirement information of the third-party platform and automatically generates an XML file according to the requirement information;
s2: the XML file is read into the memory by the JAVA code to become data which is consistent with the data structure of the automatic generation code engine;
s3: transmitting the data obtained in the S2 to an automatic code generation engine to generate an SDK interface code;
s4: generating an ant packaging script from the SDK interface code by using Java code;
s5: an ant packaging script is run by sending an instruction through Java code;
s6: compiling codes contained in the whole SDK framework through an ant packaging script to generate a jar package, wherein the codes contained in the SDK framework comprise codes of an SDK interface part, protocol layer codes and data check layer codes;
s7: packaging the jar packet and the configuration file in the whole SDK framework into a zip packet; properties, which includes certificate password, APPID, network transmission domain name, certificate transmission type, public key of open platform.
2. The method for automatically packaging the SDK of the open platform according to claim 1, wherein the SDK interface code includes an SDK entity class and an SDK interface class, and the SDK entity class is used as a parameter of the SDK interface class method for being called by an accessing third party.
3. The method for automatically packaging the open platform SDK according to claim 2, wherein the specific steps of S3 are as follows: generating an import package structure according to the data relation in the S2, and then generating an SDK interface class and an SDK entity class according to the data obtained in the S2;
specifically, the generation method of the SDK interface class includes: generating a calling method and a calling method form parameter of the SDK interface class according to the interface name in the data in the S2;
the SDK entity class generation method comprises the following steps: generating the SDK entity class name according to the interface name in the data in S2 and generating the attribute of the SDK entity class according to the attribute name in the data in S2.
4. The method for automatically packaging the SDK of the open platform according to claim 1, wherein the SDK framework comprises:
the SDK interface layer unit is used for realizing the calling of a third-party platform;
the client configuration unit is used for configuring the public information by the third-party platform;
the interface data verification rule engine unit is used for verifying data specifications and service specifications of a third party and input data;
the safety processing unit is used for signing and encrypting data in the transmission process;
the configuration processing unit is used for applying the public information configured by the client configuration unit to the SDK operation;
and the communication processing unit is used for processing the transmission communication between the SDK and the open platform.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810288774.7A CN108647033B (en) | 2018-04-03 | 2018-04-03 | SDK automatic packaging method for open platform |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810288774.7A CN108647033B (en) | 2018-04-03 | 2018-04-03 | SDK automatic packaging method for open platform |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108647033A CN108647033A (en) | 2018-10-12 |
CN108647033B true CN108647033B (en) | 2021-06-29 |
Family
ID=63745544
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810288774.7A Active CN108647033B (en) | 2018-04-03 | 2018-04-03 | SDK automatic packaging method for open platform |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108647033B (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102968306A (en) * | 2012-11-29 | 2013-03-13 | 广东全通教育股份有限公司 | Method and system for automatically generating code based on data model drive |
CN105718251A (en) * | 2014-12-03 | 2016-06-29 | 苏宁云商集团股份有限公司 | Multilanguage SDK (software development kit) automatic implementation method and system |
US9448776B1 (en) * | 2015-01-08 | 2016-09-20 | AppNotch LLC | Method and apparatus for converting a website into a native mobile application |
Family Cites Families (17)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2011150430A (en) * | 2010-01-19 | 2011-08-04 | Kyocera Mita Corp | Sdk distribution package generation device, sdk distribution package generation method, and sdk distribution package generation program |
CN103235718A (en) * | 2013-03-28 | 2013-08-07 | 迈普通信技术股份有限公司 | Method and device for generating remote procedure call (RPC) code |
CN103500087B (en) * | 2013-09-17 | 2016-08-17 | 福建亿榕信息技术有限公司 | A kind of based on maven plug-in unit and the code generating method of freemarker template and device |
CN103713896B (en) * | 2013-12-17 | 2017-01-04 | 北京京东尚科信息技术有限公司 | Method and device is generated for accessing the SDK of server |
CN103838572A (en) * | 2013-12-20 | 2014-06-04 | 北京掌阔技术有限公司 | System and method for packing Android SDK |
US9560170B2 (en) * | 2014-03-21 | 2017-01-31 | Ptc Inc. | System and method of abstracting communication protocol using self-describing messages |
CN104360833A (en) * | 2014-08-27 | 2015-02-18 | 北京中电华大电子设计有限责任公司 | Customized JAVA card platform implementation method supporting security channel protocols |
CN104317587A (en) * | 2014-10-22 | 2015-01-28 | 中国人民解放军国防科学技术大学 | Automatic android mobile device oriented application generation method |
CN105049532B (en) * | 2015-08-28 | 2018-07-13 | 北京奇艺世纪科技有限公司 | The packaging method and device and method for down loading and device of a kind of SDK packets |
CN106528069B (en) * | 2015-09-15 | 2019-06-07 | 阿里巴巴集团控股有限公司 | SDK integrated approach and device |
CN105760721B (en) * | 2016-01-29 | 2019-02-12 | 北京奇虎科技有限公司 | A kind of software reinforcement method and system |
CN107092601B (en) * | 2016-02-17 | 2021-03-23 | 创新先进技术有限公司 | Resource file construction method, resource file application method and device |
CN106250164A (en) * | 2016-08-16 | 2016-12-21 | 广州仕邦人力资源有限公司 | A kind of code generating method based on requirement documents and device |
CN107066291A (en) * | 2017-02-09 | 2017-08-18 | 阿里巴巴集团控股有限公司 | Packaging method, device and the equipment of SDK, computer-readable recording medium |
CN107066842A (en) * | 2017-03-28 | 2017-08-18 | 福建天晴在线互动科技有限公司 | A kind of method and system of reinforcing SDK projects |
CN107291447B (en) * | 2017-05-17 | 2018-09-07 | 四川新网银行股份有限公司 | A method of it automatically generates and issues SDK codes |
CN107678750A (en) * | 2017-10-27 | 2018-02-09 | 北京腾云天下科技有限公司 | A kind of SDK packaging methods, computing device and SDK packaging systems |
-
2018
- 2018-04-03 CN CN201810288774.7A patent/CN108647033B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102968306A (en) * | 2012-11-29 | 2013-03-13 | 广东全通教育股份有限公司 | Method and system for automatically generating code based on data model drive |
CN105718251A (en) * | 2014-12-03 | 2016-06-29 | 苏宁云商集团股份有限公司 | Multilanguage SDK (software development kit) automatic implementation method and system |
US9448776B1 (en) * | 2015-01-08 | 2016-09-20 | AppNotch LLC | Method and apparatus for converting a website into a native mobile application |
Also Published As
Publication number | Publication date |
---|---|
CN108647033A (en) | 2018-10-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10678522B1 (en) | Compiler and method for compiling business rules for a serverless runtime environment | |
US11467951B2 (en) | System and method for implementing mainframe continuous integration continuous development | |
van Hoorn | Model-driven online capacity management for component-based software systems | |
CN108965375A (en) | Service call proxy control system, method, server and readable storage medium storing program for executing | |
KR102226463B1 (en) | UI/UX solution providing server linked with process automation program, process automation method using the same, and computer program executing the same | |
CN111176660A (en) | Distributed architecture-oriented micro-service contract management method and device, computer equipment and readable storage medium | |
CN113590465B (en) | Method for automatically generating mock service based on SDK | |
CN111078573A (en) | Test message generation method and device | |
CN108647033B (en) | SDK automatic packaging method for open platform | |
CN111381863B (en) | APP transaction and automatic online method and system based on block chain technology | |
CN113032800A (en) | Zero-knowledge-proof-based on-chain automatic execution intelligent contract middleware system | |
Almakhour et al. | On the verification of smart contracts: A systematic review | |
CN115811513A (en) | Third-party interface request design method, device and storage medium | |
Song et al. | Quantifying consistency between conceptual and executable business processes | |
Autili et al. | On the Model-driven Synthesis of Adaptable Choreographies. | |
Jamshidi et al. | Business process and software architecture model co-evolution patterns | |
Buezas et al. | Umbra designer: Graphical modelling for telephony services | |
Ukić et al. | The influence of cyclomatic complexity distribution on the understandability of xtUML models | |
Khan et al. | Ubiquitous application testing on cloud | |
Febrian et al. | Api adapter for payment gateway variation development in software product line engineering | |
CN115373655B (en) | Information protocol code automatic generation method based on standardized template | |
CN117056317B (en) | Data processing method, device, equipment and computer readable storage medium | |
US11909858B1 (en) | System and method for generating and performing a smart contract | |
CN102663299B (en) | Hardware resource information security online detecting system facing to terminal computers | |
Haidar et al. | Abstractions of web services |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |