WO2009046593A1 - Procédé de communication d'application pour un terminal - Google Patents

Procédé de communication d'application pour un terminal Download PDF

Info

Publication number
WO2009046593A1
WO2009046593A1 PCT/CN2007/003763 CN2007003763W WO2009046593A1 WO 2009046593 A1 WO2009046593 A1 WO 2009046593A1 CN 2007003763 W CN2007003763 W CN 2007003763W WO 2009046593 A1 WO2009046593 A1 WO 2009046593A1
Authority
WO
WIPO (PCT)
Prior art keywords
message
application
channel
communication
processing module
Prior art date
Application number
PCT/CN2007/003763
Other languages
English (en)
Chinese (zh)
Inventor
Zemin Wang
Xin Yang
Fei Ju
Youpeng Gu
Original Assignee
Zte Corporation
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 Zte Corporation filed Critical Zte Corporation
Publication of WO2009046593A1 publication Critical patent/WO2009046593A1/fr

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/12Messaging; Mailboxes; Announcements

Definitions

  • the present invention relates to the field of terminal software, and in particular, to a method for application communication of a terminal.
  • the mobile terminal device is an embedded software device. At the same time, it is different from the universal embedded device. It has good human-computer interaction, and satisfies the individual requirements of the functions, styles and usage habits of the human terminal; With the rapid development and use of mobile terminals, a mobile terminal is required to perform as many tasks as possible to facilitate people's work and life. Therefore, the mobile terminal device inevitably has multiple tasks and multiple processes in the internal embedded software implementation, and the efficiency of application communication between these multi-tasking and multi-process determines the performance of the mobile terminal to a large extent. Therefore, the clean and efficient application communication in the mobile terminal is a key issue in the development of mobile terminal software.
  • Application communication provides basic communication capabilities for communication between different applications, whether the application of these communications is within the same thread (or process) or between different threads (or processes).
  • the most basic form of application communication is the IPC (InterProcess Communications Protocol) provided by the operating system.
  • IPC InterProcess Communications Protocol
  • the IPC format provided by the operating system is too primitive and too simple. It is generally suitable only for writing lower-level software systems.
  • the QCop communication mechanism adopts the publish/subscrible mode, which makes the communication very scalable; it is used for communication between different clients within the same address space or between different processes.
  • the originator of the message only needs to create a QCopEnvelope object containing the channel name, Message name, parameters, etc.; the recipient of the message must first create a message in order to receive the message.
  • the QCopChannel object the channel that wants to receive the message, indicates the correspondence with the sender of the message; at the same time, relying on its internal function callback mechanism-signal-slot mechanism, the QCop communication mechanism solves the received message and The processing relationship for receiving messages. Therefore, for the Qcop communication mechanism, the communication participant only needs to know the message channel name of Qcop, and any sender can send any message to any receiver, which makes the communication have good flexibility and scalability.
  • QCop communication mechanism is aimed at high-end smart phones, so it is not very suitable for low-end and mid-range mobile phones in terms of structural complexity and operation mechanism; at the same time, its object-oriented design ideas are transplanted to face There are certain difficulties in the design of the process, and the internal signal-slot mechanism introduces a high degree of internal coupling.
  • the biggest drawback of the QCop communication mechanism is that it does not support synchronous transmission of messages, which brings developers. Additional development difficulty.
  • D-Bus application communication is a message bus system that provides a simple way to communicate between applications.
  • the message bus is built on a common one-to-one message transmission framework.
  • D-BUS provides a daemon (also known as a message bus daemon) that routes messages on a particular bus, thus forming a bus topology that allows processes to be at the same time.
  • daemon also known as a message bus daemon
  • applications can send or listen to various events on the bus. It can be seen that compared with the QCop communication mechanism, although D-BUS supports the synchronous transmission of messages, its implementation mechanism is extremely complicated, and it is necessary to specifically start a background message bus server in the system, so it is more suitable for the application of high-end smartphone framework. Communication between.
  • QCop communication protocol and D-Bus application communication are huge in structure for medium and low-end mobile phones, and require a lot of mobile phone resources; for mobile phone development including high-end smart phones and low-end mobile phones. , it shows a problem that cannot be generalized. There are also problems that cannot be generalized on other high, medium and low-end terminals similar to the above-mentioned mobile terminal functions.
  • the present invention provides an application communication method for a terminal, so as to solve the problem that the application communication method existing in the prior art solution is not common in high, medium, and low-end terminals.
  • the present invention provides an application communication method for a terminal, and the method includes the following steps:
  • an application that needs to perform application communication registers a message channel in the terminal operating system, and attaches a message processing module of the application to the message channel;
  • the message channel hands the message to the message processing module of the hanging party for processing, thereby completing application communication.
  • the above method further includes the following steps:
  • the message channel is identified by a message channel name string.
  • the application inter-process communication protocol of the terminal operating system is encapsulated to create an application communication message processing object, where the object includes a timely acquisition of the arrival message.
  • the message channel of the signal and the message content and the message processing module processing the message of the channel, the application communication message processing object is hooked as a node in a global linked list, and the application communication message processing object Identified by the message channel name.
  • the foregoing step (1) attaches the message processing module to the message channel by: attaching a monitoring function for monitoring the application communication message processing object in the main loop of the application, and simultaneously processing the message processing module
  • the corresponding callback function pointer is saved as an input parameter to the monitor function.
  • step (2) when another application transmits a message to the application, the application finds a corresponding application communication message processing object in the global linked list by using the message channel name registered by the application, and then The message is directly written to the message channel of the application communication message processing object, thereby completing the transmission of the message.
  • the application detects that a message is written on the message channel of the application communication message processing object in the main loop, the monitoring function is automatically invoked, and the monitoring function will read on the channel. The fetched message is handed over to the message processing module corresponding to the saved input parameter for processing.
  • the another application needs to provide the non-response sending and the responding sending of the sending message in combination with the requirement of the application communication of the terminal, and send and send the response to the message.
  • the other application of the message uses a message channel to specifically process the response message.
  • the above application requiring application communication is a telephone service server, and the other application is a call application, or a short message application, or a phonebook application.
  • the application communication of the present invention is performed in a channel-based manner, the sender sends a message to the channel, and the receiver obtains a message sent by the sender to the channel on the channel, and the message channel passes through the channel name string.
  • the message dispatching function is implemented in the server daemon of the application communication processing of each application, thereby avoiding a background communication server dedicated to a common communication mechanism such as D-BUS; The shortcomings and imperfections of the current technical solutions can be avoided, and the application communication of the high, medium and low-end terminals can be realized simply and efficiently. .
  • FIG. 3 is a flowchart of processing a received message according to an embodiment of the present invention.
  • FIG. 4 is a schematic diagram of a message layer structure of a wireless application interface module
  • FIG. 5 is a message flow diagram of a call application and a telephone service server according to an application example of the present invention
  • FIG. 6 is a schematic diagram of message processing of a telephone service server according to an application example of the present invention.
  • the typical application terminal of the method is a mobile phone terminal.
  • Step A The application that needs to perform application communication registers a message channel in the mobile terminal operating system, and attaches the message processing module of the application to the message channel, so that after the message channel receives the message, the message processing is triggered.
  • the module processes the message;
  • Step B when another application sends a message to the application, the message is sent to the message channel registered by the application in step A;
  • Step C After receiving the message, the message channel hands the message to the message processing module attached in step A for processing, thereby completing application communication of the two applications;
  • Step D When the application communication is aborted, the context structure of the application communication is released, and the message channel registered by the application is cancelled.
  • step A is performed when the mobile phone is turned on, and step D is performed when the mobile phone is in the hand.
  • step A registering a message channel in the mobile terminal operating system needs to be implemented based on the underlying mechanism in the mobile phone system, such as an IPC of the operating system itself, such as a pipe, a socket, or a message queue.
  • Encapsulation to create an object, called the application communication message processing object: GMsgHandler which includes a message channel (registered in step A) that can acquire the signal and message content of the arrival message in time, and process the message of the channel.
  • the message processing module attaches the application communication message processing object as a node in a global linked list (the reason why it needs to be saved in the global linked list is mainly because the specific application (at the time of registration) and the application main loop are required
  • the list is operated; of course, there are many implementation methods.
  • the global variable is to open up a shared memory for the specific application and the application main loop to operate, and the application communication message processing object is identified by the message channel name.
  • Step A attaching the message processing module to the message channel by: attaching a monitoring function for monitoring the object in a main loop of the application
  • the number is used to call the GMsgHandler object after receiving the message arrival signal, and the callback function (also called the hook function) pointer corresponding to the message processing module is saved as an input parameter of the monitoring function.
  • the application detects that the object has data input in the main loop (the object gets a signal arrival message, that is, it knows that the message is received on the channel, there is data input)
  • the monitoring function will be automatically called, and the monitoring is performed.
  • the function will process the message read on this channel to the message processing module corresponding to the input parameter it holds.
  • step B it is required to provide a non-response transmission of the message and a response transmission in response to the demand for the application communication of the mobile phone (for example, after the voice call sends a dialing request to the telephone server, the telephone server session returns a call identifier to the voice call application),
  • the response sends an asynchronous send similar to the message, after the message is sent to the message channel, the other steps can be continued, so it is easy to implement; and the response sends a synchronous send similar to the message, which is waiting for the message to be sent to the message channel.
  • the application's message handler is executed until other steps can continue.
  • Step B the process of step C), so as not to affect the operating efficiency of the system.
  • step C when the application detects that a message is written on the GMsgHandler object in the main loop, the hooked monitoring function is called to process the message.
  • the message channel registration process in the embodiment of the present invention includes the following steps: Step 101: A message channel registration starts;
  • Step 102 The application that needs to perform application communication determines whether the channel is registered in the GMsgHandler global linked list: If yes, go to step 104; otherwise, continue;
  • Step 103 The mobile terminal application that needs to perform application communication registers the message channel and the corresponding processing function in the GMsgHandler linked list (this processing function is a function for processing the received message, that is, a function run by the message processing module);
  • Step 104 the message channel registration ends.
  • the message channel is identified by the channel name string, the message Channel names are unique across the system.
  • the implementation of the message channel depends on the underlying IPC.
  • the message channel is a message queue, and the message channel name is the name of the message queue, which uniquely identifies the message queue.
  • the message sending process of the embodiment of the present invention includes the following steps: Step 201: Sending a message begins;
  • Step 202 The application that sends the message determines whether the corresponding message channel name is empty: if yes, go to step 205; if no, continue;
  • Step 203 The application that sends the message determines whether the message channel is registered in the GMsgHandler list: if not, go to step 205; if yes, continue;
  • Step 204 Send a message on the corresponding message channel by using the underlying IPC, and the process ends; Step 205, the message fails to be sent.
  • the message channel name is unique within the entire system during the message channel registration process shown in Figure 1, in the above message sending process, the message is sent through the registered message channel name in the global linked list.
  • the GMsgHandler object is then written directly to the channel of the GMsgHandler object to complete the message. For example, when the message channel name is the message queue name, writing the message to the channel of the GMsgHandler object copies the message to its corresponding message queue.
  • the process of receiving a message processing in the embodiment of the present invention includes the following steps:
  • Step 301 the bottom layer IPC receives the message
  • Step 302 Put the message into the corresponding message channel
  • Step 303 The application detects the message in the main loop.
  • Step 304 Search for a processing function of the channel in the GMsgHandler linked list.
  • Step 305 The message processing module executes the found processing function on the message.
  • the wireless application interface module has a message layer structure, and the wireless application interface module corresponds to the interface layer, the telephone service server, and the communication processing layer in the figure, and the telephone service server passes the communication processing module (such as an AT command (the AT command is The command that the modem Modem can recognize and execute)) interacts with the wireless module.
  • the wireless application interface module is located between the mobile phone operating system and the application, and functions as a wireless application interface.
  • the wireless application interface module mainly provides a wireless communication request sent by the receiving application, receives a command response sent from the wireless module, receives a notification message sent from the wireless module, ensures the real-time performance of the sending and receiving command, priority control of the command, and the command Parallel processing, exception handling of commands, wireless module data buffering, and establishment of data call link connections.
  • the wireless application interface module communicates with the phone book application, short message application, call application, and the like.
  • the message flow of the application application and the telephone service server of the application instance of the present invention includes the following steps:
  • Step 501 The application that needs to perform application communication registers a message channel in the operating system, and attaches the message processing module to the message channel.
  • the call application needs to register a message channel in the operating system, such as the voice.service (described by string) channel, receive the message sent by the telephony service server, and attach the call to the hook.
  • a message channel in the operating system such as the voice.service (described by string) channel
  • receive the message sent by the telephony service server and attach the call to the hook.
  • the processing function of the successful/failed message (such as making a call when the dialing is successful, and displaying the dialing failure to the user on the mobile phone interface when the dialing fails);
  • the telephony service server To receive messages from the calling application, the telephony service server also needs to register a message channel (as shown in Figure 6), such as the phone.server channel, which is attached to the processing function of the dialed message (the AT command that converts the dialing command into a response). Send to the Modem, apply the call ID of the call to the call, and respond to the call application with a dial success/failure message after receiving the response of the AT command.
  • a message channel as the phone.server channel
  • the call application needs the telephone service server to respond to a call identifier, it needs to use the response message to send, so specially register a message channel syncmsghandler that specifically processes the response message, and attach the response function of the response message, here to the response message. Processing is
  • the call identity and corresponding call context data are saved in the internal data structure.
  • the message channel name and corresponding handler function are stored in the linked list structure of (GMsgHandler).
  • the trigger of receiving the message it can be triggered by such as polling or the underlying driver (here refers to triggering the underlying receiving, the underlying receiving can be detected in the main loop, the main loop is through the underlying event mechanism (such as having a message arrive) ) to drive).
  • the IPC will be triggered to receive the message.
  • the message is dispatched (through the above monitoring function), and the corresponding processing function is searched in the linked list structure of the GMsgHandler according to the message channel name, and the processing function is called to run.
  • the name of the syncmsghandler channel is not empty, indicating that the message sender If a response is required, the response message is sent through the sync.msghandler message channel; the normal response message (such as the AT command response in this example) is sent through the same voice.service message channel as the non-response message.
  • Step 502 The message is sent by searching the corresponding message channel in the GMsgHandler object list, and then sending it through the IPC of the operating system: the call application sends a response dialing message to the channel phone.server, and the phone service server is at the phone.server. Receiving the dialing message on the channel, after receiving the dialing message on the phone.server channel, the telephone service server will call the registered processing function of the call (as shown in FIG. 6);
  • Step 503 The telephone service server determines whether the syncmsghandler message channel is empty: if no, go to step 505; if yes, continue;
  • Step 504 the telephone service server sends an AT response message to the voice.service message channel, and proceeds to the subsequent process, and then proceeds to step 506;
  • Step 505 The telephone service server sends a response message to the syncmsghandler message channel, and performs a subsequent process.
  • Step 506 When the call application communication is aborted, the message channel created in step 501 and the corresponding memory resource are deleted.
  • step 504 the telephone service server sends an AT response message, and after the telephone service server receives the dialing message on the phone.server channel in step 502, the registered call processing function is called, and the two steps have no fixed time sequence. order.
  • the present invention simplifies and conveniently implements application communication between a call application and a telephone service server, and effectively avoids the defect that the application communication method existing in the prior art solution is not common in high, medium, and low-end mobile phone terminals. It ensures fast and efficient porting of application communication in various mobile phones, thus shortening the development cycle and development cost of mobile phone software from one aspect.

