WO2014110903A1 - Method used by interface machine to process messages and interface machine - Google Patents

Method used by interface machine to process messages and interface machine Download PDF

Info

Publication number
WO2014110903A1
WO2014110903A1 PCT/CN2013/082650 CN2013082650W WO2014110903A1 WO 2014110903 A1 WO2014110903 A1 WO 2014110903A1 CN 2013082650 W CN2013082650 W CN 2013082650W WO 2014110903 A1 WO2014110903 A1 WO 2014110903A1
Authority
WO
WIPO (PCT)
Prior art keywords
message
interface machine
module
configuration file
interface
Prior art date
Application number
PCT/CN2013/082650
Other languages
French (fr)
Chinese (zh)
Inventor
郭沛仪
Original Assignee
中兴通讯股份有限公司
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 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2014110903A1 publication Critical patent/WO2014110903A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/08Protocols for interworking; Protocol conversion

Definitions

  • the present invention relates to the field of telecommunications, and in particular to an interface machine for processing messages and methods in an intelligent network service.
  • SCP Service Control Point
  • DCC Diameter Credit Control
  • I VR Interactive Voice Response
  • USSD Man-Machine Interface Language
  • LLaanngguuaaggee (, abbreviated as MMMMLL))
  • MMMMLL 1155 (( EExxtteennttssiibbllee MMaarrkkuupp LLaanngguuaaggee ,, cocoa expansion and expansion mark mark language)), and interact with the third party, and finish The specific function of the special function. .
  • the structure of the DDmmmeetteerr agreement is strong, and the SSCCPP has a special module module that completes the solution analysis of the protocol, and the interface machine only needs to be processed.
  • the message exchanges and exchanges are partially divided, and the function of the machine that is connected to the interface is also fixed relative to the fixed, and does not need to be very strong.
  • Sexuality .
  • the interface machine needs to be handled by the Association.
  • the technical problem to be solved by the present invention is to provide a method and an interface machine for processing messages by an interface machine, so as to solve the disadvantages of the interface machine development mode, the interface machine has many versions, poor reusability, high maintenance cost, and poor scalability.
  • the present invention provides a method for an interface machine to process a message, including:
  • the interface machine accepts the content of the protocol input by the user, converts the content of the protocol into a configuration file, or accepts the imported configuration file;
  • the interface device parses the received message according to the configuration file, and then forwards the message to the third-party network element.
  • the interface content accepted by the interface device by the user is implemented by:
  • the interface machine accepts protocol content entered by the user by providing a graphical user interface.
  • the foregoing method further has the following features: the process of parsing the received message according to the configuration file by the interface device includes:
  • the interface machine verifies the parameter format of the message. If the verification fails, the specific error code is sent to the third-party network element according to the reason of the failure.
  • the foregoing method further has the following features: Before the interface machine parses the received message, the method further includes:
  • the validity of the message is checked, such as a message that is invalid, or a specific error code is returned, or the message is directly discarded.
  • the above method also has the following features:
  • the contents of the agreement include: a command code, an input parameter, and an input parameter;
  • the parsing process of the received message according to the configuration file includes: if the message received by the interface device is a service request message, parsing the command code of the service request message, if the command code is found If the service request message is configured, the service request message is parsed according to the input parameter;
  • the message received by the interface machine is a response message returned by the online charging system, according to the The response parses the response message.
  • the format of the configuration file includes: an extensible markup language format.
  • an interface machine including:
  • the first module is configured to: accept the content of the protocol input by the user, convert the content of the protocol into a configuration file, or accept the imported configuration file;
  • the second module is configured to: parse the received message according to the configuration file, and send the processed message to the third module;
  • the third module is configured to: forward the message sent by the second module to the third-party network element, and send the message sent by the third-party network element to the second module.
  • the above interface machine further has the following features:
  • the first module is configured to: accept the protocol content input by the user by providing a graphical user interface.
  • the above interface machine further has the following features:
  • the second module is configured to: during the parsing process of the received message according to the configuration file, verify a parameter format of the message, and if the verification fails, the specific An error code is sent to the third module;
  • the third module is further configured to: send the error code to a third-party network element.
  • the above interface machine further has the following features:
  • the third module is configured to: before sending the message sent by the third-party network element to the second module, verify the validity of the message, for example, if the message is invalid, then the third-party network The element returns a specific error code or discards the message directly.
  • the interface device further has the following features: the protocol content includes: a command code, an input parameter, and an output parameter.
  • the second module is configured to: if the received message is a service request message, parse the command code of the service request message, and if the service request message corresponding to the command code is found, the The service request message is parsed; if the message received by the interface machine is an online charging system The response message returned by the system is parsed according to the outgoing parameter.
  • the interface machine further has the following features:
  • the format of the configuration file includes: an extensible markup language format.
  • the embodiment of the invention discloses a method and an interface machine for processing messages by an interface machine, which solves the problems of poor scalability, poor reusability, development difficulty and long period of the traditional interface machine.
  • the embodiment of the invention also implements the import and export functions of the configuration file, which effectively reduces the configuration complexity.
  • FIG. 1 is a flowchart of a method for an interface machine to process a message according to an embodiment of the present invention.
  • FIG. 2 is a schematic diagram of an interface machine according to an embodiment of the present invention.
  • FIG. 3 is a flowchart of processing an interface machine according to an application example of the present invention.
  • FIG. 1 is a flowchart of a method for processing a message by an interface machine according to an embodiment of the present invention. As shown in FIG. 1 , the method in this embodiment includes:
  • the interface machine accepts the content of the protocol input by the user, converts the content of the protocol into a configuration file, or accepts the imported configuration file;
  • the interface device parses the received message according to the configuration file, and then forwards the message to the third-party network element.
  • step S10 the interface machine can accept the protocol content input by the user by providing a graphical user interface.
  • the interface device parses the received message according to the configuration file, and the interface device performs the verification on the parameter format of the message, and if the verification fails, the interface fails.
  • the reason is to send a specific error code to a third-party network element.
  • step S20 before the interface device parses the received message according to the configuration file, the method further includes: verifying the validity of the message, and if the message is invalid, returning a specific error code. Or discard the message directly.
  • FIG. 2 is a schematic diagram of an interface device according to an embodiment of the present invention. As shown in FIG. 2, the interface device of this embodiment includes:
  • the configuration file generation module provides a graphical user interface and accepts the protocol content that the user needs to parse (the protocol content may include the command code of the protocol, the input parameter (refers to a series of parameters in the request message of the protocol), and the parameter (referring to the parameter) a series of parameters in the response message of the protocol), and convert the content of the protocol input by the user into a parsable configuration file, and send it to the message parsing module; the import module, the user can complete the configuration by directly writing the XML format configuration file, and then Import to the system through the import module.
  • the protocol content may include the command code of the protocol, the input parameter (refers to a series of parameters in the request message of the protocol), and the parameter (referring to the parameter) a series of parameters in the response message of the protocol), and convert the content of the protocol input by the user into a parsable configuration file, and send it to the message parsing module; the import module, the user can complete the configuration by directly writing the XML format configuration file, and then Im
  • the combination of the profile generation module and the import module is equivalent to the first module.
  • the configuration file generating module is further responsible for verifying the command code, the input parameter, and the output parameter of the protocol input by the user, and returning the verification result to the user.
  • the specific check may include: Whether the command code length exceeds the limit, whether the command code is composed of letters or numbers, and there are no other illegal characters.
  • the checksum of the input and output parameters includes whether the definition is complete, that is, whether the parameter name, parameter type, and parameter size are included. Whether the name consists of letters and numbers, there are no other illegal characters. Whether the number of inputs and parameters exceeds the maximum value defined by the system. If any of these checks fail, the user will be prompted to ask the user to re-enter.
  • the format of the configuration file used by the configuration file generation module may be various, the .c format of the present language, or may define a format such as .cfg), and provide import and export functions of the configuration file.
  • the configuration file generating module notifies the message parsing module in real time when the configuration file changes, and updates the configuration file stored in the memory.
  • a message parsing module (corresponding to the second module), parsing the received message according to the configuration file, and if the received message is a service request message, parsing the received message into a request format specified in the configuration file (for example, according to The input part of the configuration file is parsed), and then transferred to the message Send module. If the received message is a response message returned by the OCS, the received message is parsed into an internal message with the service (resolved according to the parameter part of the configuration file, and then the parameter is adjusted according to the parameter specification in the configuration file. Regularize) and then forward to the message forwarding module.
  • the message parsing module is further configured to check the parameter format of the received message (such as the parameter type, length, and validity in the message), and send the verification result to the message forwarding module, and the message that the verification fails. According to the reason of the failure, the specific error code is used and the result is sent to the message forwarding module.
  • the parameter format of the received message such as the parameter type, length, and validity in the message
  • the message forwarding module (equivalent to the third module) is responsible for receiving and sending the message, forwarding the received message to the corresponding third-party network element, and forwarding the message sent by the third-party network element to the message parsing module for processing. For example, the received service or OCS message is forwarded to the message parsing module for processing, and the message sent by the message parsing module is forwarded to the service or ocs.
  • the message forwarding module is also responsible for verifying the validity of the received message, and does not forward the message to the message parsing module for invalid messages. Specifically, for a message that still does not get a response within the valid time, a specific error code is returned to the service. For the response message received after the valid time is exceeded, it is directly discarded.
  • the profile generation module includes a protocol format entry submodule and a parameter processing requirement entry submodule.
  • the protocol format entry sub-module is responsible for accepting user input protocol entry; it is responsible for inputting the command code, input parameter, and input parameter of the parameter, and converting it into the required XML format.
  • the parameter processing requires that the input sub-module is responsible for accepting the algorithm input of the protocol input by the user, and is responsible for configuring the parameters required by the OCS in the protocol, for example: unit conversion, seeking the maximum value among the multi-group parameters, minimum Value, etc. Finally, the parameter processing requires that the submodule be converted to the required XML format and written to the configuration file.
  • the message parsing module includes an ingress parsing submodule, an out parsing parsing submodule, and a parameter regularizing submodule.
  • the parsing sub-module is configured to parse the request message received by the message forwarding module according to the configuration file generated by the configuration file generating module, and send the parsing result to the message forwarding module.
  • the parameter parsing sub-module is responsible for parsing the response message received by the message forwarding module according to the configuration file generated by the configuration file generating module, and parsing the parsing result to the parameter regularizing module.
  • the parameter shaping sub-module is responsible for arranging the parameters of the parsing result obtained by the parsing parsing module according to the configuration file generated by the configuration file generating module, and finally sending the result to the message forwarding module.
  • the message forwarding module is responsible for establishing the third-party network element link and forwarding the message, and may be extended not only to the service and the OCS, but also to a series of external networks that need to resolve the interaction of the message in the fixed protocol format through the interface machine. yuan.
  • the embodiment of the invention provides a human-computer interaction interface for configuring a configuration file, and provides a function for importing and exporting configuration files.
  • the user can directly configure the XML format configuration file to complete the configuration, and then import it into the system to make the configuration. Simple, easy to use, and efficient.
  • the invention uses an XML language configuration file to describe the parsing rules of the protocol, and provides a parameter regularization function. Different IVR systems and USSD systems can complete the required message parsing as long as the parsing rules of the protocol are configured according to their own requirements, and the interface is guaranteed. Machine scalability, reusability, flexibility.
  • the embodiment of the present invention is not limited to a specific protocol, and only needs to be explicitly expressed by the interface protocol parsing rules. Therefore, when multiple protocols need to be used for interaction, only one interface machine needs to be deployed, which reduces engineering implementation. The complexity is convenient for users to manage.
  • Step 101 The message forwarding module of the interface machine receives the MML request message of the service.
  • the message forwarding module needs to check the received MML request message, and after the verification succeeds, the message is sent to the message parsing module for processing. The following aspects of receiving the MML request message are verified:
  • Step 102 The message parsing module first parses the command code of the MML request message, and searches in the configuration list. If the MML request message corresponding to the command code is found, the process proceeds to step 104; otherwise, step 103 is performed. Step 103: If the search fails, the message parsing module returns an error to the message forwarding module, and the message forwarding module forwards the message to the service, and ends the session.
  • Step 104 After the search is successful, the message parsing module parses the message and converts it into an input parameter of the MML protocol, and the field of the service transmission is converted into an input parameter according to the configuration.
  • the message parsing module needs to verify the parameters in addition to the message parsing. When the check fails, step 103 is skipped. Check the parameters as follows:
  • the value of the parameter is outside the scope of the configuration file.
  • Step 105 After the parsing is successful, the message parsing module sends the parsed MML request message to the message forwarding module, and the message forwarding module sends the message to the destination ocs.
  • the message forwarding module needs to save the session number of the current operation, and set a timer to wait. If the corresponding response message is not received, the session number is released, and the process proceeds to step 103. Otherwise, the step is performed. 106.
  • Step 106 The message parsing module receives the response message sent by the OCS.
  • a preliminary check is required. If the check fails, the packet is directly discarded. Otherwise, the message is forwarded to the message parsing module, and the process proceeds to step 107. It is necessary to perform preliminary verification according to the following aspects: Whether the session number of the message is a valid session number, that is, whether the response message is received within the timer; whether the service that needs to receive the response message is still built normally.
  • Step 107 The message parsing module solves the response message returned by the OCS according to the configured rule.
  • the value of the parameter is outside the scope of the configuration file.
  • Step 108 Determine the parsing result. If there is an invalid parameter, that is, the parameter parsing fails, the process proceeds to step 109, otherwise the step 110 is skipped. Step 109: The parameter parsing fails, the message parsing module returns an error to the message forwarding module, the message forwarding module forwards the message to the service, and ends the session.
  • Step 110 The parameter parsing is successful, and the message parsing module determines whether the configuration file has a regular requirement for the parameter. If not, the process proceeds to step 111, otherwise the step 112 is skipped.
  • Step 111 The parameter parsing module returns the parsed result to the message forwarding module, and forwards the message to the service by the message forwarding module, and ends the session.
  • Step 112 The parameter parsing module performs secondary processing on the parsed configuration rules, and then proceeds to step 111.
  • the interface machine can process the MML message.
  • the processing of the MML message by the interface machine depends on the configuration file.
  • the interface machine code it has strong scalability.
  • the generated exception returns have a series of internal return codes, and the user only needs to easily locate the problem according to the return code.
  • the invention can effectively solve the shortcomings of the traditional MML interface machine, the interface machine has many versions, poor reusability, high maintenance cost and poor expandability.
  • the embodiment of the invention discloses a method and an interface machine for processing messages by an interface machine, which solves the problems of poor scalability, poor reusability, development difficulty and long period of the traditional interface machine.
  • the embodiment of the invention also implements the import and export functions of the configuration file, which effectively reduces the configuration complexity.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer And Data Communications (AREA)

