KR20190078787A - Message processing apparatus and method - Google Patents

Message processing apparatus and method Download PDF

Info

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
Application number
KR1020170180462A
Other languages
Korean (ko)
Other versions
KR102284874B1 (en
Inventor
장은수
장경래
최민정
정민규
박하진
이효중
심진아
정현명
노세혁
황순형
Original Assignee
삼성에스디에스 주식회사
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 삼성에스디에스 주식회사 filed Critical 삼성에스디에스 주식회사
Priority to KR1020170180462A priority Critical patent/KR102284874B1/en
Publication of KR20190078787A publication Critical patent/KR20190078787A/en
Application granted granted Critical
Publication of KR102284874B1 publication Critical patent/KR102284874B1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/21Monitoring or handling of messages
    • H04L51/226Delivery according to priorities
    • H04L51/26
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/28Flow control; Congestion control in relation to timing considerations
    • H04L47/286Time to live
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/07User-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/18Commands or executable codes

Abstract

Provided are a message processing apparatus and method. According to an embodiment of the present invention, the message processing apparatus comprises: a plurality of device management modules; and a service management module for determining at least one device management module, that the service management module is in charge of, among the plurality of device management modules, selecting one transmission standby message based on a message generation time and a set time to live (TTL) when there are a plurality of transmission standby messages to be transmitted to the assigned device management module, and transmitting the selected transmission standby message to the assigned device management module.

Description

메시지 처리 장치 및 방법{MESSAGE PROCESSING APPARATUS AND METHOD}[0001] MESSAGE PROCESSING APPARATUS AND METHOD [0002]

본 발명의 실시예들은 메시지 처리 장치 및 방법에 관한 것으로, 특히 메시지의 재전송 및 중복 전송 처리 기술과 관련된다.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.

한국공개특허공보 제10-2017-0087116호(2017.07.28)Korean Patent Publication No. 10-2017-0087116 (July 27, 2017)

본 발명의 실시예들은 메시지 재전송 및 중복 처리를 효율적으로 수행하여 시스템 부하를 최소화하기 위한 것이다.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 message processing apparatus 100 according to an embodiment of the present invention. 1, the message processing apparatus 100 according to an exemplary embodiment of the present invention includes a service management module 102, a device management module 104, a message server 106, and a third party message server 108. [ . The message processing apparatus 100 is a system for processing message transmission / reception between a plurality of device management modules 104 and a plurality of service management modules 102. Hereinafter, the service management module 102 generates a message And transmits the message to the device management module 104 and receives an acknowledgment message for the message from the device management module 104. [ However, the present invention is not limited thereto, and the device management module 104 may generate a message, transmit the message to the service management module 102, and receive an acknowledgment message for the message from the service management module 102. The service management module 102 and the device management module 104 may be referred to as a message processing module, one of which is referred to as a first message processing module, and the other of which is referred to as a second message processing module. Hereinafter, the detailed configuration of the message processing apparatus 100 will be described in detail.

서비스 관리 모듈(102)은 애플리케이션 서버(미도시) 측 컴포넌트로서, 애플리케이션 서버와 메시지 서버(106) 사이에서 애플리케이션 서비스와 관련된 각종 메시지를 송수신한다. 본 발명의 실시예들에 있어서, 애플리케이션 서버는 애플리케이션 서비스를 디바이스(미도시)로 제공하기 위한 서버이다. 상기 애플리케이션 서비스는 예를 들어, 디바이스의 카메라 제어, 마이크 제어, 녹음 기능 제어 등과 같은 보안 관련 서비스가 될 수 있으나, 이는 일 예시에 불과할 뿐 애플리케이션 서비스가 특별히 한정되는 것은 아니다. 또한, 상기 메시지는 예를 들어, 상술한 애플리케이션 서비스를 디바이스에서 실행시키기 위한 제어 메시지, 상기 제어 메시지에 대한 수신 확인 메시지(즉, ACK 메시지) 등이 될 수 있다.The service management module 102 is an application server (not shown) side component, and transmits and receives various messages related to the application service between the application server and the message server 106. In embodiments of the present invention, the application server is a server for providing application services to a device (not shown). The application service may be, for example, a security related service such as a camera control of a device, a microphone control, a recording function control, or the like, but this is merely an example, and the application service is not particularly limited. In addition, the message may be, for example, a control message for executing the above-described application service in the device, an acknowledgment message for the control message (i.e., an ACK message), and the like.

서비스 관리 모듈(102)은 애플리케이션 서버와 메시지 서버(106) 사이에서 메시지를 송수신함으로써 애플리케이션 서버에게 메시지 전송에 대한 신뢰성을 제공할 수 있다. 구체적으로, 서비스 관리 모듈(102)은 애플리케이션 서버의 메시지 생성 요청에 따라 애플리케이션 서비스와 관련된 메시지를 생성하여 데이터베이스(미도시)에 저장하고, 상기 메시지를 메시지 서버(106)를 통해 디바이스 관리 모듈(104)로 전송할 수 있다. 이때, 상기 메시지 생성 요청에는 상기 메시지의 수신자 정보(예를 들어, 디바이스 관리 모듈(104)의 식별 정보), 상기 메시지와 관련된 애플리케이션 서비스의 식별 정보 등이 포함될 수 있다. 서비스 관리 모듈(102)은 상기 메시지 생성 요청에 따라 메시지 아이디를 생성하고, 상기 메시지 아이디에 대응되는 메시지를 생성할 수 있다. 여기서, 상기 메시지는 메시지 아이디, 발신자 주소(source address), 수신자 주소(destination address), 경유자(via) 정보, 이전에 전송된 메시지의 아이디(이하, “이전 메시지 아이디”라 함), 유효 기간(TTL : Time To Live), 생성 시각, 애플리케이션 서비스의 식별 정보 등을 포함할 수 있다. 또한, 서비스 관리 모듈(102)은 애플리케이션 서버로부터 전송 순서(transmission sequence)를 가진 메시지의 생성 요청을 수신할 수 있으며, 상기 생성 요청에 따라 설정된 순서대로 순차적으로 전송되는 메시지(이하, “순서보장 메시지”라 함)를 생성할 수 있다. The service management module 102 may provide reliability to the application server by sending and receiving messages between the application server and the message server 106. [ Specifically, the service management module 102 generates a message related to the application service according to the message generation request of the application server, stores the message in a database (not shown), and transmits the message to the device management module 104 ). At this time, the message creation request may include recipient information of the message (for example, identification information of the device management module 104), identification information of an application service related to the message, and the like. The service management module 102 may generate a message ID according to the message creation request, and may generate a message corresponding to the message ID. Here, the message includes at least one of a message ID, a source address, a destination address, via information, an ID of a previously transmitted message (hereinafter, referred to as a "previous message ID" (TTL: Time To Live), a creation time, identification information of an application service, and the like. In addition, the service management module 102 may receive a request for generating a message having a transmission sequence from an application server, and may sequentially transmit a message (hereinafter referred to as an "Quot;) can be generated.

서비스 관리 모듈(102)은 상기 순서보장 메시지의 생성 요청에 따라 데이터베이스를 참조하여 상기 메시지의 이전 메시지의 아이디(즉, 이전 메시지 아이디)를 확인하고, 자신의 메시지 아이디를 생성할 수 있다. 이후, 서비스 관리 모듈(102)은 상기 메시지 아이디 및 상기 이전 메시지 아이디를 포함하는 메시지를 생성할 수 있다. The service management module 102 may check the ID of the previous message of the message (i.e., the previous message ID) by referring to the database in response to the request for generating the order guarantee message, and may generate the message ID of the message. Then, the service management module 102 may generate a message including the message ID and the previous message ID.

여기서, 이전 메시지는 상기 메시지의 바로 이전에 처리(예를 들어, 전송 또는 수신)되어야 할 메시지를 의미한다. 서비스 관리 모듈(102)은 메시지를 생성할 때마다 데이터베이스에 기록된 메시지 아이디 중 마지막으로 기록된 메시지 아이디를 상기 이전 메시지 아이디로 판단할 수 있다. 이때, 상기 메시지 아이디는 각 디바이스 및 각 애플리케이션(또는 각 애플리케이션 클라이언트) 별로 구별되어 데이터베이스에 기록(또는 저장)될 수 있다. 서비스 관리 모듈(102)은 상기 이전 메시지 아이디를 상기 메시지의 헤더(header)에 저장할 수 있다. 만약, 상기 이전 메시지가 존재하지 않는 경우, 서비스 관리 모듈(102)은 자신의 메시지 아이디를 상기 메시지의 헤더에 저장할 수 있다. Here, the previous message means a message to be processed (e.g., transmitted or received) immediately before the message. The service management module 102 may determine the last recorded message ID among the message IDs recorded in the database each time the message is generated. At this time, the message ID can be recorded (or stored) in the database by being distinguished for each device and each application (or each application client). The service management module 102 may store the previous message ID in a header of the message. If the previous message does not exist, the service management module 102 may store its own message ID in the header of the message.

예를 들어, 서비스 관리 모듈(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 service management module 102 wants to transmit a message relating to the A application to the b device, the service management module 102 refers to the database and determines that the last recorded message ID, -1 ". Accordingly, the service management module 102 can generate its own message ID " A-b-2 ", and transmit a message including the message ID and the previous message ID to the b-device. The device management module 104 of the device b may then determine whether the processing of the previous message of the message is completed using the previous message ID included in the received message. If it is determined that the process of the previous message of the received message is not completed, the device management module 104 may transmit a check message for checking the status of the previous message to the service management module 102. In the above example, when a message having the message ID "Ab-2" is transmitted to the b-device, the device management module 104 confirms the previous message ID "Ab-1" included in the message, It is possible to determine whether or not the processing for the previous message corresponding to the message has been completed. If it is determined that the process of the previous message has not been completed yet, the device management module 104 may transmit a check message for checking the status of the previous message to the service management module 102. The check message may include, for example, an ID of the previous message, a status check and retransmission request of the previous message, a status check of an application related to the previous message, identification information of a device transmitting the check message, . The service management module 102 may receive the check message from the device management module 104 and may transmit a response to the check message to the device management module 104.

또한, 서비스 관리 모듈(102)은 설정된 시간 이내에 상기 메시지에 대한 수신 확인 메시지(즉, ACK 메시지)를 디바이스 관리 모듈(104)로부터 수신하는지 여부에 따라 상기 메시지를 재전송하거나 삭제할 수 있다. 일 예시로서, 서비스 관리 모듈(102)은 설정된 시간 이내에 상기 메시지에 대한 수신 확인 메시지를 수신하지 않는 경우 상기 메시지를 재전송할 수 있다. 다른 예시로서, 서비스 관리 모듈(102)은 설정된 시간 이내에 상기 메시지에 대한 수신 확인 메시지를 수신하는 경우 데이터베이스에 저장된 상기 메시지를 삭제할 수 있다. 이하에서는, 설명의 편의상 이와 같이 재전송 예정인(즉, pending 중인) 메시지를 “전송대기 메시지”라 칭하기로 한다. In addition, the service management module 102 may retransmit or delete the message according to whether it receives an acknowledgment message (i.e., an ACK message) for the message from the device management module 104 within a predetermined time. As an example, the service management module 102 may resend the message if it does not receive an acknowledgment message for the message within the set time. As another example, the service management module 102 may delete the message stored in the database when receiving the acknowledgment message for the message within the set time. Hereinafter, a message to be retransmitted (i.e., pending) is referred to as a " transmission standby message "

한편, 이러한 서비스 관리 모듈(102)은 부하 분산을 위해 복수 개 존재(즉, 멀티 인스턴스로 존재)할 수 있으며, 각 서비스 관리 모듈(102)은 서로 다른 아이디(즉, 인스턴스 아이디)를 가질 수 있다. 또한, 동일한 애플리케이션 서비스를 처리하는 서비스 관리 모듈(102)은 동일한 그룹 내에 속하게 되며, 동일한 그룹 아이디를 가질 수 있다. 또한, 서비스 관리 모듈(102) 및 애플리케이션 서버는 제1 네트워크에 위치할 수 있다. 본 실시예들에 있어서, 제1 네트워크는 예를 들어, 특정 조직 또는 기업의 인트라넷(intranet)일 수 있다.A plurality of service management modules 102 may exist for load balancing and each service management module 102 may have a different ID (i.e., an instance ID) . In addition, the service management module 102, which processes the same application service, belongs to the same group and can have the same group ID. In addition, the service management module 102 and the application server may be located in the first network. In the present embodiments, the first network may be, for example, an intranet of a particular organization or enterprise.

서비스 관리 모듈(102)은 디바이스 관리 모듈(104) 각각의 아이디 및 서비스 관리 모듈(102)의 전체 개수를 이용하여 복수의 디바이스 관리 모듈(104) 중 자신이 담당하는 하나 이상의 담당 디바이스 관리 모듈을 결정하며, 자신의 담당 디바이스 관리 모듈에 대한 전송대기 메시지만을 재전송할 수 있다. 이때, 서비스 관리 모듈(102)은 디바이스 관리 모듈(104) 각각의 아이디에 대한 해시값을 서비스 관리 모듈(102)의 전체 개수로 모듈러(modulus) 연산하여 디바이스 관리 모듈(104) 각각에 대한 모듈러 연산값을 계산하고, 상기 모듈러 연산값과 자신의 식별 번호를 참조하여 상기 담당 디바이스 관리 모듈을 결정할 수 있다. The service management module 102 determines one or more responsible charge management modules of the plurality of device management modules 104 by using the ID of each of the device management modules 104 and the total number of the service management modules 102 , And can only retransmit the transmission wait message to its responsible device management module. At this time, the service management module 102 performs a modulus operation on the hash values of the IDs of the device management modules 104 to the total number of the service management modules 102, and performs a modular operation And determine the responsible device management module by referring to the modular operation value and its own identification number.

일 예시로서, 서비스 관리 모듈(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 service management modules 102, the service management module # 0 processes the transfer wait messages for the device management modules 3, 6 and 9, and the service management module # And the service management module # 2 may process the transfer wait message for the device management modules 2, 5, At this time, when there are a plurality of transmission standby messages for each chargeable device management module managed by the service management module 102, the service management module 102 transmits the plurality of transmission standby messages to the corresponding chargeable device management module do. However, when the responsible device management module can not normally receive the transmission wait message (for example, the terminal in which the device management module or the device management module is installed is in an off state or their network connection is not normally established) Unnecessary resources may be wasted if a plurality of transmission wait messages for the responsible device management module are all transmitted. In this case, even if the responsible device management module switches to a state in which the transmission standby message can be normally received, the reception acknowledgment of the already transmitted transmission standby message is not performed in time, have. Accordingly, in the present embodiment, when there are a plurality of transmission wait messages to be transmitted to the device management module 104 in order to solve such a problem, the service management module 102 determines the generation time and the validity period of the transmission wait message Only one transmission standby message is selected and the selected transmission standby message is transmitted to the device management module 104 first.

일 예시로서, 디바이스 관리 모듈 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 device management module 3, the service management module # 0 transmits the transmission outstanding messages to the device management module 3 based on the generation time of the transmission outstanding messages and the valid period of the transmission outstanding messages A single message waiting to be transmitted can be selected. Specifically, the service management module 102 may select one of the transmission wait messages, which is the oldest generation time without exceeding the current valid period. In the above example, the service management module # 0 selects the transmission wait message # 3 having the oldest generation time without exceeding the current validity period (for example, until 2017.05.10) among the 100 transmission wait messages, Only the waiting message # 3 can be transmitted (i.e., retransmitted) to the device management module 3. The reason why the transmission standby message having the oldest generation time is transmitted first is to match the transmission sequence, that is, the sequence number of the transmission standby message, when the remaining transmission standby messages are transmitted in the future.

만약, 서비스 관리 모듈(102)이 전송된 상기 전송대기 메시지에 대한 수신 확인 메시지를 디바이스 관리 모듈(104)로부터 수신(또는 디바이스 관리 모듈(104)의 연결 확인 메시지를 메시지 서버(106)로부터 수신)하는 경우, 서비스 관리 모듈(102)은 상기 디바이스 관리 모듈(104)이 메시지 서버(106)에 정상적으로 연결된 것(즉, 나머지 전송대기 메시지 또한 수신할 준비가 된 것)으로 판단할 수 있다.If the service management module 102 receives an acknowledgment message from the device management module 104 (or receives a connection confirmation message from the message management server 104) from the message server 106, The service management module 102 may determine that the device management module 104 is normally connected to the message server 106 (that is, the remaining transmission wait message is also ready to be received).

즉, 본 발명의 실시예들에 따르면, 재전송 예정인(즉, 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 device management module 104 with less load by transmitting only the transmission standby message selected by selecting one transmission standby message.

또한, 서비스 관리 모듈(102)이 전송된 상기 전송대기 메시지에 대한 수신 확인 메시지를 디바이스 관리 모듈(104)로부터 수신하는 경우, 서비스 관리 모듈(102)은 선택된 상기 전송대기 메시지를 제외한 나머지 전송대기 메시지 중 현재 상기 유효 기간이 도과되지 않은 전송대기 메시지 각각을 디바이스 관리 모듈(104)로 전송할 수 있다. 위 예시에서, 서비스 관리 모듈 #0은 상기 전송대기 메시지 #3에 대한 수신 확인 메시지를 디바이스 관리 모듈 3으로부터 수신하는 경우 전송대기 메시지 #3을 제외한 나머지 전송대기 메시지 중 현재 상기 유효 기간이 도과되지 않은 전송대기 메시지 각각을 디바이스 관리 모듈 3으로 전송할 수 있다.In addition, when the service management module 102 receives an acknowledgment message for the transfer standby message from the device management module 104, the service management module 102 stores the transfer standby message except for the selected transfer standby message To the device management module 104, each of the transmission wait messages that have not yet expired. In the above example, when the service management module # 0 receives the acknowledgment message for the transmission standby message # 3 from the device management module 3, among the remaining transmission standby messages except the transmission standby message # 3, the service management module # Each of the transfer waiting messages may be transmitted to the device management module 3. [

이때, 서비스 관리 모듈(102)은 상기 나머지 전송대기 메시지 중 현재 상기 유효 기간이 도과되지 않은 설정된 개수의 전송대기 메시지 각각을 순차적으로 전송하거나 상기 전송대기 메시지 각각을 설정된 크기 단위로 묶어서 전송할 수 있다. 일 예시로서, 서비스 관리 모듈(102)은 상기 나머지 전송대기 메시지 중 현재 상기 유효 기간이 도과되지 않은 전송대기 메시지들을 설정된 개수 단위(예를 들어, 100개씩)로 대량 전송, 즉 벌크 메시지(bulk message) 형태로 전송할 수 있다. 다른 예시로서, 서비스 관리 모듈(102)은 상기 나머지 전송대기 메시지 중 현재 상기 유효 기간이 도과되지 않은 전송대기 메시지들을 설정된 크기 단위(예를 들어, 5MB 단위)로 묶어서 전송할 수 있다. 이 경우, 디바이스 관리 모듈(104)은 상기 전송대기 메시지 각각을 분리하여 각 전송대기 메시지별 ACK 메시지를 서비스 관리 모듈(102)로 전송할 수 있다. 또한, 디바이스 관리 모듈(104)은 상기 ACK 메시지 또한 설정된 크기 단위로 묶어서 서비스 관리 모듈(102)로 전송할 수 있다.At this time, the service management module 102 may sequentially transmit a predetermined number of transmission wait messages, which are not valid yet, among the remaining transmission wait messages, or may transmit the transmission standby messages in units of a predetermined size. As an example, the service management module 102 may perform bulk transmission of the transmission standby messages that have not been validated at the present time among the remaining transmission standby messages in a predetermined number of units (for example, 100), that is, a bulk message ). ≪ / RTI > As another example, the service management module 102 may group the transmission wait messages, which are not yet valid, among the remaining transmission wait messages in a predetermined size unit (for example, 5 MB units). In this case, the device management module 104 may separate each of the transmission standby messages and transmit an ACK message for each transmission standby message to the service management module 102. The device management module 104 may also transmit the ACK message to the service management module 102 in units of a set size.

또한, 서비스 관리 모듈(102)은 메시지 송수신을 위한 복수의 스레드(thread)를 구비할 수 있다. 이 경우, 각 스레드는 하나 이상의 전송대기 메시지를 전송하고, 이에 대한 수신 확인 메시지를 수신할 수 있다. 이때, 각 스레드는 전송대기 메시지가 중복으로 전송되는 것을 방지하기 위해 메시지 전송시 데이터베이스에 메시지 전송 여부를 설정할 수 있다. 구체적으로, 전송대기 메시지를 전송하는 스레드는 전송대기 메시지의 전송 여부를 나타내는 데이터베이스의 설정을 활성화(즉, 현재 전송대기 메시지가 전송 중임을 설정)할 수 있다. 이후, 상기 스레드, 즉 전송대기 메시지 각각을 전송하는 스레드를 제외한 타 스레드는 상기 전송대기 메시지 중 적어도 일부에 대한 수신 확인 메시지(또는 디바이스 관리 모듈(104)의 연결 확인 메시지)를 수신하는 경우 상기 데이터베이스를 참조하여 현재 상기 전송대기 메시지 각각이 전송되고 있음을 확인할 수 있으며, 이에 따라 전송대기 메시지 각각을 중복 전송하지 않게 된다.In addition, the service management module 102 may have a plurality of threads for sending and receiving messages. In this case, each thread may send one or more send wait messages and receive acknowledgment messages therefrom. At this time, each thread can set whether or not to transmit a message to the database when the message is transmitted in order to prevent the transmission standby message from being transmitted in duplicate. Specifically, the thread transmitting the transmission standby message can activate the setting of the database indicating whether the transmission standby message is transmitted (that is, setting that the current transmission standby message is being transmitted). If a thread other than the thread transmitting the thread, i.e., the transmission wait message, receives an acknowledgment message (or a connection acknowledgment message of the device management module 104) for at least a part of the transmission wait message, It can be confirmed that each of the transmission wait messages is currently being transmitted. Accordingly, the transmission wait messages are not transmitted repeatedly.

일 예시로서, 서비스 관리 모듈 #0의 스레드 #1이 전송대기 메시지 #1~100 중 #1~10을 디바이스 관리 모듈 3으로 전송한 상태에서 서비스 관리 모듈 #0의 스레드 #2가 전송대기 메시지 #2에 대한 수신 확인 메시지를 수신하는 경우, 스레드 #2는 데이터베이스를 참조하여 현재 상기 전송대기 메시지 각각이 전송되고 있음을 확인할 수 있으며, 이에 따라 전송대기 메시지 #11~20을 전송하지 않고 메시지 송수신 프로세스를 그대로 종료할 수 있다. 이 경우, 스레드 #1은 전송대기 메시지 #11~20을 디바이스 관리 모듈 3으로 정상적으로 전송할 수 있게 된다.As an example, when the thread # 1 of the service management module # 0 transmits # 1 to # 10 of the transmission standby messages # 1 to # 100 to the device management module 3, the thread # 2 of the service management module # 2, the thread # 2 can confirm that each of the transmission standby messages is currently being transmitted by referring to the database. Accordingly, the transmission of the transmission standby messages # 11 to # As shown in FIG. In this case, the thread # 1 can normally transmit the transfer wait messages # 11 to # 20 to the device management module 3.

디바이스 관리 모듈(104)은 디바이스 측 컴포넌트로서, 디바이스에 설치된 애플리케이션 클라이언트(미도시)와 메시지 서버(106) 사이에서 애플리케이션 서비스와 관련된 각종 메시지를 송수신한다. 본 발명의 실시예들에 있어서, 디바이스는 사용자가 소지하는 단말로서, 예를 들어 스마트폰, 노트북, 태블릿 PC 등과 같은 모바일 단말일 수 있다. 또한, 애플리케이션 클라이언트는 디바이스에 설치되어 애플리케이션 서버에서 제공되는 애플리케이션 서비스를 디바이스에서 실행시키기 위한 모듈이다. The device management module 104, as a device-side component, transmits and receives various messages related to the application service between the application client (not shown) installed in the device and the message server 106. In embodiments of the present invention, the device may be a terminal carried by the user, for example, a mobile terminal such as a smart phone, a notebook, a tablet PC, or the like. Further, the application client is a module installed in the device and causing the device to execute the application service provided by the application server.

디바이스 관리 모듈(104)은 메시지 서버(106)를 통해 서비스 관리 모듈(102)로부터 애플리케이션 서비스와 관련된 메시지를 수신하고, 메시지 서버(106)를 통해 상기 메시지에 대한 수신 확인 메시지(즉, ACK 메시지)를 서비스 관리 모듈(102)로 전송할 수 있다. 또한, 디바이스 관리 모듈(104)은 서비스 관리 모듈(102)로부터 메시지를 수신하는 경우 상기 메시지가 이미 처리된 메시지인지의 여부를 판단하고, 상기 메시지가 이미 처리된 메시지가 아닌 것으로 판단되는 경우 상기 메시지가 상술한 순서보장 메시지인지의 여부(즉, 상기 메시지에 이전 메시지 아이디가 존재하는지의 여부)를 판단한다. 만약, 상기 메시지가 상술한 순서보장 메시지인 것으로 판단되는 경우, 디바이스 관리 모듈(104)은 데이터베이스를 참조하여 상기 메시지의 이전 메시지에 대한 처리가 완료되었는지의 여부를 판단하고, 상기 메시지의 이전 메시지에 대한 처리가 완료되지 않은 것으로 판단되는 경우 상기 이전 메시지에 대한 상태 체크를 위한 체크 메시지를 서비스 관리 모듈(102)로 전송할 수 있다. 또한, 디바이스 관리 모듈(104)은 메시지 전송 취소, 보안을 위한 인증 정보 관리 등과 같은 부가 기능을 수행할 수 있다.The device management module 104 receives a message associated with the application service from the service management module 102 via the message server 106 and transmits an acknowledgment message (i.e., an ACK message) To the service management module 102. When receiving a message from the service management module 102, the device management module 104 determines whether or not the message is already processed. If the message is determined not to be a processed message, (That is, whether or not a previous message ID is present in the message). If it is determined that the message is the above-described order guarantee message, the device management module 104 refers to the database to determine whether processing of the previous message of the message is completed, It may transmit a check message for checking the state of the previous message to the service management module 102. In addition, the device management module 104 may perform additional functions such as cancellation of message transmission, management of authentication information for security, and the like.

이러한 디바이스 관리 모듈(104)은 각 디바이스별로 하나 이상 존재할 수 있으며, 각 디바이스 관리 모듈(104)은 서로 다른 아이디를 가질 수 있다. 디바이스는 디바이스 관리 모듈(104)을 최초로 활성화하는 과정에서 메시지 서버(106)로부터 해당 디바이스 관리 모듈(104)의 아이디를 할당 받을 수 있다. 또한, 디바이스 관리 모듈(104) 및 상기 디바이스 관리 모듈(104)이 설치된 디바이스는 제2 네트워크에 위치할 수 있다. 본 실시예들에 있어서, 제2 네트워크는 제1 네트워크의 외부 영역으로서, 예를 들어 인터넷(internet)일 수 있다.At least one such device management module 104 may exist for each device, and each device management module 104 may have a different ID. The device can be assigned the ID of the device management module 104 from the message server 106 in the process of activating the device management module 104 for the first time. In addition, the device in which the device management module 104 and the device management module 104 are installed may be located in the second network. In the present embodiments, the second network may be an outside area of the first network, for example, the Internet.

메시지 서버(106)는 서비스 관리 모듈(102)과 디바이스 관리 모듈(104) 사이에서 애플리케이션 서비스와 관련된 메시지를 중계(또는 양방향 전송)하는 서버이다. 이때, 메시지 서버(106)는 제1 네트워크와 제2 네트워크 사이의 DMZ(Demilitarized Zone)에 위치할 수 있다. DMZ는 제1 네트워크와 제2 네트워크 사이에 위치한 서브 네트워크로서, 제1 네트워크와 DMZ 사이에는 방화벽이 존재할 수 있다.The message server 106 is a server that relays (or bi-directionally transmits) a message related to an application service between the service management module 102 and the device management module 104. At this time, the message server 106 may be located in a demilitarized zone (DMZ) between the first network and the second network. A DMZ is a subnetwork located between a first network and a second network, and a firewall may exist between the first network and the DMZ.

메시지 서버(106)는 메시지 중계를 위한 각종 채널 매니저를 포함할 수 있으며, 상기 채널 매니저를 통해 상기 메시지를 라우팅할 수 있다.The message server 106 may include various channel managers for message relaying, and may route the messages through the channel manager.

써드 파티 메시지 서버(108)는 타 조직 또는 기업의 메시지 서버로서, 예를 들어 GCM(Google Cloud Messaging), APNS(Apple Push Notification Service)의 메시지 서버(또는 푸시 서버)일 수 있다. 메시지 서버(106)는 내부의 채널 매니저를 통해 애플리케이션 서비스와 관련된 메시지를 써드 파티 메시지 서버(108)와 송수신할 수 있다.The third party message server 108 may be a message server of another organization or enterprise, for example a message server (or push server) of Google Cloud Messaging (GCM), Apple Push Notification Service (APNS). The message server 106 may send and receive messages associated with application services to and from the third party message server 108 via an internal channel manager.

도 2는 본 발명의 일 실시예에 따른 서비스 관리 모듈(102) 및 애플리케이션 서버(200)의 예시이다. Figure 2 is an illustration of a service management module 102 and an application server 200 according to one embodiment of the present invention.

도 2를 참조하면, 본 발명의 일 실시예에 따른 서비스 관리 모듈(102)은 부하 분산을 위해 복수 개(예를 들어, 100개) 존재할 수 있으며, 라이브러리(미도시)를 통해 함수를 호출하는 형태로 애플리케이션 서버(200)와 양방향 통신할 수 있다. 이를 위해, 서비스 관리 모듈(102)은 애플리케이션 서버(200)와의 양방향 통신을 위한 인터페이스(미도시)를 구비할 수 있다. 상술한 바와 같이, 서비스 관리 모듈(102)은 애플리케이션 서버(200)의 요청에 따라 애플리케이션 서비스와 관련된 메시지를 생성하여 데이터베이스(150)에 저장하고, 상기 메시지를 메시지 서버(106)를 통해 디바이스 관리 모듈(104)로 전송할 수 있다. 상기 데이터베이스(150)는 제1 네트워크에서 각 서비스 관리 모듈(102)과 연결될 수 있다.Referring to FIG. 2, the service management module 102 according to an embodiment of the present invention may exist for a plurality of (for example, 100) load balancing and may call a function through a library (not shown) Way communication with the application server 200 in the form of a message. To this end, the service management module 102 may include an interface (not shown) for bidirectional communication with the application server 200. As described above, the service management module 102 generates a message related to the application service according to a request of the application server 200, stores the message in the database 150, (104). The database 150 may be coupled to each service management module 102 in the first network.

이때, 상기 메시지는 메시지 아이디, 발신자 주소(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 service management module 102 that transmits the message, and the receiver address may include the ID of the device management module 104, which is the destination of the message. The message server 106 may route the message to the device management module 104 using the sender information, recipient information, transit information, and the like included in the message.

도 3은 본 발명의 일 실시예에 따른 디바이스 관리 모듈(104) 및 디바이스(300)의 예시이다.FIG. 3 is an illustration of a device management module 104 and device 300 in accordance with an embodiment of the present invention.

도 3을 참조하면, 본 발명의 일 실시예에 따른 디바이스 관리 모듈(104)은 디바이스(300)에 설치되어 각 애플리케이션 클라이언트(302)에 해당 애플리케이션 서비스와 관련된 메시지를 송수신한다. 디바이스 관리 모듈(104-1)은 라이브러리(미도시)를 통해 함수를 호출하는 형태로 애플리케이션 클라이언트(302)와 양방향 통신할 수 있다. 이를 위해, 디바이스 관리 모듈(104-1)은 애플리케이션 클라이언트(302)와의 양방향 통신을 위한 인터페이스(미도시)를 구비할 수 있다. Referring to FIG. 3, the device management module 104 according to an embodiment of the present invention is installed in the device 300 and transmits and receives messages related to the application service to each application client 302. The device management module 104-1 can bidirectionally communicate with the application client 302 in the form of calling a function through a library (not shown). To this end, the device management module 104-1 may include an interface (not shown) for bi-directional communication with the application client 302. [

또한, 디바이스 관리 모듈(104)은 메시지 서버(106)를 통해 서비스 관리 모듈(102)로부터 애플리케이션 서비스와 관련된 메시지를 수신하고, 메시지 서버(106)를 통해 상기 메시지에 대한 수신 확인 메시지(즉, ACK 메시지)를 서비스 관리 모듈(102)로 전송할 수 있다.The device management module 104 also receives a message associated with the application service from the service management module 102 via the message server 106 and transmits an acknowledgment message for the message via the message server 106 Message to the service management module 102.

한편, 본 발명의 일 실시예에 따르면, 부하 분산을 위해 애플리케이션 서버(200) 측 컴포넌트, 즉 서비스 관리 모듈(102)을 멀티 인스턴스로 구성하고, 애플리케이션 서버(200)에서 상기 멀티 인스턴스를 통해 디바이스(300) 측 컴포넌트, 즉 디바이스 관리 모듈(104)과 메시지를 송수신할 수 있다. 그러나, 서비스 관리 모듈(102)이 멀티 인스턴스로 구성된다 하더라도 특정 서비스 관리 모듈(102)에 재전송 또는 삭제 대상이 되는 메시지가 집중되는 경우 해당 서비스 관리 모듈(102)에만 부하가 집중되어 전체 시스템 성능이 저하될 수 있다. 또한, 각 서비스 관리 모듈(102)에서 동일한 메시지를 중복으로 전송함에 따라 불필요한 부하를 발생시키는 경우가 빈번히 발생할 수 있다. 이에 따라, 본 발명의 실시예들에서는 메시지 전송이 어떤 서비스 관리 모듈(102)에 요청되었는지와 관계 없이 특정 디바이스 관리 모듈(104)에 대한 메시지 재전송 및 삭제 처리를 특정 서비스 관리 모듈(102)에서만 담당하도록 하여 메시지의 중복 전송을 방지하고 부하를 분산시킬 수 있도록 하였다. 이에 대해서는 도 6을 참조하여 구체적으로 후술하기로 한다.According to an embodiment of the present invention, the application server 200 side component, that is, the service management module 102 may be configured as a multi-instance for load balancing, and the application server 200 may configure the multi- 300) side component, that is, the device management module 104, as shown in FIG. However, even if the service management module 102 is configured as a multi-instance, when a message to be retransmitted or deleted is concentrated in the specific service management module 102, a load is concentrated only on the service management module 102, Can be degraded. In addition, each service management module 102 may repeatedly transmit the same message, thereby frequently generating an unnecessary load. Accordingly, in the embodiments of the present invention, regardless of whether a message transmission is requested to a service management module 102, the message re-transmission and deletion processing for the specific device management module 104 is performed only by the specific service management module 102 So that duplicate transmission of messages can be prevented and load can be distributed. This will be described later in detail with reference to FIG.

도 4는 본 발명의 일 실시예에 따른 서비스 관리 모듈(102)의 상세 구성을 나타낸 블록도이다. 도 4에 도시된 바와 같이, 본 발명의 일 실시예에 따른 메시지 처리 모듈은 생성부(402), 결정부(404) 및 처리부(406)를 포함한다.4 is a block diagram illustrating a detailed configuration of a service management module 102 according to an embodiment of the present invention. 4, the message processing module according to an embodiment of the present invention includes a generating unit 402, a determining unit 404, and a processing unit 406. [

생성부(402)는 애플리케이션 서버로부터 메시지 생성 요청을 수신함에 따라 애플리케이션 서비스와 관련된 메시지를 생성한다. 이때, 상기 메시지 생성 요청에는 상기 메시지의 수신자 정보, 상기 메시지와 관련된 애플리케이션 서비스의 식별 정보 등이 포함될 수 있다. 생성부(402)는 상기 메시지 생성 요청에 따라 메시지 아이디를 생성하고, 상기 메시지 아이디에 대응되는 메시지를 생성할 수 있다. 예를 들어, 생성부(402)는 메시지가 전송될 디바이스의 식별 정보, 메시지와 관련된 애플리케이션의 식별 정보 등을 조합하여 상기 메시지 아이디를 생성하고, 이에 대응되는 메시지를 생성할 수 있다.The generation unit 402 generates a message related to the application service as it receives a message generation request from the application server. At this time, the message creation request may include recipient information of the message, identification information of an application service related to the message, and the like. The generating unit 402 may generate a message ID according to the message creation request, and may generate a message corresponding to the message ID. For example, the generating unit 402 may generate the message ID by combining the identification information of the device to which the message is to be transmitted, the identification information of the application related to the message, and the like, and generate a corresponding message.

도 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 generation unit 402 refers to the message generation request, . In addition, the message generation request may include information on whether a message to be generated is an order guarantee message. If the message is an order assurance message, the creator 402 can refer to the database 150 to identify the previous message ID (i.e., the previous message ID) of the message. For example, the generation unit 402 may determine the last recorded message ID of the message ID recorded in the database as the previous message ID, and store the previous message ID in the header of the message. At this time, if there is no previous message (i.e., there is no previous message ID recorded in the database), the generating unit 402 may store its own message ID in the header of the message. In addition, the validity period of the message can be determined according to a set policy, and the generation time of the message can be automatically generated when a message is generated. An example of the message thus generated is shown in FIG.

결정부(404)는 디바이스 관리 모듈(104) 각각의 아이디 및 서비스 관리 모듈(102)의 전체 개수를 이용하여 복수의 디바이스 관리 모듈(104) 중 자신이 담당하는 하나 이상의 담당 디바이스 관리 모듈을 결정한다. The determination unit 404 determines one or more responsible device management modules that the plurality of device management modules 104 are responsible for using the IDs of the device management modules 104 and the total number of the service management modules 102 .

먼저, 결정부(404)는 데이터베이스(150)를 참조하여 디바이스 관리 모듈(104) 각각의 아이디에 대한 해시값 및 서비스 관리 모듈(102)의 전체 개수를 획득할 수 있다. 상기 디바이스 관리 모듈(104) 각각의 아이디 또는 상기 디바이스 관리 모듈(104) 각각의 아이디에 대한 해시값은 데이터베이스(150)에 저장될 수 있으며, 결정부(404)는 데이터베이스(150)를 참조하여 상기 디바이스 관리 모듈(104) 각각의 아이디를 획득한 후 이를 해시하거나 또는 데이터베이스(150)를 참조하여 상기 디바이스 관리 모듈(104) 각각의 아이디에 대한 해시값을 곧바로 획득할 수 있다. 또한, 각 서비스 관리 모듈(102)은 자신의 식별 번호를 상기 데이터베이스(150)에 기록할 수 있으며, 결정부(404)는 데이터베이스(150)를 참조하여 서비스 관리 모듈(102)의 전체 개수를 확인할 수 있다. 일 예시로서, 결정부(404)는 데이터베이스(150)에 마지막으로 기록된 서비스 관리 모듈(102)의 식별 번호를 참조하여 상기 서비스 관리 모듈(102)의 전체 개수를 확인할 수 있다.First, the determination unit 404 may obtain the hash value for each ID of the device management module 104 and the total number of the service management modules 102, by referring to the database 150. The hash value of each of the device management modules 104 or the ID of each of the device management modules 104 may be stored in the database 150. The decision unit 404 may refer to the database 150, The hash value for each ID of the device management module 104 can be directly obtained by acquiring the ID of each device management module 104 and then hashing it or referring to the database 150. [ Each service management module 102 may record its own identification number in the database 150 and the determination unit 404 checks the total number of the service management modules 102 by referring to the database 150 . As an example, the determination unit 404 can check the total number of the service management module 102 by referring to the identification number of the service management module 102 last recorded in the database 150. [

다음으로, 결정부(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 determination unit 404 performs a modulus operation on the hash values of the IDs of the device management modules 104 to the total number of the service management modules 102, The modular operation value can be calculated. A modular operation is an operation to obtain the remainder by dividing two values. In the modular operation expressed by a mod b (or a% b), the remainder value when a is divided by b is output. The hash value of each of the device management modules 104 is different from the hash value of each of the device management modules 104. Therefore, The device management modules 104 may be uniformly grouped by the total number of the service management modules at a random probability. As an example, when the number of the service management module 102 and the number of the device management modules 104 is 100 and 400,000, respectively, the determination unit 404 determines 400,000 device management modules 104 through the modular operation Grouping can be grouped into 100 groups (i.e., groups corresponding to the modular operation values 0, 1, 2 ... 99 respectively).

다음으로, 결정부(404)는 상기 모듈러 연산값과 자신의 식별 번호를 참조하여 담당 디바이스 관리 모듈을 결정할 수 있다. 구체적으로, 결정부(404)는 상기 모듈러 연산값과 자신의 식별 번호를 각각 비교하여 상기 모듈러 연산값 중 자신의 식별 번호와 대응(또는 일치)되는 모듈러 연산값을 찾고, 상기 모듈러 연산값과 연관된 디바이스 관리 모듈의 아이디(즉, 상기 모듈러 연산값을 획득하는 데 사용된 디바이스 관리 모듈의 아이디)를 가진 디바이스 관리 모듈을 담당 디바이스 관리 모듈로 결정할 수 있다. 이와 같이, 각 서비스 관리 모듈(102)는 상기 모듈러 연산을 통해 자신이 담당하는 담당 디바이스 관리 모듈을 각각 결정할 수 있으며, 이에 따라 각 서비스 관리 모듈(102)별로 담당 디바이스 관리 모듈이 랜덤한 확률로 균일하게 분배될 수 있다. Next, the determination unit 404 can determine the responsible device management module by referring to the modular operation value and its identification number. Specifically, the determining unit 404 compares the moduler operation value with its own identification number, finds a moduler operation value corresponding to (or coinciding with) its own identification number in the moduler operation value, A device management module having an ID of a device management module (i.e., an ID of a device management module used to acquire the modular operation value) may be determined by the device management module in charge. In this manner, each service management module 102 can determine the respective chargeable device management modules through the modular operation, and accordingly, the chargeable device management modules for each service management module 102 can obtain uniformity Lt; / RTI >

이하에서는, 도 6을 참조하여 결정부(404)에서 담당 디바이스 관리 모듈을 결정하는 과정을 살펴보기로 한다.Hereinafter, a process of determining a chargeable device management module in the decision unit 404 will be described with reference to FIG.

여기서, 서비스 관리 모듈(102) 및 디바이스 관리 모듈(104)의 개수는 각각 3개 및 9개인 것으로 가정한다. 또한, 각 서비스 관리 모듈(102)의 식별 번호는 #0, #1 및 #2이며, 각 디바이스 관리 모듈(104)의 아이디에 대한 해시값은 1, 2, 3...9 인 것으로 가정한다.Here, it is assumed that the number of the service management module 102 and the number of the device management module 104 are three and nine, respectively. It is assumed that the identification numbers of the respective service management modules 102 are # 0, # 1 and # 2, and the hash values for the IDs of the device management modules 104 are 1, 2, 3 ... 9 .

상술한 바와 같이, 각 서비스 관리 모듈(102)의 결정부(404)는 디바이스 관리 모듈 각각의 아이디에 대한 해시값을 서비스 관리 모듈의 전체 개수로 모듈러 연산하여 상기 디바이스 관리 모듈 각각에 대한 모듈러 연산값을 계산하고, 상기 모듈러 연산값과 자신의 식별 번호를 참조하여 담당 디바이스 관리 모듈을 결정할 수 있다. 여기서, 각 서비스 관리 모듈(102)의 결정부(404)는 아래 표 1과 같은 모듈러 연산값을 각각 계산할 수 있다.As described above, the determination unit 404 of each service management module 102 performs a modular operation on the hash values of the IDs of the device management modules to the total number of the service management modules, And determine the responsible device management module by referring to the modular operation value and its own identification number. Here, the determination unit 404 of each service management module 102 can calculate the modular operation values as shown in Table 1 below.

디바이스 관리 모듈Device management module 모듈러 연산값Modular operation value 디바이스 관리 모듈 1Device management module 1 1One 디바이스 관리 모듈 2Device Management Module 2 22 디바이스 관리 모듈 3Device Management Module 3 00 디바이스 관리 모듈 4Device Management Module 4 1One 디바이스 관리 모듈 5Device Management Module 5 22 디바이스 관리 모듈 6Device Management Module 6 00 디바이스 관리 모듈 7Device Management Module 7 1One 디바이스 관리 모듈 8Device Management Module 8 22 디바이스 관리 모듈 9Device Management Module 9 00

이후, 각 서비스 관리 모듈(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 determination unit 404 of each service management module 102 finds a modulo operation value corresponding to its own identification number among the modulo operation values, and determines the ID of the device management module associated with the modulo operation value (that is, The ID of the device management module used to acquire the operation value) can be determined by the device management module in charge. In the above example, the service management module # 0 determines the device management module 3, the device management module 6, and the device management module 9 associated with the modular operation value 0 as the responsible device management module, and the device management module 3, the device management module 6, Only the message retransmission and deletion processing for the management module 9 can be performed. The service management module # 1 determines the device management module 1, the device management module 4, and the device management module 7 associated with the modular operation value 1 as the responsible device management module. The device management module 1, the device management module 4, 7 only for the message retransmission and deletion processing. The service management module # 2 determines the device management module 2, the device management module 5, and the device management module 8 associated with the modular operation value 2 as the responsible device management module. The device management module 2, the device management module 5, 8 only for message retransmission and deletion processing.

다시 도 4로 돌아오면, 처리부(406)는 서비스 관리 모듈(102)의 담당 디바이스 관리 모듈로 전송된 메시지를 재전송하거나 삭제한다. 상술한 바와 같이, 서비스 관리 모듈(102)은 설정된 시간 이내에 상기 메시지에 대한 수신 확인 메시지를 수신하지 않는 경우 상기 메시지를 재전송할 수 있으며, 설정된 시간 이내에 상기 메시지에 대한 수신 확인 메시지를 수신하는 경우 데이터베이스(150)에 저장된 상기 메시지를 삭제할 수 있다. 처리부(406)는 이와 같은 메시지 재전송 및 삭제 처리를 수행함에 있어서 자신이 담당하는 담당 디바이스 관리 모듈에 대한 메시지 재전송 및 삭제 처리만을 수행하고 자신의 담당 디바이스 관리 모듈이 아닌 타 디바이스 관리 모듈에 대한 메시지 재전송 및 삭제 처리는 수행하지 않게 된다.4, the processing unit 406 retransmits or deletes the message sent to the responsible device management module of the service management module 102. [ As described above, when the service management module 102 does not receive the acknowledgment message for the message within the set time, the service management module 102 can retransmit the message. When receiving the acknowledgment message for the message within the set time, And delete the message stored in the memory 150. In performing the message retransmission and deletion processing, the processing unit 406 performs only the message retransmission and deletion processing for the responsible device management module in charge of itself and retransmits the message to the other device management module And deletion processing is not performed.

또한, 처리부(406)는 설정된 주기(예를 들어, 2분)마다 메시지의 재전송 또는 삭제 여부를 결정할 수 있다. 이때, 상기 주기는 각 서비스 관리 모듈(102)별로 상이할 수 있다. 처리부(406)는 상기 주기마다 각 담당 디바이스 관리 모듈에 대한 메시지를 하나씩 재전송하거나 삭제할 수 있다. In addition, the processing unit 406 can determine whether to retransmit or delete the message every set period (for example, two minutes). At this time, the period may be different for each service management module 102. The processing unit 406 may retransmit or delete the messages for each chargeable device management module one by one for each cycle.

이때, 디바이스 관리 모듈(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 device management module 104, the processing unit 406 selects one transmission standby message based on the generation time and the valid period of the transmission standby message, To the device management module 104. In this case, Specifically, the processing unit 406 can select one transmission wait message having the oldest generation time without passing the present validity period among the transmission standby messages. If the service management module 102 receives an acknowledgment message from the device management module 104 (or receives a connection confirmation message from the message management server 104) from the message server 106, The processing unit 406 may determine that the device management module 104 is normally connected to the message server 106 (that is, the remaining transmission wait message is also ready to be received).

또한, 서비스 관리 모듈(102)이 전송된 상기 전송대기 메시지에 대한 수신 확인 메시지를 디바이스 관리 모듈(104)로부터 수신(또는 디바이스 관리 모듈(104)의 연결 확인 메시지를 메시지 서버(106)로부터 수신)하는 경우, 처리부(406)는 선택된 상기 전송대기 메시지를 제외한 나머지 전송대기 메시지 중 현재 상기 유효 기간이 도과되지 않은 전송대기 메시지 각각을 디바이스 관리 모듈(104)로 전송할 수 있다. 이때, 처리부(406)는 상기 나머지 전송대기 메시지 중 현재 상기 유효 기간이 도과되지 않은 설정된 개수의 전송대기 메시지 각각을 순차적으로 전송하거나 상기 전송대기 메시지 각각을 설정된 크기 단위로 묶어서 전송할 수 있다.The service management module 102 receives an acknowledgment message from the device management module 104 (or receives a connection confirmation message from the message management server 104) from the message server 106, The processing unit 406 may transmit to the device management module 104 each of the remaining transmission wait messages other than the selected one of the transmission standby messages, At this time, the processing unit 406 may sequentially transmit each of the predetermined number of transmission standby messages that have not been valid for the remaining transmission standby messages, or may transmit the transmission standby messages in units of a predetermined size.

또한, 서비스 관리 모듈(102)이 메시지 송수신을 위한 복수의 스레드(thread)를 구비하는 경우, 전송대기 메시지를 전송하는 스레드는 현재 전송대기 메시지가 전송되고 있음을 데이터베이스에 기록(또는 설정)할 수 있다. 이후, 상기 스레드, 즉 전송대기 메시지 각각을 전송하는 스레드를 제외한 타 스레드는 상기 전송대기 메시지 중 적어도 일부에 대한 수신 확인 메시지(또는 디바이스 관리 모듈(104)의 연결 확인 메시지)를 수신하는 경우 상기 데이터베이스를 참조하여 현재 상기 전송대기 메시지 각각이 전송되고 있음을 확인할 수 있으며, 이에 따라 전송대기 메시지 각각을 중복 전송하지 않게 된다.In addition, when the service management module 102 has a plurality of threads for sending and receiving a message, a thread transmitting a transmission wait message can write (or set) to the database that the current transmission wait message is being transmitted have. If a thread other than the thread transmitting the thread, i.e., the transmission wait message, receives an acknowledgment message (or a connection acknowledgment message of the device management module 104) for at least a part of the transmission wait message, It can be confirmed that each of the transmission wait messages is currently being transmitted. Accordingly, the transmission wait messages are not transmitted repeatedly.

또한, 처리부(406)는 디바이스 관리 모듈(104)로부터 메시지를 수신하고 이를 처리할 수 있다. 이하에서는, 설명의 편의상 타 모듈로부터 수신된 메시지를 “수신 메시지"라 칭하기로 한다. The processing unit 406 can also receive messages from the device management module 104 and process them. Hereinafter, for convenience of explanation, a message received from another module will be referred to as a " received message ".

먼저, 처리부(406)는 수신 메시지의 아이디를 이용하여 상기 수신 메시지가 이미 처리된 메시지인지의 여부를 판단할 수 있다. 구체적으로, 처리부(406)는 상기 수신 메시지의 아이디가 데이터베이스(150)의 메시지 로그 테이블에 기록되어 있는지의 여부에 따라 상기 수신 메시지가 이미 처리된 메시지인지의 여부를 판단할 수 있다. 일 예시로서, 처리부(406)는 상기 수신 메시지의 아이디가 데이터베이스(150)의 메시지 로그 테이블에 기록되어 있는 경우 상기 수신 메시지가 이미 처리된 메시지인 것으로 판단하고 다음 프로세스를 진행하지 않게 된다. 다른 예시로서, 처리부(406)는 상기 수신 메시지의 아이디가 데이터베이스(150)의 메시지 로그 테이블에 기록되어 있지 않은 경우 상기 수신 메시지가 이미 처리된 메시지가 아닌 것으로 판단(즉, 신규 메시지인 것으로 판단)할 수 있다.First, the processing unit 406 can determine whether the received message is already processed by using the ID of the received message. Specifically, the processing unit 406 may determine whether the received message is a processed message according to whether the ID of the received message is recorded in the message log table of the database 150. [ As an example, when the ID of the received message is recorded in the message log table of the database 150, the processing unit 406 determines that the received message is already processed and does not proceed with the next process. As another example, if the ID of the received message is not recorded in the message log table of the database 150, the processing unit 406 determines that the received message is not a processed message (i.e., determines that the received message is a new message) can do.

만약, 상기 수신 메시지가 이미 처리된 메시지가 아닌 것으로 판단되는 경우, 처리부(406)는 상기 수신 메시지에 이전 메시지 아이디가 존재하는지의 여부(즉, 수신 메시지가 순서보장 메시지인지의 여부)를 판단할 수 있다. If it is determined that the received message is not a processed message, the processing unit 406 determines whether a previous message ID exists in the received message (i.e., whether or not the received message is an ordered guarantee message) .

만약, 상기 수신 메시지에 이전 메시지 아이디가 존재하지 않는 경우, 처리부(406)는 상기 수신 메시지를 애플리케이션 서버에 전달할 수 있다.If the previous message ID does not exist in the received message, the processing unit 406 may transmit the received message to the application server.

만약, 상기 수신 메시지에 이전 메시지 아이디가 존재하는 경우, 처리부(406)는 데이터베이스(150)를 참조하여 상기 수신 메시지의 이전 메시지에 대한 처리가 완료되었는지의 여부를 판단할 수 있다. 이때, 상기 수신 메시지의 이전 메시지에 대한 처리가 완료된 것으로 판단되는 경우, 처리부(406)는 상기 수신 메시지를 애플리케이션 서버에 전달할 수 있다. 반면, 상기 수신 메시지의 이전 메시지에 대한 처리가 완료되지 않은 것으로 판단되는 경우, 처리부(406)는 상기 수신 메시지를 데이터베이스(150)에 저장한 후 상기 이전 메시지에 대한 상태 체크를 위한 체크 메시지를 디바이스 관리 모듈(104)로 전달할 수 있다.If there is a previous message ID in the received message, the processor 406 may refer to the database 150 to determine whether or not the previous message of the received message has been processed. At this time, if it is determined that the processing of the previous message of the received message is completed, the processing unit 406 can deliver the received message to the application server. On the other hand, if it is determined that the process of the previous message of the received message is not completed, the processing unit 406 stores the received message in the database 150, and transmits a check message for status check of the previous message to the device To the management module 104.

한편, 여기서는 설명의 편의상 서비스 관리 모듈(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 service management module 102 for the sake of convenience, the process of generating, retransmitting, and receiving the message is the same or similar to that of the device management module 104 Can be applied. For example, the device management module 104 may generate a message according to a message creation request of the application client and transmit the message to the service management module 102. At this time, the information included in the message is the same as that shown in FIG. In addition, the device management module 104 selects one of the plurality of transmission waiting messages to be transmitted to the service management module 102, which is the oldest generation time without exceeding the valid period, The service management module 102 may first check whether the service management module 102 is connected or not. When receiving the reception message from the service management module 102, the device management module 104 determines whether or not the received message is already processed. If the received message is determined to be not a processed message It may determine whether a previous message ID exists in the received message and determine whether to generate a check message.

도 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 service management module 102 determines one or more responsible device management modules that the plurality of device management modules 104 are responsible for.

S104 단계에서, 서비스 관리 모듈(102)은 복수 개의 전송대기 메시지에 담당 디바이스 관리 모듈의 아이디가 존재하는지의 여부를 판단한다. 만약, S104 단계의 판단 결과 상기 복수 개의 전송대기 메시지에 담당 디바이스 관리 모듈의 아이디가 존재하지 않는 경우, 서비스 관리 모듈(102)은 해당 프로세스를 종료한다.In step S104, the service management module 102 determines whether or not the ID of the responsible device management module exists in a plurality of transmission wait messages. If it is determined in step S104 that the ID of the responsible device management module does not exist in the plurality of transmission wait messages, the service management module 102 terminates the process.

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 service management module 102 transmits the transmission standby message having the oldest creation time among the transmission standby messages corresponding to the responsible device management module Search.

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 service management module 102 determines whether there is an id of another responsible device management module (Step S104).

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 service management module 102 determines whether or not the transmission standby message, . If it is determined in step S108 that the oldest transmission wait message has passed the current validity period, the service management module 102 may search for the next oldest transmission wait message.

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 service management module 102 transmits the oldest transmission wait message to the corresponding in-charge device management module 104 .

도 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 service management module 102 receives an acknowledgment message for the transmission standby message or a connection confirmation message of the device management module 104 transmitted in FIG.

S204 단계에서, 상기 스레드는 데이터베이스(150)를 통해 현재 전송대기 메시지가 전송 중인지의 여부를 확인한다. 만약, S204 단계의 판단 결과 현재 전송대기 메시지가 전송 중인 것으로 확인되는 경우, 상기 스레드는 전송대기 메시지를 전송하지 않고 메시지 송수신 프로세스를 그대로 종료할 수 있다. In step S204, the thread checks whether the current transmission wait message is being transmitted through the database 150. [ If it is determined in step S204 that the current transmission wait message is being transmitted, the thread may terminate the message transmission / reception process without transmitting the transmission standby message.

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 service management module 102. [

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 service management module 102 according to an embodiment of the present invention.

S302 단계에서, 서비스 관리 모듈(102)은 디바이스 관리 모듈(104)로부터 수신 메시지를 수신한다.In step S302, the service management module 102 receives the reception message from the device management module 104. [

S304 단계에서, 서비스 관리 모듈(102)은 상기 수신 메시지의 아이디를 이용하여 상기 수신 메시지가 이미 처리된 메시지인지의 여부를 판단한다. 구체적으로, 서비스 관리 모듈(102)은 상기 수신 메시지의 아이디가 데이터베이스(150)의 메시지 로그 테이블에 기록되어 있는지의 여부에 따라 상기 수신 메시지가 이미 처리된 메시지인지의 여부를 판단할 수 있다. 만약, S304 단계의 판단 결과 상기 수신 메시지가 이미 처리된 메시지인 경우, 서비스 관리 모듈(102)은 해당 프로세스를 종료할 수 있다.In step S304, the service management module 102 determines whether the received message is a processed message using the ID of the received message. Specifically, the service management module 102 may determine whether the received message is a processed message according to whether the ID of the received message is recorded in the message log table of the database 150. [ If it is determined in step S304 that the received message is already processed, the service management module 102 may terminate the process.

S306 단계에서, S304 단계의 판단 결과 상기 수신 메시지가 이미 처리된 메시지가 아닌 경우, 서비스 관리 모듈(102)은 상기 수신 메시지에 이전 메시지 아이디가 존재하는지의 여부를 판단한다.If it is determined in step S306 that the received message is not a processed message, the service management module 102 determines whether a previous message ID exists in the received message.

S308 단계에서, S306 단계의 판단 결과 상기 수신 메시지에 이전 메시지 아이디가 존재하지 않는 경우, 서비스 관리 모듈(102)은 상기 수신 메시지를 애플리케이션 서버에 전달한다.If it is determined in step S308 that the previous message ID does not exist in the received message, the service management module 102 transmits the received message to the application server.

S310 단계에서, 서비스 관리 모듈(102)은 상기 수신 메시지에 대한 수신 확인 메시지(ACK 메시지)를 디바이스 관리 모듈(104)로 전송한다.In step S310, the service management module 102 transmits an acknowledgment message (ACK message) to the device management module 104 for the received message.

S312 단계에서, 서비스 관리 모듈(102)은 상기 수신 메시지의 로그 정보 및 처리 완료 여부를 데이터베이스(150)에 기록한다.In step S312, the service management module 102 records in the database 150 the log information of the received message and whether the processing is completed.

S314 단계에서, 서비스 관리 모듈(102)은 상기 수신 메시지가 그 순서상 타 메시지보다 먼저 수신된 것인지의 여부를 판단한다. 만약, S314 단계의 판단 결과 상기 수신 메시지가 그 순서상 타 메시지보다 먼저 수신된 것이 아닌 경우, 서비스 관리 모듈(102)은 해당 프로세스를 종료한다.In step S314, the service management module 102 determines whether the received message is received earlier than other messages in that order. If it is determined in step S314 that the received message is not received earlier than other messages, the service management module 102 terminates the process.

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 service management module 102 temporarily stores the received message in the database 150, And delivers the received message to the application server after being received.

한편, S318 단계에서, S306 단계의 판단 결과 상기 수신 메시지에 이전 메시지 아이디가 존재하는 경우, 서비스 관리 모듈(102)은 상기 수신 메시지의 이전 메시지의 처리가 완료되었는지의 여부를 판단한다. 만약, S318 단계의 판단 결과 상기 수신 메시지의 이전 메시지의 처리가 완료된 경우, 서비스 관리 모듈(102)은 상기 수신 메시지를 애플리케이션 서버로 전달한다.If it is determined in step S318 that the previous message ID exists in the received message, the service management module 102 determines whether the previous message of the received message has been processed. If it is determined in step S318 that the processing of the previous message of the received message is completed, the service management module 102 delivers the received message to the application server.

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 service management module 102 stores the received message in the database 150 in step S320.

S322 단계에서, 서비스 관리 모듈(102)은 상기 수신 메시지에 대한 수신 확인 메시지(ACK 메시지)를 디바이스 관리 모듈(104)로 전송한다.In step S322, the service management module 102 transmits an acknowledgment message (ACK message) to the device management module 104 for the received message.

S324 단계에서, 서비스 관리 모듈(102)은 상기 이전 메시지에 대한 상태 체크를 위한 체크 메시지를 디바이스 관리 모듈(104)로 전송한다.In step S324, the service management module 102 transmits a check message for checking the state of the previous message to the device management module 104. [

도 10은 본 발명의 일 실시예에 따른 디바이스 관리 모듈(104)에서 수행되는 수신 메시지의 처리 과정을 설명하기 위한 흐름도이다. FIG. 10 is a flowchart illustrating a process of a received message performed by the device management module 104 according to an embodiment of the present invention.

S402 단계에서, 디바이스 관리 모듈(104)은 서비스 관리 모듈(102)로부터 수신 메시지를 수신한다.In step S402, the device management module 104 receives a reception message from the service management module 102. [

S404 단계에서, 디바이스 관리 모듈(104)은 상기 수신 메시지에 대한 수신 확인 메시지(ACK 메시지)를 서비스 관리 모듈(102)로 전송한다.In step S404, the device management module 104 transmits an acknowledgment message (ACK message) to the service management module 102 for the received message.

S406 단계에서, 디바이스 관리 모듈(104)은 상기 수신 메시지의 아이디를 이용하여 상기 수신 메시지가 이미 처리된 메시지인지의 여부를 판단한다. 상기 수신 메시지가 이미 처리된 메시지인지의 여부를 판단하는 과정은 앞선 도 9의 S304 단계에서와 동일하다. In step S406, the device management module 104 determines whether the received message is a processed message using the ID of the received message. The process of determining whether the received message is already processed is the same as that in step S304 of FIG.

S408 단계에서, S406 단계의 판단 결과 상기 수신 메시지가 이미 처리된 메시지가 아닌 경우, 디바이스 관리 모듈(104)은 상기 수신 메시지를 데이터베이스(150)에 저장한다.If it is determined in step S408 that the received message is not a processed message, the device management module 104 stores the received message in the database 150. In step S408,

S410 단계에서, 디바이스 관리 모듈(104)은 상기 수신 메시지에 이전 메시지 아이디가 존재하는지의 여부를 판단한다.In step S410, the device management module 104 determines whether a previous message ID is present in the received message.

S412 단계에서, S410 단계의 판단 결과 상기 수신 메시지에 이전 메시지 아이디가 존재하지 않는 경우, 디바이스 관리 모듈(104)은 상기 수신 메시지를 애플리케이션 클라이언트에 전달한다.If it is determined in step S412 that the previous message ID does not exist in the received message, the device management module 104 transmits the received message to the application client.

S414 단계에서, 디바이스 관리 모듈(104)은 상기 수신 메시지의 로그 정보 및 처리 완료 여부를 데이터베이스(150)에 기록한다.In step S414, the device management module 104 records in the database 150 the log information of the received message and whether the processing is completed.

S416 단계에서, 디바이스 관리 모듈(104)은 상기 수신 메시지가 그 순서상 타 메시지보다 먼저 수신된 것인지의 여부를 판단한다. 만약, S416 단계의 판단 결과 상기 수신 메시지가 그 순서상 타 메시지보다 먼저 수신된 것이 아닌 경우, 디바이스 관리 모듈(104)은 해당 프로세스를 종료한다.In step S416, the device management module 104 determines whether the received message is received earlier than other messages in that order. If it is determined in step S416 that the received message is not received earlier than other messages in the order, the device management module 104 ends the process.

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 device management module 104 temporarily stores the received message in the database 150, And delivers the received message to the application client after it is received.

한편, 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 device management module 104 determines whether the previous message of the received message has been processed. If it is determined in step S420 that the processing of the previous message of the received message is completed, the device management module 104 transfers the received message to the application client.

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 device management module 104 transmits a check message for checking the status of the previous message to the service management module 102 do.

도 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 computing environment 10 includes a computing device 12. In one embodiment, computing device 12 may be one or more components included in message processing device 100, or message processing device 100.

컴퓨팅 장치(12)는 적어도 하나의 프로세서(14), 컴퓨터 판독 가능 저장 매체(16) 및 통신 버스(18)를 포함한다. 프로세서(14)는 컴퓨팅 장치(12)로 하여금 앞서 언급된 예시적인 실시예에 따라 동작하도록 할 수 있다. 예컨대, 프로세서(14)는 컴퓨터 판독 가능 저장 매체(16)에 저장된 하나 이상의 프로그램들을 실행할 수 있다. 상기 하나 이상의 프로그램들은 하나 이상의 컴퓨터 실행 가능 명령어를 포함할 수 있으며, 상기 컴퓨터 실행 가능 명령어는 프로세서(14)에 의해 실행되는 경우 컴퓨팅 장치(12)로 하여금 예시적인 실시예에 따른 동작들을 수행하도록 구성될 수 있다.The computing device 12 includes at least one processor 14, a computer readable storage medium 16, The processor 14 may cause the computing device 12 to operate in accordance with the exemplary embodiment discussed above. For example, processor 14 may execute one or more programs stored on computer readable storage medium 16. The one or more programs may include one or more computer-executable instructions, which when executed by the processor 14 cause the computing device 12 to perform operations in accordance with the illustrative embodiment .

컴퓨터 판독 가능 저장 매체(16)는 컴퓨터 실행 가능 명령어 내지 프로그램 코드, 프로그램 데이터 및/또는 다른 적합한 형태의 정보를 저장하도록 구성된다. 컴퓨터 판독 가능 저장 매체(16)에 저장된 프로그램(20)은 프로세서(14)에 의해 실행 가능한 명령어의 집합을 포함한다. 일 실시예에서, 컴퓨터 판독 가능 저장 매체(16)는 메모리(랜덤 액세스 메모리와 같은 휘발성 메모리, 비휘발성 메모리, 또는 이들의 적절한 조합), 하나 이상의 자기 디스크 저장 디바이스들, 광학 디스크 저장 디바이스들, 플래시 메모리 디바이스들, 그 밖에 컴퓨팅 장치(12)에 의해 액세스되고 원하는 정보를 저장할 수 있는 다른 형태의 저장 매체, 또는 이들의 적합한 조합일 수 있다.The computer-readable storage medium 16 is configured to store computer-executable instructions or program code, program data, and / or other suitable forms of information. The program 20 stored in the computer-readable storage medium 16 includes a set of instructions executable by the processor 14. In one embodiment, the computer-readable storage medium 16 may be any type of storage medium such as a memory (volatile memory such as random access memory, non-volatile memory, or any suitable combination thereof), one or more magnetic disk storage devices, Memory devices, or any other form of storage medium that can be accessed by the computing device 12 and store the desired information, or any suitable combination thereof.

통신 버스(18)는 프로세서(14), 컴퓨터 판독 가능 저장 매체(16)를 포함하여 컴퓨팅 장치(12)의 다른 다양한 컴포넌트들을 상호 연결한다.Communication bus 18 interconnects various other components of computing device 12, including processor 14, computer readable storage medium 16.

컴퓨팅 장치(12)는 또한 하나 이상의 입출력 장치(24)를 위한 인터페이스를 제공하는 하나 이상의 입출력 인터페이스(22) 및 하나 이상의 네트워크 통신 인터페이스(26)를 포함할 수 있다. 입출력 인터페이스(22) 및 네트워크 통신 인터페이스(26)는 통신 버스(18)에 연결된다. 입출력 장치(24)는 입출력 인터페이스(22)를 통해 컴퓨팅 장치(12)의 다른 컴포넌트들에 연결될 수 있다. 예시적인 입출력 장치(24)는 포인팅 장치(마우스 또는 트랙패드 등), 키보드, 터치 입력 장치(터치패드 또는 터치스크린 등), 음성 또는 소리 입력 장치, 다양한 종류의 센서 장치 및/또는 촬영 장치와 같은 입력 장치, 및/또는 디스플레이 장치, 프린터, 스피커 및/또는 네트워크 카드와 같은 출력 장치를 포함할 수 있다. 예시적인 입출력 장치(24)는 컴퓨팅 장치(12)를 구성하는 일 컴포넌트로서 컴퓨팅 장치(12)의 내부에 포함될 수도 있고, 컴퓨팅 장치(12)와는 구별되는 별개의 장치로 컴퓨팅 장치(12)와 연결될 수도 있다.The computing device 12 may also include one or more input / output interfaces 22 and one or more network communication interfaces 26 that provide an interface for one or more input / output devices 24. The input / output interface 22 and the network communication interface 26 are connected to the communication bus 18. The input / output device 24 may be connected to other components of the computing device 12 via the input / output interface 22. The exemplary input and output device 24 may be any type of device, such as a pointing device (such as a mouse or trackpad), a keyboard, a touch input device (such as a touch pad or touch screen), a voice or sound input device, An input device, and / or an output device such as a display device, a printer, a speaker, and / or a network card. The exemplary input and output device 24 may be included within the computing device 12 as a component of the computing device 12 and may be coupled to the computing device 12 as a separate device distinct from the computing device 12 It is possible.

이상에서 대표적인 실시예를 통하여 본 발명에 대하여 상세하게 설명하였으나, 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자는 전술한 실시예에 대하여 본 발명의 범주에서 벗어나지 않는 한도 내에서 다양한 변형이 가능함을 이해할 것이다. 그러므로 본 발명의 권리범위는 설명된 실시예에 국한되어 정해져서는 안 되며, 후술하는 특허청구범위뿐만 아니라 이 특허청구범위와 균등한 것들에 의해 정해져야 한다.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.
청구항 1에 있어서,
상기 서비스 관리 모듈은, 상기 복수의 전송대기 메시지 중 현재 상기 유효 기간이 도과되지 않으면서 상기 생성 시각이 가장 오래된 하나의 전송대기 메시지를 선택하는, 메시지 처리 장치.
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.
청구항 1에 있어서,
상기 서비스 관리 모듈은, 상기 전송대기 메시지에 대한 수신 확인 메시지를 상기 디바이스 관리 모듈로부터 수신하는 경우 상기 디바이스 관리 모듈이 메시지 서버에 정상적으로 연결된 것으로 판단하는, 메시지 처리 장치.
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.
청구항 3에 있어서,
상기 서비스 관리 모듈은, 상기 수신 확인 메시지 또는 설정된 상기 담당 디바이스 관리 모듈의 연결 확인 메시지를 수신하는 경우 선택된 상기 전송대기 메시지를 제외한 나머지 전송대기 메시지 중 현재 상기 유효 기간이 도과되지 않은 전송대기 메시지 각각을 상기 담당 디바이스 관리 모듈로 전송하는, 메시지 처리 장치.
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.
청구항 4에 있어서,
상기 서비스 관리 모듈은, 상기 나머지 전송대기 메시지 중 현재 상기 유효 기간이 도과되지 않은 설정된 개수의 전송대기 메시지 각각을 순차적으로 전송하거나 상기 전송대기 메시지 각각을 설정된 크기 단위로 묶어서 전송하는, 메시지 처리 장치.
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.
청구항 4에 있어서,
상기 서비스 관리 모듈이 메시지 송수신을 위한 복수의 스레드(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.
청구항 1에 있어서,
상기 서비스 관리 모듈은, 상기 디바이스 관리 모듈로부터 수신 메시지를 수신하는 경우 상기 수신 메시지의 아이디를 이용하여 상기 수신 메시지가 이미 처리된 메시지인지의 여부를 판단하고, 상기 수신 메시지가 이미 처리된 메시지가 아닌 것으로 판단되는 경우 상기 수신 메시지에 이전 메시지 아이디(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.
청구항 7에 있어서,
상기 서비스 관리 모듈은, 상기 수신 메시지에 상기 이전 메시지 아이디가 존재하는 것으로 판단되는 경우 데이터베이스를 참조하여 상기 수신 메시지의 이전 메시지에 대한 처리가 완료되었는지의 여부를 판단하고, 상기 수신 메시지의 이전 메시지에 대한 처리가 완료되지 않은 것으로 판단되는 경우 상기 이전 메시지에 대한 상태 체크를 위한 체크 메시지를 상기 디바이스 관리 모듈로 전달하는, 메시지 처리 장치.
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.
청구항 9에 있어서,
상기 하나의 전송대기 메시지를 선택하는 단계는, 상기 복수의 전송대기 메시지 중 현재 상기 유효 기간이 도과되지 않으면서 상기 생성 시각이 가장 오래된 하나의 전송대기 메시지를 선택하는, 메시지 처리 방법.
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.
청구항 9에 있어서,
선택된 상기 전송대기 메시지를 상기 담당 디바이스 관리 모듈로 전송하는 단계 이후,
상기 처리부에서, 상기 전송대기 메시지에 대한 수신 확인 메시지를 상기 디바이스 관리 모듈로부터 수신하는 경우 상기 디바이스 관리 모듈이 메시지 서버에 정상적으로 연결된 것으로 판단하는 단계를 더 포함하는, 메시지 처리 방법.
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.
청구항 11에 있어서,
선택된 상기 전송대기 메시지를 상기 담당 디바이스 관리 모듈로 전송하는 단계 이후,
상기 처리부에서, 상기 수신 확인 메시지 또는 설정된 상기 담당 디바이스 관리 모듈의 연결 확인 메시지를 수신하는 경우 선택된 상기 전송대기 메시지를 제외한 나머지 전송대기 메시지 중 현재 상기 유효 기간이 도과되지 않은 전송대기 메시지 각각을 상기 담당 디바이스 관리 모듈로 전송하는 단계를 더 포함하는, 메시지 처리 방법.
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.
청구항 12에 있어서,
상기 전송대기 메시지 각각을 상기 담당 디바이스 관리 모듈로 전송하는 단계는, 상기 나머지 전송대기 메시지 중 현재 상기 유효 기간이 도과되지 않은 설정된 개수의 전송대기 메시지 각각을 순차적으로 전송하거나 상기 전송대기 메시지 각각을 설정된 크기 단위로 묶어서 전송하는, 메시지 처리 방법.
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:
청구항 12에 있어서,
상기 서비스 관리 모듈이 메시지 송수신을 위한 복수의 스레드(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.
청구항 9에 있어서,
상기 처리부에서, 상기 디바이스 관리 모듈로부터 수신 메시지를 수신하는 경우 상기 수신 메시지의 아이디를 이용하여 상기 수신 메시지가 이미 처리된 메시지인지의 여부를 판단하는 단계; 및
상기 처리부에서, 상기 수신 메시지가 이미 처리된 메시지가 아닌 것으로 판단되는 경우 상기 수신 메시지에 이전 메시지 아이디(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.
청구항 15에 있어서,
상기 수신 메시지에 상기 이전 메시지 아이디가 존재하는지의 여부를 판단하는 단계 이후,
상기 처리부에서, 상기 수신 메시지에 상기 이전 메시지 아이디가 존재하는 것으로 판단되는 경우 데이터베이스를 참조하여 상기 수신 메시지의 이전 메시지에 대한 처리가 완료되었는지의 여부를 판단하는 단계; 및
상기 처리부에서, 상기 수신 메시지의 이전 메시지에 대한 처리가 완료되지 않은 것으로 판단되는 경우 상기 이전 메시지에 대한 상태 체크를 위한 체크 메시지를 상기 디바이스 관리 모듈로 전달하는 단계를 더 포함하는, 메시지 처리 방법.
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.
KR1020170180462A 2017-12-27 2017-12-27 Message processing apparatus and method KR102284874B1 (en)

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)

* Cited by examiner, † Cited by third party
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

Patent Citations (5)

* Cited by examiner, † Cited by third party
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