CN110673892A - Interface unified calling method based on component configuration - Google Patents

Interface unified calling method based on component configuration Download PDF

Info

Publication number
CN110673892A
CN110673892A CN201910873731.XA CN201910873731A CN110673892A CN 110673892 A CN110673892 A CN 110673892A CN 201910873731 A CN201910873731 A CN 201910873731A CN 110673892 A CN110673892 A CN 110673892A
Authority
CN
China
Prior art keywords
component
interface
configuration
calling
loading
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.)
Granted
Application number
CN201910873731.XA
Other languages
Chinese (zh)
Other versions
CN110673892B (en
Inventor
韦应虎
刘博�
张宝玉
周小龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Telecom Wanwei Information Technology Co Ltd
Original Assignee
China Telecom Wanwei 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 China Telecom Wanwei Information Technology Co Ltd filed Critical China Telecom Wanwei Information Technology Co Ltd
Priority to CN201910873731.XA priority Critical patent/CN110673892B/en
Publication of CN110673892A publication Critical patent/CN110673892A/en
Application granted granted Critical
Publication of CN110673892B publication Critical patent/CN110673892B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • G06F9/44526Plug-ins; Add-ons
    • 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/44594Unloading

Landscapes

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

Abstract

The invention relates to the technical field of data exchange, in particular to a unified interface calling method based on component configuration, which comprises the following steps: s1, loading components, wherein the loading components dynamically load all component configuration information into an application program; s2, analyzing the component, namely finding a path where the component is located by the application program according to the configuration information of the component loaded in the step S1, and analyzing the component; s3, verifying the component, namely verifying the correctness of the analysis result of the component analyzed in the step S2; s4, initializing the component, and setting default values of the initial configuration of the component which completes the step S3; s5, using, namely using the component before and after interface calling, using the authentication component and the request analysis component before the interface calling, and using the analysis component and the cache group price after the interface calling; s6, unloading the components, and unloading the components which are not suitable for use. The invention can realize the unified calling of the interface without the development of a system level, thereby greatly reducing the implementation period and the difficulty of product development.

Description

Interface unified calling method based on component configuration
Technical Field
The invention relates to the technical field of data exchange, in particular to a unified interface calling method based on component configuration.
Background
With the rapid development of electronic government affairs and the requirement of service collaboration among departments, the number of Web and RPC remote services is rapidly increased, and because the services are from different departments, the safety, the standardization and the data consistency cannot be guaranteed, so that the standardization of electronic government interface services is guaranteed, the clear boundaries of company products are ensured, the safety and the reliability are realized, different sources are realized in a larger range at a higher level, the unified management and control and the operation of different types of interface services are urgently needed, the unified management of the interface services is urgently needed, the unified management of service sharing among the departments is realized, meanwhile, a management platform meeting the butt joint form of various service interfaces can be provided, and more convenience supports are provided for data sharing and exchange.
Disclosure of Invention
The invention aims to provide an interface unified calling method based on component configuration, which can realize the unified calling of interfaces without system-level development, thereby greatly reducing the implementation period and the difficulty of product development.
In order to solve the technical problem, the invention provides an interface unified calling method based on component configuration, which is characterized in that: the method comprises the following steps:
s1, loading the component, wherein the loading component is carried out after the application program is started, and the loading component dynamically loads all the component configuration information into the application program;
s2, analyzing the component, wherein the application program finds the path of the component according to the configuration information of the component loaded in the step S1 and analyzes the component;
s3, verifying the component, namely verifying the correctness of the analysis result of the component analyzed in the step S2, entering the next link after the verification is successful, and requiring the step S1 and the step S2 to be carried out again after the verification fails;
s4, initializing the component, and setting default values of the initial configuration of the component which completes the step S3;
s5, using, namely using the component before and after interface calling, using the authentication component and the request analysis component before the interface calling, and using the analysis component and the cache group price after the interface calling;
s6, unloading the components, and unloading the components which are not suitable for use.
Further, the user customizes the component, and the customizing component comprises the following steps:
q1., downloading a basic component package, introducing the downloaded basic component package during development, inheriting a relevant abstract class for development, writing the basic component package into a service place, and packaging after development is completed;
uploading, namely adding a new component on a self-defined component management page, filling component description information, uploading a component package and storing;
q3. configuration, selecting the interface needed to use the self-defining component, and configuring the necessary parameters of the component.
Furthermore, a standard springMVC mode and a java hot loading technology are adopted, the time stamp change of the class file is detected at regular time, and if the time stamp of the class is changed, the class is reloaded
The invention has the beneficial effects that: the method comprises the following steps: s1, loading the component, wherein the loading component is carried out after the application program is started, and the loading component dynamically loads all the component configuration information into the application program; s2, analyzing the component, wherein the application program finds the path of the component according to the configuration information of the component loaded in the step S1 and analyzes the component; s3, verifying the component, namely verifying the correctness of the analysis result of the component analyzed in the step S2, entering the next link after the verification is successful, and requiring the step S1 and the step S2 to be carried out again after the verification fails; s4, initializing the component, and setting default values of the initial configuration of the component which completes the step S3; s5, using, namely using the component before and after interface calling, using the authentication component and the request analysis component before the interface calling, and using the analysis component and the cache group price after the interface calling; s6, unloading the components, and unloading the components which are not suitable for use. The invention can realize the unified calling of the interface without the development of a system level, thereby greatly reducing the implementation period and the difficulty of product development.
Drawings
FIG. 1 is a flow chart of the invention.
Detailed Description
As shown in fig. 1, the present invention provides a unified interface calling method based on component configuration, which is characterized in that: the method comprises the following steps:
s1, loading the component, wherein the loading component is carried out after the application program is started, and the loading component dynamically loads all the component configuration information into the application program;
s2, analyzing the component, wherein the application program finds the path of the component according to the configuration information of the component loaded in the step S1 and analyzes the component;
s3, verifying the component, namely verifying the correctness of the analysis result of the component analyzed in the step S2, entering the next link after the verification is successful, and requiring the step S1 and the step S2 to be carried out again after the verification fails;
s4, initializing the component, and setting default values of the initial configuration of the component which completes the step S3;
s5, using, namely using the component before and after interface calling, using the authentication component and the request analysis component before the interface calling, and using the analysis component and the cache group price after the interface calling;
s6, unloading the components, and unloading the components which are not suitable for use.
Further, the user customizes the component, and the customizing component comprises the following steps:
q1., downloading a basic component package, introducing the downloaded basic component package during development, inheriting a relevant abstract class for development, writing the basic component package into a service place, and packaging after development is completed;
uploading, namely adding a new component on a self-defined component management page, filling component description information, uploading a component package and storing;
q3. configuration, selecting the interface needed to use the self-defining component, and configuring the necessary parameters of the component. After configuration is completed, the interface call may perform some processing of the business logic based on the current component.
Furthermore, a standard springMVC mode and a java hot loading technology are adopted, the time stamp change of the class file is detected at regular time, and if the time stamp of the class is changed, the class is reloaded
The method adopts a standard springMVC mode and a java hot loading technology, can be summarized into a background thread when a container is started, detects the timestamp change of class files at regular time, and reloads the classes if the timestamp of the classes is changed. Compared with the reflection mechanism of java, reflection is to acquire class information during running and change the program behavior through dynamic calling; the hot loading directly changes the program behavior by reloading the change class information during running, the hot deployment principle is similar, but the whole application is directly reloaded, and the mode releases the memory, is cleaner and more thorough than the hot loading, and is more time-consuming at the same time.
Many inconsistent interface call parameters are found in the government affair information resource sharing and exchanging and the national platform docking, including requests for data parameters, analysis of return parameters, authorization modes and the like, and through self-contained components of the system (WeChat login, qq login, current limit, black list, white list and the like), a user only needs to add configuration information (for example, WeChat login, related authorization information called by WeChat login is added on a configuration interface, and flow control information needs to be added for current limit configuration). After the configuration is completed, the system automatically analyzes the configuration in the interface calling process and triggers the corresponding flow of each component (for example, WeChat login, the authentication of WeChat login is carried out firstly, and the interface is called after the authorization is passed)
The present invention will be described in detail below with reference to an example of enterprise data opening. In this example, the service interface adopts restfull, the authentication interface of the enterprise includes WeChat login, qq login, and username and password login modes, and the specific execution steps must be supported as follows:
a) according to the steps S1 and S2, starting a component application platform, and loading and analyzing the built-in components;
b) according to the steps S3 and S4, the enterprise authentication interface is accessed to the platform, a system built-in component (user name and password login) is configured, the component needs to be verified in the configuration, and the platform initializes the component to the enterprise authentication interface after the verification is successful;
c) and developing the WeChat authentication component and the qq authentication component according to the custom development component flow and the specification.
d) According to step S5, the application login invokes authentication, the application login invokes the component according to the invocation instance provided by the component, and the authentication component invokes the component based on the authentication invocation before the authentication interface is executed;
e) according to the step Q1, for WeChat login, the platform itself has no built-in component, development is carried out according to a component development template and a WeChat related protocol, and the development is completed and packed into jar text;
f) according to the step Q2, after the development is completed, the components are packaged and uploaded, a user-defined component is selected on an application platform for uploading, and description information of the components is required to be input in the uploading process;
g) according to the step Q3, after the component is uploaded, the content of the component needs to be configured, and the wechat authentication login configuration mainly fills in the information such as wechat credentials and IP addresses required by the system.
h) After the component configuration is completed, the component can be used as the built-in component of the system.
The invention can realize the unified calling of the interface without the development of a system level, thereby greatly reducing the implementation period and the difficulty of product development.

