KR20190078787A - Message processing apparatus and method - Google Patents
Message processing apparatus and method Download PDFInfo
- Publication number
- KR20190078787A KR20190078787A KR1020170180462A KR20170180462A KR20190078787A KR 20190078787 A KR20190078787 A KR 20190078787A KR 1020170180462 A KR1020170180462 A KR 1020170180462A KR 20170180462 A KR20170180462 A KR 20170180462A KR 20190078787 A KR20190078787 A KR 20190078787A
- Authority
- KR
- South Korea
- Prior art keywords
- message
- management module
- device management
- transmission
- messages
- Prior art date
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L51/00—User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
- H04L51/21—Monitoring or handling of messages
- H04L51/226—Delivery according to priorities
-
- H04L51/26—
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/10—Flow control; Congestion control
- H04L47/28—Flow control; Congestion control in relation to timing considerations
- H04L47/286—Time to live
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L51/00—User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
- H04L51/07—User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail characterised by the inclusion of specific contents
- H04L51/18—Commands or executable codes
Abstract
Description
본 발명의 실시예들은 메시지 처리 장치 및 방법에 관한 것으로, 특히 메시지의 재전송 및 중복 전송 처리 기술과 관련된다.Embodiments of the present invention relate to a message processing apparatus and method, and particularly to a retransmission and a duplicate transmission processing technique of a message.
최근, 모바일 단말의 사용이 일반화되고 정보통신기술이 발달함에 따라, 다양한 메시지 서비스를 제공하는 메시지 처리 시스템에 대한 수요가 증가하고 있다. 이러한 메시지 처리 시스템은 보안 서비스, 이메일 서비스, 결제 서비스 등 다양한 분야에서 적용될 수 있다. 상기 메시지 처리 시스템에 있어서, 전송측과 수신측은 메시지 처리 시스템에서 제공하는 서비스와 관련된 각종 메시지를 송수신하게 되며, 상기 서비스의 신뢰성을 확보하기 위해 메시지를 재전송하는 경우가 빈번하게 발생된다.Recently, with the generalization of mobile terminals and the development of information communication technology, there is an increasing demand for a message processing system that provides various message services. Such a message processing system can be applied to various fields such as a security service, an e-mail service, and a payment service. In the message processing system, the transmitting side and the receiving side send and receive various messages related to a service provided by the message processing system, and frequently transmit the message in order to secure the reliability of the service.
그러나, 서비스 규모가 커져 전송측/수신측 인스턴스가 많아지는 경우 재전송되는 메시지도 많아지게 되고 메시지 재전송에 따른 전송측과 수신측 사이에서 메시지가 중복 전송되는 경우가 빈번히 발생하게 된다. 특히, 종래에는 수신측 인스턴스로 재전송되어야 할 전송대기 메시지가 다수 개 존재하는 경우 수신측 인스턴스가 상기 메시지를 정상적으로 수신할 수 없는 경우(예를 들어, 수신측 인스턴스가 오프 상태이거나 이의 네트워크 연결이 정상적으로 이루어지지 않은 경우)에도 상기 메시지가 모두 재전송되어 불필요한 자원이 낭비되는 문제가 있었다.However, when the size of the service is increased and the number of instances of the transmitting / receiving side increases, the number of messages to be retransmitted also increases, and messages are repeatedly transmitted between the transmitting side and the receiving side due to message retransmission. Particularly, when there are a plurality of transmission wait messages to be retransmitted to the receiving-side instance in the past, when the receiving-side instance can not normally receive the message (for example, when the receiving-side instance is off, There is a problem in that all the messages are retransmitted and unnecessary resources are wasted.
본 발명의 실시예들은 메시지 재전송 및 중복 처리를 효율적으로 수행하여 시스템 부하를 최소화하기 위한 것이다.Embodiments of the present invention are intended to efficiently perform message retransmission and redundancy processing to minimize system load.
예시적인 실시예에 따르면, 복수의 디바이스 관리 모듈; 및 상기 복수의 디바이스 관리 모듈 중 자신이 담당하는 하나 이상의 담당 디바이스 관리 모듈을 결정하며, 상기 담당 디바이스 관리 모듈로 전송되어야 할 전송대기 메시지가 복수 개 존재하는 경우 상기 전송대기 메시지의 생성 시각 및 설정된 유효 기간(TTL : Time To Live)을 기준으로 하나의 전송대기 메시지를 선택하고, 선택된 상기 전송대기 메시지를 상기 담당 디바이스 관리 모듈로 전송하는 서비스 관리 모듈을 포함하는, 메시지 처리 장치가 제공된다.According to an exemplary embodiment, a plurality of device management modules; And a plurality of device management modules that are responsible for the plurality of device management modules, and when there is a plurality of transmission wait messages to be transmitted to the responsible device management module, And a service management module for selecting one transmission standby message based on a time to live (TTL) and transmitting the selected transmission standby message to the corresponding device management module.
상기 서비스 관리 모듈은, 상기 복수의 전송대기 메시지 중 현재 상기 유효 기간이 도과되지 않으면서 상기 생성 시각이 가장 오래된 하나의 전송대기 메시지를 선택할 수 있다.The service management module may select one of the plurality of transmission wait messages, which is the oldest generation wait time message, without the current validity period being exceeded.
상기 서비스 관리 모듈은, 상기 전송대기 메시지에 대한 수신 확인 메시지를 상기 디바이스 관리 모듈로부터 수신하는 경우 상기 디바이스 관리 모듈이 메시지 서버에 정상적으로 연결된 것으로 판단할 수 있다.The service management module may determine that the device management module is normally connected to the message server when receiving the acknowledgment message for the transmission standby message from the device management module.
상기 서비스 관리 모듈은, 상기 수신 확인 메시지 또는 설정된 상기 담당 디바이스 관리 모듈의 연결 확인 메시지를 수신하는 경우 선택된 상기 전송대기 메시지를 제외한 나머지 전송대기 메시지 중 현재 상기 유효 기간이 도과되지 않은 전송대기 메시지 각각을 상기 담당 디바이스 관리 모듈로 전송할 수 있다.Wherein the service management module is configured to transmit the transmission standby message that has not expired at the present time among the remaining transmission standby messages except for the transmission standby message selected when the reception confirmation message or the connection confirmation message of the responsible device management module is received To the responsible device management module.
상기 서비스 관리 모듈은, 상기 나머지 전송대기 메시지 중 현재 상기 유효 기간이 도과되지 않은 설정된 개수의 전송대기 메시지 각각을 순차적으로 전송하거나 상기 전송대기 메시지 각각을 설정된 크기 단위로 묶어서 전송할 수 있다.The service management module may sequentially transmit each of a predetermined number of the transmission wait messages, which are not yet valid, of the remaining transmission wait messages, or may transmit the transmission standby messages by grouping the transmission wait messages in units of a predetermined size.
상기 서비스 관리 모듈이 메시지 송수신을 위한 복수의 스레드(thread)를 구비하는 경우, 상기 전송대기 메시지 각각을 전송하는 스레드는, 상기 전송대기 메시지의 전송 여부를 나타내는 데이터베이스의 설정을 활성화하고, 상기 스레드를 제외한 타 스레드는, 상기 전송대기 메시지 중 적어도 일부에 대한 수신 확인 메시지 또는 상기 담당 디바이스 관리 모듈의 연결 확인 메시지를 수신하는 경우 상기 데이터베이스를 참조하여 현재 상기 전송대기 메시지 각각이 전송되고 있음을 확인함에 따라 상기 전송대기 메시지 각각이 중복 전송되는 것을 방지할 수 있다.If the service management module includes a plurality of threads for transmitting and receiving a message, the thread transmitting each of the transmission wait messages activates a setting of a database indicating whether the transmission wait message is transmitted, When receiving the acknowledgment message for at least a part of the transmission standby message or the connection confirmation message of the responsible device management module, the other thread, excluding the transmission standby message, confirms that each of the transmission standby messages is currently being transmitted It is possible to prevent each of the transmission wait messages from being duplicated.
상기 서비스 관리 모듈은, 상기 디바이스 관리 모듈로부터 수신 메시지를 수신하는 경우 상기 수신 메시지의 아이디를 이용하여 상기 수신 메시지가 이미 처리된 메시지인지의 여부를 판단하고, 상기 수신 메시지가 이미 처리된 메시지가 아닌 것으로 판단되는 경우 상기 수신 메시지에 이전 메시지 아이디(previous message ID)가 존재하는지의 여부를 판단할 수 있다.Wherein the service management module determines whether the received message is already processed by using the ID of the received message when receiving the received message from the device management module, It can be determined whether or not a previous message ID exists in the received message.
상기 서비스 관리 모듈은, 상기 수신 메시지에 상기 이전 메시지 아이디가 존재하는 것으로 판단되는 경우 데이터베이스를 참조하여 상기 수신 메시지의 이전 메시지에 대한 처리가 완료되었는지의 여부를 판단하고, 상기 수신 메시지의 이전 메시지에 대한 처리가 완료되지 않은 것으로 판단되는 경우 상기 이전 메시지에 대한 상태 체크를 위한 체크 메시지를 상기 디바이스 관리 모듈로 전달할 수 있다.The service management module determines whether the previous message of the received message has been processed by referring to the database if the previous message ID is found in the received message, It may transmit a check message for checking the state of the previous message to the device management module.
다른 예시적인 실시예에 따르면, 네트워크를 통해 복수의 디바이스 관리 모듈과 연결되는 서비스 관리 모듈에서 수행되는 메시지 처리 방법으로서, 결정부에서, 상기 복수의 디바이스 관리 모듈 중 자신이 담당하는 하나 이상의 담당 디바이스 관리 모듈을 결정하는 단계; 처리부에서, 상기 담당 디바이스 관리 모듈로 전송되어야 할 전송대기 메시지가 복수 개 존재하는 경우 상기 전송대기 메시지의 생성 시각 및 설정된 유효 기간(TTL : Time To Live)을 기준으로 하나의 전송대기 메시지를 선택하는 단계; 및 상기 처리부에서, 선택된 상기 전송대기 메시지를 상기 담당 디바이스 관리 모듈로 전송하는 단계를 포함하는, 메시지 처리 방법이 제공된다.According to another exemplary embodiment, there is provided a message processing method performed by a service management module connected to a plurality of device management modules through a network, the method comprising: Determining a module; If there is a plurality of transmission wait messages to be transmitted to the responsible device management module, the processing unit selects one transmission wait message based on the generation time of the transmission wait message and the set time-to-live (TTL) step; And transmitting, at the processing unit, the selected transmission wait message to the responsible device management module.
상기 하나의 전송대기 메시지를 선택하는 단계는, 상기 복수의 전송대기 메시지 중 현재 상기 유효 기간이 도과되지 않으면서 상기 생성 시각이 가장 오래된 하나의 전송대기 메시지를 선택할 수 있다.The selecting of the one transmission standby message may select one of the plurality of transmission standby messages, the oldest one of which is the oldest generation time without exceeding the current validity period.
상기 메시지 처리 방법은, 선택된 상기 전송대기 메시지를 상기 담당 디바이스 관리 모듈로 전송하는 단계 이후, 상기 처리부에서, 상기 전송대기 메시지에 대한 수신 확인 메시지를 상기 디바이스 관리 모듈로부터 수신하는 경우 상기 디바이스 관리 모듈이 메시지 서버에 정상적으로 연결된 것으로 판단하는 단계를 더 포함할 수 있다. Wherein the message processing method further comprises the step of, when the processing unit receives from the device management module a reception acknowledgment message for the transmission standby message, transmitting the selected transmission standby message to the responsible device management module, And determining that the message server is normally connected to the message server.
상기 메시지 처리 방법은, 선택된 상기 전송대기 메시지를 상기 담당 디바이스 관리 모듈로 전송하는 단계 이후, 상기 처리부에서, 상기 수신 확인 메시지 또는 설정된 상기 담당 디바이스 관리 모듈의 연결 확인 메시지를 수신하는 경우 선택된 상기 전송대기 메시지를 제외한 나머지 전송대기 메시지 중 현재 상기 유효 기간이 도과되지 않은 전송대기 메시지 각각을 상기 담당 디바이스 관리 모듈로 전송하는 단계를 더 포함할 수 있다.The message processing method may further include the step of, after the step of transmitting the selected transmission wait message to the responsible device management module, if the reception confirmation message or the connection confirmation message of the corresponding charged device management module is received, And transmitting a transmission wait message, which is not yet valid, to the responsible device management module among the remaining transmission wait messages except for the message.
상기 전송대기 메시지 각각을 상기 담당 디바이스 관리 모듈로 전송하는 단계는, 상기 나머지 전송대기 메시지 중 현재 상기 유효 기간이 도과되지 않은 설정된 개수의 전송대기 메시지 각각을 순차적으로 전송하거나 상기 전송대기 메시지 각각을 설정된 크기 단위로 묶어서 전송할 수 있다.Wherein the step of transmitting each of the transmission standby messages to the corresponding device management module comprises the steps of sequentially transmitting each of the remaining transmission standby messages and a predetermined number of transmission standby messages not exceeding the valid period, Size can be bundled and transmitted.
상기 서비스 관리 모듈이 메시지 송수신을 위한 복수의 스레드(thread)를 구비하는 경우, 상기 전송대기 메시지 각각을 상기 담당 디바이스 관리 모듈로 전송하는 단계는, 상기 전송대기 메시지 각각을 전송하는 스레드에서, 상기 전송대기 메시지의 전송 여부를 나타내는 데이터베이스의 설정을 활성화하는 단계; 및 상기 스레드를 제외한 타 스레드는, 상기 전송대기 메시지 중 적어도 일부에 대한 수신 확인 메시지 또는 상기 담당 디바이스 관리 모듈의 연결 확인 메시지를 수신하는 경우 상기 데이터베이스를 참조하여 현재 상기 전송대기 메시지 각각이 전송되고 있음을 확인함에 따라 상기 전송대기 메시지 각각이 중복 전송되는 것을 방지하는 단계를 포함할 수 있다.Wherein when the service management module includes a plurality of threads for transmitting and receiving a message, transmitting each of the transmission wait messages to the corresponding device management module comprises: Activating a setting of a database indicating whether a standby message is transmitted; And a thread other than the thread receives the acknowledgment message for at least a part of the transmission wait message or the connection acknowledgment message for the responsible device management module, Thereby preventing the transmission wait messages from being repeatedly transmitted.
상기 메시지 처리 방법은, 상기 처리부에서, 상기 디바이스 관리 모듈로부터 수신 메시지를 수신하는 경우 상기 수신 메시지의 아이디를 이용하여 상기 수신 메시지가 이미 처리된 메시지인지의 여부를 판단하는 단계; 및 상기 처리부에서, 상기 수신 메시지가 이미 처리된 메시지가 아닌 것으로 판단되는 경우 상기 수신 메시지에 이전 메시지 아이디(previous message ID)가 존재하는지의 여부를 판단하는 단계를 더 포함할 수 있다.The message processing method may further include the steps of: determining whether the received message is already processed using the ID of the received message when the processing unit receives the received message from the device management module; And determining whether a previous message ID exists in the received message when the processing unit determines that the received message is not a processed message.
상기 메시지 처리 방법은, 상기 수신 메시지에 상기 이전 메시지 아이디가 존재하는지의 여부를 판단하는 단계 이후, 상기 처리부에서, 상기 수신 메시지에 상기 이전 메시지 아이디가 존재하는 것으로 판단되는 경우 데이터베이스를 참조하여 상기 수신 메시지의 이전 메시지에 대한 처리가 완료되었는지의 여부를 판단하는 단계; 및 상기 처리부에서, 상기 수신 메시지의 이전 메시지에 대한 처리가 완료되지 않은 것으로 판단되는 경우 상기 이전 메시지에 대한 상태 체크를 위한 체크 메시지를 상기 디바이스 관리 모듈로 전달하는 단계를 더 포함할 수 있다.The message processing method may further include a step of determining whether or not the previous message ID exists in the received message, if the processing unit determines that the previous message ID exists in the received message, Determining whether processing of a previous message of the message has been completed; And transmitting the check message for checking the status of the previous message to the device management module when the processing unit determines that the process of the previous message of the received message is not completed.
다른 예시적인 실시예에 따르면, 네트워크를 통해 복수의 디바이스 관리 모듈과 연결되는 서비스 관리 모듈로서, 상기 복수의 디바이스 관리 모듈 중 자신이 담당하는 하나 이상의 담당 디바이스 관리 모듈을 결정하는 결정부; 및 상기 담당 디바이스 관리 모듈로 전송되어야 할 전송대기 메시지가 복수 개 존재하는 경우 상기 전송대기 메시지의 생성 시각 및 설정된 유효 기간(TTL : Time To Live)을 기준으로 하나의 전송대기 메시지를 선택하고, 상기 처리부에서, 선택된 상기 전송대기 메시지를 상기 담당 디바이스 관리 모듈로 전송하는 처리부를 포함하는, 서비스 관리 모듈이 제공된다.According to another exemplary embodiment, a service management module connected to a plurality of device management modules via a network, the determining module determining one or more responsible device management modules of the plurality of device management modules, And selecting one transmission wait message based on a generation time of the transmission wait message and a set time-to-live (TTL) when a plurality of transmission wait messages to be transmitted to the corresponding device management module exist, And a processing unit for transmitting the selected transmission wait message to the responsible device management module.
본 발명의 실시예들에 따르면, 재전송 예정인(즉, pending 중인) 전송대기 메시지가 복수 개 존재하는 경우 각 전송대기 메시지를 모두 전송하는 것이 아니라 전송대기 메시지의 생성 시각 및 유효 기간을 기준으로 하나의 전송대기 메시지를 선택하여 선택된 상기 전송대기 메시지만을 먼저 전송하여 수신 측 모듈의 연결 여부(connectivity)를 보다 적은 부하로 용이하게 체크할 수 있다. 또한, 본 발명의 실시예들에 따르면, 데이터베이스와 연동하여 수신 메시지의 중복 처리 여부 및 이전 메시지 아이디에 따른 순차 처리 여부를 보다 효율적으로 수행할 수 있다.According to embodiments of the present invention, when there are a plurality of transmission standby messages scheduled to be retransmitted (that is, pending), not all of the transmission standby messages are transmitted, but one transmission standby message The transmission standby message may be selected and the selected transmission standby message may be transmitted first so that connectivity of the receiving module may be checked with less load. In addition, according to the embodiments of the present invention, it is possible to more efficiently perform the repetitive processing of the received message and the sequential processing according to the previous message ID in cooperation with the database.
도 1은 본 발명의 일 실시예에 따른 메시지 처리 장치의 상세 구성을 나타낸 블록도
도 2는 본 발명의 일 실시예에 따른 서비스 관리 모듈 및 애플리케이션 서버의 예시
도 3은 본 발명의 일 실시예에 따른 디바이스 관리 모듈 및 디바이스의 예시
도 4는 본 발명의 일 실시예에 따른 서비스 관리 모듈의 상세 구성을 나타낸 블록도
도 5는 본 발명의 일 실시예에 따른 생성부에서 생성되는 메시지의 예시
도 6은 본 발명의 일 실시예에 따른 결정부에서 담당 디바이스 관리 모듈을 결정하는 과정을 설명하기 위한 예시
도 7은 본 발명의 일 실시예에 따른 전송대기 메시지의 처리 과정을 설명하기 위한 흐름도
도 8은 본 발명의 일 실시예에 따른 전송대기 메시지의 처리 과정을 설명하기 위한 흐름도
도 9는 본 발명의 일 실시예에 따른 서비스 관리 모듈에서 수행되는 수신 메시지의 처리 과정을 설명하기 위한 흐름도
도 10은 본 발명의 일 실시예에 따른 디바이스 관리 모듈에서 수행되는 수신 메시지의 처리 과정을 설명하기 위한 흐름도
도 11은 예시적인 실시예들에서 사용되기에 적합한 컴퓨팅 장치를 포함하는 컴퓨팅 환경을 예시하여 설명하기 위한 블록도1 is a block diagram showing a detailed configuration of a message processing apparatus according to an embodiment of the present invention;
2 illustrates an example of a service management module and an application server according to an embodiment of the present invention.
3 illustrates an example of a device management module and a device according to an embodiment of the present invention.
4 is a block diagram illustrating a detailed configuration of a service management module according to an embodiment of the present invention.
5 is a diagram illustrating an example of a message generated in a generation unit according to an embodiment of the present invention
6 is a flowchart illustrating a process of determining a device management module in charge in a determination unit according to an exemplary embodiment of the present invention.
FIG. 7 is a flowchart illustrating a process of processing a transmission wait message according to an embodiment of the present invention.
8 is a flowchart for explaining a processing procedure of a transmission wait message according to an embodiment of the present invention.
9 is a flowchart for explaining a processing procedure of a received message performed by the service management module according to an embodiment of the present invention.
10 is a flowchart illustrating a process of processing a received message performed in the device management module according to an embodiment of the present invention.
11 is a block diagram illustrating and illustrating a computing environment including a computing device suitable for use in the exemplary embodiments.
이하, 도면을 참조하여 본 발명의 구체적인 실시형태를 설명하기로 한다. 이하의 상세한 설명은 본 명세서에서 기술된 방법, 장치 및/또는 시스템에 대한 포괄적인 이해를 돕기 위해 제공된다. 그러나 이는 예시에 불과하며 본 발명은 이에 제한되지 않는다.Hereinafter, specific embodiments of the present invention will be described with reference to the drawings. The following detailed description is provided to provide a comprehensive understanding of the methods, apparatus, and / or systems described herein. However, this is merely an example and the present invention is not limited thereto.
본 발명의 실시예들을 설명함에 있어서, 본 발명과 관련된 공지기술에 대한 구체적인 설명이 본 발명의 요지를 불필요하게 흐릴 수 있다고 판단되는 경우에는 그 상세한 설명을 생략하기로 한다. 그리고, 후술되는 용어들은 본 발명에서의 기능을 고려하여 정의된 용어들로서 이는 사용자, 운용자의 의도 또는 관례 등에 따라 달라질 수 있다. 그러므로 그 정의는 본 명세서 전반에 걸친 내용을 토대로 내려져야 할 것이다. 상세한 설명에서 사용되는 용어는 단지 본 발명의 실시예들을 기술하기 위한 것이며, 결코 제한적이어서는 안 된다. 명확하게 달리 사용되지 않는 한, 단수 형태의 표현은 복수 형태의 의미를 포함한다. 본 설명에서, "포함" 또는 "구비"와 같은 표현은 어떤 특성들, 숫자들, 단계들, 동작들, 요소들, 이들의 일부 또는 조합을 가리키기 위한 것이며, 기술된 것 이외에 하나 또는 그 이상의 다른 특성, 숫자, 단계, 동작, 요소, 이들의 일부 또는 조합의 존재 또는 가능성을 배제하도록 해석되어서는 안 된다.DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Hereinafter, exemplary embodiments of the present invention will be described in detail with reference to the accompanying drawings. In the following description, well-known functions or constructions are not described in detail since they would obscure the invention in unnecessary detail. The following terms are defined in consideration of the functions of the present invention, and may be changed according to the intention or custom of the user, the operator, and the like. Therefore, the definition should be based on the contents throughout this specification. The terms used in the detailed description are intended only to describe embodiments of the invention and should in no way be limiting. Unless specifically stated otherwise, the singular form of a term includes plural forms of meaning. In this description, the expressions "comprising" or "comprising" are intended to indicate certain features, numbers, steps, operations, elements, parts or combinations thereof, Should not be construed to preclude the presence or possibility of other features, numbers, steps, operations, elements, portions or combinations thereof.
도 1은 본 발명의 일 실시예에 따른 메시지 처리 장치(100)의 상세 구성을 나타낸 블록도이다. 도 1에 도시된 바와 같이, 본 발명의 일 실시예에 따른 메시지 처리 장치(100)는 서비스 관리 모듈(102), 디바이스 관리 모듈(104), 메시지 서버(106) 및 써드 파티 메시지 서버(108)를 포함한다. 상기 메시지 처리 장치(100)는 복수의 디바이스 관리 모듈(104)과 복수의 서비스 관리 모듈(102) 간의 메시지 송수신을 처리하기 위한 시스템으로서, 이하에서는 설명의 편의상 서비스 관리 모듈(102)이 메시지를 생성하여 디바이스 관리 모듈(104)로 전송하고 디바이스 관리 모듈(104)로부터 상기 메시지에 대한 수신 확인 메시지를 수신하는 것으로 가정한다. 다만, 이에 한정되는 것은 아니며, 디바이스 관리 모듈(104)이 메시지를 생성하여 서비스 관리 모듈(102)로 전송하고 서비스 관리 모듈(102)로부터 상기 메시지에 대한 수신 확인 메시지를 수신할 수도 있다. 이러한 서비스 관리 모듈(102) 및 디바이스 관리 모듈(104)은 메시지 처리모듈로서, 이들 중 어느 하나를 제1 메시지 처리모듈, 이들 중 나머지 하나를 제2 메시지 처리모듈로 구별하여 칭할 수 있다. 이하에서는, 메시지 처리 장치(100)의 상세 구성에 대해 자세히 살펴보도록 한다.1 is a block diagram showing a detailed configuration of a
서비스 관리 모듈(102)은 애플리케이션 서버(미도시) 측 컴포넌트로서, 애플리케이션 서버와 메시지 서버(106) 사이에서 애플리케이션 서비스와 관련된 각종 메시지를 송수신한다. 본 발명의 실시예들에 있어서, 애플리케이션 서버는 애플리케이션 서비스를 디바이스(미도시)로 제공하기 위한 서버이다. 상기 애플리케이션 서비스는 예를 들어, 디바이스의 카메라 제어, 마이크 제어, 녹음 기능 제어 등과 같은 보안 관련 서비스가 될 수 있으나, 이는 일 예시에 불과할 뿐 애플리케이션 서비스가 특별히 한정되는 것은 아니다. 또한, 상기 메시지는 예를 들어, 상술한 애플리케이션 서비스를 디바이스에서 실행시키기 위한 제어 메시지, 상기 제어 메시지에 대한 수신 확인 메시지(즉, ACK 메시지) 등이 될 수 있다.The
서비스 관리 모듈(102)은 애플리케이션 서버와 메시지 서버(106) 사이에서 메시지를 송수신함으로써 애플리케이션 서버에게 메시지 전송에 대한 신뢰성을 제공할 수 있다. 구체적으로, 서비스 관리 모듈(102)은 애플리케이션 서버의 메시지 생성 요청에 따라 애플리케이션 서비스와 관련된 메시지를 생성하여 데이터베이스(미도시)에 저장하고, 상기 메시지를 메시지 서버(106)를 통해 디바이스 관리 모듈(104)로 전송할 수 있다. 이때, 상기 메시지 생성 요청에는 상기 메시지의 수신자 정보(예를 들어, 디바이스 관리 모듈(104)의 식별 정보), 상기 메시지와 관련된 애플리케이션 서비스의 식별 정보 등이 포함될 수 있다. 서비스 관리 모듈(102)은 상기 메시지 생성 요청에 따라 메시지 아이디를 생성하고, 상기 메시지 아이디에 대응되는 메시지를 생성할 수 있다. 여기서, 상기 메시지는 메시지 아이디, 발신자 주소(source address), 수신자 주소(destination address), 경유자(via) 정보, 이전에 전송된 메시지의 아이디(이하, “이전 메시지 아이디”라 함), 유효 기간(TTL : Time To Live), 생성 시각, 애플리케이션 서비스의 식별 정보 등을 포함할 수 있다. 또한, 서비스 관리 모듈(102)은 애플리케이션 서버로부터 전송 순서(transmission sequence)를 가진 메시지의 생성 요청을 수신할 수 있으며, 상기 생성 요청에 따라 설정된 순서대로 순차적으로 전송되는 메시지(이하, “순서보장 메시지”라 함)를 생성할 수 있다. The
서비스 관리 모듈(102)은 상기 순서보장 메시지의 생성 요청에 따라 데이터베이스를 참조하여 상기 메시지의 이전 메시지의 아이디(즉, 이전 메시지 아이디)를 확인하고, 자신의 메시지 아이디를 생성할 수 있다. 이후, 서비스 관리 모듈(102)은 상기 메시지 아이디 및 상기 이전 메시지 아이디를 포함하는 메시지를 생성할 수 있다. The
여기서, 이전 메시지는 상기 메시지의 바로 이전에 처리(예를 들어, 전송 또는 수신)되어야 할 메시지를 의미한다. 서비스 관리 모듈(102)은 메시지를 생성할 때마다 데이터베이스에 기록된 메시지 아이디 중 마지막으로 기록된 메시지 아이디를 상기 이전 메시지 아이디로 판단할 수 있다. 이때, 상기 메시지 아이디는 각 디바이스 및 각 애플리케이션(또는 각 애플리케이션 클라이언트) 별로 구별되어 데이터베이스에 기록(또는 저장)될 수 있다. 서비스 관리 모듈(102)은 상기 이전 메시지 아이디를 상기 메시지의 헤더(header)에 저장할 수 있다. 만약, 상기 이전 메시지가 존재하지 않는 경우, 서비스 관리 모듈(102)은 자신의 메시지 아이디를 상기 메시지의 헤더에 저장할 수 있다. Here, the previous message means a message to be processed (e.g., transmitted or received) immediately before the message. The
예를 들어, 서비스 관리 모듈(102)이 A 애플리케이션에 관한 메시지를 b 디바이스로 전송하고자 하는 경우, 서비스 관리 모듈(102)은 데이터베이스를 참조하여 마지막으로 기록된 메시지 아이디, 즉 이전 메시지 아이디가 “A-b-1”인 것을 확인할 수 있다. 이에 따라, 서비스 관리 모듈(102)은 자신의 메시지 아이디 “A-b-2”를 생성하고 상기 메시지 아이디 및 이전 메시지 아이디를 포함하는 메시지를 b 디바이스로 전송할 수 있다. 이후, b 디바이스의 디바이스 관리 모듈(104)은 수신된 상기 메시지에 포함된 이전 메시지 아이디를 이용하여 상기 메시지의 이전 메시지에 대한 처리가 완료되었는지의 여부를 판단할 수 있다. 만약, 상기 수신 메시지의 이전 메시지에 대한 처리가 완료되지 않은 것으로 판단되는 경우, 디바이스 관리 모듈(104)은 상기 이전 메시지에 대한 상태 체크를 위한 체크 메시지를 서비스 관리 모듈(102)로 전달할 수 있다. 위 예시에서, 메시지 아이디가 “A-b-2”인 메시지가 b 디바이스로 전송된 경우, 디바이스 관리 모듈(104)은 상기 메시지에 포함된 이전 메시지 아이디 “A-b-1”를 확인하고, 상기 이전 메시지 아이디에 대응되는 이전 메시지에 대한 처리가 완료되었는지의 여부를 판단할 수 있다. 만약, 상기 이전 메시지의 처리가 아직 완료되지 않은 것으로 판단되는 경우, 디바이스 관리 모듈(104)은 상기 이전 메시지에 대한 상태 체크를 위한 체크 메시지를 서비스 관리 모듈(102)로 전달할 수 있다. 상기 체크 메시지는 예를 들어, 상기 이전 메시지의 아이디, 상기 이전 메시지의 상태 체크 및 재전송 요청, 상기 이전 메시지와 관련된 애플리케이션의 상태 체크, 상기 체크 메시지를 전송하는 디바이스의 식별 정보 등을 포함할 수 있다. 서비스 관리 모듈(102)은 디바이스 관리 모듈(104)로부터 상기 체크 메시지를 수신하고, 이에 대한 응답을 디바이스 관리 모듈(104)로 전달할 수 있다.For example, when the
또한, 서비스 관리 모듈(102)은 설정된 시간 이내에 상기 메시지에 대한 수신 확인 메시지(즉, ACK 메시지)를 디바이스 관리 모듈(104)로부터 수신하는지 여부에 따라 상기 메시지를 재전송하거나 삭제할 수 있다. 일 예시로서, 서비스 관리 모듈(102)은 설정된 시간 이내에 상기 메시지에 대한 수신 확인 메시지를 수신하지 않는 경우 상기 메시지를 재전송할 수 있다. 다른 예시로서, 서비스 관리 모듈(102)은 설정된 시간 이내에 상기 메시지에 대한 수신 확인 메시지를 수신하는 경우 데이터베이스에 저장된 상기 메시지를 삭제할 수 있다. 이하에서는, 설명의 편의상 이와 같이 재전송 예정인(즉, pending 중인) 메시지를 “전송대기 메시지”라 칭하기로 한다. In addition, the
한편, 이러한 서비스 관리 모듈(102)은 부하 분산을 위해 복수 개 존재(즉, 멀티 인스턴스로 존재)할 수 있으며, 각 서비스 관리 모듈(102)은 서로 다른 아이디(즉, 인스턴스 아이디)를 가질 수 있다. 또한, 동일한 애플리케이션 서비스를 처리하는 서비스 관리 모듈(102)은 동일한 그룹 내에 속하게 되며, 동일한 그룹 아이디를 가질 수 있다. 또한, 서비스 관리 모듈(102) 및 애플리케이션 서버는 제1 네트워크에 위치할 수 있다. 본 실시예들에 있어서, 제1 네트워크는 예를 들어, 특정 조직 또는 기업의 인트라넷(intranet)일 수 있다.A plurality of
서비스 관리 모듈(102)은 디바이스 관리 모듈(104) 각각의 아이디 및 서비스 관리 모듈(102)의 전체 개수를 이용하여 복수의 디바이스 관리 모듈(104) 중 자신이 담당하는 하나 이상의 담당 디바이스 관리 모듈을 결정하며, 자신의 담당 디바이스 관리 모듈에 대한 전송대기 메시지만을 재전송할 수 있다. 이때, 서비스 관리 모듈(102)은 디바이스 관리 모듈(104) 각각의 아이디에 대한 해시값을 서비스 관리 모듈(102)의 전체 개수로 모듈러(modulus) 연산하여 디바이스 관리 모듈(104) 각각에 대한 모듈러 연산값을 계산하고, 상기 모듈러 연산값과 자신의 식별 번호를 참조하여 상기 담당 디바이스 관리 모듈을 결정할 수 있다. The
일 예시로서, 서비스 관리 모듈(102)이 3개 존재하는 것으로 가정하는 경우, 서비스 관리 모듈 #0은 디바이스 관리 모듈 3, 6 및 9에 대한 전송대기 메시지를 처리하고, 서비스 관리 모듈 #1은 디바이스 관리 모듈 1, 4 및 7에 대한 전송대기 메시지를 처리하고, 서비스 관리 모듈 #2는 디바이스 관리 모듈 2, 5 및 8에 대한 전송대기 메시지를 처리할 수 있다. 이때, 서비스 관리 모듈(102)이 담당하는 각 담당 디바이스 관리 모듈에 대한 전송대기 메시지가 복수 개인 경우, 서비스 관리 모듈(102)은 상기 복수 개의 전송대기 메시지를 대응되는 담당 디바이스 관리 모듈로 각각 전송하여야 한다. 그러나, 상기 담당 디바이스 관리 모듈이 상기 전송대기 메시지를 정상적으로 수신할 수 없는 경우(예를 들어, 디바이스 관리 모듈 또는 상기 디바이스 관리 모듈이 설치된 단말이 오프 상태이거나 이들의 네트워크 연결이 정상적으로 이루어지지 않은 경우)에도 상기 담당 디바이스 관리 모듈에 대한 복수 개의 전송대기 메시지가 모두 전송되는 경우 불필요한 자원이 낭비될 수 있다. 또한, 이 경우 담당 디바이스 관리 모듈이 전송대기 메시지를 정상적으로 수신할 수 있는 상태로 전환된다 하더라도 이미 전송된 전송대기 메시지의 수신 확인이 제때에 이루어지지 않아 상기 전송대기 메시지가 중복 전송되는 일이 발생할 수 있다. 따라서, 본 실시예들에서는 이러한 문제점을 해결하기 위해 디바이스 관리 모듈(104)로 전송되어야 할 전송대기 메시지가 복수 개 존재하는 경우 서비스 관리 모듈(102)이 상기 전송대기 메시지의 생성 시각 및 유효 기간을 기준으로 하나의 전송대기 메시지를 선택하여 선택된 하나의 전송대기 메시지만을 디바이스 관리 모듈(104)로 먼저 전송하도록 하였다.As an example, assuming that there are three
일 예시로서, 디바이스 관리 모듈 3으로 전송되어야 할 전송대기 메시지가 100개인 경우, 서비스 관리 모듈 #0은 상기 전송개기 메시지의 생성 시각과 상기 전송개기 메시지의 유효 기간을 기준으로 디바이스 관리 모듈 3으로 전송될 하나의 전송대기 메시지를 선택할 수 있다. 구체적으로, 서비스 관리 모듈(102)은 상기 전송대기 메시지 중 현재 유효 기간이 도과되지 않으면서 생성 시각이 가장 오래된 하나의 전송대기 메시지를 선택할 수 있다. 위 예시에서, 서비스 관리 모듈 #0은 100개의 전송대기 메시지 중 현재 유효 기간(예를 들어, 2017.05.10까지)이 도과되지 않으면서 생성 시각이 가장 오래된 전송대기 메시지 #3을 선택하고, 상기 전송대기 메시지 #3만을 디바이스 관리 모듈 3으로 전송(즉, 재전송)할 수 있다. 이와 같이 생성 시각이 가장 오래된 전송대기 메시지를 먼저 전송하는 이유는 추후 나머지 전송대기 메시지들을 전송할 때 미리 정해진 전송 순서, 즉 전송대기 메시지의 시퀀스 번호를 맞추기 위해서이다. As an example, when there are 100 transmission waiting messages to be transmitted to the
만약, 서비스 관리 모듈(102)이 전송된 상기 전송대기 메시지에 대한 수신 확인 메시지를 디바이스 관리 모듈(104)로부터 수신(또는 디바이스 관리 모듈(104)의 연결 확인 메시지를 메시지 서버(106)로부터 수신)하는 경우, 서비스 관리 모듈(102)은 상기 디바이스 관리 모듈(104)이 메시지 서버(106)에 정상적으로 연결된 것(즉, 나머지 전송대기 메시지 또한 수신할 준비가 된 것)으로 판단할 수 있다.If the
즉, 본 발명의 실시예들에 따르면, 재전송 예정인(즉, pending 중인) 전송대기 메시지가 복수 개 존재하는 경우 각 전송대기 메시지를 모두 전송하는 것이 아니라 전송대기 메시지의 생성 시각 및 유효 기간을 기준으로 하나의 전송대기 메시지를 선택하여 선택된 상기 전송대기 메시지만을 먼저 전송하여 디바이스 관리 모듈(104)의 연결 여부(connectivity)를 보다 적은 부하로 용이하게 체크할 수 있다.That is, according to the embodiments of the present invention, when there are a plurality of transmission standby messages scheduled to be retransmitted (that is, pending), not all of the transmission standby messages are transmitted, It is possible to check the connectivity of the
또한, 서비스 관리 모듈(102)이 전송된 상기 전송대기 메시지에 대한 수신 확인 메시지를 디바이스 관리 모듈(104)로부터 수신하는 경우, 서비스 관리 모듈(102)은 선택된 상기 전송대기 메시지를 제외한 나머지 전송대기 메시지 중 현재 상기 유효 기간이 도과되지 않은 전송대기 메시지 각각을 디바이스 관리 모듈(104)로 전송할 수 있다. 위 예시에서, 서비스 관리 모듈 #0은 상기 전송대기 메시지 #3에 대한 수신 확인 메시지를 디바이스 관리 모듈 3으로부터 수신하는 경우 전송대기 메시지 #3을 제외한 나머지 전송대기 메시지 중 현재 상기 유효 기간이 도과되지 않은 전송대기 메시지 각각을 디바이스 관리 모듈 3으로 전송할 수 있다.In addition, when the
이때, 서비스 관리 모듈(102)은 상기 나머지 전송대기 메시지 중 현재 상기 유효 기간이 도과되지 않은 설정된 개수의 전송대기 메시지 각각을 순차적으로 전송하거나 상기 전송대기 메시지 각각을 설정된 크기 단위로 묶어서 전송할 수 있다. 일 예시로서, 서비스 관리 모듈(102)은 상기 나머지 전송대기 메시지 중 현재 상기 유효 기간이 도과되지 않은 전송대기 메시지들을 설정된 개수 단위(예를 들어, 100개씩)로 대량 전송, 즉 벌크 메시지(bulk message) 형태로 전송할 수 있다. 다른 예시로서, 서비스 관리 모듈(102)은 상기 나머지 전송대기 메시지 중 현재 상기 유효 기간이 도과되지 않은 전송대기 메시지들을 설정된 크기 단위(예를 들어, 5MB 단위)로 묶어서 전송할 수 있다. 이 경우, 디바이스 관리 모듈(104)은 상기 전송대기 메시지 각각을 분리하여 각 전송대기 메시지별 ACK 메시지를 서비스 관리 모듈(102)로 전송할 수 있다. 또한, 디바이스 관리 모듈(104)은 상기 ACK 메시지 또한 설정된 크기 단위로 묶어서 서비스 관리 모듈(102)로 전송할 수 있다.At this time, the
또한, 서비스 관리 모듈(102)은 메시지 송수신을 위한 복수의 스레드(thread)를 구비할 수 있다. 이 경우, 각 스레드는 하나 이상의 전송대기 메시지를 전송하고, 이에 대한 수신 확인 메시지를 수신할 수 있다. 이때, 각 스레드는 전송대기 메시지가 중복으로 전송되는 것을 방지하기 위해 메시지 전송시 데이터베이스에 메시지 전송 여부를 설정할 수 있다. 구체적으로, 전송대기 메시지를 전송하는 스레드는 전송대기 메시지의 전송 여부를 나타내는 데이터베이스의 설정을 활성화(즉, 현재 전송대기 메시지가 전송 중임을 설정)할 수 있다. 이후, 상기 스레드, 즉 전송대기 메시지 각각을 전송하는 스레드를 제외한 타 스레드는 상기 전송대기 메시지 중 적어도 일부에 대한 수신 확인 메시지(또는 디바이스 관리 모듈(104)의 연결 확인 메시지)를 수신하는 경우 상기 데이터베이스를 참조하여 현재 상기 전송대기 메시지 각각이 전송되고 있음을 확인할 수 있으며, 이에 따라 전송대기 메시지 각각을 중복 전송하지 않게 된다.In addition, the
일 예시로서, 서비스 관리 모듈 #0의 스레드 #1이 전송대기 메시지 #1~100 중 #1~10을 디바이스 관리 모듈 3으로 전송한 상태에서 서비스 관리 모듈 #0의 스레드 #2가 전송대기 메시지 #2에 대한 수신 확인 메시지를 수신하는 경우, 스레드 #2는 데이터베이스를 참조하여 현재 상기 전송대기 메시지 각각이 전송되고 있음을 확인할 수 있으며, 이에 따라 전송대기 메시지 #11~20을 전송하지 않고 메시지 송수신 프로세스를 그대로 종료할 수 있다. 이 경우, 스레드 #1은 전송대기 메시지 #11~20을 디바이스 관리 모듈 3으로 정상적으로 전송할 수 있게 된다.As an example, when the
디바이스 관리 모듈(104)은 디바이스 측 컴포넌트로서, 디바이스에 설치된 애플리케이션 클라이언트(미도시)와 메시지 서버(106) 사이에서 애플리케이션 서비스와 관련된 각종 메시지를 송수신한다. 본 발명의 실시예들에 있어서, 디바이스는 사용자가 소지하는 단말로서, 예를 들어 스마트폰, 노트북, 태블릿 PC 등과 같은 모바일 단말일 수 있다. 또한, 애플리케이션 클라이언트는 디바이스에 설치되어 애플리케이션 서버에서 제공되는 애플리케이션 서비스를 디바이스에서 실행시키기 위한 모듈이다. The
디바이스 관리 모듈(104)은 메시지 서버(106)를 통해 서비스 관리 모듈(102)로부터 애플리케이션 서비스와 관련된 메시지를 수신하고, 메시지 서버(106)를 통해 상기 메시지에 대한 수신 확인 메시지(즉, ACK 메시지)를 서비스 관리 모듈(102)로 전송할 수 있다. 또한, 디바이스 관리 모듈(104)은 서비스 관리 모듈(102)로부터 메시지를 수신하는 경우 상기 메시지가 이미 처리된 메시지인지의 여부를 판단하고, 상기 메시지가 이미 처리된 메시지가 아닌 것으로 판단되는 경우 상기 메시지가 상술한 순서보장 메시지인지의 여부(즉, 상기 메시지에 이전 메시지 아이디가 존재하는지의 여부)를 판단한다. 만약, 상기 메시지가 상술한 순서보장 메시지인 것으로 판단되는 경우, 디바이스 관리 모듈(104)은 데이터베이스를 참조하여 상기 메시지의 이전 메시지에 대한 처리가 완료되었는지의 여부를 판단하고, 상기 메시지의 이전 메시지에 대한 처리가 완료되지 않은 것으로 판단되는 경우 상기 이전 메시지에 대한 상태 체크를 위한 체크 메시지를 서비스 관리 모듈(102)로 전송할 수 있다. 또한, 디바이스 관리 모듈(104)은 메시지 전송 취소, 보안을 위한 인증 정보 관리 등과 같은 부가 기능을 수행할 수 있다.The
이러한 디바이스 관리 모듈(104)은 각 디바이스별로 하나 이상 존재할 수 있으며, 각 디바이스 관리 모듈(104)은 서로 다른 아이디를 가질 수 있다. 디바이스는 디바이스 관리 모듈(104)을 최초로 활성화하는 과정에서 메시지 서버(106)로부터 해당 디바이스 관리 모듈(104)의 아이디를 할당 받을 수 있다. 또한, 디바이스 관리 모듈(104) 및 상기 디바이스 관리 모듈(104)이 설치된 디바이스는 제2 네트워크에 위치할 수 있다. 본 실시예들에 있어서, 제2 네트워크는 제1 네트워크의 외부 영역으로서, 예를 들어 인터넷(internet)일 수 있다.At least one such
메시지 서버(106)는 서비스 관리 모듈(102)과 디바이스 관리 모듈(104) 사이에서 애플리케이션 서비스와 관련된 메시지를 중계(또는 양방향 전송)하는 서버이다. 이때, 메시지 서버(106)는 제1 네트워크와 제2 네트워크 사이의 DMZ(Demilitarized Zone)에 위치할 수 있다. DMZ는 제1 네트워크와 제2 네트워크 사이에 위치한 서브 네트워크로서, 제1 네트워크와 DMZ 사이에는 방화벽이 존재할 수 있다.The
메시지 서버(106)는 메시지 중계를 위한 각종 채널 매니저를 포함할 수 있으며, 상기 채널 매니저를 통해 상기 메시지를 라우팅할 수 있다.The
써드 파티 메시지 서버(108)는 타 조직 또는 기업의 메시지 서버로서, 예를 들어 GCM(Google Cloud Messaging), APNS(Apple Push Notification Service)의 메시지 서버(또는 푸시 서버)일 수 있다. 메시지 서버(106)는 내부의 채널 매니저를 통해 애플리케이션 서비스와 관련된 메시지를 써드 파티 메시지 서버(108)와 송수신할 수 있다.The third
도 2는 본 발명의 일 실시예에 따른 서비스 관리 모듈(102) 및 애플리케이션 서버(200)의 예시이다. Figure 2 is an illustration of a
도 2를 참조하면, 본 발명의 일 실시예에 따른 서비스 관리 모듈(102)은 부하 분산을 위해 복수 개(예를 들어, 100개) 존재할 수 있으며, 라이브러리(미도시)를 통해 함수를 호출하는 형태로 애플리케이션 서버(200)와 양방향 통신할 수 있다. 이를 위해, 서비스 관리 모듈(102)은 애플리케이션 서버(200)와의 양방향 통신을 위한 인터페이스(미도시)를 구비할 수 있다. 상술한 바와 같이, 서비스 관리 모듈(102)은 애플리케이션 서버(200)의 요청에 따라 애플리케이션 서비스와 관련된 메시지를 생성하여 데이터베이스(150)에 저장하고, 상기 메시지를 메시지 서버(106)를 통해 디바이스 관리 모듈(104)로 전송할 수 있다. 상기 데이터베이스(150)는 제1 네트워크에서 각 서비스 관리 모듈(102)과 연결될 수 있다.Referring to FIG. 2, the
이때, 상기 메시지는 메시지 아이디, 발신자 주소(source address), 수신자 주소(destination address), 경유자(via) 정보, 이전에 전송된 메시지의 아이디(즉, 이전 메시지 아이디), 유효 기간(TTL : Time To Live), 생성 시각, 애플리케이션 서비스의 식별 정보 등을 포함할 수 있다. 여기서, 발신자 주소는 메시지를 전송하는 서비스 관리 모듈(102)의 아이디를 포함할 수 있으며, 수신자 주소는 메시지의 수신 대상인 디바이스 관리 모듈(104)의 아이디를 포함할 수 있다. 메시지 서버(106)는 상기 메시지에 포함된 발신자 정보, 수신자 정보, 경유자 정보 등을 이용하여 상기 메시지를 라우팅한 후 디바이스 관리 모듈(104)로 전달할 수 있다.At this time, the message includes a message ID, a source address, a destination address, via information, an ID of a previously transmitted message (i.e., a previous message ID), a valid time period (TTL: Time To Live, a creation time, identification information of an application service, and the like. Here, the sender address may include the ID of the
도 3은 본 발명의 일 실시예에 따른 디바이스 관리 모듈(104) 및 디바이스(300)의 예시이다.FIG. 3 is an illustration of a
도 3을 참조하면, 본 발명의 일 실시예에 따른 디바이스 관리 모듈(104)은 디바이스(300)에 설치되어 각 애플리케이션 클라이언트(302)에 해당 애플리케이션 서비스와 관련된 메시지를 송수신한다. 디바이스 관리 모듈(104-1)은 라이브러리(미도시)를 통해 함수를 호출하는 형태로 애플리케이션 클라이언트(302)와 양방향 통신할 수 있다. 이를 위해, 디바이스 관리 모듈(104-1)은 애플리케이션 클라이언트(302)와의 양방향 통신을 위한 인터페이스(미도시)를 구비할 수 있다. Referring to FIG. 3, the
또한, 디바이스 관리 모듈(104)은 메시지 서버(106)를 통해 서비스 관리 모듈(102)로부터 애플리케이션 서비스와 관련된 메시지를 수신하고, 메시지 서버(106)를 통해 상기 메시지에 대한 수신 확인 메시지(즉, ACK 메시지)를 서비스 관리 모듈(102)로 전송할 수 있다.The
한편, 본 발명의 일 실시예에 따르면, 부하 분산을 위해 애플리케이션 서버(200) 측 컴포넌트, 즉 서비스 관리 모듈(102)을 멀티 인스턴스로 구성하고, 애플리케이션 서버(200)에서 상기 멀티 인스턴스를 통해 디바이스(300) 측 컴포넌트, 즉 디바이스 관리 모듈(104)과 메시지를 송수신할 수 있다. 그러나, 서비스 관리 모듈(102)이 멀티 인스턴스로 구성된다 하더라도 특정 서비스 관리 모듈(102)에 재전송 또는 삭제 대상이 되는 메시지가 집중되는 경우 해당 서비스 관리 모듈(102)에만 부하가 집중되어 전체 시스템 성능이 저하될 수 있다. 또한, 각 서비스 관리 모듈(102)에서 동일한 메시지를 중복으로 전송함에 따라 불필요한 부하를 발생시키는 경우가 빈번히 발생할 수 있다. 이에 따라, 본 발명의 실시예들에서는 메시지 전송이 어떤 서비스 관리 모듈(102)에 요청되었는지와 관계 없이 특정 디바이스 관리 모듈(104)에 대한 메시지 재전송 및 삭제 처리를 특정 서비스 관리 모듈(102)에서만 담당하도록 하여 메시지의 중복 전송을 방지하고 부하를 분산시킬 수 있도록 하였다. 이에 대해서는 도 6을 참조하여 구체적으로 후술하기로 한다.According to an embodiment of the present invention, the
도 4는 본 발명의 일 실시예에 따른 서비스 관리 모듈(102)의 상세 구성을 나타낸 블록도이다. 도 4에 도시된 바와 같이, 본 발명의 일 실시예에 따른 메시지 처리 모듈은 생성부(402), 결정부(404) 및 처리부(406)를 포함한다.4 is a block diagram illustrating a detailed configuration of a
생성부(402)는 애플리케이션 서버로부터 메시지 생성 요청을 수신함에 따라 애플리케이션 서비스와 관련된 메시지를 생성한다. 이때, 상기 메시지 생성 요청에는 상기 메시지의 수신자 정보, 상기 메시지와 관련된 애플리케이션 서비스의 식별 정보 등이 포함될 수 있다. 생성부(402)는 상기 메시지 생성 요청에 따라 메시지 아이디를 생성하고, 상기 메시지 아이디에 대응되는 메시지를 생성할 수 있다. 예를 들어, 생성부(402)는 메시지가 전송될 디바이스의 식별 정보, 메시지와 관련된 애플리케이션의 식별 정보 등을 조합하여 상기 메시지 아이디를 생성하고, 이에 대응되는 메시지를 생성할 수 있다.The
도 5를 참조하면, 상기 메시지는 메시지 아이디, 발신자 주소, 수신자 주소, 경유자 정보, 이전에 전송된 메시지의 아이디, 유효 기간(TTL), 생성 시각, 애플리케이션 서비스의 식별 정보 등을 포함할 수 있다. 상기 발신자 주소, 수신자 주소, 경유자 정보, 상기 메시지와 관련된 애플리케이션 서비스의 식별 정보 등은 상기 메시지 생성 요청에 포함될 수 있으며, 생성부(402)는 상기 메시지 생성 요청을 참조하여 이들 정보를 메시지에 포함시킬 수 있다. 또한, 상기 메시지 생성 요청에는 생성될 메시지가 순서보장 메시지인지의 여부에 대한 정보가 포함될 수 있다. 만약, 상기 메시지가 순서보장 메시지인 경우, 생성부(402)는 데이터베이스(150)를 참조하여 상기 메시지의 이전 메시지의 아이디(즉, 이전 메시지 아이디)를 확인할 수 있다. 생성부(402)는 예를 들어, 상기 데이터베이스에 기록된 메시지 아이디 중 마지막으로 기록된 메시지 아이디를 상기 이전 메시지 아이디로 판단하고, 상기 이전 메시지 아이디를 상기 메시지의 헤더에 저장할 수 있다. 이때, 이전 메시지가 존재하지 않는 경우(즉, 데이터베이스에 기록된 이전 메시지 아이디가 없는 경우), 생성부(402)는 자신의 메시지 아이디를 상기 메시지의 헤더에 저장할 수 있다. 또한, 상기 메시지의 유효 기간은 설정된 정책에 따라 결정될 수 있으며, 상기 메시지의 생성 시각은 메시지의 생성시 자동 생성될 수 있다. 이와 같이 생성된 메시지의 예시는 도 5와 같다.Referring to FIG. 5, the message may include a message ID, a sender address, a recipient address, passerby information, an ID of a previously transmitted message, a validity period (TTL), a generation time, . The sender address, the receiver address, the passerby information, the identification information of the application service related to the message, and the like can be included in the message generation request. The
결정부(404)는 디바이스 관리 모듈(104) 각각의 아이디 및 서비스 관리 모듈(102)의 전체 개수를 이용하여 복수의 디바이스 관리 모듈(104) 중 자신이 담당하는 하나 이상의 담당 디바이스 관리 모듈을 결정한다. The
먼저, 결정부(404)는 데이터베이스(150)를 참조하여 디바이스 관리 모듈(104) 각각의 아이디에 대한 해시값 및 서비스 관리 모듈(102)의 전체 개수를 획득할 수 있다. 상기 디바이스 관리 모듈(104) 각각의 아이디 또는 상기 디바이스 관리 모듈(104) 각각의 아이디에 대한 해시값은 데이터베이스(150)에 저장될 수 있으며, 결정부(404)는 데이터베이스(150)를 참조하여 상기 디바이스 관리 모듈(104) 각각의 아이디를 획득한 후 이를 해시하거나 또는 데이터베이스(150)를 참조하여 상기 디바이스 관리 모듈(104) 각각의 아이디에 대한 해시값을 곧바로 획득할 수 있다. 또한, 각 서비스 관리 모듈(102)은 자신의 식별 번호를 상기 데이터베이스(150)에 기록할 수 있으며, 결정부(404)는 데이터베이스(150)를 참조하여 서비스 관리 모듈(102)의 전체 개수를 확인할 수 있다. 일 예시로서, 결정부(404)는 데이터베이스(150)에 마지막으로 기록된 서비스 관리 모듈(102)의 식별 번호를 참조하여 상기 서비스 관리 모듈(102)의 전체 개수를 확인할 수 있다.First, the
다음으로, 결정부(404)는 상기 디바이스 관리 모듈(104) 각각의 아이디에 대한 해시값을 서비스 관리 모듈(102)의 전체 개수로 모듈러(modulus) 연산하여 상기 디바이스 관리 모듈(104) 각각에 대한 모듈러 연산값을 계산할 수 있다. 모듈러 연산은 두 값의 나눗셈에 의한 나머지를 구하는 연산으로서, a mod b (또는 a % b)로 표현되는 모듈러 연산의 경우 a 를 b로 나누었을 때의 나머지 값이 출력된다. 상기 디바이스 관리 모듈(104) 각각의 아이디에 대한 해시값은 서로 다른 고유의 값을 가지게 되므로, 상기 디바이스 관리 모듈(104) 각각의 아이디에 대한 해시값을 서비스 관리 모듈(102)의 전체 개수로 모듈러 연산하는 경우 상기 디바이스 관리 모듈(104) 각각이 랜덤한 확률로 서비스 관리 모듈의 전체 개수만큼 균일하게 그룹핑될 수 있다. 일 예시로서, 서비스 관리 모듈(102) 및 디바이스 관리 모듈(104)의 개수가 각각 100개 및 40만개인 경우, 결정부(404)는 상기 모듈러 연산을 통해 40만개의 디바이스 관리 모듈(104)을 100개의 그룹(즉, 모듈러 연산값 0, 1, 2...99에 각각 대응되는 그룹)으로 그룹핑할 수 있다.Next, the
다음으로, 결정부(404)는 상기 모듈러 연산값과 자신의 식별 번호를 참조하여 담당 디바이스 관리 모듈을 결정할 수 있다. 구체적으로, 결정부(404)는 상기 모듈러 연산값과 자신의 식별 번호를 각각 비교하여 상기 모듈러 연산값 중 자신의 식별 번호와 대응(또는 일치)되는 모듈러 연산값을 찾고, 상기 모듈러 연산값과 연관된 디바이스 관리 모듈의 아이디(즉, 상기 모듈러 연산값을 획득하는 데 사용된 디바이스 관리 모듈의 아이디)를 가진 디바이스 관리 모듈을 담당 디바이스 관리 모듈로 결정할 수 있다. 이와 같이, 각 서비스 관리 모듈(102)는 상기 모듈러 연산을 통해 자신이 담당하는 담당 디바이스 관리 모듈을 각각 결정할 수 있으며, 이에 따라 각 서비스 관리 모듈(102)별로 담당 디바이스 관리 모듈이 랜덤한 확률로 균일하게 분배될 수 있다. Next, the
이하에서는, 도 6을 참조하여 결정부(404)에서 담당 디바이스 관리 모듈을 결정하는 과정을 살펴보기로 한다.Hereinafter, a process of determining a chargeable device management module in the
여기서, 서비스 관리 모듈(102) 및 디바이스 관리 모듈(104)의 개수는 각각 3개 및 9개인 것으로 가정한다. 또한, 각 서비스 관리 모듈(102)의 식별 번호는 #0, #1 및 #2이며, 각 디바이스 관리 모듈(104)의 아이디에 대한 해시값은 1, 2, 3...9 인 것으로 가정한다.Here, it is assumed that the number of the
상술한 바와 같이, 각 서비스 관리 모듈(102)의 결정부(404)는 디바이스 관리 모듈 각각의 아이디에 대한 해시값을 서비스 관리 모듈의 전체 개수로 모듈러 연산하여 상기 디바이스 관리 모듈 각각에 대한 모듈러 연산값을 계산하고, 상기 모듈러 연산값과 자신의 식별 번호를 참조하여 담당 디바이스 관리 모듈을 결정할 수 있다. 여기서, 각 서비스 관리 모듈(102)의 결정부(404)는 아래 표 1과 같은 모듈러 연산값을 각각 계산할 수 있다.As described above, the
이후, 각 서비스 관리 모듈(102)의 결정부(404)는 상기 모듈러 연산값 중 자신의 식별 번호와 대응되는 모듈러 연산값을 찾고, 상기 모듈러 연산값과 연관된 디바이스 관리 모듈의 아이디(즉, 상기 모듈러 연산값을 획득하는 데 사용된 디바이스 관리 모듈의 아이디)를 가진 디바이스 관리 모듈을 담당 디바이스 관리 모듈로 결정할 수 있다. 위 예시에서, 서비스 관리 모듈 #0은 모듈러 연산값 0과 연관된 디바이스 관리 모듈 3, 디바이스 관리 모듈 6 및 디바이스 관리 모듈 9를 담당 디바이스 관리 모듈로 결정하고, 디바이스 관리 모듈 3, 디바이스 관리 모듈 6 및 디바이스 관리 모듈 9에 대한 메시지 재전송 및 삭제 처리만을 수행할 수 있다. 또한, 서비스 관리 모듈 #1은 모듈러 연산값 1과 연관된 디바이스 관리 모듈 1, 디바이스 관리 모듈 4 및 디바이스 관리 모듈 7을 담당 디바이스 관리 모듈로 결정하고, 디바이스 관리 모듈 1, 디바이스 관리 모듈 4 및 디바이스 관리 모듈 7에 대한 메시지 재전송 및 삭제 처리만을 수행할 수 있다. 또한, 서비스 관리 모듈 #2는 모듈러 연산값 2와 연관된 디바이스 관리 모듈 2, 디바이스 관리 모듈 5 및 디바이스 관리 모듈 8을 담당 디바이스 관리 모듈로 결정하고, 디바이스 관리 모듈 2, 디바이스 관리 모듈 5 및 디바이스 관리 모듈 8에 대한 메시지 재전송 및 삭제 처리만을 수행할 수 있다.Then, the
다시 도 4로 돌아오면, 처리부(406)는 서비스 관리 모듈(102)의 담당 디바이스 관리 모듈로 전송된 메시지를 재전송하거나 삭제한다. 상술한 바와 같이, 서비스 관리 모듈(102)은 설정된 시간 이내에 상기 메시지에 대한 수신 확인 메시지를 수신하지 않는 경우 상기 메시지를 재전송할 수 있으며, 설정된 시간 이내에 상기 메시지에 대한 수신 확인 메시지를 수신하는 경우 데이터베이스(150)에 저장된 상기 메시지를 삭제할 수 있다. 처리부(406)는 이와 같은 메시지 재전송 및 삭제 처리를 수행함에 있어서 자신이 담당하는 담당 디바이스 관리 모듈에 대한 메시지 재전송 및 삭제 처리만을 수행하고 자신의 담당 디바이스 관리 모듈이 아닌 타 디바이스 관리 모듈에 대한 메시지 재전송 및 삭제 처리는 수행하지 않게 된다.4, the
또한, 처리부(406)는 설정된 주기(예를 들어, 2분)마다 메시지의 재전송 또는 삭제 여부를 결정할 수 있다. 이때, 상기 주기는 각 서비스 관리 모듈(102)별로 상이할 수 있다. 처리부(406)는 상기 주기마다 각 담당 디바이스 관리 모듈에 대한 메시지를 하나씩 재전송하거나 삭제할 수 있다. In addition, the
이때, 디바이스 관리 모듈(104)로 전송되어야 할 전송대기 메시지가 복수 개 존재하는 경우, 처리부(406)는 상기 전송대기 메시지의 생성 시각 및 유효 기간을 기준으로 하나의 전송대기 메시지를 선택하여 선택된 하나의 전송대기 메시지만을 디바이스 관리 모듈(104)로 먼저 전송할 수 있다. 구체적으로, 처리부(406)는 상기 전송대기 메시지 중 현재 유효 기간이 도과되지 않으면서 생성 시각이 가장 오래된 하나의 전송대기 메시지를 선택할 수 있다. 만약, 서비스 관리 모듈(102)이 전송된 상기 전송대기 메시지에 대한 수신 확인 메시지를 디바이스 관리 모듈(104)로부터 수신(또는 디바이스 관리 모듈(104)의 연결 확인 메시지를 메시지 서버(106)로부터 수신)하는 경우, 처리부(406)는 상기 디바이스 관리 모듈(104)이 메시지 서버(106)에 정상적으로 연결된 것(즉, 나머지 전송대기 메시지 또한 수신할 준비가 된 것)으로 판단할 수 있다.At this time, if there are a plurality of transmission standby messages to be transmitted to the
또한, 서비스 관리 모듈(102)이 전송된 상기 전송대기 메시지에 대한 수신 확인 메시지를 디바이스 관리 모듈(104)로부터 수신(또는 디바이스 관리 모듈(104)의 연결 확인 메시지를 메시지 서버(106)로부터 수신)하는 경우, 처리부(406)는 선택된 상기 전송대기 메시지를 제외한 나머지 전송대기 메시지 중 현재 상기 유효 기간이 도과되지 않은 전송대기 메시지 각각을 디바이스 관리 모듈(104)로 전송할 수 있다. 이때, 처리부(406)는 상기 나머지 전송대기 메시지 중 현재 상기 유효 기간이 도과되지 않은 설정된 개수의 전송대기 메시지 각각을 순차적으로 전송하거나 상기 전송대기 메시지 각각을 설정된 크기 단위로 묶어서 전송할 수 있다.The
또한, 서비스 관리 모듈(102)이 메시지 송수신을 위한 복수의 스레드(thread)를 구비하는 경우, 전송대기 메시지를 전송하는 스레드는 현재 전송대기 메시지가 전송되고 있음을 데이터베이스에 기록(또는 설정)할 수 있다. 이후, 상기 스레드, 즉 전송대기 메시지 각각을 전송하는 스레드를 제외한 타 스레드는 상기 전송대기 메시지 중 적어도 일부에 대한 수신 확인 메시지(또는 디바이스 관리 모듈(104)의 연결 확인 메시지)를 수신하는 경우 상기 데이터베이스를 참조하여 현재 상기 전송대기 메시지 각각이 전송되고 있음을 확인할 수 있으며, 이에 따라 전송대기 메시지 각각을 중복 전송하지 않게 된다.In addition, when the
또한, 처리부(406)는 디바이스 관리 모듈(104)로부터 메시지를 수신하고 이를 처리할 수 있다. 이하에서는, 설명의 편의상 타 모듈로부터 수신된 메시지를 “수신 메시지"라 칭하기로 한다. The
먼저, 처리부(406)는 수신 메시지의 아이디를 이용하여 상기 수신 메시지가 이미 처리된 메시지인지의 여부를 판단할 수 있다. 구체적으로, 처리부(406)는 상기 수신 메시지의 아이디가 데이터베이스(150)의 메시지 로그 테이블에 기록되어 있는지의 여부에 따라 상기 수신 메시지가 이미 처리된 메시지인지의 여부를 판단할 수 있다. 일 예시로서, 처리부(406)는 상기 수신 메시지의 아이디가 데이터베이스(150)의 메시지 로그 테이블에 기록되어 있는 경우 상기 수신 메시지가 이미 처리된 메시지인 것으로 판단하고 다음 프로세스를 진행하지 않게 된다. 다른 예시로서, 처리부(406)는 상기 수신 메시지의 아이디가 데이터베이스(150)의 메시지 로그 테이블에 기록되어 있지 않은 경우 상기 수신 메시지가 이미 처리된 메시지가 아닌 것으로 판단(즉, 신규 메시지인 것으로 판단)할 수 있다.First, the
만약, 상기 수신 메시지가 이미 처리된 메시지가 아닌 것으로 판단되는 경우, 처리부(406)는 상기 수신 메시지에 이전 메시지 아이디가 존재하는지의 여부(즉, 수신 메시지가 순서보장 메시지인지의 여부)를 판단할 수 있다. If it is determined that the received message is not a processed message, the
만약, 상기 수신 메시지에 이전 메시지 아이디가 존재하지 않는 경우, 처리부(406)는 상기 수신 메시지를 애플리케이션 서버에 전달할 수 있다.If the previous message ID does not exist in the received message, the
만약, 상기 수신 메시지에 이전 메시지 아이디가 존재하는 경우, 처리부(406)는 데이터베이스(150)를 참조하여 상기 수신 메시지의 이전 메시지에 대한 처리가 완료되었는지의 여부를 판단할 수 있다. 이때, 상기 수신 메시지의 이전 메시지에 대한 처리가 완료된 것으로 판단되는 경우, 처리부(406)는 상기 수신 메시지를 애플리케이션 서버에 전달할 수 있다. 반면, 상기 수신 메시지의 이전 메시지에 대한 처리가 완료되지 않은 것으로 판단되는 경우, 처리부(406)는 상기 수신 메시지를 데이터베이스(150)에 저장한 후 상기 이전 메시지에 대한 상태 체크를 위한 체크 메시지를 디바이스 관리 모듈(104)로 전달할 수 있다.If there is a previous message ID in the received message, the
한편, 여기서는 설명의 편의상 서비스 관리 모듈(102)을 중심으로 메시지의 생성, 재전송 및 수신 처리 과정을 설명하였으나 상기 메시지의 생성, 재전송 및 수신 처리 과정은 디바이스 관리 모듈(104)에서도 이와 동일하거나 유사하게 적용될 수 있다. 예를 들어, 디바이스 관리 모듈(104)은 애플리케이션 클라이언트의 메시지 생성 요청에 따라 메시지를 생성하고 이를 서비스 관리 모듈(102)로 전송할 수 있다. 이때, 상기 메시지에 포함되는 정보들은 도 5에 도시된 바와 동일하다. 또한, 디바이스 관리 모듈(104)은 서비스 관리 모듈(102)로 전송되어야 할 복수 개의 전송대기 메시지 중 유효 기간이 도과되지 않으면서 생성 시각이 가장 오래된 하나의 전송대기 메시지를 선택하고, 이를 서비스 관리 모듈(102)로 먼저 전송하여 서비스 관리 모듈(102)의 연결 여부를 체크할 수 있다. 또한, 디바이스 관리 모듈(104)은 서비스 관리 모듈(102)로부터 수신 메시지를 수신하는 경우 상기 수신 메시지가 이미 처리된 메시지인지의 여부를 판단하고, 상기 수신 메시지가 이미 처리된 메시지가 아닌 것으로 판단되는 경우 상기 수신 메시지에 이전 메시지 아이디가 존재하는지의 여부를 판단하여 체크 메시지의 생성 여부를 결정할 수 있다.Although the process of generating, retransmitting, and receiving a message has been described with reference to the
도 7은 본 발명의 일 실시예에 따른 전송대기 메시지의 처리 과정을 설명하기 위한 흐름도이다. 이하의 도 7 내지 도 10에 도시된 흐름도에서는 상기 방법을 복수 개의 단계로 나누어 기재하였으나, 적어도 일부의 단계들은 순서를 바꾸어 수행되거나, 다른 단계와 결합되어 함께 수행되거나, 생략되거나, 세부 단계들로 나뉘어 수행되거나, 또는 도시되지 않은 하나 이상의 단계가 부가되어 수행될 수 있다.7 is a flowchart illustrating a process of a transmission wait message according to an embodiment of the present invention. In the following flow charts shown in Figs. 7 to 10, the method is described by dividing into a plurality of steps, but at least some of the steps may be performed in reverse order, combined with other steps, performed together, omitted, Or one or more steps not shown may be added.
S102 단계에서, 서비스 관리 모듈(102)은 복수의 디바이스 관리 모듈(104) 중 자신이 담당하는 하나 이상의 담당 디바이스 관리 모듈을 결정한다.In step S102, the
S104 단계에서, 서비스 관리 모듈(102)은 복수 개의 전송대기 메시지에 담당 디바이스 관리 모듈의 아이디가 존재하는지의 여부를 판단한다. 만약, S104 단계의 판단 결과 상기 복수 개의 전송대기 메시지에 담당 디바이스 관리 모듈의 아이디가 존재하지 않는 경우, 서비스 관리 모듈(102)은 해당 프로세스를 종료한다.In step S104, the
S106에서, S104 단계의 판단 결과 전송대기 메시지에 담당 디바이스 관리 모듈의 아이디가 존재하는 경우, 서비스 관리 모듈(102)은 담당 디바이스 관리 모듈에 대응되는 전송대기 메시지 중 생성 시각이 가장 오래된 전송대기 메시지를 검색한다.If it is determined in step S104 that the ID of the responsible device management module exists in the transmission standby message, the
S108 단계에서, 상기 담당 디바이스 관리 모듈에 대응되는 전송대기 메시지 중 생성 시각이 가장 오래된 전송대기 메시지의 존재 여부를 판단한다. 만약, S108 단계의 판단 결과 상기 담당 디바이스 관리 모듈에 대응되는 전송대기 메시지가 존재하지 않는 경우, 서비스 관리 모듈(102)은 복수 개의 전송대기 메시지 중 자신이 담당하는 다른 담당 디바이스 관리 모듈의 아이디가 존재하는지의 여부를 판단한다(S104 단계).In step S108, it is determined whether there is a transmission wait message with the oldest generation time among the transmission wait messages corresponding to the responsible device management module. If there is no transmission standby message corresponding to the responsible device management module as a result of the determination in step S108, the
S110 단계에서, S108 단계의 판단 결과 상기 담당 디바이스 관리 모듈에 대응되는 전송대기 메시지가 존재하는 경우, 서비스 관리 모듈(102)은 생성 시각이 가장 오래된 전송대기 메시지가 현재 유효 기간을 도과하였는지의 여부를 판단한다. 만약, S108 단계의 판단 결과 상기 가장 오래된 전송대기 메시지가 현재 유효 기간을 도과한 경우, 서비스 관리 모듈(102)은 다음으로 가장 오래된 전송대기 메시지를 검색할 수 있다.If it is determined in step S110 that there is a transmission standby message corresponding to the responsible device management module as a result of the determination in step S108, the
S112 단계에서, S110 단계의 판단 결과 상기 가장 오래된 전송대기 메시지가 현재 유효 기간을 도과하지 않은 경우, 서비스 관리 모듈(102)은 상기 가장 오래된 전송대기 메시지를 해당 담당 디바이스 관리 모듈(104)로 전송한다.If it is determined in step S112 that the oldest transmission wait message does not exceed the current validity period, the
도 8은 본 발명의 일 실시예에 따른 전송대기 메시지의 처리 과정을 설명하기 위한 흐름도이다. 8 is a flowchart illustrating a process of a transmission wait message according to an embodiment of the present invention.
S202 단계에서, 서비스 관리 모듈(102)의 일 스레드(thread)는 도 7에서 전송된 상기 전송대기 메시지에 대한 수신 확인 메시지 또는 디바이스 관리 모듈(104)의 연결 확인 메시지를 수신한다.In step S202, a thread of the
S204 단계에서, 상기 스레드는 데이터베이스(150)를 통해 현재 전송대기 메시지가 전송 중인지의 여부를 확인한다. 만약, S204 단계의 판단 결과 현재 전송대기 메시지가 전송 중인 것으로 확인되는 경우, 상기 스레드는 전송대기 메시지를 전송하지 않고 메시지 송수신 프로세스를 그대로 종료할 수 있다. In step S204, the thread checks whether the current transmission wait message is being transmitted through the
S206 단계에서, S204 단계의 판단 결과 현재 전송대기 메시지가 전송되고 있지 않은 것으로 판단되는 경우, 상기 스레드는 전송대기 메시지의 전송 여부를 나타내는 데이터베이스의 설정을 활성화(즉, 현재 전송대기 메시지가 전송 중임을 설정)한다.If it is determined in step S204 that the current transmission standby message is not being transmitted, the thread activates the setting of the database indicating whether the transmission standby message is transmitted (that is, the current transmission standby message is being transmitted Setting).
S208 단계에서, 상기 스레드는 서비스 관리 모듈(102)의 담당 디바이스 관리 모듈에 대응되는 전송대기 메시지를 검색한다.In step S208, the thread retrieves a transmission wait message corresponding to the device management module in charge of the
S210 단계에서, 상기 스레드는 담당 디바이스 관리 모듈에 대응되는 전송대기 메시지가 존재하는지의 여부를 판단한다. 만약, S210 단계의 판단 결과 담당 디바이스 관리 모듈에 대응되는 전송대기 메시지가 존재하지 않는 경우, 상기 스레드는 메시지 송수신 프로세스를 그대로 종료할 수 있다.In step S210, the thread determines whether there is a transfer wait message corresponding to the device management module in charge. If it is determined in step S210 that there is no transmission standby message corresponding to the responsible device management module, the thread can terminate the message transmission / reception process as it is.
S212 단계에서, S210 단계의 판단 결과 담당 디바이스 관리 모듈에 대응되는 전송대기 메시지가 존재하는 경우, 상기 스레드는 상기 전송대기 메시지가 유효 기간을 도과하였는지의 여부를 판단한다. 만약, S212 단계의 판단 결과 상기 전송대기 메시지가 유효 기간을 도과한 경우, 상기 스레드는 담당 디바이스 관리 모듈에 대응되는 다른 전송대기 메시지를 검색할 수 있다.If it is determined in step S212 that there is a transfer wait message corresponding to the responsible device management module, the thread determines whether the transfer wait message has passed the validity period. If it is determined in step S212 that the waiting-for-transmission message has passed the validity period, the thread can search for another transmission waiting message corresponding to the responsible device management module.
S214 단계에서, S212 단계의 판단 결과 상기 전송대기 메시지가 유효 기간을 도과하지 않은 경우, 상기 스레드는 유효 기간을 도과하지 않은 상기 전송대기 메시지 각각을 담당 디바이스 관리 모듈로 전송한다. 이때, 상기 스레드는 설정된 개수의 전송대기 메시지 각각을 순차적으로 전송하거나 상기 전송대기 메시지 각각을 설정된 크기 단위로 묶어서 전송할 수 있다.In step S214, if it is determined in step S212 that the wait-for-transmission message does not exceed the validity period, the thread transmits the wait-for-each-not-send message to the in-charge device management module. At this time, the thread may sequentially transmit each of the set number of transmission wait messages or may transmit each of the transmission wait messages in units of a predetermined size.
도 9는 본 발명의 일 실시예에 따른 서비스 관리 모듈(102)에서 수행되는 수신 메시지의 처리 과정을 설명하기 위한 흐름도이다. 9 is a flowchart illustrating a process of a received message performed by the
S302 단계에서, 서비스 관리 모듈(102)은 디바이스 관리 모듈(104)로부터 수신 메시지를 수신한다.In step S302, the
S304 단계에서, 서비스 관리 모듈(102)은 상기 수신 메시지의 아이디를 이용하여 상기 수신 메시지가 이미 처리된 메시지인지의 여부를 판단한다. 구체적으로, 서비스 관리 모듈(102)은 상기 수신 메시지의 아이디가 데이터베이스(150)의 메시지 로그 테이블에 기록되어 있는지의 여부에 따라 상기 수신 메시지가 이미 처리된 메시지인지의 여부를 판단할 수 있다. 만약, S304 단계의 판단 결과 상기 수신 메시지가 이미 처리된 메시지인 경우, 서비스 관리 모듈(102)은 해당 프로세스를 종료할 수 있다.In step S304, the
S306 단계에서, S304 단계의 판단 결과 상기 수신 메시지가 이미 처리된 메시지가 아닌 경우, 서비스 관리 모듈(102)은 상기 수신 메시지에 이전 메시지 아이디가 존재하는지의 여부를 판단한다.If it is determined in step S306 that the received message is not a processed message, the
S308 단계에서, S306 단계의 판단 결과 상기 수신 메시지에 이전 메시지 아이디가 존재하지 않는 경우, 서비스 관리 모듈(102)은 상기 수신 메시지를 애플리케이션 서버에 전달한다.If it is determined in step S308 that the previous message ID does not exist in the received message, the
S310 단계에서, 서비스 관리 모듈(102)은 상기 수신 메시지에 대한 수신 확인 메시지(ACK 메시지)를 디바이스 관리 모듈(104)로 전송한다.In step S310, the
S312 단계에서, 서비스 관리 모듈(102)은 상기 수신 메시지의 로그 정보 및 처리 완료 여부를 데이터베이스(150)에 기록한다.In step S312, the
S314 단계에서, 서비스 관리 모듈(102)은 상기 수신 메시지가 그 순서상 타 메시지보다 먼저 수신된 것인지의 여부를 판단한다. 만약, S314 단계의 판단 결과 상기 수신 메시지가 그 순서상 타 메시지보다 먼저 수신된 것이 아닌 경우, 서비스 관리 모듈(102)은 해당 프로세스를 종료한다.In step S314, the
S316 단계에서, S314 단계의 판단 결과 상기 수신 메시지가 그 순서상 타 메시지보다 먼저 수신된 경우, 서비스 관리 모듈(102)은 상기 수신 메시지를 데이테베이스(150)에 임시 저장하고, 상기 타 메시지가 수신된 이후 상기 수신 메시지를 애플리케이션 서버에 전달한다.If it is determined in step S314 that the received message is received earlier than other messages in step S314, the
한편, S318 단계에서, S306 단계의 판단 결과 상기 수신 메시지에 이전 메시지 아이디가 존재하는 경우, 서비스 관리 모듈(102)은 상기 수신 메시지의 이전 메시지의 처리가 완료되었는지의 여부를 판단한다. 만약, S318 단계의 판단 결과 상기 수신 메시지의 이전 메시지의 처리가 완료된 경우, 서비스 관리 모듈(102)은 상기 수신 메시지를 애플리케이션 서버로 전달한다.If it is determined in step S318 that the previous message ID exists in the received message, the
S320 단계에서, S318 단계의 판단 결과 상기 수신 메시지의 이전 메시지의 처리가 완료되지 않은 경우, 서비스 관리 모듈(102)은 상기 수신 메시지를 데이터베이스(150)에 저장한다.If it is determined in step S320 that the processing of the previous message of the received message is not completed, the
S322 단계에서, 서비스 관리 모듈(102)은 상기 수신 메시지에 대한 수신 확인 메시지(ACK 메시지)를 디바이스 관리 모듈(104)로 전송한다.In step S322, the
S324 단계에서, 서비스 관리 모듈(102)은 상기 이전 메시지에 대한 상태 체크를 위한 체크 메시지를 디바이스 관리 모듈(104)로 전송한다.In step S324, the
도 10은 본 발명의 일 실시예에 따른 디바이스 관리 모듈(104)에서 수행되는 수신 메시지의 처리 과정을 설명하기 위한 흐름도이다. FIG. 10 is a flowchart illustrating a process of a received message performed by the
S402 단계에서, 디바이스 관리 모듈(104)은 서비스 관리 모듈(102)로부터 수신 메시지를 수신한다.In step S402, the
S404 단계에서, 디바이스 관리 모듈(104)은 상기 수신 메시지에 대한 수신 확인 메시지(ACK 메시지)를 서비스 관리 모듈(102)로 전송한다.In step S404, the
S406 단계에서, 디바이스 관리 모듈(104)은 상기 수신 메시지의 아이디를 이용하여 상기 수신 메시지가 이미 처리된 메시지인지의 여부를 판단한다. 상기 수신 메시지가 이미 처리된 메시지인지의 여부를 판단하는 과정은 앞선 도 9의 S304 단계에서와 동일하다. In step S406, the
S408 단계에서, S406 단계의 판단 결과 상기 수신 메시지가 이미 처리된 메시지가 아닌 경우, 디바이스 관리 모듈(104)은 상기 수신 메시지를 데이터베이스(150)에 저장한다.If it is determined in step S408 that the received message is not a processed message, the
S410 단계에서, 디바이스 관리 모듈(104)은 상기 수신 메시지에 이전 메시지 아이디가 존재하는지의 여부를 판단한다.In step S410, the
S412 단계에서, S410 단계의 판단 결과 상기 수신 메시지에 이전 메시지 아이디가 존재하지 않는 경우, 디바이스 관리 모듈(104)은 상기 수신 메시지를 애플리케이션 클라이언트에 전달한다.If it is determined in step S412 that the previous message ID does not exist in the received message, the
S414 단계에서, 디바이스 관리 모듈(104)은 상기 수신 메시지의 로그 정보 및 처리 완료 여부를 데이터베이스(150)에 기록한다.In step S414, the
S416 단계에서, 디바이스 관리 모듈(104)은 상기 수신 메시지가 그 순서상 타 메시지보다 먼저 수신된 것인지의 여부를 판단한다. 만약, S416 단계의 판단 결과 상기 수신 메시지가 그 순서상 타 메시지보다 먼저 수신된 것이 아닌 경우, 디바이스 관리 모듈(104)은 해당 프로세스를 종료한다.In step S416, the
S418 단계에서, S416 단계의 판단 결과 상기 수신 메시지가 그 순서상 타 메시지보다 먼저 수신된 경우, 디바이스 관리 모듈(104)은 상기 수신 메시지를 데이테베이스(150)에 임시 저장하고, 상기 타 메시지가 수신된 이후 상기 수신 메시지를 애플리케이션 클라이언트에 전달한다.If it is determined in step S418 that the received message is received earlier than other messages in step S416, the
한편, S420 단계에서, S410 단계의 판단 결과 상기 수신 메시지에 이전 메시지 아이디가 존재하는 경우, 디바이스 관리 모듈(104)은 상기 수신 메시지의 이전 메시지의 처리가 완료되었는지의 여부를 판단한다. 만약, S420 단계의 판단 결과 상기 수신 메시지의 이전 메시지의 처리가 완료된 경우, 디바이스 관리 모듈(104)은 상기 수신 메시지를 애플리케이션 클라이언트로 전달한다.On the other hand, if it is determined in step S420 that the previous message ID exists in the received message, the
S422 단계에서, S410 단계의 판단 결과 상기 수신 메시지의 이전 메시지의 처리가 완료되지 않은 경우, 디바이스 관리 모듈(104)은 상기 이전 메시지에 대한 상태 체크를 위한 체크 메시지를 서비스 관리 모듈(102)로 전송한다.If it is determined in step S422 that the processing of the previous message of the received message is not completed as a result of the determination in step S410, the
도 11은 예시적인 실시예들에서 사용되기에 적합한 컴퓨팅 장치를 포함하는 컴퓨팅 환경을 예시하여 설명하기 위한 블록도이다. 도시된 실시예에서, 각 컴포넌트들은 이하에 기술된 것 이외에 상이한 기능 및 능력을 가질 수 있고, 이하에 기술되지 것 이외에도 추가적인 컴포넌트를 포함할 수 있다.11 is a block diagram illustrating and illustrating a computing environment including a computing device suitable for use in the exemplary embodiments. In the illustrated embodiment, each of the components may have different functions and capabilities than those described below, and may include additional components in addition to those described below.
도시된 컴퓨팅 환경(10)은 컴퓨팅 장치(12)를 포함한다. 일 실시예에서, 컴퓨팅 장치(12)는 메시지 처리 장치(100), 또는 메시지 처리 장치(100)에 포함되는 하나 이상의 컴포넌트일 수 있다.The illustrated
컴퓨팅 장치(12)는 적어도 하나의 프로세서(14), 컴퓨터 판독 가능 저장 매체(16) 및 통신 버스(18)를 포함한다. 프로세서(14)는 컴퓨팅 장치(12)로 하여금 앞서 언급된 예시적인 실시예에 따라 동작하도록 할 수 있다. 예컨대, 프로세서(14)는 컴퓨터 판독 가능 저장 매체(16)에 저장된 하나 이상의 프로그램들을 실행할 수 있다. 상기 하나 이상의 프로그램들은 하나 이상의 컴퓨터 실행 가능 명령어를 포함할 수 있으며, 상기 컴퓨터 실행 가능 명령어는 프로세서(14)에 의해 실행되는 경우 컴퓨팅 장치(12)로 하여금 예시적인 실시예에 따른 동작들을 수행하도록 구성될 수 있다.The
컴퓨터 판독 가능 저장 매체(16)는 컴퓨터 실행 가능 명령어 내지 프로그램 코드, 프로그램 데이터 및/또는 다른 적합한 형태의 정보를 저장하도록 구성된다. 컴퓨터 판독 가능 저장 매체(16)에 저장된 프로그램(20)은 프로세서(14)에 의해 실행 가능한 명령어의 집합을 포함한다. 일 실시예에서, 컴퓨터 판독 가능 저장 매체(16)는 메모리(랜덤 액세스 메모리와 같은 휘발성 메모리, 비휘발성 메모리, 또는 이들의 적절한 조합), 하나 이상의 자기 디스크 저장 디바이스들, 광학 디스크 저장 디바이스들, 플래시 메모리 디바이스들, 그 밖에 컴퓨팅 장치(12)에 의해 액세스되고 원하는 정보를 저장할 수 있는 다른 형태의 저장 매체, 또는 이들의 적합한 조합일 수 있다.The computer-
통신 버스(18)는 프로세서(14), 컴퓨터 판독 가능 저장 매체(16)를 포함하여 컴퓨팅 장치(12)의 다른 다양한 컴포넌트들을 상호 연결한다.
컴퓨팅 장치(12)는 또한 하나 이상의 입출력 장치(24)를 위한 인터페이스를 제공하는 하나 이상의 입출력 인터페이스(22) 및 하나 이상의 네트워크 통신 인터페이스(26)를 포함할 수 있다. 입출력 인터페이스(22) 및 네트워크 통신 인터페이스(26)는 통신 버스(18)에 연결된다. 입출력 장치(24)는 입출력 인터페이스(22)를 통해 컴퓨팅 장치(12)의 다른 컴포넌트들에 연결될 수 있다. 예시적인 입출력 장치(24)는 포인팅 장치(마우스 또는 트랙패드 등), 키보드, 터치 입력 장치(터치패드 또는 터치스크린 등), 음성 또는 소리 입력 장치, 다양한 종류의 센서 장치 및/또는 촬영 장치와 같은 입력 장치, 및/또는 디스플레이 장치, 프린터, 스피커 및/또는 네트워크 카드와 같은 출력 장치를 포함할 수 있다. 예시적인 입출력 장치(24)는 컴퓨팅 장치(12)를 구성하는 일 컴포넌트로서 컴퓨팅 장치(12)의 내부에 포함될 수도 있고, 컴퓨팅 장치(12)와는 구별되는 별개의 장치로 컴퓨팅 장치(12)와 연결될 수도 있다.The
이상에서 대표적인 실시예를 통하여 본 발명에 대하여 상세하게 설명하였으나, 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자는 전술한 실시예에 대하여 본 발명의 범주에서 벗어나지 않는 한도 내에서 다양한 변형이 가능함을 이해할 것이다. 그러므로 본 발명의 권리범위는 설명된 실시예에 국한되어 정해져서는 안 되며, 후술하는 특허청구범위뿐만 아니라 이 특허청구범위와 균등한 것들에 의해 정해져야 한다.While the present invention has been particularly shown and described with reference to exemplary embodiments thereof, it is to be understood that the invention is not limited to the disclosed embodiments, but, on the contrary, I will understand. Therefore, the scope of the present invention should not be limited to the above-described embodiments, but should be determined by equivalents to the appended claims, as well as the appended claims.
10 : 컴퓨팅 환경
12 : 컴퓨팅 장치
14 : 프로세서
16 : 컴퓨터 판독 가능 저장 매체
18 : 통신 버스
20 : 프로그램
22 : 입출력 인터페이스
24 : 입출력 장치
26 : 네트워크 통신 인터페이스
100 : 메시지 처리 장치
102 : 서비스 관리 모듈
104 : 디바이스 관리 모듈
106 : 메시지 서버
108 : 써드 파티 메시지 서버
150 : 데이터베이스
200 : 애플리케이션 서버
300 : 디바이스
302 : 애플리케이션 클라이언트
402 : DB 접근부
404 : 결정부
406 : 처리부10: Computing environment
12: computing device
14: Processor
16: Computer readable storage medium
18: Communication bus
20: Program
22: I / O interface
24: input / output device
26: Network communication interface
100: Message processing device
102: service management module
104: Device management module
106: message server
108: Third party message server
150: Database
200: Application server
300: device
302: Application client
402: DB access unit
404:
406:
Claims (17)
상기 복수의 디바이스 관리 모듈 중 자신이 담당하는 하나 이상의 담당 디바이스 관리 모듈을 결정하며, 상기 담당 디바이스 관리 모듈로 전송되어야 할 전송대기 메시지가 복수 개 존재하는 경우 상기 전송대기 메시지의 생성 시각 및 설정된 유효 기간(TTL : Time To Live)을 기준으로 하나의 전송대기 메시지를 선택하고, 선택된 상기 전송대기 메시지를 상기 담당 디바이스 관리 모듈로 전송하는 서비스 관리 모듈을 포함하는, 메시지 처리 장치.
A plurality of device management modules; And
The device management module determines at least one responsible device management module of the plurality of device management modules, and when there is a plurality of transmission wait messages to be transmitted to the responsible device management module, And a service management module for selecting one transmission standby message based on time to live (TTL) and transmitting the selected transmission standby message to the corresponding device management module.
상기 서비스 관리 모듈은, 상기 복수의 전송대기 메시지 중 현재 상기 유효 기간이 도과되지 않으면서 상기 생성 시각이 가장 오래된 하나의 전송대기 메시지를 선택하는, 메시지 처리 장치.
The method according to claim 1,
Wherein the service management module selects one of the plurality of transmission wait messages, the one of the plurality of transmission wait messages being the oldest generation time without exceeding the current valid period.
상기 서비스 관리 모듈은, 상기 전송대기 메시지에 대한 수신 확인 메시지를 상기 디바이스 관리 모듈로부터 수신하는 경우 상기 디바이스 관리 모듈이 메시지 서버에 정상적으로 연결된 것으로 판단하는, 메시지 처리 장치.
The method according to claim 1,
Wherein the service management module determines that the device management module is normally connected to the message server when receiving an acknowledgment message for the transmission standby message from the device management module.
상기 서비스 관리 모듈은, 상기 수신 확인 메시지 또는 설정된 상기 담당 디바이스 관리 모듈의 연결 확인 메시지를 수신하는 경우 선택된 상기 전송대기 메시지를 제외한 나머지 전송대기 메시지 중 현재 상기 유효 기간이 도과되지 않은 전송대기 메시지 각각을 상기 담당 디바이스 관리 모듈로 전송하는, 메시지 처리 장치.
The method of claim 3,
Wherein the service management module is configured to transmit the transmission standby message that has not expired at the present time among the remaining transmission standby messages except for the transmission standby message selected when the reception confirmation message or the connection confirmation message of the responsible device management module is received To the responsible device management module.
상기 서비스 관리 모듈은, 상기 나머지 전송대기 메시지 중 현재 상기 유효 기간이 도과되지 않은 설정된 개수의 전송대기 메시지 각각을 순차적으로 전송하거나 상기 전송대기 메시지 각각을 설정된 크기 단위로 묶어서 전송하는, 메시지 처리 장치.
The method of claim 4,
Wherein the service management module sequentially transmits each of a predetermined number of transmission standby messages that have not reached the valid period of the remaining transmission standby messages or bundles the transmission standby messages in units of a predetermined size.
상기 서비스 관리 모듈이 메시지 송수신을 위한 복수의 스레드(thread)를 구비하는 경우,
상기 전송대기 메시지 각각을 전송하는 스레드는, 상기 전송대기 메시지의 전송 여부를 나타내는 데이터베이스의 설정을 활성화하고,
상기 스레드를 제외한 타 스레드는, 상기 전송대기 메시지 중 적어도 일부에 대한 수신 확인 메시지 또는 상기 담당 디바이스 관리 모듈의 연결 확인 메시지를 수신하는 경우 상기 데이터베이스를 참조하여 현재 상기 전송대기 메시지 각각이 전송되고 있음을 확인함에 따라 상기 전송대기 메시지 각각이 중복 전송되는 것을 방지하는, 메시지 처리 장치.
The method of claim 4,
When the service management module includes a plurality of threads for transmitting and receiving a message,
The thread transmitting the transmission standby message activates the setting of the database indicating whether the transmission standby message is transmitted,
If the thread other than the thread receives the acknowledgment message for at least a part of the transmission wait message or the connection acknowledgment message for the responsible device management module, it is determined that each transmission wait message is currently being transmitted Thereby preventing the transmission wait messages from being duplicated.
상기 서비스 관리 모듈은, 상기 디바이스 관리 모듈로부터 수신 메시지를 수신하는 경우 상기 수신 메시지의 아이디를 이용하여 상기 수신 메시지가 이미 처리된 메시지인지의 여부를 판단하고, 상기 수신 메시지가 이미 처리된 메시지가 아닌 것으로 판단되는 경우 상기 수신 메시지에 이전 메시지 아이디(previous message ID)가 존재하는지의 여부를 판단하는, 메시지 처리 장치.
The method according to claim 1,
Wherein the service management module determines whether the received message is already processed by using the ID of the received message when receiving the received message from the device management module, And judges whether or not a previous message ID exists in the received message if it is determined that the previous message ID exists.
상기 서비스 관리 모듈은, 상기 수신 메시지에 상기 이전 메시지 아이디가 존재하는 것으로 판단되는 경우 데이터베이스를 참조하여 상기 수신 메시지의 이전 메시지에 대한 처리가 완료되었는지의 여부를 판단하고, 상기 수신 메시지의 이전 메시지에 대한 처리가 완료되지 않은 것으로 판단되는 경우 상기 이전 메시지에 대한 상태 체크를 위한 체크 메시지를 상기 디바이스 관리 모듈로 전달하는, 메시지 처리 장치.
The method of claim 7,
The service management module determines whether the previous message of the received message has been processed by referring to the database if the previous message ID is found in the received message, And transmits a check message for status check of the previous message to the device management module when it is determined that the process for the previous message is not completed.
결정부에서, 상기 복수의 디바이스 관리 모듈 중 자신이 담당하는 하나 이상의 담당 디바이스 관리 모듈을 결정하는 단계;
처리부에서, 상기 담당 디바이스 관리 모듈로 전송되어야 할 전송대기 메시지가 복수 개 존재하는 경우 상기 전송대기 메시지의 생성 시각 및 설정된 유효 기간(TTL : Time To Live)을 기준으로 하나의 전송대기 메시지를 선택하는 단계; 및
상기 처리부에서, 선택된 상기 전송대기 메시지를 상기 담당 디바이스 관리 모듈로 전송하는 단계를 포함하는, 메시지 처리 방법.
1. A message processing method performed by a service management module connected to a plurality of device management modules via a network,
Determining at least one chargeable device management module in charge of the plurality of device management modules,
If there is a plurality of transmission wait messages to be transmitted to the responsible device management module, the processing unit selects one transmission wait message based on the generation time of the transmission wait message and the set time-to-live (TTL) step; And
And transmitting, at the processing unit, the selected transmission wait message to the responsible device management module.
상기 하나의 전송대기 메시지를 선택하는 단계는, 상기 복수의 전송대기 메시지 중 현재 상기 유효 기간이 도과되지 않으면서 상기 생성 시각이 가장 오래된 하나의 전송대기 메시지를 선택하는, 메시지 처리 방법.
The method of claim 9,
Wherein the selecting of the one transmission wait message selects one transmission wait message having the oldest generation time without exceeding the current validity period among the plurality of transmission standby messages.
선택된 상기 전송대기 메시지를 상기 담당 디바이스 관리 모듈로 전송하는 단계 이후,
상기 처리부에서, 상기 전송대기 메시지에 대한 수신 확인 메시지를 상기 디바이스 관리 모듈로부터 수신하는 경우 상기 디바이스 관리 모듈이 메시지 서버에 정상적으로 연결된 것으로 판단하는 단계를 더 포함하는, 메시지 처리 방법.
The method of claim 9,
After transmitting the selected transmission wait message to the responsible device management module,
Further comprising the step of the processor determining that the device management module is normally connected to the message server when receiving an acknowledgment message for the transmission standby message from the device management module.
선택된 상기 전송대기 메시지를 상기 담당 디바이스 관리 모듈로 전송하는 단계 이후,
상기 처리부에서, 상기 수신 확인 메시지 또는 설정된 상기 담당 디바이스 관리 모듈의 연결 확인 메시지를 수신하는 경우 선택된 상기 전송대기 메시지를 제외한 나머지 전송대기 메시지 중 현재 상기 유효 기간이 도과되지 않은 전송대기 메시지 각각을 상기 담당 디바이스 관리 모듈로 전송하는 단계를 더 포함하는, 메시지 처리 방법.
The method of claim 11,
After transmitting the selected transmission wait message to the responsible device management module,
When the reception confirmation message or the connection confirmation message of the responsible device management module is received, in the processing unit, among the remaining transmission standby messages except for the selected transmission standby message, each of the transmission standby messages, And sending the message to the device management module.
상기 전송대기 메시지 각각을 상기 담당 디바이스 관리 모듈로 전송하는 단계는, 상기 나머지 전송대기 메시지 중 현재 상기 유효 기간이 도과되지 않은 설정된 개수의 전송대기 메시지 각각을 순차적으로 전송하거나 상기 전송대기 메시지 각각을 설정된 크기 단위로 묶어서 전송하는, 메시지 처리 방법.
The method of claim 12,
Wherein the step of transmitting each of the transmission standby messages to the corresponding device management module comprises the steps of sequentially transmitting each of the remaining transmission standby messages and a predetermined number of transmission standby messages not exceeding the valid period, A method for processing a message, the method comprising:
상기 서비스 관리 모듈이 메시지 송수신을 위한 복수의 스레드(thread)를 구비하는 경우,
상기 전송대기 메시지 각각을 상기 담당 디바이스 관리 모듈로 전송하는 단계는,
상기 전송대기 메시지 각각을 전송하는 스레드에서, 상기 전송대기 메시지의 전송 여부를 나타내는 데이터베이스의 설정을 활성화하는 단계; 및
상기 스레드를 제외한 타 스레드는, 상기 전송대기 메시지 중 적어도 일부에 대한 수신 확인 메시지 또는 상기 담당 디바이스 관리 모듈의 연결 확인 메시지를 수신하는 경우 상기 데이터베이스를 참조하여 현재 상기 전송대기 메시지 각각이 전송되고 있음을 확인함에 따라 상기 전송대기 메시지 각각이 중복 전송되는 것을 방지하는 단계를 포함하는, 메시지 처리 방법.
The method of claim 12,
When the service management module includes a plurality of threads for transmitting and receiving a message,
Wherein the step of transmitting each of the transmission wait messages to the responsible device management module comprises:
Activating, in a thread for transmitting each of the transmission wait messages, a setting of a database indicating whether or not the transmission wait message is transmitted; And
If the thread other than the thread receives the acknowledgment message for at least a part of the transmission wait message or the connection acknowledgment message for the responsible device management module, it is determined that each transmission wait message is currently being transmitted And preventing each of the transmission wait messages from being duplicated upon acknowledgment.
상기 처리부에서, 상기 디바이스 관리 모듈로부터 수신 메시지를 수신하는 경우 상기 수신 메시지의 아이디를 이용하여 상기 수신 메시지가 이미 처리된 메시지인지의 여부를 판단하는 단계; 및
상기 처리부에서, 상기 수신 메시지가 이미 처리된 메시지가 아닌 것으로 판단되는 경우 상기 수신 메시지에 이전 메시지 아이디(previous message ID)가 존재하는지의 여부를 판단하는 단계를 더 포함하는, 메시지 처리 방법.
The method of claim 9,
Determining whether the received message is a processed message using the ID of the received message when the processing unit receives the received message from the device management module; And
Further comprising the step of determining whether a previous message ID is present in the received message if the processing unit determines that the received message is not a processed message.
상기 수신 메시지에 상기 이전 메시지 아이디가 존재하는지의 여부를 판단하는 단계 이후,
상기 처리부에서, 상기 수신 메시지에 상기 이전 메시지 아이디가 존재하는 것으로 판단되는 경우 데이터베이스를 참조하여 상기 수신 메시지의 이전 메시지에 대한 처리가 완료되었는지의 여부를 판단하는 단계; 및
상기 처리부에서, 상기 수신 메시지의 이전 메시지에 대한 처리가 완료되지 않은 것으로 판단되는 경우 상기 이전 메시지에 대한 상태 체크를 위한 체크 메시지를 상기 디바이스 관리 모듈로 전달하는 단계를 더 포함하는, 메시지 처리 방법.
16. The method of claim 15,
After determining whether the previous message ID is present in the received message,
Determining whether the processing of the previous message of the received message is completed with reference to the database when the processing unit determines that the previous message ID exists in the received message; And
Further comprising the step of, when the processing unit determines that processing of the previous message of the received message is not completed, transmitting a check message for status check of the previous message to the device management module.
상기 복수의 디바이스 관리 모듈 중 자신이 담당하는 하나 이상의 담당 디바이스 관리 모듈을 결정하는 결정부; 및
상기 담당 디바이스 관리 모듈로 전송되어야 할 전송대기 메시지가 복수 개 존재하는 경우 상기 전송대기 메시지의 생성 시각 및 설정된 유효 기간(TTL : Time To Live)을 기준으로 하나의 전송대기 메시지를 선택하고, 상기 처리부에서, 선택된 상기 전송대기 메시지를 상기 담당 디바이스 관리 모듈로 전송하는 처리부를 포함하는, 서비스 관리 모듈.A service management module connected to a plurality of device management modules via a network,
A determination unit that determines one or more responsible device management modules of the plurality of device management modules that are responsible for the plurality of device management modules; And
When a plurality of transmission wait messages to be transmitted to the responsible device management module exist, selects one transmission wait message based on the generation time of the transmission wait message and the set time-to-live (TTL) And a processing unit for transmitting the selected transmission wait message to the corresponding device management module.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020170180462A KR102284874B1 (en) | 2017-12-27 | 2017-12-27 | Message processing apparatus and method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020170180462A KR102284874B1 (en) | 2017-12-27 | 2017-12-27 | Message processing apparatus and method |
Publications (2)
Publication Number | Publication Date |
---|---|
KR20190078787A true KR20190078787A (en) | 2019-07-05 |
KR102284874B1 KR102284874B1 (en) | 2021-07-30 |
Family
ID=67224921
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR1020170180462A KR102284874B1 (en) | 2017-12-27 | 2017-12-27 | Message processing apparatus and method |
Country Status (1)
Country | Link |
---|---|
KR (1) | KR102284874B1 (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20040096193A (en) * | 2003-05-07 | 2004-11-16 | 주식회사 케이티프리텔 | Method for controlling a duplicated message in highly available system |
KR20050069902A (en) * | 2003-12-29 | 2005-07-05 | 한국전자통신연구원 | Method for retransmitting packet in mobile communication system and computer-readable medium recorded program thereof |
KR20100010191A (en) * | 2008-07-22 | 2010-02-01 | 삼성중공업 주식회사 | Method for reliability of transferring data in a network |
KR20140056452A (en) * | 2012-10-25 | 2014-05-12 | 삼성에스디에스 주식회사 | Apparatus and method for retransmitting message in message transmission system |
KR20170087116A (en) | 2016-01-19 | 2017-07-28 | 명지대학교 산학협력단 | Security monitoring system for mobile device and method of security monitoring for mobile device using it |
-
2017
- 2017-12-27 KR KR1020170180462A patent/KR102284874B1/en active IP Right Grant
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20040096193A (en) * | 2003-05-07 | 2004-11-16 | 주식회사 케이티프리텔 | Method for controlling a duplicated message in highly available system |
KR20050069902A (en) * | 2003-12-29 | 2005-07-05 | 한국전자통신연구원 | Method for retransmitting packet in mobile communication system and computer-readable medium recorded program thereof |
KR20100010191A (en) * | 2008-07-22 | 2010-02-01 | 삼성중공업 주식회사 | Method for reliability of transferring data in a network |
KR20140056452A (en) * | 2012-10-25 | 2014-05-12 | 삼성에스디에스 주식회사 | Apparatus and method for retransmitting message in message transmission system |
KR20170087116A (en) | 2016-01-19 | 2017-07-28 | 명지대학교 산학협력단 | Security monitoring system for mobile device and method of security monitoring for mobile device using it |
Also Published As
Publication number | Publication date |
---|---|
KR102284874B1 (en) | 2021-07-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8769262B2 (en) | VPN connection system and VPN connection method | |
CN110413424B (en) | Configurable third-party message callback method, device, server and storage medium | |
KR102398502B1 (en) | Electronic device for processing a message and operating method thereof | |
CN101720478A (en) | High availability transport | |
CN110413425B (en) | Third-party message callback method, device, server and storage medium | |
US20130191484A1 (en) | Mail transfer system, mail gateway and data store server | |
CN102647365A (en) | Method and device for processing message and message status and data exchange server | |
CN109120385B (en) | Data transmission method, device and system based on data transmission system | |
US20060089164A1 (en) | Method and system for transmitting MMS notification message | |
US11582320B2 (en) | Message transmitting and receiving method, communication apparatus, and program | |
US20110060957A1 (en) | Reliable Messaging Using Publish Subscribe Mechanism | |
CN103647622A (en) | Method, apparatus and system for realizing computer room-spanning data transmission | |
JP2009212796A (en) | Transmitter, data transfer system, data transfer method, and data transfer program | |
KR102284874B1 (en) | Message processing apparatus and method | |
KR20190086922A (en) | Message processing apparatus and method | |
KR101758337B1 (en) | Method for preventing overlap notice of message, storing medium and user device implementing the same | |
CN113992740B (en) | Middleware based on autonomous control and data transmission method | |
JP6999056B2 (en) | Message management device and message management method | |
KR101996239B1 (en) | Message processing system and method | |
KR20190113200A (en) | Message server and message processing apparatus including the same | |
CN106921619B (en) | Associated event processing method and device | |
KR102258895B1 (en) | Village broadcasting system and village broadcasting method | |
CN114816785A (en) | Service data processing method and device, electronic equipment and storage medium | |
US10992634B2 (en) | Message server and message processing apparatus for relaying application service message | |
JP6182779B1 (en) | Transfer device, transfer method, and program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A201 | Request for examination | ||
E902 | Notification of reason for refusal | ||
E701 | Decision to grant or registration of patent right | ||
GRNT | Written decision to grant |