Abstract

A method used by an interface machine to process messages and the interface machine. The method comprises: the interface machine accepting protocol content entered by a user, and converting the protocol content to a configuration file, or accepting an imported configuration file; and the interface machine parsing a received message according to the configuration file, and then forwarding the message to a third-party network element. Embodiments of the present invention can solve defects of too many interface machine versions, poor reusability, a high maintenance cost, and poor expandability in a conventional interface machine development mode.

Description

一种接口机处理消息的方法和接口机  Method and interface machine for processing message by interface machine
技术领域 Technical field
本发明涉及电信通讯行业领域, 尤其涉及智能网业务中的一种接口机处 理消息的方法和接口机。  The present invention relates to the field of telecommunications, and in particular to an interface machine for processing messages and methods in an intelligent network service.
背景技术 Background technique
智能网中, 不同网元处理不同事务, 各网元之间的消息交互主要通过接 口机完成。例如,业务控制点( Service Control Point,简称 SCP )通过 Diameter 协议 ( Diameter Credit Control,简称 DCC )向 OCS ( Online Charging System, 在线计费***)发送实时扣费信息。 交互式语音应答业务( Interactive Voice Response , 简称 I VR ) 业务以及非结构化补充数据业务 ( Unstmetured
Figure imgf000003_0001
简称 USSD )中通过人机接口语言( Man- Machine
In an intelligent network, different network elements handle different transactions, and message interaction between network elements is mainly performed through an interface machine. For example, the Service Control Point (SCP) sends real-time deduction information to the OCS (Online Charging System) through the Diameter Credit Control (DCC). Interactive Voice Response (I VR ) services and unstructured supplementary data services ( Unstmetured
Figure imgf000003_0001
Referred to as USSD) through Man-Machine Interface Language (Man- Machine
LLaanngguuaaggee,, 简简称称 MMMMLL ))协协议议向向 OOCCSS发发起起服服务务的的订订购购请请求求。。 或或者者釆釆用用 XXMMLL 1155 (( EExxtteennttssiibbllee MMaarrkkuupp LLaanngguuaaggee ,,可可扩扩展展标标记记语语言言))协协议议,,与与第第三三方方进进行行交交互互,, 完完成成特特定定的的功功能能。。 LLaanngguuaaggee,, abbreviated as MMMMLL)) The agreement agreement to request the OOCCSS to initiate service orders. . Or use XXMMLL 1155 (( EExxtteennttssiibbllee MMaarrkkuupp LLaanngguuaaggee ,, cocoa expansion and expansion mark mark language)), and interact with the third party, and finish The specific function of the special function. .
DDmmmeetteerr协协议议结结构构性性强强,, SSCCPP有有专专门门的的模模块块完完成成协协议议的的解解析析,, 接接口口机机只只 需需要要处处理理消消息息交交互互部部分分,, 这这样样接接口口机机的的功功能能也也就就相相对对固固定定,, 不不需需要要很很强强的的扩扩 展展性性。。 但但是是对对于于其其他他协协议议,, 例例如如,, MMMMLL或或者者 XXMMLL协协议议,, 接接口口机机需需要要处处理理协协 The structure of the DDmmmeetteerr agreement is strong, and the SSCCPP has a special module module that completes the solution analysis of the protocol, and the interface machine only needs to be processed. The message exchanges and exchanges are partially divided, and the function of the machine that is connected to the interface is also fixed relative to the fixed, and does not need to be very strong. Sexuality. . However, for the other parties, for example, for example, MMMMLL or XXMMLL, the interface machine needs to be handled by the Association.
2200 议议的的解解析析操操作作,, 将将这这些些标标准准协协议议与与业业务务和和接接口口机机之之间间通通过过固固定定的的内内部部协协议议进进 行行映映射射,, 从从而而完完成成业业务务与与第第三三方方之之间间的的消消息息交交互互。。 虽虽然然都都是是采采用用标标准准协协议议来来 进进行行交交互互,,但但是是不不同同的的 IIVVRR业业务务或或者者 UUSSSSDD业业务务在在协协议议中中个个别别命命令令的的解解析析要要 求求上上面面存存在在差差异异,, 这这样样就就需需要要用用不不同同的的接接口口机机版版本本与与之之对对应应,, 这这就就造造成成接接口口 机机版版本本非非常常多多,,而而且且每每当当一一个个 IIVVRR业业务务版版本本或或者者 UUSSSSDD业业务务版版本本有有变变化化的的时时2200 The solution to the analysis and analysis of the operation, and the internal standard of the agreement between the standard and the business and the interface machine will be passed through the fixed internal The ministry agreement negotiates to conduct the mapping, and then completes the interaction between the business operations and the third party. . Although they are all using the standard-standard agreement agreement to enter and exchange, but the different IIVVRR business or the UUSSSSDD business is in the agreement. In the solution analysis of the individual command order in the middle and the middle, it is required to find the difference in the above-mentioned face-to-face existence. Therefore, it is necessary to use the interface version of the interface port which is not the same. Corresponding to the corresponding pair, this will result in a very limited number of interface versions of the interface interface, and often and whenever a version of the IIVVRR business version or UUSSSSDD The business version of the business has changed from time to time.
2255 候候,, 其其对对应应的的接接口口机机版版本本也也很很有有可可能能需需要要修修改改,, 很很多多时时候候,, 同同一一个个协协议议命命令令 需需要要在在不不同同的的接接口口机机版版本本中中进进行行开开发发,, 这这样样也也无无形形的的增增加加了了开开发发的的工工作作量量,,
Figure imgf000003_0002
发明内容 本发明要解决的技术问题是提供一种接口机处理消息的方法和接口机, 以解决传统接口机开发模式中, 接口机版本多, 复用性差、 维护成本高, 扩 展性差等缺点。
2255 waiting, its corresponding interface port version of the interface is also very likely to be able to need to be modified, very many times, with the same agreement The deliberate order order needs to be developed and developed in the version of the interface port of the interface that is not the same, and this also has no intangible increase and increase development. Work volume,
Figure imgf000003_0002
Summary of the invention The technical problem to be solved by the present invention is to provide a method and an interface machine for processing messages by an interface machine, so as to solve the disadvantages of the interface machine development mode, the interface machine has many versions, poor reusability, high maintenance cost, and poor scalability.
为了解决上述技术问题, 本发明提供了一种接口机处理消息的方法, 包 括:  In order to solve the above technical problem, the present invention provides a method for an interface machine to process a message, including:
接口机接受用户输入的协议内容, 将所述协议内容转换为一配置文件, 或者接受导入的配置文件;  The interface machine accepts the content of the protocol input by the user, converts the content of the protocol into a configuration file, or accepts the imported configuration file;
所述接口机根据所述配置文件对收到的消息进行解析处理, 然后转发给 第三方网元。  The interface device parses the received message according to the configuration file, and then forwards the message to the third-party network element.
优选地, 上述方法还具有下面特点: 所述接口机接受用户输入的协议内 容是通过以下方式实现的:  Preferably, the foregoing method further has the following features: The interface content accepted by the interface device by the user is implemented by:
所述接口机通过提供图形化的用户界面来接受用户输入的协议内容。 优选地, 上述方法还具有下面特点: 所述接口机根据所述配置文件对收 到的消息进行解析处理过程中包括:  The interface machine accepts protocol content entered by the user by providing a graphical user interface. Preferably, the foregoing method further has the following features: the process of parsing the received message according to the configuration file by the interface device includes:
所述接口机对所述消息的参数格式进行校验, 如校验失败, 则根据失败 的原因将特定的错误码发送给第三方网元。  The interface machine verifies the parameter format of the message. If the verification fails, the specific error code is sent to the third-party network element according to the reason of the failure.
优选地, 上述方法还具有下面特点: 所述接口机对收到的消息进行解析 处理之前, 还包括:  Preferably, the foregoing method further has the following features: Before the interface machine parses the received message, the method further includes:
对所述消息的有效性进行校验, 如校验为无效的消息, 则返回特定的错 误码, 或者直接丟弃所述消息。  The validity of the message is checked, such as a message that is invalid, or a specific error code is returned, or the message is directly discarded.
优选地, 上述方法还具有下面特点:  Preferably, the above method also has the following features:
所述协议内容包括: 命令码、 入参和出参;  The contents of the agreement include: a command code, an input parameter, and an input parameter;
所述接口机根据所述配置文件对收到的消息进行解析处理包括: 如所述接口机收到的消息是业务请求消息, 则解析该业务请求消息的命 令码, 如查找到命令码对应的业务请求消息配置, 则根据所述入参对所述业 务请求消息进行解析;  The parsing process of the received message according to the configuration file includes: if the message received by the interface device is a service request message, parsing the command code of the service request message, if the command code is found If the service request message is configured, the service request message is parsed according to the input parameter;
如所述接口机收到的消息是在线计费***返回的响应消息, 则根据所述 出参对所述响应消息进行解析。 If the message received by the interface machine is a response message returned by the online charging system, according to the The response parses the response message.
优选地, 上述方法还具有下面特点: 所述配置文件的格式包括: 可扩展标记语言格式。  Preferably, the foregoing method further has the following features: The format of the configuration file includes: an extensible markup language format.
为了解决上述问题, 本发明还提供了一种接口机, 包括:  In order to solve the above problems, the present invention also provides an interface machine, including:
第一模块, 设置为: 接受用户输入的协议内容, 将所述协议内容转换为 一配置文件, 或者接受导入的配置文件;  The first module is configured to: accept the content of the protocol input by the user, convert the content of the protocol into a configuration file, or accept the imported configuration file;
第二模块, 设置为: 根据所述配置文件对收到的消息进行解析处理, 将 处理后的消息发送给第三模块;  The second module is configured to: parse the received message according to the configuration file, and send the processed message to the third module;
第三模块, 设置为: 将所述第二模块发送的消息转发给第三方网元, 将 第三方网元发送的消息发给所述第二模块。  The third module is configured to: forward the message sent by the second module to the third-party network element, and send the message sent by the third-party network element to the second module.
优选地, 上述接口机还具有下面特点:  Preferably, the above interface machine further has the following features:
所述第一模块, 设置为: 是通过提供图形化的用户界面来接受用户输入 的协议内容的。  The first module is configured to: accept the protocol content input by the user by providing a graphical user interface.
优选地, 上述接口机还具有下面特点:  Preferably, the above interface machine further has the following features:
所述第二模块, 设置为: 在根据所述配置文件对收到的消息进行解析处 理过程中, 对所述消息的参数格式进行校验, 如校验失败, 则根据失败的原 因将特定的错误码发送给所述第三模块;  The second module is configured to: during the parsing process of the received message according to the configuration file, verify a parameter format of the message, and if the verification fails, the specific An error code is sent to the third module;
所述第三模块, 还设置为: 将所述错误码发送给第三方网元。  The third module is further configured to: send the error code to a third-party network element.
优选地, 上述接口机还具有下面特点:  Preferably, the above interface machine further has the following features:
所述第三模块, 设置为: 将第三方网元发送的消息发给所述第二模块之 前, 对所述消息的有效性进行校验, 如校验为无效的消息, 则向第三方网元 返回特定的错误码, 或者直接丟弃所述消息。  The third module is configured to: before sending the message sent by the third-party network element to the second module, verify the validity of the message, for example, if the message is invalid, then the third-party network The element returns a specific error code or discards the message directly.
优选地, 上述接口机还具有下面特点: 所述协议内容包括: 命令码、 入 参和出参,  Preferably, the interface device further has the following features: the protocol content includes: a command code, an input parameter, and an output parameter.
所述第二模块, 设置为: 如收到的消息是业务请求消息, 则解析该业务 请求消息的命令码, 如查找到命令码对应的业务请求消息配置, 则根据所述 入参对所述业务请求消息进行解析; 如所述接口机收到的消息是在线计费系 统返回的响应消息 , 则根据所述出参对所述响应消息进行解析。 优选地, 上述接口机还具有下面特点: 所述配置文件的格式包括: 可扩展标记语言格式。 The second module is configured to: if the received message is a service request message, parse the command code of the service request message, and if the service request message corresponding to the command code is found, the The service request message is parsed; if the message received by the interface machine is an online charging system The response message returned by the system is parsed according to the outgoing parameter. Preferably, the interface machine further has the following features: The format of the configuration file includes: an extensible markup language format.
本发明实施例公开了一种接口机处理消息的方法和接口机, 解决了传统 接口机的功能扩展性差、 复用性差、 开发难度大、 周期长的问题。 本发明实 施例还实现配置文件的导入和导出功能, 有效的降低了配置复杂度。 附图概述  The embodiment of the invention discloses a method and an interface machine for processing messages by an interface machine, which solves the problems of poor scalability, poor reusability, development difficulty and long period of the traditional interface machine. The embodiment of the invention also implements the import and export functions of the configuration file, which effectively reduces the configuration complexity. BRIEF abstract
图 1为本发明实施例的一种接口机处理消息的方法的流程图。  FIG. 1 is a flowchart of a method for an interface machine to process a message according to an embodiment of the present invention.
图 2为本发明实施例的接口机的示意图。  2 is a schematic diagram of an interface machine according to an embodiment of the present invention.
图 3为本发明一应用示例的接口机处理消息的流程图。  FIG. 3 is a flowchart of processing an interface machine according to an application example of the present invention.
本发明的较佳实施方式 Preferred embodiment of the invention
下文中将结合附图对本发明的实施例进行详细说明。 需要说明的是, 在 不冲突的情况下, 本申请中的实施例及实施例中的特征可以相互任意组合。  Embodiments of the present invention will be described in detail below with reference to the accompanying drawings. It should be noted that, in the case of no conflict, the features in the embodiments and the embodiments in the present application may be arbitrarily combined with each other.
为了更好地理解本发明, 下面结合附图和具体实施例对本发明作进一步 地描述。  For a better understanding of the invention, the invention will be further described in conjunction with the drawings and specific embodiments.
图 1为本发明实施例的一种接口机处理消息的方法的流程图, 如图 1所 示, 本实施例的方法包括:  FIG. 1 is a flowchart of a method for processing a message by an interface machine according to an embodiment of the present invention. As shown in FIG. 1 , the method in this embodiment includes:
S10、 接口机接受用户输入的协议内容, 将所述协议内容转换为一配置 文件, 或者接受导入的配置文件;  S10. The interface machine accepts the content of the protocol input by the user, converts the content of the protocol into a configuration file, or accepts the imported configuration file;
S20、 接口机根据所述配置文件对收到的消息进行解析处理, 然后转发 给第三方网元。  S20. The interface device parses the received message according to the configuration file, and then forwards the message to the third-party network element.
步骤 S10中, 接口机可以通过提供图形化的用户界面来接受用户输入的 协议内容。  In step S10, the interface machine can accept the protocol content input by the user by providing a graphical user interface.
步骤 S20中, 接口机根据所述配置文件对收到的消息进行解析处理过程 中包括: 接口机对所述消息的参数格式进行校验, 如校验失败, 则根据失败 的原因将特定的错误码发送给第三方网元。 In the step S20, the interface device parses the received message according to the configuration file, and the interface device performs the verification on the parameter format of the message, and if the verification fails, the interface fails. The reason is to send a specific error code to a third-party network element.
步骤 S20中,接口机根据所述配置文件对收到的消息进行解析处理之前, 还包括, 对所述消息的有效性进行校验, 如校验为无效的消息, 则返回特定 的错误码, 或者直接丟弃所述消息。  In step S20, before the interface device parses the received message according to the configuration file, the method further includes: verifying the validity of the message, and if the message is invalid, returning a specific error code. Or discard the message directly.
图 2为本发明实施例的接口机的示意图, 如图 2所示, 本实施例的接口 机包括:  2 is a schematic diagram of an interface device according to an embodiment of the present invention. As shown in FIG. 2, the interface device of this embodiment includes:
配置文件生成模块, 提供一个图形化的用户界面, 接受用户输入需要解 析的协议内容(协议内容可以包括协议的命令码、 入参(指协议的请求消息 中的一系列参数) 、 出参(指协议的响应消息中的一系列参数) , 并将用户 输入的协议内容转换为一个可以解析的配置文件, 发送给消息解析模块; 导入模块, 用户可以通过直接编写 XML格式配置文件来完成配置, 然 后通过导入模块导入到***。  The configuration file generation module provides a graphical user interface and accepts the protocol content that the user needs to parse (the protocol content may include the command code of the protocol, the input parameter (refers to a series of parameters in the request message of the protocol), and the parameter (referring to the parameter) a series of parameters in the response message of the protocol), and convert the content of the protocol input by the user into a parsable configuration file, and send it to the message parsing module; the import module, the user can complete the configuration by directly writing the XML format configuration file, and then Import to the system through the import module.
配置文件生成模块和导入模块的组合相当于第一模块。  The combination of the profile generation module and the import module is equivalent to the first module.
所述配置文件生成模块还负责对用户输入的协议的命令码、 入参、 出参 进行校验, 并将校验结果返回给用户。 具体的校验可以包括: 命令码长度是 否超过限制, 命令码是否是由字母或数字组成, 不存在其他非法字符。 入参 和出参的校验包括其定义是否完整, 即是否包含参数名称、 参数类型、 参数 大小三部分。 其名称是否由字母和数字组成, 不存在其他非法字符。 入参和 出参的个数是否超过***定义的最大值。 如果其中任何一条校验失败, 都会 提示用户, 要求用户重新输入。  The configuration file generating module is further responsible for verifying the command code, the input parameter, and the output parameter of the protocol input by the user, and returning the verification result to the user. The specific check may include: Whether the command code length exceeds the limit, whether the command code is composed of letters or numbers, and there are no other illegal characters. The checksum of the input and output parameters includes whether the definition is complete, that is, whether the parameter name, parameter type, and parameter size are included. Whether the name consists of letters and numbers, there are no other illegal characters. Whether the number of inputs and parameters exceeds the maximum value defined by the system. If any of these checks fail, the user will be prompted to ask the user to re-enter.
所述配置文件生成模块所釆用的配置文件的格式可以是多种多样的, 本 言的. c格式, 或者可以自己定义格式例如 .cfg ) , 并且提供了配置文件的导入 和导出功能。 所述的配置文件生成模块, 在配置文件有变化时, 会实时通知 消息解析模块, 更新其存储在内存的配置文件。  The format of the configuration file used by the configuration file generation module may be various, the .c format of the present language, or may define a format such as .cfg), and provide import and export functions of the configuration file. The configuration file generating module notifies the message parsing module in real time when the configuration file changes, and updates the configuration file stored in the memory.
消息解析模块(相当于第二模块) , 根据配置文件对收到的消息进行解 析, 如果收到的消息是业务请求消息, 则将收到消息解析为配置文件中所规 定的请求格式(例如根据配置文件的入参部分进行解析) , 然后转给消息转 发模块。如果收到的消息是 OCS返回的响应消息,则将收到消息解析为与业 务之间的内部消息 (根据配置文件的出参部分进行解析, 然后再根据配置文 件中的参数规整要求对出参进行规整) , 然后转给消息转发模块。 a message parsing module (corresponding to the second module), parsing the received message according to the configuration file, and if the received message is a service request message, parsing the received message into a request format specified in the configuration file (for example, according to The input part of the configuration file is parsed), and then transferred to the message Send module. If the received message is a response message returned by the OCS, the received message is parsed into an internal message with the service (resolved according to the parameter part of the configuration file, and then the parameter is adjusted according to the parameter specification in the configuration file. Regularize) and then forward to the message forwarding module.
所述消息解析模块还负责对收到的消息的参数格式 (如消息中的参数类 型、 长度、 有效性)进行校验, 并将校验结果发送给消息转发模块, 对校验 失败的消息, 根据失败的原因, 用特定的错误码表示并将结果发送给消息转 发模块。  The message parsing module is further configured to check the parameter format of the received message (such as the parameter type, length, and validity in the message), and send the verification result to the message forwarding module, and the message that the verification fails. According to the reason of the failure, the specific error code is used and the result is sent to the message forwarding module.
消息转发模块(相当于第三模块) , 负责消息的接收和发送, 将收到的 消息转发给相应的第三方网元并且将第三方网元发送的消息转给消息解析模 块进行处理。例如,将收到的业务或者 OCS的消息转发给消息解析模块进行 处理, 并将由消息解析模块发送的消息转发给业务或者 ocs。  The message forwarding module (equivalent to the third module) is responsible for receiving and sending the message, forwarding the received message to the corresponding third-party network element, and forwarding the message sent by the third-party network element to the message parsing module for processing. For example, the received service or OCS message is forwarded to the message parsing module for processing, and the message sent by the message parsing module is forwarded to the service or ocs.
所述消息转发模块还负责对收到的消息的有效性进行校验, 对于无效的 消息, 不转给消息解析模块处理。 具体地, 对于有效时间内仍没有得到响应 的消息, 返回特定的错误码给业务。 对于在超过有效时间收到的响应消息, 直接丟弃。  The message forwarding module is also responsible for verifying the validity of the received message, and does not forward the message to the message parsing module for invalid messages. Specifically, for a message that still does not get a response within the valid time, a specific error code is returned to the service. For the response message received after the valid time is exceeded, it is directly discarded.
所述配置文件生成模块包含协议格式录入子模块和参数处理要求录入子 模块。  The profile generation module includes a protocol format entry submodule and a parameter processing requirement entry submodule.
其中, 协议格式录入子模块负责用于接受用户输入协议录入; 负责对参 数的命令码、 入参、 出参的录入, 并将其转换为要求的 XML格式。  The protocol format entry sub-module is responsible for accepting user input protocol entry; it is responsible for inputting the command code, input parameter, and input parameter of the parameter, and converting it into the required XML format.
参数处理要求录入子模块负责用于接受用户输入的协议出参的算法录入, 负责对协议中, OCS返回的参数进行规整要求进行配置, 例如: 单位换算、 求多组参数中的最大值、 最小值等。 最后, 参数处理要求录入子模块也将其 转换为要求的 XML格式, 写入配置文件中。  The parameter processing requires that the input sub-module is responsible for accepting the algorithm input of the protocol input by the user, and is responsible for configuring the parameters required by the OCS in the protocol, for example: unit conversion, seeking the maximum value among the multi-group parameters, minimum Value, etc. Finally, the parameter processing requires that the submodule be converted to the required XML format and written to the configuration file.
所述消息解析模块包含入参解析子模块、 出参解析子模块和参数规整子 模块。  The message parsing module includes an ingress parsing submodule, an out parsing parsing submodule, and a parameter regularizing submodule.
其中,入参解析子模块,负责根据配置文件生成模块所生成的配置文件, 对由消息转发模块收到的请求消息进行解析, 并将解析结果发送给消息转发 模块。 出参解析子模块, 负责根据配置文件生成模块所生成的配置文件, 对由 消息转发模块收到的响应消息进行解析,并且解析结果发送给参数规整模块。 The parsing sub-module is configured to parse the request message received by the message forwarding module according to the configuration file generated by the configuration file generating module, and send the parsing result to the message forwarding module. The parameter parsing sub-module is responsible for parsing the response message received by the message forwarding module according to the configuration file generated by the configuration file generating module, and parsing the parsing result to the parameter regularizing module.
参数规整子模块, 负责根据配置文件生成模块所生成的配置文件, 对由 出参解析模块得到的解析结果进行参数的规整, 最后再将结果发送给消息转 发模块。  The parameter shaping sub-module is responsible for arranging the parameters of the parsing result obtained by the parsing parsing module according to the configuration file generated by the configuration file generating module, and finally sending the result to the message forwarding module.
所述消息转发模块, 负责和第三方网元链路的建立和消息的转发, 可以 不仅仅局限于业务和 OCS, 可以扩展为需要通过接口机解析固定协议格式的 消息的交互的一系列外部网元。  The message forwarding module is responsible for establishing the third-party network element link and forwarding the message, and may be extended not only to the service and the OCS, but also to a series of external networks that need to resolve the interaction of the message in the fixed protocol format through the interface machine. yuan.
本发明实施例提供了一个人机交互界面进行配置文件的配置, 并且提供 了配置文件的导入和导出功能, 用户可以通过直接编写 XML格式配置文件 来完成配置, 然后再导入到***中, 使得配置简单、 易用、 高效。 本发明釆 用 XML语言配置文件来描述协议的解析规则, 并且提供了参数规整功能, 不同 IVR***和 USSD***只要根据自己的要求配置协议的解析规则,就可 以完成所需要消息解析, 保证了接口机的扩展性、 复用性、 灵活性。 本发明 实施例不局限于某一种特定的协议, 只需要接口协议解析规则可以明确的表 示, 这样在需要釆用多种协议进行交互时, 只需要部署一个接口机即可, 降 低了工程实施的复杂度, 方便用户进行管理。  The embodiment of the invention provides a human-computer interaction interface for configuring a configuration file, and provides a function for importing and exporting configuration files. The user can directly configure the XML format configuration file to complete the configuration, and then import it into the system to make the configuration. Simple, easy to use, and efficient. The invention uses an XML language configuration file to describe the parsing rules of the protocol, and provides a parameter regularization function. Different IVR systems and USSD systems can complete the required message parsing as long as the parsing rules of the protocol are configured according to their own requirements, and the interface is guaranteed. Machine scalability, reusability, flexibility. The embodiment of the present invention is not limited to a specific protocol, and only needs to be explicitly expressed by the interface protocol parsing rules. Therefore, when multiple protocols need to be used for interaction, only one interface machine needs to be deployed, which reduces engineering implementation. The complexity is convenient for users to manage.
下面以 MML协议(当然, 还可以是其他协议, 例如 HTTP协议, smpp 协议)为例, 可配置接口机处理的步骤如图 3所示, 具体如下:  The following takes the MML protocol (of course, other protocols, such as the HTTP protocol and the smpp protocol) as an example. The steps of the configurable interface machine are shown in Figure 3, as follows:
步骤 101、 接口机的消息转发模块收到业务的 MML请求消息。  Step 101: The message forwarding module of the interface machine receives the MML request message of the service.
其中, 消息转发模块需要对收到 MML请求消息进行校验, 校验成功后 将消息发送给消息解析模块处理。 对收到 MML请求消息的如下方面进行校 验:  The message forwarding module needs to check the received MML request message, and after the verification succeeds, the message is sent to the message parsing module for processing. The following aspects of receiving the MML request message are verified:
消息所需要发送到的目的 OCS是否存在;  Whether the destination OCS to which the message needs to be sent exists;
目的 OCS是否已建链成功。  Purpose Whether the OCS has been successfully built.
步骤 102、 消息解析模块首先解析此 MML请求消息的命令码, 并在配 置列表中查找, 如果查找到命令码所对应的 MML请求消息配置, 则跳转到 步骤 104; 否则, 则执行步骤 103。 步骤 103、 查找失败, 则消息解析模块给消息转发模块返回错误, 消息 转模块将消息转发给业务, 并且结束本次会话。 Step 102: The message parsing module first parses the command code of the MML request message, and searches in the configuration list. If the MML request message corresponding to the command code is found, the process proceeds to step 104; otherwise, step 103 is performed. Step 103: If the search fails, the message parsing module returns an error to the message forwarding module, and the message forwarding module forwards the message to the service, and ends the session.
步骤 104、查找成功后,消息解析模块将对此消息进行解析,转换为 MML 协议的入参, 业务传送的字段根据配置转换为入参。  Step 104: After the search is successful, the message parsing module parses the message and converts it into an input parameter of the MML protocol, and the field of the service transmission is converted into an input parameter according to the configuration.
其中, 消息解析模块除了完成消息解析, 还需要对参数进行校验。 当校 验失败时, 则跳转步骤 103。 对参数进行如下方面的校验:  The message parsing module needs to verify the parameters in addition to the message parsing. When the check fails, step 103 is skipped. Check the parameters as follows:
参数类型是否与配置文件的一致;  Whether the parameter type is consistent with the configuration file;
参数的个数是否与配置文件的一致;  Whether the number of parameters is consistent with the configuration file;
参数的值是超过配置文件的范围。  The value of the parameter is outside the scope of the configuration file.
步骤 105、 解析入参成功以后, 消息解析模块将解析出的 MML请求消 息发送消息转发模块, 并且消息转发模块发送给目的 ocs。  Step 105: After the parsing is successful, the message parsing module sends the parsed MML request message to the message forwarding module, and the message forwarding module sends the message to the destination ocs.
其中, 消息转发模块需要保存本次操作的会话号, 并且设置定时器进行 等待, 如果超过定时器还没有收到对应的响应消息, 则释放本次会话号, 跳 转到步骤 103 , 否则执行步骤 106。  The message forwarding module needs to save the session number of the current operation, and set a timer to wait. If the corresponding response message is not received, the session number is released, and the process proceeds to step 103. Otherwise, the step is performed. 106.
步骤 106、 消息解析模块收到 OCS发送的响应消息。  Step 106: The message parsing module receives the response message sent by the OCS.
该步骤中, 需要进行初步校验, 如果校验失败则直接丟弃, 否则将消息 转发给消息解析模块, 跳转步骤 107。 需要根据如下方面进行初步校验: 消息的会话号是否是有效的会话号,即是否在定时器内收到的响应消息; 需要接收此响应消息的业务是否依然建链正常。  In this step, a preliminary check is required. If the check fails, the packet is directly discarded. Otherwise, the message is forwarded to the message parsing module, and the process proceeds to step 107. It is necessary to perform preliminary verification according to the following aspects: Whether the session number of the message is a valid session number, that is, whether the response message is received within the timer; whether the service that needs to receive the response message is still built normally.
步骤 107、 消息解析模块根据配置的规则对 OCS返回的响应消息进行解  Step 107: The message parsing module solves the response message returned by the OCS according to the configured rule.
该步骤中, 需要对参数进行如下校验: In this step, you need to verify the parameters as follows:
参数类型是否与配置文件的一致;  Whether the parameter type is consistent with the configuration file;
参数的个数是否与配置文件的一致;  Whether the number of parameters is consistent with the configuration file;
参数的值是超过配置文件的范围。  The value of the parameter is outside the scope of the configuration file.
步骤 108、 判断解析结果, 如果存在无效的参数, 即参数解析失败, 则 跳转步骤 109 , 否则跳转步骤 110。 步骤 109、 参数解析失败, 消息解析模块给消息转发模块返回错误, 消 息转发模块将消息转发给业务, 并且结束本次会话。 Step 108: Determine the parsing result. If there is an invalid parameter, that is, the parameter parsing fails, the process proceeds to step 109, otherwise the step 110 is skipped. Step 109: The parameter parsing fails, the message parsing module returns an error to the message forwarding module, the message forwarding module forwards the message to the service, and ends the session.
步骤 110、 参数解析成功, 消息解析模块再判断配置文件是否针对出参 有规整要求, 如没有, 则跳转步骤 111 , 否则跳转步骤 112。  Step 110: The parameter parsing is successful, and the message parsing module determines whether the configuration file has a regular requirement for the parameter. If not, the process proceeds to step 111, otherwise the step 112 is skipped.
步骤 111、 参数解析模块将解析出的结果返回给消息转发模块, 并且由 消息转发模块转发给业务, 结束本次会话。  Step 111: The parameter parsing module returns the parsed result to the message forwarding module, and forwards the message to the service by the message forwarding module, and ends the session.
步骤 112、参数解析模块将解析出的配置的规则对参数进行二次处理后, 然后转到步骤 111。  Step 112: The parameter parsing module performs secondary processing on the parsed configuration rules, and then proceeds to step 111.
从上面可配置接口机处理 MML消息的步骤可以看出, 接口机对 MML 消息的处理取决于配置文件, 当有新增的 MML消息需要解析时, 只需要提 供处理规则就可以完成解析, 不需要修改接口机代码, 有很强的可扩展性。 并且在解析过程中, 产生的异常返回都有一系列内部返回码对应, 使用人员 只需要根据返回码就可以轻松定位问题。 本发明可以有效地解决传统 MML 接口机, 接口机版本多, 复用性差、 维护成本高, 扩展性差等缺点。  It can be seen from the above steps that the interface machine can process the MML message. The processing of the MML message by the interface machine depends on the configuration file. When a new MML message needs to be parsed, only the processing rule needs to be provided to complete the parsing. Modify the interface machine code, it has strong scalability. And in the parsing process, the generated exception returns have a series of internal return codes, and the user only needs to easily locate the problem according to the return code. The invention can effectively solve the shortcomings of the traditional MML interface machine, the interface machine has many versions, poor reusability, high maintenance cost and poor expandability.
本领域普通技术人员可以理解上述方法中的全部或部分步骤可通过程序 来指令相关硬件完成, 所述程序可以存储于计算机可读存储介质中, 如只读 存储器、 磁盘或光盘等。 可选地, 上述实施例的全部或部分步骤也可以使用 一个或多个集成电路来实现。 相应地, 上述实施例中的各模块 /单元可以釆用 硬件的形式实现, 也可以釆用软件功能模块的形式实现。 本发明不限制于任 何特定形式的硬件和软件的结合。 One of ordinary skill in the art will appreciate that all or a portion of the above steps may be accomplished by a program instructing the associated hardware, such as a read-only memory, a magnetic disk, or an optical disk. Alternatively, all or part of the steps of the above embodiments may also be implemented using one or more integrated circuits. Correspondingly, each module/unit in the above embodiment may be implemented in the form of hardware or in the form of a software function module. The invention is not limited to any specific form of combination of hardware and software.
以上仅为本发明的优选实施例, 当然, 本发明还可有其他多种实施例, 在不背离本发明精神及其实质的情况下, 熟悉本领域的技术人员当可根据本 发明作出各种相应的改变和变形, 但这些相应的改变和变形都应属于本发明 所附的权利要求的保护范围。 The above is only a preferred embodiment of the present invention, and of course, the present invention may be embodied in various other embodiments without departing from the spirit and scope of the invention. Corresponding changes and modifications are intended to be included within the scope of the appended claims.
工业实用性 本发明实施例公开了一种接口机处理消息的方法和接口机, 解决了传统 接口机的功能扩展性差、 复用性差、 开发难度大、 周期长的问题。 本发明实 施例还实现配置文件的导入和导出功能, 有效的降低了配置复杂度。 Industrial applicability The embodiment of the invention discloses a method and an interface machine for processing messages by an interface machine, which solves the problems of poor scalability, poor reusability, development difficulty and long period of the traditional interface machine. The embodiment of the invention also implements the import and export functions of the configuration file, which effectively reduces the configuration complexity.