Claims (3)

1. A unified interface calling method based on component configuration is characterized in that: the method comprises the following steps:
s1, loading the component, wherein the loading component is carried out after the application program is started, and the loading component dynamically loads all the component configuration information into the application program;
s2, analyzing the component, wherein the application program finds the path of the component according to the configuration information of the component loaded in the step S1 and analyzes the component;
s3, verifying the component, namely verifying the correctness of the analysis result of the component analyzed in the step S2, entering the next link after the verification is successful, and requiring the step S1 and the step S2 to be carried out again after the verification fails;
s4, initializing the component, and setting default values of the initial configuration of the component which completes the step S3;
s5, using, namely using the component before and after interface calling, using the authentication component and the request analysis component before the interface calling, and using the analysis component and the cache group price after the interface calling;
s6, unloading the components, and unloading the components which are not suitable for use.
2. The method for unified calling of an interface based on component configuration according to claim 1, wherein: the user customizes the assembly, and the customization of the assembly comprises the following steps:
q1., downloading a basic component package, introducing the downloaded basic component package during development, inheriting a relevant abstract class for development, writing the basic component package into a service place, and packaging after development is completed;
uploading, namely adding a new component on a self-defined component management page, filling component description information, uploading a component package and storing;
q3. configuration, selecting the interface needed to use the self-defining component, and configuring the necessary parameters of the component.
3. The method for unified calling of an interface based on component configuration according to claim 1, wherein: the method adopts a standard springMVC mode and a java hot loading technology, regularly detects the time stamp change of the class file, and reloads the class if the time stamp of the class is changed.
CN201910873731.XA 2019-09-17 2019-09-17 Interface unified calling method based on component configuration Active CN110673892B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910873731.XA CN110673892B (en) 2019-09-17 2019-09-17 Interface unified calling method based on component configuration

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910873731.XA CN110673892B (en) 2019-09-17 2019-09-17 Interface unified calling method based on component configuration

