CN113098792B - Interface data communication method and system based on token binding - Google Patents

Interface data communication method and system based on token binding Download PDF

Info

Publication number
CN113098792B
CN113098792B CN202110176204.0A CN202110176204A CN113098792B CN 113098792 B CN113098792 B CN 113098792B CN 202110176204 A CN202110176204 A CN 202110176204A CN 113098792 B CN113098792 B CN 113098792B
Authority
CN
China
Prior art keywords
token
request message
application
network element
queue
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
CN202110176204.0A
Other languages
Chinese (zh)
Other versions
CN113098792A (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.)
Beijing Si Tech Information Technology Co Ltd
Original Assignee
Beijing Si Tech Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Si Tech Information Technology Co Ltd filed Critical Beijing Si Tech Information Technology Co Ltd
Priority to CN202110176204.0A priority Critical patent/CN113098792B/en
Publication of CN113098792A publication Critical patent/CN113098792A/en
Application granted granted Critical
Publication of CN113098792B publication Critical patent/CN113098792B/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
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/215Flow control; Congestion control using token-bucket
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/12Applying verification of the received information
    • 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/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]

Abstract

The invention discloses an interface data communication method and system based on token binding, wherein the method comprises the following steps: a plurality of applications in distributed deployment attempt to acquire a preset token in a distribution table; successfully acquiring a configuration file corresponding to the application loading token of the token; the application generates a routing key field according to the monitored and received request message; sending the request message to a network element of a corresponding route according to the routing key field and a preset routing scheme; and releasing the token when the application monitors or the process for receiving the request message is abnormal, and retrying to acquire the token and monitoring the request message by other parallel applications. By the technical scheme of the invention, the concurrency of the service is increased, the development pressure brought by subsequent service change is reduced, and the network pressure and performance loss brought by frequent connection are avoided.

Description

