CN107846300B - Method and device for providing service interface - Google Patents

Method and device for providing service interface Download PDF

Info

Publication number
CN107846300B
CN107846300B CN201610838823.0A CN201610838823A CN107846300B CN 107846300 B CN107846300 B CN 107846300B CN 201610838823 A CN201610838823 A CN 201610838823A CN 107846300 B CN107846300 B CN 107846300B
Authority
CN
China
Prior art keywords
service
package
interface
system platform
identifier
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
Application number
CN201610838823.0A
Other languages
Chinese (zh)
Other versions
CN107846300A (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.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CN201610838823.0A priority Critical patent/CN107846300B/en
Publication of CN107846300A publication Critical patent/CN107846300A/en
Application granted granted Critical
Publication of CN107846300B publication Critical patent/CN107846300B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/146Markers for unambiguous identification of a particular session, e.g. session cookie or URL-encoding

Abstract

The invention provides a method and a device for providing a service interface, wherein the method is applied to a system platform and comprises the following steps: receiving a service package registered to a system platform; and acquiring a service interface for accessing the service package according to the service package, and recording the service interface on the system platform. The embodiment of the invention solves the problem of lower flexibility of developing services caused by the limited service fixed access interface of a service developer in the prior art.

Description

Method and device for providing service interface
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method and an apparatus for providing a service interface.
Background
With the development of the information era, the development of telecommunication capability service, mobile internet value-added service and intelligent network telephone service is becoming mature day by day. With the increasing requirements of the service access method, the contradiction between the complexity of the original service access interface and the development period required by the service developer is getting worse, so that the service access method needs to be simplified in order to shorten the service development period of the service developer, so that the service developer can conveniently and quickly access the development service, and the service development delivery cost is reduced. In addition, from the prior art, the traditional access of the telecommunication capability service, the mobile internet value-added service and the intelligent network telephone traffic service is a customized fixed interface mode, and a service developer must perform service access according to a complex service access method specified by an operator, so that much inconvenience is brought to the service developer, and the flexibility of service development is reduced; in addition, the communication interface is mostly defined and fixed by the system, which also increases the difficulty of service access.
Disclosure of Invention
The invention provides a method and a device for providing a service interface, which aim to solve the problem of low flexibility of service development caused by the fact that a service developer is limited in a service fixed access interface in the prior art.
In a first aspect, the present invention provides a method for providing a service interface, which is applied to a system platform, and includes:
receiving a service package registered on the system platform;
and acquiring a service interface for accessing the service package according to the service package, and recording the service interface on the system platform.
Optionally, the service interface is a uniform resource locator URL, and the URL carries a service name and a service action corresponding to the service packet.
Optionally, the service pack includes: jar files used for processing service access messages sent by users; an xml file for specifying the service package name, the service action corresponding to the service package, and the output parameter corresponding to the service package; a service properties file for specifying a file name of jar file of the service package and a file name of xml file of the service package.
Optionally, after the step of acquiring a service interface for accessing the service package according to the service package and recording the service interface on the system platform, the method further includes: calling the service interface to receive a service access message sent by a user, wherein the service access message carries a service access identifier and information required by service query; accessing the service packet according to the service name corresponding to the service packet and the service access identifier; acquiring a service output value corresponding to the service inquiry information according to the information required by the service inquiry and the service action corresponding to the service packet; and outputting the service output value.
Optionally, the service access identifier includes a service identifier, a matching code identifier, or a session identifier.
In a second aspect, the present invention provides an apparatus for providing a service interface, which is applied to a system platform, and the apparatus includes:
the receiving module is used for receiving the service package registered to the system platform;
and the first acquisition module is used for acquiring a service interface for accessing the service package according to the service package and recording the service interface on the system platform.
Optionally, the service interface is a uniform resource locator URL, and the URL carries a service name and a service action corresponding to the service packet.
Optionally, the service pack includes: jar files used for processing service access messages sent by users; an xml file for specifying the service package name, the service action corresponding to the service package, and the output parameter corresponding to the service package; a service properties file for specifying a file name of a jar file of the service package and a file name of an xml file of the service package.
Optionally, the apparatus further comprises: the calling module is used for calling the service interface to receive a service access message sent by a user, wherein the service access message carries a service access identifier and information required by service inquiry; the access module is used for accessing the service package according to the service name corresponding to the service package and the service access identifier; the second acquisition module is used for acquiring a service output value corresponding to the service inquiry information according to the information required by the service inquiry and the service action corresponding to the service packet; and the output module is used for outputting the service output value.
Optionally, the service access identifier includes a service identifier, a matching code identifier, or a session identifier.
The invention has the beneficial effects that:
the service interface of the service package accessed by the user is obtained according to the received service package and recorded on the system platform, so that a service developer can self-define the development service interface according to the development standard according to the development mode of own habits, and the self-defined service interface is provided on the system platform by registering the service package, so that the user can access the service package by calling the service interface, the service developer is prevented from accessing the service according to a complex service access method specified by an operator, the flexibility of developing the service by the service developer is improved, and the problem of low flexibility of developing the service caused by the limited service fixed access interface of the service developer in the prior art is solved.
Drawings
Fig. 1 shows a flow chart of a method of providing a service interface in a first embodiment of the invention;
FIG. 2 is a schematic diagram of a service interface provided by a service package on a system platform;
fig. 3 shows a block diagram of an apparatus for providing a service interface according to a second embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
The first embodiment:
as shown in fig. 1, a flowchart of a method for providing a service interface in a first embodiment of the present invention is applied to a system platform, and the method includes:
step 101, receiving a service package registered to a system platform.
Specifically, after a service developer develops a service, a service package in the developed service package may be registered on the system platform, and the service package may be deployed on the system platform. The service package comprises a plurality of service packages and an incidence relation among the service packages, the service packages are elements for completing service functions, for example, the functions included by the service packages can be the issuing of telecommunication capacity (short messages and multimedia messages), the accessing of external resources (such as a lightweight directory access protocol server, a website server and a database), the assembling and analyzing of messages, the recording of call tickets and the like. The association relationship between the plurality of service packages may include an unconditional connection, a conditional connection, an abnormal connection, and a timeout connection. The unconditional connection is the connection that the previous service packet can be unconditionally connected to the next service packet; when the condition connection line connection meets a preset condition, the previous service package can be connected to the connection of the next service package; the abnormal connection is the connection that when the previous service is abnormal, the previous service is connected to the next service packet through an abnormal path; the connection of the overtime connection is the connection that the previous service is connected to the next service packet by the overtime path when the interaction time of the previous service packet and the external network element exceeds a preset threshold. Therefore, after the service package is developed, the service developer can deploy the service package on the system platform and register the service package in the service package on the system platform.
At this time, in this step, the system platform receives a service package registered to the system platform. In addition, the service package registered on the system platform specifically includes three files, namely a jar file, an xml file and a service.
And 102, acquiring a service interface for accessing the service package according to the service package, and recording the service interface on a system platform.
In this step, specifically, each service packet corresponds to a service interface accessing the service packet. As shown in fig. 2, when the first service package is registered on the system platform, a first service interface corresponding to the first service package may be provided on the system platform; when the second service package is registered on the system platform, a second service interface corresponding to the second service package may be provided on the system platform, and so on. In addition, when the system platform receives the registered service package, the service interface for accessing the service package can be obtained according to the registered service package, and the service interface is recorded on the system platform. Therefore, the service interface which is self-defined and developed by the service developer according to the development mode which is used by the service developer can be integrated and recorded on the system platform, and the flexibility of the service developer in developing the service is improved.
Specifically, the service interface may be a Uniform Resource Locator (URL), that is, the service interface may be recorded on the system platform in the form of a URL, and the URL carries a service name and a service action corresponding to the service packet. For example, when a service interface for accessing a service packet is: when the http port/udt-see/rest/uplinks/{ uplinkServiceName }/{ uplinkServiceActionName }/"," the uplinkServiceName "is a service name corresponding to a service bundle carried by a service interface, and the uplinkServiceActionName" is a service action corresponding to the service bundle carried by the service interface. The service action corresponding to the service package is an association relation among a plurality of service packages in the service package. Therefore, when a user needs to access a service, the system platform can call the URL to receive a service access message sent by the user, and because the URL carries the service name and the service action corresponding to the service packet, the user can access the node of the service packet in the service packet according to the service name and access the next service packet having an association relation with the service packet according to the service action, namely the association relation between the service packets until the service flow is finished.
Therefore, the embodiment of the invention acquires the service interface of the user access service package according to the received service package registered on the system platform, and records the service interface on the system platform, so that the service developer can self-define the development service interface according to the development mode which is used by the service developer, and the self-defined service interface is provided on the system platform by registering the service package, so that the user can access the service package by calling the service interface provided on the system platform, thereby avoiding that the service developer must access the service according to the complex service access mode specified by an operator, improving the flexibility of the service developed by the service developer, and solving the problem of low flexibility of the developed service caused by the limited service fixed access interface of the service developer in the prior art.
In addition, optionally, after the system platform acquires a service interface for accessing the service package according to the service package and records the service interface on the system platform, the system platform may further invoke the service interface to receive a service access message sent by the user, where the service access message carries a service access identifier and information required for service query; then, accessing the service package according to the service name and the service access identifier corresponding to the service package; acquiring a service output value corresponding to the service inquiry information according to the information required by the service inquiry and the service action corresponding to the service packet; and finally, outputting the service output value. Specifically, when the system platform calls a service interface to receive a service access message sent by a user, the service access message can be analyzed to obtain a service access identifier and information required by service query, the analyzed service access identifier is assigned to a system platform engine variable, the platform engine variable is used for starting a service, and the analyzed service query information is assigned to a service output variable of a service package, so that the service package can perform service query according to the service query information.
Specifically, the service access identifier carried in the service access message includes a service identifier, a matching code identifier, or a session identifier.
The service access identifier will be described in detail below.
In the service access identifier, the service identifier is allocated by a service developer when developing a service, and the service identifier has uniqueness on a system platform. Therefore, when the service interface is called to receive the service access message, if the service identifier carried in the service access message is consistent with the service identifier of the service on the system platform, the service node of the service package corresponding to the service name in the service package can be accessed. The matching code identification aims at the telecom capability or value added service on-demand function, when the system platform receives the on-demand message, the on-demand message can match and search the service through the matching code identification, and after the service is searched, the service is accessed and triggered. Therefore, when the service interface is called to receive the service access message, the service identifier matched with the matching code identifier can be found according to the matching code identifier, and when the service identifier is consistent with the service identifier of the service on the system platform, the service node of the service packet corresponding to the service name in the service packet is accessed. In addition, a service package in one service can be configured with a plurality of matching code identifiers, but each matching code identifier has uniqueness in the system platform, so that the on-demand message can be ensured to be normally accessed and trigger the service through the matching code identifier. The session identifier is mainly used for telephone traffic service, and actions of one telephone traffic comprise telephone calling, ringing, off-hook, heartbeat and on-hook in a conversation process and the like. A traffic requires multiple access initiations or multiple actions to complete, and therefore, in order to ensure the integrity and atomicity of a traffic data, a traffic must be executed in a session, i.e., the session identifier needs to have uniqueness in the system platform. Therefore, when the service interface is called to receive the service access message, the service identifier matched with the session identifier can be found according to the session identifier, and when the service identifier is consistent with the service identifier of the service on the system platform, the service node of the service packet corresponding to the service name in the service packet is accessed.
In addition, specifically, when the service output value is output, the service output value may be output according to a preset output mode. The preset output mode may include a synchronous output mode and an asynchronous output mode. Specifically, the synchronous output mode is a mode of outputting a service output value after a service access message sent by a user is received by a system platform calling service interface and is accessed to a trigger service and the service flow is completely completed; the asynchronous output mode is a mode of outputting a service output value at the same time when the system platform calls a service interface to receive a service access message sent by a user.
Thus, in the embodiment of the invention, after the service interface of the user access service package is obtained according to the received service package registered on the system platform and is recorded on the system platform, the service access message sent by the user can be called through the service interface, the service access and the service query are carried out according to the service access message and the service access interface, and the service output value is output, so that a service developer can custom-develop the service interface according to the development specification according to the development mode of own habit, the custom-defined service interface is provided on the system platform through the mode of registering the service package, and the user can access the service package through calling the service interface, thereby avoiding that the service developer must carry out service access according to the complex service access method specified by an operator, improving the flexibility of the service developer in developing services, the problem of low flexibility of the development service caused by the limited service fixed access interface of the service developer in the prior art is solved.
Second embodiment:
as shown in fig. 3, a block diagram of an apparatus for providing a service interface in a second embodiment of the present invention is shown, where the apparatus includes:
a receiving module 301, configured to receive a service package registered on a system platform;
a first obtaining module 302, configured to obtain, according to the service package, a service interface for accessing the service package, and record the service interface on the system platform.
Optionally, the service interface is a uniform resource locator URL, and the URL carries a service name and a service action corresponding to the service packet.
Optionally, the service pack comprises: jar files used for processing service access messages sent by users; the xml file is used for specifying the name of the service package, the service action corresponding to the service package and the output parameter corresponding to the service package; property file for specifying the file name of jar file of service package and the file name of xml file of service package.
Optionally, the apparatus further comprises: the calling module is used for calling a service interface to receive a service access message sent by a user, wherein the service access message carries a service access identifier and information required by service inquiry; the access module is used for accessing the service package according to the service name and the service access identifier corresponding to the service package; the second acquisition module is used for acquiring a service output value corresponding to the service inquiry information according to the service action corresponding to the service packet and the information required by the service inquiry; and the output module is used for outputting the service output value.
Optionally, the service access identifier includes a service identifier, a matching code identifier, or a session identifier.
Therefore, the embodiment of the invention receives the service package registered on the system platform through the receiving module, acquires the service interface for accessing the service package according to the service package through the first acquiring module, and records the service interface on the system platform, so that a service developer can self-define and develop the service interface according to the development mode of own habit and the development standard, thereby avoiding that the service developer must perform service access according to a complex service access method specified by an operator, improving the flexibility of developing services by the service developer, and solving the problem of lower flexibility of developing services caused by the limited service fixed access interface of the service developer in the prior art.
While the preferred embodiments of the present invention have been described, it will be understood by those skilled in the art that various changes and modifications may be made without departing from the spirit and scope of the invention as defined in the following claims.

Claims (8)

1. A method for providing service interface is applied to a system platform, and is characterized in that the method comprises the following steps:
receiving a service package registered on the system platform;
acquiring a service interface for accessing the service package according to the service package, and recording the service interface on the system platform; wherein, the service interface comprises: and a service developer customizes a developed service interface according to a development specification, wherein the service interface is a Uniform Resource Locator (URL), and the URL carries a service name and a service action corresponding to the service packet.
2. The method of claim 1, wherein the service pack comprises:
jar files used for processing service access messages sent by users;
an xml file for specifying the service package name, the service action corresponding to the service package, and the output parameter corresponding to the service package;
a service properties file for specifying a file name of a jar file of the service package and a file name of an xml file of the service package.
3. The method of claim 1, wherein after the steps of obtaining a service interface for accessing the service package according to the service package and recording the service interface on the system platform, the method further comprises:
calling the service interface to receive a service access message sent by a user, wherein the service access message carries a service access identifier and information required by service query;
accessing the service packet according to the service name corresponding to the service packet and the service access identifier;
acquiring a service output value corresponding to the service inquiry information according to the information required by the service inquiry and the service action corresponding to the service packet;
and outputting the service output value.
4. The method of claim 3, wherein the service access identifier comprises a service identifier, a matching code identifier, or a session identifier.
5. An apparatus for providing service interface, applied to a system platform, the apparatus comprising:
the receiving module is used for receiving the service package registered to the system platform;
the first acquisition module is used for acquiring a service interface used for accessing the service package according to the service package and recording the service interface on the system platform; wherein the service interface comprises: and a service developer customizes a developed service interface according to a development specification, wherein the service interface is a Uniform Resource Locator (URL), and the URL carries a service name and a service action corresponding to the service packet.
6. The apparatus of claim 5, wherein the service pack comprises: jar files for processing service access messages sent by users; an xml file for specifying the service package name, the service action corresponding to the service package, and the output parameter corresponding to the service package; a service properties file for specifying a file name of a jar file of the service package and a file name of an xml file of the service package.
7. The apparatus of claim 5, further comprising:
the calling module is used for calling the service interface to receive a service access message sent by a user, wherein the service access message carries a service access identifier and information required by service inquiry;
the access module is used for accessing the service package according to the service name corresponding to the service package and the service access identifier;
a second obtaining module, configured to obtain a service output value corresponding to the service query information according to the information required for service query and the service action corresponding to the service packet;
and the output module is used for outputting the service output value.
8. The apparatus of claim 7, wherein the service access identifier comprises a service identifier, a match code identifier, or a session identifier.
CN201610838823.0A 2016-09-21 2016-09-21 Method and device for providing service interface Active CN107846300B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610838823.0A CN107846300B (en) 2016-09-21 2016-09-21 Method and device for providing service interface

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610838823.0A CN107846300B (en) 2016-09-21 2016-09-21 Method and device for providing service interface

Publications (2)

Publication Number Publication Date
CN107846300A CN107846300A (en) 2018-03-27
CN107846300B true CN107846300B (en) 2022-09-16

Family

ID=61657515

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610838823.0A Active CN107846300B (en) 2016-09-21 2016-09-21 Method and device for providing service interface

Country Status (1)

Country Link
CN (1) CN107846300B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115883668B (en) * 2022-11-29 2023-10-20 广发银行股份有限公司 Telephone traffic scheduling platform

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101232371A (en) * 2007-01-24 2008-07-30 中兴通讯股份有限公司 Verification method of digital signature under stream media business level networking architecture
CN101976199A (en) * 2010-10-15 2011-02-16 德讯科技股份有限公司 Object-oriented middleware distributed system development platform

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102137136B (en) * 2010-08-13 2014-04-30 华为技术有限公司 Method, device and equipment for realizing Mashup business in business integration
US8838767B2 (en) * 2010-12-30 2014-09-16 Jesse Lakes Redirection service
CN103095479A (en) * 2011-11-04 2013-05-08 华为技术有限公司 Method and device of business configuration

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101232371A (en) * 2007-01-24 2008-07-30 中兴通讯股份有限公司 Verification method of digital signature under stream media business level networking architecture
CN101976199A (en) * 2010-10-15 2011-02-16 德讯科技股份有限公司 Object-oriented middleware distributed system development platform

Also Published As

Publication number Publication date
CN107846300A (en) 2018-03-27

Similar Documents

Publication Publication Date Title
US8538427B2 (en) Method for obtaining telecommunications services through a telecommunications terminal
US20050276229A1 (en) Service discovery method in a network
US8504048B2 (en) Systems and methods of making a call
CN104935744A (en) Verification code display method, verification code display device and mobile terminal
CN110572820B (en) Registration method and device of IMS terminal, position information server and storage medium
CN107547213B (en) Method and device for identifying business rules
EP3669561B1 (en) A method of obtaining user subscription data pertaining to a subscriber in a telecommunication network
CN113645254A (en) Method and device for signaling addressing
CN109964473B (en) Voice service response method and device
US20140074931A1 (en) Method and device for suggesting applications
CN107846300B (en) Method and device for providing service interface
US20080132205A1 (en) Method and System for Device Identity Check
CN109218275B (en) Application interaction method and device
US9992638B1 (en) System and method of facilitating management of common channel based services
JP2006295500A (en) Mobile phone, management server and communication system
CN112752258B (en) eSIM card opening method, mobile phone terminal and service acceptance system
RU2596588C2 (en) System and method for activation of mobile device for communication initiating
JP2010525627A (en) Method and apparatus for notifying database update in end user terminal system
CN106850925A (en) The synchronous method of a kind of mobile unit and cellphone directory based on WiFi
CN108882184B (en) Supplementary service configuration method, supplementary service configuration device and terminal
CN113434552B (en) Data request processing method and device, storage medium and electronic device
CN113867976A (en) Calling method and device of application program interface, storage medium and electronic device
US8086193B2 (en) Method of configuring a multi-network terminal and an associated multi-network terminal
WO2023088011A1 (en) Method and apparatus for transmitting interaction information, and storage medium and electronic apparatus
CN106331270B (en) Method and device for managing numbers of contact persons

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