CN107800669B - Multi-service session control method and device based on satellite communication - Google Patents
Multi-service session control method and device based on satellite communication Download PDFInfo
- Publication number
- CN107800669B CN107800669B CN201610803084.1A CN201610803084A CN107800669B CN 107800669 B CN107800669 B CN 107800669B CN 201610803084 A CN201610803084 A CN 201610803084A CN 107800669 B CN107800669 B CN 107800669B
- Authority
- CN
- China
- Prior art keywords
- service
- message
- service state
- session
- session process
- 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
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L65/00—Network arrangements, protocols or services for supporting real-time applications in data packet communication
- H04L65/1066—Session management
Abstract
The invention discloses a multi-service session control method and a device based on satellite communication, relating to the technical field of multi-service session control management, wherein the method comprises the following steps: in a system with a plurality of service modules, after each service session process of each service module is executed to any service state, the service state is packaged into a service state message and sent to a message transmission module; the message transmission module transmits the received service state message to all session processes of all service modules except the service session process which transmits the service state message; and each session process receiving the service state message executes corresponding operation according to the preset relation between the service state message and the operation performed by the service state message. The invention supports the reliable transmission of communication messages among the services, realizes effective isolation of multiple services and greatly reduces the coupling degree among the service modules.
Description
Technical Field
The invention relates to the field of multi-service session control management in a satellite communication environment, in particular to a multi-service session control method and device based on satellite communication.
Background
Generally, for a single-service system, the related services are single and simple in logic, so that the service states are not many and the control is simple. However, when a system involves a multi-service scenario, it is difficult to ensure that the system service logic is clear and there is low coupling between service modules.
At present, terminal services based on satellite communication only relate to a few service types such as satellite telephones, satellite short messages and the like, and communication between service modules of a satellite terminal is realized by directly calling a method, and the method has the following problems in a satellite application environment: if the state jump of the service 1 depends on the return value of the method 2 of the service 2, and the method 2 relates to forward and backward transmission of data on a satellite link, because the satellite link is complex and changeable and is easy to have abnormalities such as broken link, packet loss and the like, when the method 2 cannot return due to delay due to packet loss, the service 1 is blocked, and the remaining service logic cannot be continuously executed until the method 2 returns due to timeout. Therefore, the state jump of the service 1 highly depends on the method 2 of the service 2, that is, the coupling degree between the service 1 and the service 2 is increased, which not only seriously affects the execution efficiency of the service 1, but also reduces the expansion performance of the system.
Disclosure of Invention
The technical problem solved by the scheme provided by the embodiment of the invention is that different service sessions are communicated through messages, and the communication is realized through direct method calling (high coupling).
The multi-service session control method based on satellite communication provided by the embodiment of the invention comprises the following steps:
in a system with a plurality of service modules, after each service session process of each service module is executed to any service state, the service state is packaged into a service state message and sent to a message transmission module;
the message transmission module transmits the received service state message to all session processes of all service modules except the service session process which transmits the service state message;
and each session process receiving the service state message executes corresponding operation according to the preset relation between the service state message and the operation performed by the service state message.
Preferably, after each service session process of each service module is executed to any service state, encapsulating the service state into a service state message includes:
each service session process monitors the current service in real time;
and when each service session process monitors that the current service is executed to any service state, packaging any service state into corresponding service state information.
Preferably, the message transmission module includes a buffer queue for buffering the service status messages sent by each session process of all the service modules.
Preferably, the step of transferring the received service status message to each session process of all service modules except the service session process that sent the service status message by the message transfer module includes:
after receiving the service state message, the message transmission module puts the service state message into a buffer queue;
and the message transmission module transmits the service state message to all session processes of all service modules except the service session process which sends the service state message according to the first-in first-out sequence of the cache queue.
Preferably, each session process that receives the service status message executes corresponding operations according to a predetermined relationship between the service status message and the operations performed by the service status message, including:
receiving the session process of the service state message, and judging whether the service state message influences the currently executed service state of the service state message;
if the session process judges that the service state message influences the currently executed service state of the session process, generating a corresponding control operation instruction according to a preset relation between the service state message and the operation performed by the service state message;
and the session process executes corresponding operation according to the generated control operation instruction.
The multi-service session control device based on satellite communication provided by the embodiment of the invention comprises:
the service module is used for encapsulating the service state into service state information after each service session process is executed to any service state, sending the service state information to the message transmission module, and executing corresponding operation according to the predetermined relation between the service state information and the operation of each session process receiving the service state information;
and the message transmission module is used for transmitting the received service state message to each session process of all the service modules except the service session process which sends the service state message.
Preferably, the service module includes a plurality of service session processes, and is specifically configured to perform real-time monitoring on the current service of each service session process, and when each service session process monitors that the current service is executed in any service state, encapsulate any service state into a corresponding service state message.
Preferably, the message transmission module includes a buffer queue for buffering the service status messages sent by each session process of all the service modules.
Preferably, the message transmission module is specifically configured to, after receiving the service status message, put the service status message into a buffer queue, and transmit the service status message to each session process of all service modules except a service session process that sends the service status message according to a first-in first-out order of the buffer queue.
Preferably, the session process in the service module that receives the service state message determines whether the service state message affects the currently executed service state of the service module, and if it is determined that the service state message affects the currently executed service state of the service module, generates a corresponding control operation instruction according to a predetermined relationship between the service state message and the operation performed by the service state message, and performs a corresponding operation according to the generated control operation instruction.
According to the scheme provided by the embodiment of the invention, the reliable transmission of communication messages among services is supported, the effective isolation of multiple services is realized, and the coupling degree among service modules is greatly reduced.
Drawings
Fig. 1 is a flowchart of a multi-service session control method based on satellite communication according to an embodiment of the present invention;
fig. 2 is a schematic diagram of a multi-service session control device based on satellite communication according to an embodiment of the present invention;
FIG. 3 is a block diagram of inter-multi-service session messaging provided by an embodiment of the present invention;
fig. 4 is a schematic diagram illustrating a relationship between a registration service and a heartbeat service provided in an embodiment of the present invention;
fig. 5 is a schematic diagram illustrating a relationship between a heartbeat service and a voice service provided in an embodiment of the present invention;
fig. 6 is a schematic diagram illustrating a relationship between a logout service and a voice service according to an embodiment of the present invention.
Detailed Description
The preferred embodiments of the present invention will be described in detail below with reference to the accompanying drawings, and it should be understood that the preferred embodiments described below are only for the purpose of illustrating and explaining the present invention, and are not to be construed as limiting the present invention.
Fig. 1 is a flowchart of a method for controlling a multi-service session based on satellite communication according to an embodiment of the present invention, as shown in fig. 1, including:
step S101: in a system with a plurality of service modules, after each service session process of each service module is executed to any service state, the service state is packaged into a service state message and sent to a message transmission module;
step S102: the message transmission module transmits the received service state message to all session processes of all service modules except the service session process which transmits the service state message;
step S103: and each session process receiving the service state message executes corresponding operation according to the preset relation between the service state message and the operation performed by the service state message.
Wherein, after each service session process of each service module is executed to any service state, encapsulating the service state into a service state message comprises: each service session process monitors the current service in real time; and when each service session process monitors that the current service is executed to any service state, packaging any service state into corresponding service state information.
The message transmission module comprises a buffer queue for buffering the service state message sent by each session process of all the service modules. Specifically, the step of the message passing module passing the received service status message to each session process of all service modules except the service session process that sent the service status message includes: after receiving the service state message, the message transmission module puts the service state message into a buffer queue; and the message transmission module transmits the service state message to all session processes of all service modules except the service session process which sends the service state message according to the first-in first-out sequence of the cache queue.
Wherein, each session process receiving the service status message executes corresponding operations according to the predetermined relationship between the service status message and the operations performed by the service status message, and the operations include: receiving the session process of the service state message, and judging whether the service state message influences the currently executed service state of the service state message; if the session process judges that the service state message influences the currently executed service state of the session process, generating a corresponding control operation instruction according to a preset relation between the service state message and the operation performed by the service state message; and the session process executes corresponding operation according to the generated control operation instruction.
Fig. 2 is a schematic diagram of a multi-service session control device based on satellite communication according to an embodiment of the present invention, including: a service module 201, configured to package each service session process into a service state message after the service session process is executed to any service state, send the service state message to a message passing module, and execute a corresponding operation according to a predetermined relationship between the service state message and an operation performed by each session process that receives the service state message; a message passing module 202, configured to pass the received service status message to each session process of all service modules except the service session process that sent the service status message.
The service module 201 includes a plurality of service session processes, which are specifically used for real-time monitoring of the current service of each service session process, and when each service session process monitors that the current service is executed in any service state, encapsulates any service state into a corresponding service state message.
The message transmission module 202 includes a buffer queue for buffering the service status messages sent by each session process of all the service modules. Specifically, the message passing module 202 is specifically configured to, after receiving the service status message, put the service status message into a buffer queue, and pass the service status message to each session process of all service modules except a service session process that sends the service status message according to a first-in first-out order of the buffer queue.
The service module 201 receives the session progress of the service state message, determines whether the service state message affects the currently executed service state of the service module, and if it is determined that the service state message affects the currently executed service state of the service module, generates a corresponding control operation instruction according to a predetermined relationship between the service state message and the operation performed by the service state message, and performs a corresponding operation according to the generated control operation instruction.
Fig. 3 is a structural diagram of message passing among multiple service sessions according to an embodiment of the present invention, and as shown in fig. 3, part of the "other modules" includes important functional modules such as a management layer module, other independent functional modules (e.g., a data transceiver module, a timer management module, etc.), etc., so as to support other auxiliary functions of normal operation of the system outside the point of the present invention. While the lower part of the figure shows the communication direction among various types of sessions, as can be seen from fig. 3, no communication line directly acting between sessions is available, and indirect communication is realized through the "other modules" at the upper part of fig. 3. The method comprises the following steps:
1. after executing a certain service state, the session 1 in the service 1 encapsulates the state into a message 1 and delivers the message 1 to a message transfer module.
2. After receiving the message 1, the message transmission module queues the message 1, and then transmits the message 1 to the sessions (except the session itself) of all other service modules such as the service 1, the service 2, the service n and the like according to the first-in first-out sequence.
3. Some sessions in service 2 execute the corresponding service logic if they are concerned with message 1, otherwise, do nothing.
4. If another service, for example a session n of service n, after processing message 1, enters another service logic state and sends out message 2. The following passes are similar to 1-4. Message 2 may in turn affect service modules like service 1 or service 2.
If the example in the background above is applied, the business logic will become such that: the service 1 does not directly call the method 2 in the service 2, but broadcasts a message 1 out, and other service logics are continuously executed without waiting for a return result by another thread. After receiving the message 1, the service 2 executes the method 2, and when the execution is completed or the timeout is completed, the service 2 also sends out the result in a mode of broadcasting a message 2. And after receiving the message 2, the service 1 directly executes the state jump.
Comparing the two service processing methods, it can be known that the coupling degree between the satellite multiple services is high at present, which directly affects the service processing efficiency and the service expansion. The embodiment of the invention solves the problem of high coupling degree between services to a certain extent, and has obvious benefit. The method has certain reference value for the realization or reconstruction of other similar multi-service systems.
The embodiment is described with reference to fig. 4 to 6. The embodiment is applied to development of team projects APP and has long-term stable operation at present. The APP mainly realizes the functions of registration, cancellation, voice calling, voice called, short message receiving and sending and the like, the effective operation of the functional modules and the interaction among the modules are established on the basis of the method, so that the logic of the originally complex system becomes simpler, and the performances of code modularization, low coupling and the like are greatly improved. Therefore, the system established on the method has good expansion performance, and is convenient for service expansion and maintenance.
One, registration and heartbeat
Fig. 4 shows how registration affects heartbeat service, and the service processing is as follows:
1. effect of registration success on heartbeat:
1.1 when the registration service session is successfully registered, sending a message of successful registration.
1.2 after receiving the message of successful registration, the message transmission module forwards the message to all other service modules.
1.3 when the heartbeat service session receives the message of successful registration, the online heartbeat is started.
1.4 after receiving the registration success message, if the other services concern the message, the other services perform corresponding processing.
2. Effect of registration failure on heartbeat:
2.1 when the registration of the registration service session fails, sending a message of registration failure.
2.2 after receiving the message of registration failure, the message transmission module forwards the message to all other service modules.
2.3 when the heartbeat service session receives the message of registration failure, if the heartbeat exists, the heartbeat is stopped.
2.4 after receiving the registration failure message, if the other services concern the message, the other services perform corresponding processing.
As can be seen from the above, the heartbeat start and stop depends on the registration result. When the registration is successful, the registration session encapsulates the state into a message to be sent out, the message reaches the heartbeat service session through the message transmission module of the invention, and the heartbeat service logic is started after the heartbeat service session receives the message.
Second, heartbeat and voice
In order to improve the consistency of the voice state, the APP can actively initiate voice heartbeat after entering the voice call state. When the voice heartbeat fails for 5 times (caused by chain scission or inconsistent state and the like), the APP actively ends the current voice session.
Fig. 5 shows the business logic impact of voice heartbeat on voice. The service processing is as follows:
1.1 when the voice heartbeat of the heartbeat service session fails, sending a message of the voice heartbeat failure.
1.2 the message transmission module receives the message of voice heartbeat failure and then forwards the message to all other service modules.
1.3 when the voice service session receives the message of voice heartbeat failure, the current voice call is ended.
1.4 after receiving the message of voice heartbeat failure, if the message is concerned, the other services carry out corresponding processing.
From the above, the success or failure of the voice heartbeat session directly affects the current voice session. When the voice service session receives the heartbeat failure message sent by the message transmission module, the session enters a session release state, and after resources are released, a deletion message is sent. When the manager receives the delete message, the session is deleted.
Third, logout and voice
In order to keep the voice state consistent with the online state, after the APP enters the voice call state, according to section 5.2, the heartbeat failure may cause the voice to end, and besides, if the APP performs the logout operation, the ongoing voice call must also end.
Fig. 6 illustrates the logical impact of log-off on voice service. The service processing is as follows:
1.1 when the APP carries out logout operation, sending a logout completion message.
1.2 after receiving the message of completion of logout, the message transmission module forwards the message to all other service modules.
1.3 when the voice service session receives the message of completion of logout, the current voice call is ended.
1.4 after receiving the message of voice heartbeat failure, if the message is concerned, the other services carry out corresponding processing.
From the above, the presence of APP directly affects the current voice session. When the voice service session receives the off-line message (log-off is completed) sent by the message transmission module, the voice service session enters a session release state, and after resources are released, a deletion message is sent. When the manager receives the delete message, the voice session is deleted.
It can be known from the above 3 exemplary embodiments that the communication mode between multiple services is simple and clear, there is no complex scheduling relationship, and after the services pass through the message delivery mechanism of the present invention, for a specific service session, it is not necessary to care how other service logic operates, but only needs to process the messages concerned by itself and throw out the messages with changed states appropriately. The communication control method for the session among the multiple services effectively isolates the contact among different services, reduces the coupling degree among the services and is beneficial to the expansion of the services of a multi-service session system.
The message transmission of the embodiment of the invention adopts a broadcasting mode, and the message can be informed to all other service sessions only by sending once. And other service sessions only respond to the respective concerned messages and carry out corresponding processing. Therefore, for the service module sending the message, only the message needs to be sent out, and it is not necessary to know how many other service sessions are concerned with the message. Therefore, the normal operation of the existing module and the existing service is not influenced by the expansion of other services.
According to the scheme provided by the embodiment of the invention, the low coupling degree between the service sessions is realized, and the service is ensured to be synchronous and reliable.
Although the present invention has been described in detail hereinabove, the present invention is not limited thereto, and various modifications can be made by those skilled in the art in light of the principle of the present invention. Thus, modifications made in accordance with the principles of the present invention should be understood to fall within the scope of the present invention.
Claims (10)
1. A multi-service session control method based on satellite communication comprises the following steps:
in a system with a plurality of service modules, after each service session process of each service module is executed to any service state, the service state is packaged into a service state message and sent to a message transmission module;
the message transmission module broadcasts the received service state message to all session processes of all service modules except the service session process which sends the service state message;
and each session process receiving the service state message executes corresponding operation according to the preset relation between the service state message and the operation performed by the service state message.
2. The method of claim 1, wherein encapsulating the service state into a service state message after each service session process of each service module is executed to any service state comprises:
each service session process monitors the current service in real time;
and when each service session process monitors that the current service is executed to any service state, packaging any service state into corresponding service state information.
3. The method according to claim 1 or 2, wherein the message transfer module comprises a buffer queue for buffering the service status messages sent by each session process of all the service modules.
4. The method of claim 3, wherein the message passing module passing the received service status message to each session process of all service modules except the service session process that sent the service status message comprises:
after receiving the service state message, the message transmission module puts the service state message into a buffer queue;
and the message transmission module transmits the service state message to all session processes of all service modules except the service session process which sends the service state message according to the first-in first-out sequence of the cache queue.
5. The method of claim 4, wherein each session process that receives the service status message performs a corresponding operation according to a predetermined relationship with which the service status message operates, and the method comprises:
receiving the session process of the service state message, and judging whether the service state message influences the currently executed service state of the service state message;
if the session process judges that the service state message influences the currently executed service state of the session process, generating a corresponding control operation instruction according to a preset relation between the service state message and the operation performed by the service state message;
and the session process executes corresponding operation according to the generated control operation instruction.
6. A multi-service session control device based on satellite communication, comprising:
the service module is used for encapsulating the service state into service state information after each service session process is executed to any service state, sending the service state information to the message transmission module, and executing corresponding operation according to the predetermined relation between the service state information and the operation of each session process receiving the service state information;
and the message transmission module is used for broadcasting the received service state message to all session processes of all service modules except the service session process which sends the service state message.
7. The apparatus according to claim 6, wherein the service module includes a plurality of service session processes, and is specifically configured to perform real-time monitoring on the current service of each service session process, and when each service session process monitors that the current service is executed in any service state, encapsulate any service state into a corresponding service state message.
8. The apparatus according to claim 6 or 7, wherein the message passing module includes a buffer queue for buffering the service status messages sent by each session process of all the service modules.
9. The apparatus according to claim 8, wherein the message passing module is specifically configured to, after receiving the service status message, place the service status message into a buffer queue, and pass the service status message to each session process of all service modules except a service session process that sends the service status message according to a first-in first-out order of the buffer queue.
10. The apparatus according to claim 9, wherein the session process in the service module that receives the service status message determines whether the service status message affects a currently executed service status of the service module, and if it is determined that the service status message affects the currently executed service status of the service module, generates a corresponding control operation instruction according to a predetermined relationship between the service status message and an operation performed by the service status message, and performs a corresponding operation according to the generated control operation instruction.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610803084.1A CN107800669B (en) | 2016-09-05 | 2016-09-05 | Multi-service session control method and device based on satellite communication |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610803084.1A CN107800669B (en) | 2016-09-05 | 2016-09-05 | Multi-service session control method and device based on satellite communication |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107800669A CN107800669A (en) | 2018-03-13 |
CN107800669B true CN107800669B (en) | 2021-08-31 |
Family
ID=61530658
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610803084.1A Active CN107800669B (en) | 2016-09-05 | 2016-09-05 | Multi-service session control method and device based on satellite communication |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107800669B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115150870B (en) * | 2022-06-30 | 2023-03-21 | 广州爱浦路网络技术有限公司 | Session residue processing method, device, session management functional entity and storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1972296A (en) * | 2006-12-05 | 2007-05-30 | 北京邮电大学 | Method for generating service combined with various communication means based on XPL and its system |
CN101087474A (en) * | 2006-06-19 | 2007-12-12 | 中兴通讯股份有限公司 | A method for capturing service status of voice call continuous service |
CN101309254A (en) * | 2007-05-17 | 2008-11-19 | 上海宇梦通信科技有限公司 | Device and method for controlling multiple function of communication apparatus by related parallel state machine |
CN102420811A (en) * | 2011-10-19 | 2012-04-18 | 广东中大讯通软件科技有限公司 | Conversation control system based on three-network convergence |
EP2713573A1 (en) * | 2012-09-27 | 2014-04-02 | British Telecommunications public limited company | Application layer session routing |
-
2016
- 2016-09-05 CN CN201610803084.1A patent/CN107800669B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101087474A (en) * | 2006-06-19 | 2007-12-12 | 中兴通讯股份有限公司 | A method for capturing service status of voice call continuous service |
CN1972296A (en) * | 2006-12-05 | 2007-05-30 | 北京邮电大学 | Method for generating service combined with various communication means based on XPL and its system |
CN101309254A (en) * | 2007-05-17 | 2008-11-19 | 上海宇梦通信科技有限公司 | Device and method for controlling multiple function of communication apparatus by related parallel state machine |
CN102420811A (en) * | 2011-10-19 | 2012-04-18 | 广东中大讯通软件科技有限公司 | Conversation control system based on three-network convergence |
EP2713573A1 (en) * | 2012-09-27 | 2014-04-02 | British Telecommunications public limited company | Application layer session routing |
Also Published As
Publication number | Publication date |
---|---|
CN107800669A (en) | 2018-03-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112752173B (en) | Method and device for dynamic lossless bandwidth adjustment of M-OTN system | |
CN101553012A (en) | Node b and rnc actions during a serving hsdpa cell change | |
CN101014019B (en) | Communication method for transmitting message among systems | |
CN111147573A (en) | Data transmission method and device | |
CN107800669B (en) | Multi-service session control method and device based on satellite communication | |
CN105490936A (en) | SDN-based conflict-avoiding rapid data transmission method | |
US8060628B2 (en) | Technique for realizing high reliability in inter-application communication | |
US11977935B2 (en) | Method and apparatus for improving message processing efficiency of flash channel controller | |
CN102611717A (en) | Service data sending method and system, client-side agent and server agent | |
CN102811451B (en) | Method and device for controlling connection of control and provisioning of wireless access points (Capwap) tunnel | |
CN101917687B (en) | Message sending method and message centre | |
CN106878060A (en) | The active and standby synchronization system and method for a kind of multi-service integrated access device | |
CN113645312A (en) | Method and device for protecting sub-ring network link based on ERPS protocol | |
US11582320B2 (en) | Message transmitting and receiving method, communication apparatus, and program | |
CN104580209A (en) | Device and method for implementing multi-platform message processing | |
CN100417069C (en) | Method and system for charge data transmission | |
CN107623645A (en) | A kind of power system Real Data Exchangs system based on forwarding data flow | |
CN108834081A (en) | A kind of multicast service handling method and AP | |
CN111198840B (en) | GOOSE and MMS common network communication method and system suitable for dual-core system | |
CN111726201A (en) | AIRT-ROS virtual network card packet loss solution method | |
CN107508755B (en) | Network communication method and device for avoiding data collision | |
CN101473686A (en) | Method for reducing the delay time by a paging procedure in network-initiated data transmission in GPRS-mobile communication networks | |
KR20020057190A (en) | Method for service data processing in intelligent network for mobile communication | |
CN104253811A (en) | Network packet communication method and system | |
EP4351160A1 (en) | Bandwidth adjustment method and apparatus, storage medium, and electronic 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 |