Interface data communication method and system based on token binding
Technical Field
The invention relates to the technical field of data communication, in particular to an interface data communication method based on token binding and an interface data communication system based on token binding.
Background
Data exchange between a service system (charging) and network elements (shutdown system) in the telecommunication industry is frequent, and under the background of 5G service, basic data and policy counter data of users change, so that the requirements on transmission performance and accuracy between the network elements are higher than those in the 4G era. However, after the HTTP protocol is adopted, due to the characteristics of the HTTP/1.0 protocol, a long connection mode cannot be adopted in a service, and concurrent transmission and reception cannot be completed well.
Disclosure of Invention
In order to solve the problems, the invention provides an interface data communication method and system based on token binding, which can initiate a request to a peripheral network element while providing a request receiving service to the outside in a distributed mode by binding tokens, realize a two-stage parallel processing scheme by parallel processing of a plurality of applications and parallel receiving and transmitting queues in the applications, increase the concurrency of services, distribute messages by a configurable routing strategy, reduce the development pressure brought by subsequent service change, and avoid the network pressure and performance loss brought by frequent connection in a long connection mode.
In order to achieve the above object, the present invention provides an interface data communication method based on token binding, including: a plurality of applications in distributed deployment try to obtain a preset distribution table middle token; successfully acquiring an application of the token and loading a configuration file corresponding to the token; the application generates a routing key field according to the monitored and received request message; sending the request message to a network element of a corresponding route according to the routing key field and a preset routing scheme; and releasing the token when the application monitors or receives the abnormal process of the request message, and retrying to acquire the token and monitor the request message by other parallel applications.
In the above technical solution, preferably, the application implements data transmission with a corresponding network element in a long connection manner.
In the above technical solution, preferably, the application includes a receive queue and a response queue, where the receive queue is used to receive a request message initiated by a peripheral network element, and the response queue is used to send the request message or a response message to the peripheral network element.
In the above technical solution, preferably, the receive queue and the response queue are managed by independent threads respectively, so as to implement asynchronous processing of a send message and a receive message.
In the above technical solution, preferably, when the receiving queue receives the request message, the receiving queue performs security check through an IP and a port that receive the message.
In the foregoing technical solution, preferably, the generating a routing key field according to the monitored and received request message specifically includes: and the application combines the path information and the host general field in the request message as the routing key field according to the received request message.
In the foregoing technical solution, preferably, the sending the request message to the network element of the corresponding route according to the routing key field and a preset routing scheme specifically includes: analyzing the routing key field, and inquiring a forwarding path in a preset routing scheme; and judging whether forwarding is needed or not according to the query result, if the forwarding is needed, forwarding the forwarding to the target network element of the corresponding path, and if the forwarding is not needed, sending a response message after the self-processing of the application.
The invention also provides an interface data communication system based on token binding, which applies the interface data communication method based on token binding provided by any one of the above technical schemes, and comprises the following steps: the token acquisition module is used for attempting to acquire a preset distribution table token by utilizing a plurality of distributed deployed applications; the token binding module loads a configuration file corresponding to the token by using the application which successfully obtains the token; the route generating module generates a route key field according to the monitored and received request message; a message sending module, configured to send the request message to a network element of a corresponding route according to the routing key field and a preset routing scheme; and the token switching module is used for releasing the token when the process of monitoring or receiving the request message by the application is abnormal, and other parallel applications try to acquire the token again and monitor the request message.
In the above technical solution, preferably, the application includes a receive queue and a response queue, where the receive queue is configured to receive a request message initiated by a peripheral network element, and the response queue is configured to send the request message or a response message to the peripheral network element; the receiving queue and the response queue are respectively managed by independent threads, so that asynchronous processing of sending messages and receiving messages is realized; and when receiving the request message, the receiving queue carries out security check through the IP and the port of the received message.
In the foregoing technical solution, preferably, the route generation module is specifically configured to combine, according to a received request message, path information and a host general field in the request message to serve as the route key field; the message sending module is specifically configured to: analyzing the routing key field, and inquiring a forwarding path in a preset routing scheme; and judging whether forwarding is needed or not according to the query result, if so, forwarding to the target network element of the corresponding path, and if not, sending a response message after self-processing by the application.
Compared with the prior art, the invention has the beneficial effects that: the binding token realizes that a request can be initiated to a peripheral network element while a request receiving service is provided to the outside in a distributed mode, the parallel processing of a plurality of applications and the parallel receiving and sending queues in the applications realize a two-stage parallel processing scheme, the concurrency of services is increased, messages are distributed through a configurable routing strategy, the development pressure brought by subsequent service change is reduced, and the network pressure and performance loss brought by frequent connection are avoided by a long-connection mode.
Drawings
FIG. 1 is a flow chart illustrating a method for interface data communication based on token binding according to an embodiment of the present invention;
FIG. 2 is a block diagram of an application according to an embodiment of the present invention;
FIG. 3 is a flow chart illustrating parallel transceiving in an application according to an embodiment of the present invention;
FIG. 4 is a diagram illustrating a distributed token binding method according to an embodiment of the present invention;
fig. 5 is a schematic flow chart of route forwarding according to an embodiment of the present invention;
fig. 6 is a block diagram of an interface data communication system based on token binding according to an embodiment of the present invention.
In the drawings, the correspondence between each component and the reference numeral is:
11. the system comprises a token acquisition module, 12 a token binding module, 13 a route generation module, 14 a message sending module and 15 a token switching module.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be obtained by a person skilled in the art without any inventive step based on the embodiments of the present invention, are within the scope of the present invention.
The invention is described in further detail below with reference to the attached drawing figures:
as shown in fig. 1, the interface data communication method based on token binding according to the present invention includes: a plurality of applications in distributed deployment attempt to acquire a preset token in a distribution table; successfully acquiring a configuration file corresponding to the application loading token of the token; the application generates a routing key field according to the monitored and received request message; sending the request message to a network element of a corresponding route according to the routing key field and a preset routing scheme; and releasing the token when the application monitors or receives the abnormal process of the request message, and retrying to acquire the token and monitor the request message by other parallel applications.
In the embodiment, the binding token realizes that a request can be initiated to a peripheral network element while a request receiving service is provided to the outside in a distributed mode, parallel processing of a plurality of applications and parallel receiving and sending queues in the applications realize a two-stage parallel processing scheme, the concurrency of services is increased, messages are distributed through a configurable routing strategy, the development pressure brought by subsequent service change is reduced, and the network pressure and performance loss brought by frequent connection are avoided by a long-connection mode.
As shown in fig. 2, the above interface data communication method based on token binding is described by taking an interface between a telecommunication PCF and a CHF network element as an example. Specifically, the application is deployed in an interface between a telecommunication PCF and a CHF network element, and the configuration is performed according to the path information in the request message, so that the transmission of a policy counter and 5G user basic data between the two network elements is completed. Wherein, the strategy counter means: and data change information such as the flow, the short message, the call usage amount, the account balance and the like of the user. And establishing a channel in the CHF, and integrating all messages requested by the CFG network elements except the policy counter to the outside and all messages requested by other network elements, thereby laying a foundation for subsequent charging and message management of the network elements.
In the foregoing embodiment, preferably, the generating a routing key field according to the request message monitored and received specifically includes: and the application combines the path information in the request message and the host general field according to the received request message to be used as a routing key field. Specifically, all request messages initiated by the charging network element and received request messages preferably have a head line format of:
method path protocol
For example: GET/basepath/busi01 HTTP/1.0
In addition, there is a general field HOST of 127.0.0.1
The application uses the combined part of the path (i.e./basepath/busi 01) and the HOST as the key field of the route, matches the route table configured in advance in the program, and forwards the request to the corresponding network element.
In the foregoing embodiment, preferably, the application implements data transmission with a corresponding network element through a long connection manner.
In the above embodiment, in the two-stage parallel processing scheme, the implementation scheme of the parallel transceiving queue in the application is as follows:
when the application is started, the application is used as a client and a server at the same time, and the processing flows of the application as the client and the server are similar. As shown in fig. 3, the above flow is described by taking the server as an example:
as a server, the application receives and processes a request initiated by a peripheral network element.
The application comprises a receiving queue and a response queue as a server, wherein the receiving queue is used for receiving the request message initiated by the peripheral network element, and the response queue is used for sending the request message or the response message to the peripheral network element.
Preferably, the receiving queue and the response queue are managed by independent threads respectively, and asynchronous processing of sending messages and receiving messages is realized.
Preferably, the receive queue performs security check on receipt of the request message through the IP and port of the received message.
The difference between the flow as the client and the flow as the server is that the active initiator of the client is a Charging (CHF) network element.
The parallel processing scheme for multiple applications is as follows:
and the application enables a plurality of applications to perform parallel processing according to the unique key field number of the operator.
The distribution table carries token fields in the upstream writing process, the application binds tokens in the starting process to start, and the distribution mode of the tokens and the service number are correspondingly set and can be changed at any time.
Specifically, as shown in fig. 4, for an opposite-end network element, an application a and an application B are deployed in a telecommunication charging system, and both the application a and the application B can be connected to the opposite-end network element in a long connection manner after loading a configuration file for the opposite-end network element.
And when the system is normally started, the application process A acquires the token, loads the configuration file of the opposite-end network element and completes the butt joint work with the opposite-end network element. The application process B can not acquire the token, and the program can not be started and can only wait for the exit of the application process A to acquire the token.
When the application process A is abnormal, the token and the configuration file occupied by the application process A are released, the application process B acquires the token and loads the configuration file of the opposite-end network element, and the connection process A continues to complete message response and request work.
By the method, the application program is bound with the configuration file when running, when the application process A cannot be started due to the problems of a network, a host and the like, the application process B can quickly take over the work of the process A, and the risks of message request and response are greatly reduced.
In addition, multiple applications such as application processes C, D, can be deployed, concurrent requests can be effectively increased, or the processing capacity of responses can be enhanced.
As shown in fig. 5, in the foregoing embodiment, preferably, the sending the request message to the network element of the corresponding route according to the routing key field and the preset routing scheme specifically includes: analyzing the routing key field, and inquiring a forwarding path in a preset routing scheme; and judging whether forwarding is needed or not according to the query result, if so, forwarding to the target network element of the corresponding path, and if not, sending a response message after self-processing by the application.
As shown in fig. 6, the present invention further provides an interface data communication system based on token binding, which applies the interface data communication method based on token binding as set forth in any of the above embodiments, including: the token acquisition module 11 attempts to acquire a token in a preset distribution table by using a plurality of distributed applications; the token binding module 12 loads a configuration file corresponding to the token by using the application which successfully obtains the token; the route generating module 13 generates a route key field according to the monitored and received request message; a message sending module 14, configured to send the request message to the network element corresponding to the route according to the routing key field and a preset routing scheme; and the token switching module 15 is configured to release the token when the process of the application monitoring or receiving the request message is abnormal, and retry obtaining the token and monitoring the request message by other parallel applications.
In this embodiment, the interface data communication system based on token binding applies the interface data communication method based on token binding of the above embodiment, and implements a distributed manner by binding tokens, and can issue a request to a peripheral network element while providing a service for receiving a request to the outside, and implement a two-stage parallel processing scheme by parallel processing of multiple applications and parallel transceiving queues in the applications, thereby increasing concurrency of services, and meanwhile, distributing messages by a configurable routing policy, reducing development pressure brought by subsequent service changes, and avoiding network pressure and performance loss brought by frequent connection due to a connection manner of a long connection mode.
In the foregoing embodiment, preferably, the application includes a receive queue and a response queue, where the receive queue is used to receive a request message initiated by a peripheral network element, and the response queue is used to send the request message or a response message to the peripheral network element; the receiving queue and the response queue are respectively managed by independent threads, so that the asynchronous processing of the sending message and the receiving message is realized; and when receiving the request message, the receiving queue carries out security check through the IP and the port of the received message.
In the foregoing embodiment, preferably, the route generation module is specifically configured to combine, according to the received request message, the path information and the host general field in the request message as a routing key field; the message sending module is specifically configured to: analyzing the routing key field, and inquiring a forwarding path in a preset routing scheme; and judging whether forwarding is needed or not according to the query result, if so, forwarding to the target network element of the corresponding path, and if not, sending a response message after self-processing by the application.
The present invention has been described in terms of the preferred embodiment, and it is not intended to be limited to the embodiment. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (9)

