CN110727475A - Intelligent service calling method based on configuration - Google Patents

Intelligent service calling method based on configuration Download PDF

Info

Publication number
CN110727475A
CN110727475A CN201910967075.XA CN201910967075A CN110727475A CN 110727475 A CN110727475 A CN 110727475A CN 201910967075 A CN201910967075 A CN 201910967075A CN 110727475 A CN110727475 A CN 110727475A
Authority
CN
China
Prior art keywords
interface
information
configuration
message
interface processor
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
CN201910967075.XA
Other languages
Chinese (zh)
Other versions
CN110727475B (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.)
Sichuan XW Bank Co Ltd
Original Assignee
Sichuan XW Bank 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 Sichuan XW Bank Co Ltd filed Critical Sichuan XW Bank Co Ltd
Priority to CN201910967075.XA priority Critical patent/CN110727475B/en
Publication of CN110727475A publication Critical patent/CN110727475A/en
Application granted granted Critical
Publication of CN110727475B publication Critical patent/CN110727475B/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/44505Configuring for program initiating, e.g. using registry, configuration files
    • G06F9/4451User profiles; Roaming

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)
  • Exchange Systems With Centralized Control (AREA)

Abstract

The invention discloses a collocation-based intelligent service calling method, which belongs to the technical field of collocation intelligent service calling and solves the problems that in the prior art, the adjustment of configuration information is accompanied with the adjustment of code logic, the code logic amount is very large, the maintenance is not easy, all transaction interfaces are necessary to judge before calling, but belong to redundant judgment in terms of execution, and the efficiency is influenced. According to the record information of the configuration of the uploading project message, aiming at different types of uploading project messages, initializing a corresponding interface processor chain with thread safety; acquiring information in an uploading project message to form an application message for interface application according to an attribute acquirer corresponding to the input parameters of each interface processor in an interface processor chain; according to the interface application, the interface processor chain calls the output parameter from the third party or the local system, and returns the output parameter through the attribute acquirer to complete the information. The method and the device are used for completing the information.

Description