Claims

权 利 要 求 书 claims
1、 一种接口机处理消息的方法, 包括: 1. A method for an interface machine to process messages, including:
接口机接受用户输入的协议内容, 将所述协议内容转换为一配置文件, 或者接受导入的配置文件; The interface machine accepts the protocol content input by the user, converts the protocol content into a configuration file, or accepts the imported configuration file;
所述接口机根据所述配置文件对收到的消息进行解析处理, 然后转发给 第三方网元。 The interface machine parses and processes the received message according to the configuration file, and then forwards it to the third-party network element.
2、如权利要求 1所述的方法, 其中, 所述接口机接受用户输入的协议内 容是通过以下方式实现的: 2. The method of claim 1, wherein the interface machine accepts the protocol content input by the user in the following manner:
所述接口机通过提供图形化的用户界面来接受用户输入的协议内容。 The interface machine accepts the protocol content input by the user by providing a graphical user interface.
3、如权利要求 1所述的方法, 其中, 所述接口机根据所述配置文件对收 到的消息进行解析处理过程中包括: 3. The method of claim 1, wherein the process of parsing the received message by the interface machine according to the configuration file includes:
所述接口机对所述消息的参数格式进行校验, 如校验失败, 则根据失败 的原因将特定的错误码发送给第三方网元。 The interface machine verifies the parameter format of the message. If the verification fails, a specific error code is sent to the third-party network element according to the reason for the failure.
4、如权利要求 1所述的方法, 其中, 所述接口机对收到的消息进行解析 处理之前, 还包括: 4. The method of claim 1, wherein before the interface machine parses and processes the received message, it further includes:
对所述消息的有效性进行校验, 如校验为无效的消息, 则返回特定的错 误码, 或者直接丟弃所述消息。 The validity of the message is verified. If the verification is an invalid message, a specific error code is returned, or the message is directly discarded.
5、 如权利要求 1所述的方法, 其中, 5. The method of claim 1, wherein,
所述协议内容包括: 命令码、 入参和出参; The content of the protocol includes: command code, input parameters and output parameters;
所述接口机根据所述配置文件对收到的消息进行解析处理包括: 如所述接口机收到的消息是业务请求消息, 则解析该业务请求消息的命 令码, 如查找到命令码对应的业务请求消息配置, 则根据所述入参对所述业 务请求消息进行解析; The interface machine parsing the received message according to the configuration file includes: If the message received by the interface machine is a service request message, parse the command code of the service request message. If the command code corresponding to the command code is found, The service request message is configured, and the service request message is parsed according to the input parameters;
如所述接口机收到的消息是在线计费***返回的响应消息, 则根据所述 出参对所述响应消息进行解析。 If the message received by the interface machine is a response message returned by the online charging system, the response message is parsed according to the output parameters.
6、如权利要求 1-4任一项所述的方法,其中,所述配置文件的格式包括: 可扩展标记语言格式。 6. The method according to any one of claims 1 to 4, wherein the format of the configuration file includes: extensible markup language format.
7、 一种接口机, 包括: 7. An interface machine, including:
第一模块, 设置为: 接受用户输入的协议内容, 将所述协议内容转换为 一配置文件, 或者接受导入的配置文件; The first module is set to: accept the protocol content input by the user, convert the protocol content into a configuration file, or accept the imported configuration file;
第二模块, 设置为: 根据所述配置文件对收到的消息进行解析处理, 将 处理后的消息发送给第三模块; The second module is configured to: parse and process the received message according to the configuration file, and send the processed message to the third module;
第三模块, 设置为: 将所述第二模块发送的消息转发给第三方网元, 将 第三方网元发送的消息发给所述第二模块。 The third module is configured to: forward messages sent by the second module to a third-party network element, and send messages sent by the third-party network element to the second module.
8、 如权利要求 7所述的接口机, 其中, 8. The interface machine as claimed in claim 7, wherein,
所述第一模块, 设置为: 是通过提供图形化的用户界面来接受用户输入 的协议内容的。 The first module is configured to: accept the protocol content input by the user by providing a graphical user interface.
9、 如权利要求 7所述的接口机, 其中, 9. The interface machine as claimed in claim 7, wherein,
所述第二模块, 设置为: 在根据所述配置文件对收到的消息进行解析处 理过程中, 对所述消息的参数格式进行校验, 如校验失败, 则根据失败的原 因将特定的错误码发送给所述第三模块; The second module is configured to: during the parsing process of the received message according to the configuration file, verify the parameter format of the message. If the verification fails, the specific The error code is sent to the third module;
所述第三模块, 还设置为: 将所述错误码发送给第三方网元。 The third module is further configured to: send the error code to a third-party network element.
10、 如权利要求 7所述的接口机, 其中, 10. The interface machine as claimed in claim 7, wherein,
所述第三模块, 设置为: 将第三方网元发送的消息发给所述第二模块之 前, 对所述消息的有效性进行校验, 如校验为无效的消息, 则向第三方网元 返回特定的错误码, 或者直接丟弃所述消息。 The third module is configured to: before sending the message sent by the third-party network element to the second module, verify the validity of the message, and if the verification is an invalid message, send the message to the third-party network element. Return a specific error code, or simply discard the message.
11、 如权利要求 7所述的接口机, 其中, 所述协议内容包括: 命令码、 入参和出参, 11. The interface machine according to claim 7, wherein the protocol content includes: command code, input parameters and output parameters,
所述第二模块, 设置为: 如收到的消息是业务请求消息, 则解析该业务 请求消息的命令码, 如查找到命令码对应的业务请求消息配置, 则根据所述 入参对所述业务请求消息进行解析; 如所述接口机收到的消息是在线计费系 统返回的响应消息, 则根据所述出参对所述响应消息进行解析。 The second module is set to: if the received message is a service request message, parse the command code of the service request message; if the service request message configuration corresponding to the command code is found, then according to the input parameter pair The service request message is parsed; if the message received by the interface machine is a response message returned by the online charging system, the response message is parsed according to the output parameters.
12、 如权利要求 7-11任一所述的接口机, 其中, 所述配置文件的格式包 括: 可扩展标记语言格式。 12. The interface machine according to any one of claims 7-11, wherein the format of the configuration file includes: extensible markup language format.
PCT/CN2013/082650 2013-01-21 2013-08-30 Method used by interface machine to process messages and interface machine WO2014110903A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201310021294.1A CN103945287B (en) 2013-01-21 2013-01-21 A kind of method and interface message processor (IMP) of interface message processor (IMP) processing message
CN201310021294.1 2013-01-21