1. An interface data communication method based on token binding, comprising:
a plurality of applications in distributed deployment attempt to acquire a preset token in a distribution table;
the application which successfully obtains the token loads the configuration file corresponding to the token;
the application generates a routing key field according to the monitored and received request message;
sending the request message to a network element of a corresponding route according to the routing key field and a preset routing scheme;
releasing the token when the application monitors or receives the abnormal progress of the request message, and other parallel applications try to acquire the token again and monitor the request message;
the application realizes data transmission with a corresponding network element in a long connection mode, and realizes two-stage parallel processing through parallel processing of a plurality of applications and parallel receiving and transmitting queues in the applications.
2. The interface data communication method based on token binding of claim 1, wherein the application comprises a receive queue and a response queue, the receive queue is configured to receive the request message from the peripheral network element, and the response queue is configured to send the request message or the response message to the peripheral network element.
3. The interface data communication method based on token binding according to claim 2, wherein the receive queue and the response queue are managed by independent threads respectively, so as to implement asynchronous processing of sent messages and received messages.
4. The interface data communication method based on token binding of claim 2, wherein the receiving queue performs security check through the IP and port of the receiving message when receiving the request message.
5. The interface data communication method based on token binding according to claim 1, wherein the generating a routing key field according to the intercepted and received request message specifically comprises:
and the application combines the path information and the host general field in the request message as the routing key field according to the received request message.
6. The interface data communication method based on token binding according to claim 1, wherein the sending the request message to the network element of the corresponding route according to the routing key field and a preset routing scheme specifically comprises:
analyzing the routing key field, and inquiring a forwarding path in a preset routing scheme;
and judging whether forwarding is needed or not according to the query result, if so, forwarding to the target network element of the corresponding path, and if not, sending a response message after self-processing by the application.
7. An interface data communication system based on token binding, which applies the interface data communication method based on token binding according to any one of claims 1 to 6, and is characterized by comprising:
the token acquisition module is used for attempting to acquire a token in a preset distribution table by utilizing a plurality of applications deployed in a distributed manner;
the token binding module loads a configuration file corresponding to the token by using the application which successfully obtains the token;
the route generation module generates a route key field according to the monitored and received request message;
a message sending module, configured to send the request message to a network element of a corresponding route according to the routing key field and a preset routing scheme;
the token switching module is used for releasing the token when the process of monitoring or receiving the request message by the application is abnormal, and other parallel applications try to acquire the token again and monitor the request message;
the application realizes data transmission with a corresponding network element in a long connection mode, and realizes two-stage parallel processing through parallel processing of a plurality of applications and parallel receiving and sending queues in the applications.
8. The interface data communication system based on token binding of claim 7, wherein the application comprises a receive queue and a response queue, the receive queue is configured to receive the request message from the peripheral network element, and the response queue is configured to send the request message or the response message to the peripheral network element;
the receiving queue and the response queue are respectively managed by independent threads, so that asynchronous processing of sending messages and receiving messages is realized;
and when the receiving queue receives the request message, the receiving queue carries out security check through the IP and the port of the received message.
9. The interface data communication system based on token binding of claim 7, wherein the route generation module is specifically configured to combine, according to the received request message, the path information and the host general field in the request message as the route key field;
the message sending module is specifically configured to:
analyzing the routing key field, and inquiring a forwarding path in a preset routing scheme;
and judging whether forwarding is needed or not according to the query result, if so, forwarding to the target network element of the corresponding path, and if not, sending a response message after self-processing by the application.
CN202110176204.0A 2021-02-07 2021-02-07 Interface data communication method and system based on token binding Active CN113098792B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110176204.0A CN113098792B (en) 2021-02-07 2021-02-07 Interface data communication method and system based on token binding

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110176204.0A CN113098792B (en) 2021-02-07 2021-02-07 Interface data communication method and system based on token binding