Intelligent service calling method based on configuration
Technical Field
A configuration-based intelligent service calling method is used for completing information and belongs to the technical field of configuration-based intelligent service calling.
Background
JSON field obtainer, i.e. JSON attribute obtainer: acquiring json message information of unknown formats of upstream systems by using corresponding acquirers to acquire information of different levels;
a field completer: completing fields of other messages needing to call the third party or the local system to perfect information;
in the prior art, incomplete input application information is complemented through a third-party interface/a local interface if necessary, the method is developed based on the process, corresponding logic is developed according to the requirement, namely, a project message enters execution logic, public information inspection is carried out, and the application type is judged; according to the type obtained by the judgment, the interface completion logic to be executed is judged, and for different interfaces and different input application messages, corresponding interface logic needs to be developed so as to realize functions, as shown in fig. 1 specifically. But has the following disadvantages:
with the adjustment of service requirements, hard code development is inevitably required in scenes such as the need of accessing a new interface information source, the need of matching with interface modification, new type of interface processing and the like. In the existing implementation, the problems that the test return definition is difficult, and the channel types are frequently increased/changed exist, which often causes the problems of huge test quantity and frequent regression.
Disclosure of Invention
In view of the above-mentioned problems, an object of the present invention is to provide a method for calling a configuration-based intelligent service, which solves the problems in the prior art that adjustment of configuration information is accompanied by adjustment of code logic, and the code logic amount is very large and is not easy to maintain.
In order to achieve the purpose, the invention adopts the following technical scheme:
a configuration-based intelligent service calling method is characterized in that: the method comprises the following steps:
s1, according to the record information of the configuration of the uploading project message, aiming at different types of uploading project messages, initializing a corresponding thread safe interface processor chain;
s2, acquiring information in the uploading project message to form an application message for interface application according to the attribute acquirer corresponding to the input parameter of each interface processor in the interface processor chain, wherein the interface processor needs to chain a plurality of input parameters, and each attribute acquirer can acquire parameters in sequence according to the uploading project message structure;
and S3, calling out the reference from a third party or a local system by the interface processor chain according to the interface application, returning the reference through the attribute acquirer, and completing the information.
Further, a single interface processor in the interface processor chain is an information completion/assembly interface; the interface handler chain constructs data objects for an information completion/assembly interface list or interface responsibility chain.
Further, the attribute acquirer comprises an application parameter input unit and a return parameter output unit;
application to the reference unit: acquiring information in the uploaded project message to form an application message for interface application;
returning to a parameter output unit: for returning an argument called from a third party or local system.
Further, the configuration-based intelligent service calling method is deployed on a virtual machine.
Further, the record information in step S1 includes the mobile phone information of the user, the identity of the user, the address details information, and the configuration identifier of the required upload item message.
Compared with the prior art, the invention has the beneficial effects that:
the invention abstracts different source information field extraction logics of the uploaded item messages and third party/local system calling, so that the description information of all configured fields of the record information is analyzed, judged and abstracted, the condition that each uploaded item message can be executed only by field information description judgment is avoided, the uploaded item messages with different contents can be fully covered, and only corresponding check information needs to be adjusted (namely, the transmission verification is needed, and the corresponding quick failure is adjusted according to different interface types or the execution is ignored), as in the embodiment.
The invention only needs to perform interface extension on JSON/XML of different standards (the document takes JSON formatted data as an example for explanation, if XML is adjusted by a system standard part, XML is required to be developed to be realized by corresponding to an interface processor chain), and for a newly added type interface, only needs to develop aiming at the type and adjust the corresponding interface processing chain required to be called, and does not need to develop aiming at the content, thereby reducing the development and the test cost.
The interface of the invention is newly added/adjusted, the existing scene is called and added, and only the database configuration is online: developing a new scene, wherein the development only relates to the development of calling logic of the new scene and the configuration of a corresponding database, the upper level of codes is clear, the test range is clear, and related service regression is not required (the related service regression refers to the fact that for code adjustment, all test regression under all scenes which relate to the execution of the code logic is required); and the calling logic is clearly displayed in the configuration of the database, so that the later test is convenient.
Drawings
FIG. 1 is a schematic diagram of prior art execution logic;
FIG. 2 is a schematic diagram of the execution logic of the present invention;
FIG. 3 is a UML diagram in the present invention, wherein solid arrows indicate integration and dashed arrows indicate dependency;
FIG. 4 is a schematic diagram of an embodiment of the present invention.
Detailed Description
The invention will be further described with reference to the accompanying drawings and specific embodiments.
The transaction judgment logic is preposed, different interfaces are initialized according to different item messages, an interface processor chain is packaged, and after the item messages enter, corresponding interface processors are executed to prevent redundant judgment. For different interface applications, different abstract interface packaging objects, namely interface processors with different abstractions, are developed according to interface types, and configuration management is carried out on input parameters and output parameters, so that development is simplified. The overall efficiency of development and even testing is improved. The method comprises the following specific steps:
a configuration-based intelligent service calling method comprises the following steps:
s1, according to the record information of the configuration of the uploading project message, aiming at different types of uploading project messages, initializing a corresponding thread safe interface processor chain;
the single interface processor in the interface processor chain is an information completion/assembly interface, and the interface processor chain is an information completion/assembly interface list or an interface responsibility chain structure data object. For information processing with different requirements, information completion/assembly interfaces with different lengths and types are initialized (namely, each single interface processor is initialized) so as to realize an information completion/assembly interface list or an interface responsibility chain structure data object.
S2, acquiring information in the project message to form an application message for interface application according to the attribute acquirer corresponding to the input parameter of each interface processor in the interface processor chain, wherein the interface processor needs a plurality of input parameters, and each attribute acquirer can acquire parameters in sequence according to the structure of the uploaded project message;
such as: the project request message (i.e., the upload project message) requires user handset information, user identity information, and address details, but the original message lacks user identity and address details. After parameters are sequentially acquired according to the message structure of the uploaded project, information calling is carried out through a user information query interface processor in a request interface processor chain, and identity information (including identity card number, name, gender and birth year and month) is acquired from a returned Json object (namely, parameters) to complete user identity information acquisition/completion; the information is called by an address coding interface processor in the request interface processor chain, so that address coding information and local province and city information are obtained to complete address detail completion;
if the subsequent processing needs to obtain the application time counting information, when the called uploading project message has no field, the fixed default parameter information configured is obtained through a fixed value information Json object acquirer (namely an attribute acquirer corresponding to the input parameter), the local interface calling time counting is applied, a Json object is obtained to return, and the information is put into the processing message to be subsequently applied.
Processing messages acquired by the user information query object acquirer, the address code object acquirer and the fixed value information Json object acquirer are combined into an application message for interface application.
The attribute acquirer comprises an application parameter input unit and a return parameter output unit;
application to the reference unit: acquiring information in the uploaded project message to form an application message for interface application;
returning to a parameter output unit: for returning an argument called from a third party or local system.
And S3, calling out the reference from a third party or a local system by the interface processor chain according to the interface application, returning the reference through the attribute acquirer, and completing the information. The calling sequence of each interface processor is executed in sequence according to the configuration, for example, the three-party A function is firstly called, the result fails, and the direct error reporting termination processing can be carried out according to the situation, or the skipping is carried out, and then the B function is called, or other interface processors. Or the execution sequence is matched with the configured record information insertion sequence, namely if the entry of the B interface processor needs to depend on the return of the A interface processor, the A interface processor needs to be configured first, and the B interface processor is configured; otherwise, no insertion order execution requirement exists.
Further, the configuration-based intelligent service calling method is deployed on a virtual machine.
The similar interfaces (i.e., similar interface processors) are initialized, and only different attribute obtainers need to be initialized to obtain configured parameters and values thereof for the standardized access parameters, so as to implement different parameter applications for the similar interfaces, as in the similar interfaces in embodiments 1 and 2, the complementary information with the configuration identifier of FJDJT001_ activation is used.
In summary, the present invention configures a corresponding information assembler, i.e., an interface processor, for different source information fields, i.e., configured record information, of the uploaded item message, so as to implement overlay modification or addition of sub-attribute information of the input information object. Configuring different completion field information for different uploading project messages, automatically assembling application information according to different configured record information, and acquiring return information. The project messages with different contents can be fully covered, only corresponding checking information needs to be adjusted, only type development is needed, content development is not needed, and development and testing cost are reduced.
Example 1
This embodiment takes JSON transaction messages as an example for illustration. Namely, by configuring the specified type message standard (number), executing the corresponding interface calling logic and calling the corresponding information completion.
As shown in fig. 4, the configuration identifier (i.e. the configured record information) is the complete information of FJDJT001_ activation, and for this configuration, the corresponding interface processor is initialized, i.e. a BP module invoker needs to be developed first, where BP is Http invocation, and the MBSD _ BP _ BIZ-1400-1125 interface of its BP module invoker is invoked as the interface processor, where MBSD _ BP _ BIZ-1400-1125 is an invocation function identifier, i.e. the interface is referred to as LINK _ ACCT _ NO (the bankkandno attribute of the JOSN object), the interface is referred to as USER _ ID (the account attribute of the JSON object), the information of the on transaction message is obtained through the MBSD _ BP _ BIZ-1400-1125 interface which refers to LINK _ ACCT _ NO and USER _ ID, the application message is composed to apply for the interface, and the application message is invoked from the third party 1125 or 1400-side system 1125 according to the interface application, the return field is completed with: a bankCardName attribute (CLIENT _ NAME attribute in the return text), a bankCardMobile (PHONE _ NO attribute in the return field), and a bankName (LINK _ ACCT _ BANK _ NAME attribute in the return field).
In this embodiment, the number of times of invoking the interface processor in the record information of such configuration is the number of times of configuration (1), but the like interfaces, the invocation of the same method is not limited to single invocation, for example, if the MBSD _ BP _ BIZ-1400-1125 interface needs to be invoked for multiple times, the MBSD _ BP _ BIZ-1400-1125 configuration is newly added in the table configuration, and so on, to form an interface processor chain for such transaction, so as to implement different configured interfaces, multiple invocations for different times, and no additional development is needed.
Example 2
Similarly, in embodiment 1, the configuration identifier (i.e., the configured record information) is the completion information of FJDJT001_ activation, an ADDField attribute expander (another implementation of the interface processor) is developed, the caladdressfromregigode interface (address coding calculation method) is called, the entry code (area attribute whose value is JSON object) is entered, the return field is completely supplemented with the contitaddrprogress (provincial attribute in the return text), the contitaddrcity (city attribute in the return text), and the contitaddrdispatch (region attribute in the return text).
In this embodiment, the number of times of processing the calling interface in such a configuration is the number of times of configuration, but the calling of the same kind of interface and method is not limited to single calling; for example, the following steps are carried out: if the caladdressfromregigode interface needs to be called for many times, the caladdressfromregigode configuration is newly added in the table configuration, and so on, an interface processor chain of the transaction is formed, and configured different interfaces and calling for many times with different times are realized. No additional development is required.
Both the embodiment 1 and the embodiment 2 only aim at the situation that the completion information with the configuration identifier of FJDJT001_ activation is initially processed by the corresponding interface processor, if the completion of the record information of the configuration of all the upper-sending item messages needs to be completed, a plurality of interface processors need to be configured, then an interface processor chain is formed, and the final completion can be completed by sequentially executing the present invention after the interface processor chain is formed.
The above are merely representative examples of the many specific applications of the present invention, and do not limit the scope of the invention in any way. All the technical solutions formed by the transformation or the equivalent substitution fall within the protection scope of the present invention.