Publications (1)

Publication Number Publication Date
WO2014110903A1 true WO2014110903A1 (en) 2014-07-24

Family

ID=51192728

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2013/082650 WO2014110903A1 (en) 2013-01-21 2013-08-30 Method used by interface machine to process messages and interface machine

Country Status (2)

Country Link
CN (1) CN103945287B (en)
WO (1) WO2014110903A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116489254A (en) * 2023-06-21 2023-07-25 中储粮成都储藏研究院有限公司 Method for debugging lower computer by using upper computer

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104468593A (en) * 2014-12-16 2015-03-25 上海理工大学 Communication protocol converter generally used by multiple interfaces
CN107562614A (en) * 2016-07-01 2018-01-09 北京京东尚科信息技术有限公司 Interface setting method, service management, service executing apparatus and its equipment
CN108710526A (en) * 2018-05-21 2018-10-26 北京大米科技有限公司 Configuration method, device, computer equipment and the readable storage medium storing program for executing of message format
CN110275831B (en) * 2019-06-18 2023-10-27 广州华多网络科技有限公司 Mock data verification method and device of protocol interface

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1845066A (en) * 2006-05-16 2006-10-11 北京启明星辰信息技术有限公司 Automatic protocol recognition method and system
CN101232625A (en) * 2008-02-26 2008-07-30 吉林大学 High efficient multidimensional video stream encoding and decoding method
CN101321178A (en) * 2008-07-18 2008-12-10 中兴通讯股份有限公司 Portal workflow engine system and its implementing method
CN101466108A (en) * 2008-12-31 2009-06-24 中兴通讯股份有限公司 Method for controlling multiple interface message processors and interface management module
CN102158498A (en) * 2011-05-26 2011-08-17 东南大学 Implementation method for network node structure supporting service customization and expansion

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1845066A (en) * 2006-05-16 2006-10-11 北京启明星辰信息技术有限公司 Automatic protocol recognition method and system
CN101232625A (en) * 2008-02-26 2008-07-30 吉林大学 High efficient multidimensional video stream encoding and decoding method
CN101321178A (en) * 2008-07-18 2008-12-10 中兴通讯股份有限公司 Portal workflow engine system and its implementing method
CN101466108A (en) * 2008-12-31 2009-06-24 中兴通讯股份有限公司 Method for controlling multiple interface message processors and interface management module
CN102158498A (en) * 2011-05-26 2011-08-17 东南大学 Implementation method for network node structure supporting service customization and expansion

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116489254A (en) * 2023-06-21 2023-07-25 中储粮成都储藏研究院有限公司 Method for debugging lower computer by using upper computer
CN116489254B (en) * 2023-06-21 2023-09-08 中储粮成都储藏研究院有限公司 Method for debugging lower computer by using upper computer