Publications (2)

Publication Number Publication Date
CN113098792A CN113098792A (en) 2021-07-09
CN113098792B true CN113098792B (en) 2022-11-18

Family

ID=76663788

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110176204.0A Active CN113098792B (en) 2021-02-07 2021-02-07 Interface data communication method and system based on token binding

Country Status (1)

Country Link
CN (1) CN113098792B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104205726A (en) * 2012-03-21 2014-12-10 交互数字专利控股公司 Sponsoring of a mobile station session by another mobile station in a wireless network
CN105049519A (en) * 2015-08-07 2015-11-11 北京思特奇信息技术股份有限公司 Message routing method and system base on SOAP protocol
EP2961128A1 (en) * 2014-06-26 2015-12-30 Xiaomi Inc. Method, apparatus, computer program and computer program product for binding a token key to an account
CN109672627A (en) * 2018-09-26 2019-04-23 深圳壹账通智能科技有限公司 Method for processing business, platform, equipment and storage medium based on cluster server
CN111901249A (en) * 2020-07-31 2020-11-06 深圳前海微众银行股份有限公司 Service current limiting method, device, equipment and storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10783722B2 (en) * 2018-06-28 2020-09-22 Paypal, Inc. Short range communications for specific device identification during multi-device proximity
CN109905318B (en) * 2019-03-28 2021-06-25 腾讯科技(深圳)有限公司 Equipment control method, device and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104205726A (en) * 2012-03-21 2014-12-10 交互数字专利控股公司 Sponsoring of a mobile station session by another mobile station in a wireless network
EP2961128A1 (en) * 2014-06-26 2015-12-30 Xiaomi Inc. Method, apparatus, computer program and computer program product for binding a token key to an account
CN105049519A (en) * 2015-08-07 2015-11-11 北京思特奇信息技术股份有限公司 Message routing method and system base on SOAP protocol
CN109672627A (en) * 2018-09-26 2019-04-23 深圳壹账通智能科技有限公司 Method for processing business, platform, equipment and storage medium based on cluster server
CN111901249A (en) * 2020-07-31 2020-11-06 深圳前海微众银行股份有限公司 Service current limiting method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN113098792A (en) 2021-07-09