Claims (5)

1. A configuration-based intelligent service calling method is characterized in that: the method comprises the following steps:
s1, according to the record information of the configuration of the uploading project message, aiming at different types of uploading project messages, initializing a corresponding thread safe interface processor chain;
s2, acquiring information in the uploading project message to form an application message for interface application according to the attribute acquirer corresponding to the input parameter of each interface processor in the interface processor chain, wherein the interface processor needs to chain a plurality of input parameters, and each attribute acquirer can acquire parameters in sequence according to the uploading project message structure;
and S3, calling out the reference from a third party or a local system by the interface processor chain according to the interface application, returning the reference through the attribute acquirer, and completing the information.
2. The intelligent service invocation method based on configuration according to claim 1, wherein: a single interface processor in the interface processor chain is an information completion/assembly interface; the interface handler chain constructs data objects for an information completion/assembly interface list or interface responsibility chain.
3. The intelligent service invocation method based on configuration according to claim 1, wherein: the attribute acquirer comprises an application parameter input unit and a return parameter output unit;
application to the reference unit: acquiring information in the uploaded project message to form an application message for interface application;
returning to a parameter output unit: for returning an argument called from a third party or local system.
4. The intelligent service invocation method based on configuration according to any one of claims 1-3, wherein: the configuration-based intelligent service calling method is deployed on a virtual machine.
5. The intelligent service invocation method based on configuration according to claim 4, wherein: the recorded information in step S1 includes the user 'S mobile phone information, the user' S identity, the address details information, and the configuration identifier of the required item message to be sent.
CN201910967075.XA 2019-10-12 2019-10-12 Intelligent service calling method based on configuration Active CN110727475B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910967075.XA CN110727475B (en) 2019-10-12 2019-10-12 Intelligent service calling method based on configuration

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910967075.XA CN110727475B (en) 2019-10-12 2019-10-12 Intelligent service calling method based on configuration