Abstract

L'invention concerne un procédé de communication d'application pour un terminal. Ledit procédé comprend les étapes suivantes: (1) l'application nécessitant une communication d'application enregistre un canal de messagerie dans un système d'exploitation de terminal, et affecte un module de traitement de message de l'application au canal de messagerie; (2) un message est envoyé au canal de messagerie enregistré par le message, lorsqu'une autre application envoie le message à l'application; (3) après réception du message par le canal de messagerie, le message est transformé dans le module de traitement de message et est traité pour terminer la communication du terminal.
PCT/CN2007/003763 2007-10-12 2007-12-25 Procédé de communication d'application pour un terminal WO2009046593A1 (fr)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN200710164043.3 2007-10-12
CN2007101640433A CN101141742B (zh) 2007-10-12 2007-10-12 一种终端的应用通信方法

Publications (1)

Publication Number Publication Date
WO2009046593A1 true WO2009046593A1 (fr) 2009-04-16

Family

ID=39193421

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2007/003763 WO2009046593A1 (fr) 2007-10-12 2007-12-25 Procédé de communication d'application pour un terminal

Country Status (2)

Country Link
CN (1) CN101141742B (fr)
WO (1) WO2009046593A1 (fr)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101651863B (zh) * 2008-08-14 2012-07-04 中兴通讯股份有限公司 基于软件总线扩展的消息发送方法
CN101882068B (zh) * 2009-05-08 2013-04-03 上海科泰世纪科技有限公司 实现构件对象托管的方法和数据处理设备
CN103095656A (zh) * 2011-11-03 2013-05-08 陈璧超 一种对等通信方法、通信节点和对等通信系统
CN103902390B (zh) * 2014-03-12 2017-04-19 深圳创维-Rgb电子有限公司 基于Android的应用层的进程间通信方法及基础应用通信系统
JP6524606B2 (ja) * 2014-03-25 2019-06-05 セイコーエプソン株式会社 表示制御装置及び表示装置
CN105404557A (zh) * 2015-12-07 2016-03-16 中国电子科技集团公司第五十研究所 基于消息队列的进程通信方法
CN107391630B (zh) * 2017-07-10 2020-03-31 北京京东尚科信息技术有限公司 处理并行网络请求的方法、装置及终端设备
CN107656826B (zh) * 2017-09-19 2020-06-26 光一科技股份有限公司 一种基于ipc动态维护技术的面向对象用电信息采集终端
CN110750684B (zh) * 2018-07-06 2022-08-16 武汉斗鱼网络科技有限公司 多维度验证的消息提示方法、存储介质、电子设备及系统
CN110177126A (zh) * 2019-04-04 2019-08-27 口碑(上海)信息技术有限公司 统一消息通道的数据通讯方法、装置及系统
CN113835909B (zh) * 2021-09-30 2023-10-24 中国电子科技集团公司第二十八研究所 一种基于消息框架的应用集成方法

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1297656A (zh) * 1998-03-23 2001-05-30 诺基亚网络有限公司 移动通信系统中的请求式业务
CN1400748A (zh) * 2001-07-31 2003-03-05 皇家菲利浦电子有限公司 通信系统中终端与基站之间预约的方法

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2412762B (en) * 2004-04-02 2009-01-28 Symbian Software Ltd Inter process communication in a computing device
US7219198B2 (en) * 2004-06-22 2007-05-15 International Business Machines Corporation Facilitating communication within shared memory environments using lock-free queues
CN100392599C (zh) * 2006-01-10 2008-06-04 杭州东信灵通电子实业公司 通用进程间通信实现方法
CN100403739C (zh) * 2006-02-14 2008-07-16 华为技术有限公司 基于链表的进程间消息传递方法
CN100512305C (zh) * 2006-03-15 2009-07-08 华为技术有限公司 一种进程发送方法

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1297656A (zh) * 1998-03-23 2001-05-30 诺基亚网络有限公司 移动通信系统中的请求式业务
CN1400748A (zh) * 2001-07-31 2003-03-05 皇家菲利浦电子有限公司 通信系统中终端与基站之间预约的方法