Publications (2)

Publication Number Publication Date
CN110673892A true CN110673892A (en) 2020-01-10
CN110673892B CN110673892B (en) 2023-01-03

Family

ID=69078365

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910873731.XA Active CN110673892B (en) 2019-09-17 2019-09-17 Interface unified calling method based on component configuration

Country Status (1)

Country Link
CN (1) CN110673892B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112241430A (en) * 2020-10-26 2021-01-19 浪潮云信息技术股份公司 Model applied to multi-system docking processing
CN112287009A (en) * 2020-11-03 2021-01-29 平安普惠企业管理有限公司 Interface calling and interface data warehousing method, device, equipment and storage medium
CN113867818A (en) * 2021-09-28 2021-12-31 潍柴动力股份有限公司 Method and device for generating ini file, computer equipment and medium

Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102215232A (en) * 2011-06-07 2011-10-12 浪潮齐鲁软件产业有限公司 Single sign-on method
CN102291464A (en) * 2011-08-29 2011-12-21 上海普元信息技术股份有限公司 System and method for dynamically generating Web Service by business flow in BPM (Business Process Management)
CN102315945A (en) * 2011-10-20 2012-01-11 江苏三源教育实业有限公司 Unified identity authentication method based on private agreement
CN103259763A (en) * 2012-02-16 2013-08-21 中国移动通信集团公司 IP multi-media subsystem (IMS) domain login method, system and device
CN104283919A (en) * 2013-07-05 2015-01-14 中兴通讯股份有限公司 Interface invocation system and method
CN104486318A (en) * 2014-12-08 2015-04-01 西安电子科技大学 Identity authentication method for single sign-on in Android operating system
CN105188060A (en) * 2015-10-12 2015-12-23 深圳竹云科技有限公司 Mobile terminal-oriented single sign-on (SSO) authentication method and system
CN105389222A (en) * 2015-12-15 2016-03-09 中国科学院声学研究所 Method, apparatus and system for dynamically calling native interface
CN105653363A (en) * 2015-12-28 2016-06-08 北京致远协创软件有限公司 Interface function realization method and apparatus
WO2016188256A1 (en) * 2016-01-25 2016-12-01 中兴通讯股份有限公司 Application access authentication method, system, apparatus and terminal
CN107172008A (en) * 2017-04-01 2017-09-15 北京芯盾时代科技有限公司 A kind of system and method for carrying out multisystem certification and synchronization in a mobile device
CN109063457A (en) * 2018-06-22 2018-12-21 杭州才云科技有限公司 The cross-platform login unified certification interconnection method of one kind, storage medium, electronic equipment
CN109492358A (en) * 2018-09-25 2019-03-19 国网浙江省电力有限公司信息通信分公司 A kind of open interface uniform authentication method
CN109669718A (en) * 2018-09-26 2019-04-23 深圳壹账通智能科技有限公司 System permission configuration method, device, equipment and storage medium
CN109743205A (en) * 2018-12-29 2019-05-10 浪潮电子信息产业股份有限公司 A kind of cloud platform OS network management, device and server
CN109739573A (en) * 2018-12-27 2019-05-10 深圳市多度科技有限公司 Realize the processing method and processing device that api interface calls, the system for realizing api interface