Publications (2)

Publication Number Publication Date
CN110727475A true CN110727475A (en) 2020-01-24
CN110727475B CN110727475B (en) 2023-07-21

Family

ID=69219927

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910967075.XA Active CN110727475B (en) 2019-10-12 2019-10-12 Intelligent service calling method based on configuration

Country Status (1)

Country Link
CN (1) CN110727475B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112799713A (en) * 2020-12-31 2021-05-14 江苏苏宁银行股份有限公司 Universal configurable test pile platform

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001016204A (en) * 1999-06-25 2001-01-19 Matsushita Electric Works Ltd Lan unit and lan configuration using it
JP2004364158A (en) * 2003-06-06 2004-12-24 Nippon Telegr & Teleph Corp <Ntt> Method for generating service resource information of ip network
CN1574750A (en) * 2003-06-20 2005-02-02 西门子医疗健康服务公司 System supporting communication between a web enabled application and another application
CN101420437A (en) * 2008-11-14 2009-04-29 北京航空航天大学 Interface device for prototype system and HLA simulation system
CN102622444A (en) * 2012-03-15 2012-08-01 深圳市同洲视讯传媒有限公司 XML (extensible markup language) message processing method and XML message processing device
CN106464513A (en) * 2014-06-27 2017-02-22 迈克菲股份有限公司 System and method to mitigate malicious calls
CN106487712A (en) * 2016-11-24 2017-03-08 泰康保险集团股份有限公司 For accessing method, device and the server of multiple external systems
CN109510737A (en) * 2018-12-14 2019-03-22 深圳壹账通智能科技有限公司 Protocol interface test method, device, computer equipment and storage medium
CN109587134A (en) * 2018-12-03 2019-04-05 中国移动通信集团江苏有限公司 Method, apparatus, equipment and the medium of the safety certification of interface bus
CN109996275A (en) * 2017-12-29 2019-07-09 北京京东尚科信息技术有限公司 A kind of method and apparatus obtaining network signal coverage information
CN110290135A (en) * 2019-06-24 2019-09-27 四川新网银行股份有限公司 The data flow of method and request to complicated message unified standardization processing side

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001016204A (en) * 1999-06-25 2001-01-19 Matsushita Electric Works Ltd Lan unit and lan configuration using it
JP2004364158A (en) * 2003-06-06 2004-12-24 Nippon Telegr & Teleph Corp <Ntt> Method for generating service resource information of ip network
CN1574750A (en) * 2003-06-20 2005-02-02 西门子医疗健康服务公司 System supporting communication between a web enabled application and another application
CN101420437A (en) * 2008-11-14 2009-04-29 北京航空航天大学 Interface device for prototype system and HLA simulation system
CN102622444A (en) * 2012-03-15 2012-08-01 深圳市同洲视讯传媒有限公司 XML (extensible markup language) message processing method and XML message processing device
CN106464513A (en) * 2014-06-27 2017-02-22 迈克菲股份有限公司 System and method to mitigate malicious calls
CN106487712A (en) * 2016-11-24 2017-03-08 泰康保险集团股份有限公司 For accessing method, device and the server of multiple external systems
CN109996275A (en) * 2017-12-29 2019-07-09 北京京东尚科信息技术有限公司 A kind of method and apparatus obtaining network signal coverage information
CN109587134A (en) * 2018-12-03 2019-04-05 中国移动通信集团江苏有限公司 Method, apparatus, equipment and the medium of the safety certification of interface bus
CN109510737A (en) * 2018-12-14 2019-03-22 深圳壹账通智能科技有限公司 Protocol interface test method, device, computer equipment and storage medium
CN110290135A (en) * 2019-06-24 2019-09-27 四川新网银行股份有限公司 The data flow of method and request to complicated message unified standardization processing side