Similar Documents

Publication Publication Date Title
US9537786B2 (en) Method, device, and system for information processing based on distributed buses
CN101291205B (en) Backup data transmitting method, system, mirror-image server
CN107528891B (en) Websocket-based automatic clustering method and system
JP2019522428A (en) Cyber security management system, method and apparatus
CN110808948B (en) Remote procedure calling method, device and system
EP3496432A1 (en) Communication method and device
CN114338650A (en) File transmission method and device, electronic equipment and readable storage medium
JP3083540B2 (en) Switching control method using multiprocessor
CN103535061A (en) Network communication system and terminal
EP2439881B1 (en) Cluster system and request message distribution method for processing multi-node transaction
CN111586140A (en) Data interaction method and server
CN108551477B (en) Data transmission channel establishing system, network storage device, server and method
JP3715071B2 (en) Communication line control system
CN108259605B (en) Data calling system and method based on multiple data centers
CN113098792B (en) Interface data communication method and system based on token binding
KR102168177B1 (en) Network function and method for processing packet using the same
CN101060487B (en) A data forwarding system and method
CN113746574B (en) Information interaction method, system and equipment
JP3168241B2 (en) Mass simultaneous request control processing system using caller ID transmission function
KR100856258B1 (en) Charging data collection method by group service in mobile switching system
KR100204581B1 (en) Interface method of vod service in the exchange
JP4381990B2 (en) Communication line control system
JP2990229B2 (en) VC path connection control method and test equipment
KR100442599B1 (en) Message handling apparatus and method in exchange system using distributed objects of workstation
JPH024038A (en) Communication control device

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