Patent Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102215232A (en) * 2011-06-07 2011-10-12 浪潮齐鲁软件产业有限公司 Single sign-on method
CN102291464A (en) * 2011-08-29 2011-12-21 上海普元信息技术股份有限公司 System and method for dynamically generating Web Service by business flow in BPM (Business Process Management)
CN102315945A (en) * 2011-10-20 2012-01-11 江苏三源教育实业有限公司 Unified identity authentication method based on private agreement
CN103259763A (en) * 2012-02-16 2013-08-21 中国移动通信集团公司 IP multi-media subsystem (IMS) domain login method, system and device
CN104283919A (en) * 2013-07-05 2015-01-14 中兴通讯股份有限公司 Interface invocation system and method
CN104486318A (en) * 2014-12-08 2015-04-01 西安电子科技大学 Identity authentication method for single sign-on in Android operating system
CN105188060A (en) * 2015-10-12 2015-12-23 深圳竹云科技有限公司 Mobile terminal-oriented single sign-on (SSO) authentication method and system
CN105389222A (en) * 2015-12-15 2016-03-09 中国科学院声学研究所 Method, apparatus and system for dynamically calling native interface
CN105653363A (en) * 2015-12-28 2016-06-08 北京致远协创软件有限公司 Interface function realization method and apparatus
WO2016188256A1 (en) * 2016-01-25 2016-12-01 中兴通讯股份有限公司 Application access authentication method, system, apparatus and terminal
CN107172008A (en) * 2017-04-01 2017-09-15 北京芯盾时代科技有限公司 A kind of system and method for carrying out multisystem certification and synchronization in a mobile device
CN109063457A (en) * 2018-06-22 2018-12-21 杭州才云科技有限公司 The cross-platform login unified certification interconnection method of one kind, storage medium, electronic equipment
CN109492358A (en) * 2018-09-25 2019-03-19 国网浙江省电力有限公司信息通信分公司 A kind of open interface uniform authentication method
CN109669718A (en) * 2018-09-26 2019-04-23 深圳壹账通智能科技有限公司 System permission configuration method, device, equipment and storage medium
CN109739573A (en) * 2018-12-27 2019-05-10 深圳市多度科技有限公司 Realize the processing method and processing device that api interface calls, the system for realizing api interface
CN109743205A (en) * 2018-12-29 2019-05-10 浪潮电子信息产业股份有限公司 A kind of cloud platform OS network management, device and server

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
KE LIU; KE XU: "Open Service-Aware Mobile Network API for 3rd Party Control of Network QoS", 《2012 INTERNATIONAL CONFERENCE ON COMPUTER SCIENCE AND ELECTRONICS ENGINEERING》 *
WUHAUNGVVVAAA: "基于Laravel Auth实现自定义接口API用户认证详解", 《HTTPS://BLOG.CSDN.NET/CPONGO2PPP1/ARTICLE/DETAILS/89383148》 *
任捷; 史纪强; 李新宇: "集成服务云平台门户定制技术研究", 《电子技术与软件工程》 *
张DOZEN: "spring security 多登陆入口实现方式 以及对spring security认证流程的理解", 《HTTPS://BLOG.CSDN.NET/ZJLGDXZZW/ARTICLE/DETAILS/47724611》 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112241430A (en) * 2020-10-26 2021-01-19 浪潮云信息技术股份公司 Model applied to multi-system docking processing
CN112287009A (en) * 2020-11-03 2021-01-29 平安普惠企业管理有限公司 Interface calling and interface data warehousing method, device, equipment and storage medium
CN113867818A (en) * 2021-09-28 2021-12-31 潍柴动力股份有限公司 Method and device for generating ini file, computer equipment and medium
CN113867818B (en) * 2021-09-28 2024-04-16 潍柴动力股份有限公司 Method, device, computer equipment and medium for generating ini file