Non-Patent Citations (5)

* Cited by examiner, † Cited by third party
Title
SIMGEULUSOY: "Omni-script: Device independent user interface development for omni-channel fintech applications", 《COMPUTER STANDARDS & INTERFACES》 *
方原柏: "从布线技术看RTU的发展", 《自动化博览》 *
朱磊: "智慧供热二次网服务器软件系统设计与实现", 《中国优秀硕士学位论文全文数据库》 *
李华英: "网络交换机的设置和选择", 《建筑电气》 *
舒忠玲: "Abis 接口用户位置信息智能学习方法", 《电视技术》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112799713A (en) * 2020-12-31 2021-05-14 江苏苏宁银行股份有限公司 Universal configurable test pile platform
CN112799713B (en) * 2020-12-31 2022-06-28 江苏苏宁银行股份有限公司 Universal configurable test pile platform

Also Published As

Publication number Publication date
CN110727475B (en) 2023-07-21

Similar Documents

Publication Publication Date Title
CN108415832B (en) Interface automation test method, device, equipment and storage medium
CN107992409B (en) Test case generation method and device, computer equipment and storage medium
CN109240924B (en) Application program testing method and device
CN111177005B (en) Service application testing method, device, server and storage medium
US10642913B2 (en) Intent and bot based query guidance
WO2020029375A1 (en) Interface testing method and system, and computer device and storage medium
CN110941546A (en) Automatic test method, device, equipment and storage medium for WEB page case
CN111124906A (en) Tracking method, compiling method and device based on dynamic embedded points and electronic equipment
CN111143087A (en) Interface calling method and device, storage medium and server
CN111597120B (en) Interface test apparatus, method, electronic device, and computer-readable storage medium
CN110262978B (en) Interface retry method and device based on long-flow automatic test
CN111831542B (en) API application debugging method and device and storage medium
CN110727581B (en) Crash positioning method and electronic equipment
CN114168190A (en) Interface document generation method and device, computer equipment and storage medium
CN111737140A (en) Interface automation test method, device, equipment and computer readable storage medium
CN112579461A (en) Assertion processing method, system and storage medium
CN112395202A (en) Interface automation test method and device, computer equipment and storage medium
CN110727475A (en) Intelligent service calling method based on configuration
CN113987337A (en) Search method, system, equipment and storage medium based on componentized dynamic arrangement
CN116644122A (en) Data transaction processing method, device, computer equipment and storage medium
CN116339690A (en) Method and device for executing business process, electronic equipment and storage medium
CN116483888A (en) Program evaluation method and device, electronic equipment and computer readable storage medium
CN112491943A (en) Data request method, device, storage medium and electronic equipment
CN116483899A (en) Calling method and device for converged service interface, electronic equipment and storage medium
CN116599881A (en) Cloud platform tenant modeling test method, device, equipment and storage medium

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