Also Published As

Publication number Publication date
CN103945287B (en) 2019-05-10
CN103945287A (en) 2014-07-23

Similar Documents

Publication Publication Date Title
CN108306877B (en) NODE JS-based user identity information verification method and device and storage medium
CN110247928B (en) Simulation switch safety flow control device and method
WO2014110903A1 (en) Method used by interface machine to process messages and interface machine
EP4167678A1 (en) Network security management method and apparatus
CN103117983B (en) The method for designing of data service request answer method and data, services protocol stack
CN110049022A (en) A kind of domain name access control method, device and computer readable storage medium
CN102143177B (en) Portal authentication method, Portal authentication device,Portal authentication equipment and Portal authentication system
WO2015070540A1 (en) Terminal pairing method, terminal and system
CN111404695B (en) Token request verification method and device
TW201505464A (en) Controlling method for sharing wireless data traffic and system thereof
WO2017107653A1 (en) Mobile payment method, related device and system
WO2008116405A1 (en) Method for achieving a service request and online command system
CN106027534A (en) System for implementing financial message processing based on Netty
CN107547213A (en) A kind of recognition methods of business rule and device
WO2012034337A1 (en) Implementing method for ussd application service and ussd center thereof
WO2009127162A1 (en) Method, system and apparatus for realizing combined charging service
WO2023279896A1 (en) Message processing method, electronic device, and storage medium
CN112615838B (en) Extensible block chain cross-chain communication method
CN102137102B (en) Realizing method of service supporting platform for supporting multiclass information publishing modes
CN102255904A (en) Communication network and terminal authentication method thereof
US10511494B2 (en) Network control method and apparatus
CN102710434B (en) NuSMV-based correction proving method of route combining service and rule
CN101695169B (en) Remote-end maintaining method of operation support system data as well as system and remote-end account opening proxy
WO2011035577A1 (en) Method and sysytem for realizing trans-province transmission of multimedia messages over an industry application platform
CN103856917B (en) The implementation method of USSD business based on USSD AGW

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 13871498

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 13871498

Country of ref document: EP

Kind code of ref document: A1