Also Published As

Publication number Publication date
CN101141742A (zh) 2008-03-12
CN101141742B (zh) 2011-08-10

Similar Documents

Publication Publication Date Title
WO2009046593A1 (fr) Procédé de communication d'application pour un terminal
AU2014269271B2 (en) Electronic device using logical channels for communication
WO2013097452A1 (fr) Procédé pour la réception de données, procédé pour la transmission de données, terminal mobile et serveur
CN101453404A (zh) 一种实现负载均衡的方法及装置
WO2011130940A1 (fr) Procédé de traitement d'intégration multiservices et plate-forme d'intégration de services
CN101281480B (zh) 一种嵌入式系统中实现睡眠功能的方法
WO2012009936A1 (fr) Système et procédé de gestion de grappes
CN101222483A (zh) 业务触发方法、系统及业务触发装置
WO2023083038A1 (fr) Procédé et appareil de traitement de données de centre d'enregistrement multiple, dispositif et support de stockage
WO2013185441A1 (fr) Dispositif et procédé permettant de commander une communication de données multi-pdp pour un dispositif à large bande mobile
JP2011029896A (ja) 遠隔起動システムおよびその方法
WO2008025198A1 (fr) Procédé, système et appareil pour la communication entre un terminal et un serveur
WO2012151998A1 (fr) Procédé de traitement de données et appareil de commande pour un dispositif de diffusion mobile
WO2012100717A1 (fr) Procédé, système et élément de réseau permettant le lancement d'une pagination active
WO2011072537A1 (fr) Appareil, procédé et système de traitement de commandes at
WO2010130131A1 (fr) Système et procédé de mise en oeuvre de fonctionnement en parallèle de tâches de gestion d'équipement
WO2007009386A1 (fr) Méthode et système pour fournir un service supplémentaire sur signal crochet commutateur
EP2173110B1 (fr) Procédé de réalisation pour un appel de nouvelle réponse
EP2391094B1 (fr) Appareil de téléphonie de réseau et système supportant la téléphonie Internet sans fil
CN114816792B (zh) 一种基于专用通道的远程函数调用方法
CN102262533B (zh) 终端、触发方法和终端间应用程序通讯方法
WO2012126212A1 (fr) Appareil de communication et procédé pour la couche d'interface d'un dispositif d'identification à radiofréquence
CN101820691A (zh) 能够合并异类网络上的电话服务的方法和移动电话终端
WO2009036621A1 (fr) Procédé de déclenchement d'un appel pour un terminal de communication numérique à ressources partagées
WO2012071860A1 (fr) Procédé de communication de synchronisation entre des cartes uniques d'une unité d'habitations multiples et unité d'habitations multiples associée

Legal Events

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

Ref document number: 07855769

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 07855769

Country of ref document: EP

Kind code of ref document: A1