Also Published As

Publication number Publication date
CN110673892B (en) 2023-01-03

Similar Documents

Publication Publication Date Title
CN110673892B (en) Interface unified calling method based on component configuration
US7640542B2 (en) Managing midlet suites in OSGI environment
US20200348960A1 (en) Robotic process automation system with separate platform, bot and command class loaders
US8839194B2 (en) Component-based web application development framework used for creating web page
US9058571B2 (en) Tool for automated transformation of a business process definition into a web application package
US20130326487A1 (en) Emulating cloud functioning of applications locally
CN112130871B (en) Method and device for remotely deploying middleware, computer equipment and storage medium
KR102426381B1 (en) Api request processing system
US20230036357A1 (en) Method and apparatus for authority control, computer device and storage medium
CN106874028A (en) Using dispositions method and device
CN113687858B (en) Configuration file checking method and device, electronic equipment and storage medium
CN113971110A (en) Interface testing method, device, equipment and computer readable storage medium
US20170262263A1 (en) Process and system for the generation of an operating program in the form of a mobile application that is capable of operating on a mobile device
CN112416453B (en) Method for integrating domestic external equipment unified data under trusted environment and storage equipment
CN111708550A (en) Application deployment method and device, computer equipment and storage medium
CN111858727A (en) Multi-data-source data export system and method based on template configuration
CN111858101B (en) Cloud architecture system-oriented adaptation method, device, equipment and storage medium
CN104636122A (en) Sharing method and device of capacity component
EP2216962B1 (en) A method for deploying and managing the sip servlet application and the osgi service platform thereof
Hartauer et al. Cloud Function Lifecycle Considerations for Portability in Function as a Service.
CN111651169B (en) Block chain intelligent contract operation method and system based on web container
CN111597020B (en) Application programming interface API debugging method and debugging terminal
CN106775879B (en) VR application installation-free method and system based on android system client
CN114385258B (en) Automatic test method, device, electronic equipment and storage medium
CN115525396A (en) Application management method and device based on cloud protogenesis

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