CN111090530B - Distributed inter-process communication bus system - Google Patents

Distributed inter-process communication bus system Download PDF

Info

Publication number
CN111090530B
CN111090530B CN201911249830.7A CN201911249830A CN111090530B CN 111090530 B CN111090530 B CN 111090530B CN 201911249830 A CN201911249830 A CN 201911249830A CN 111090530 B CN111090530 B CN 111090530B
Authority
CN
China
Prior art keywords
data object
module
application program
request information
database
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911249830.7A
Other languages
Chinese (zh)
Other versions
CN111090530A (en
Inventor
饶东铭
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN201911249830.7A priority Critical patent/CN111090530B/en
Publication of CN111090530A publication Critical patent/CN111090530A/en
Application granted granted Critical
Publication of CN111090530B publication Critical patent/CN111090530B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/542Event management; Broadcasting; Multicasting; Notifications
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/543Local

Abstract

The invention provides a distributed inter-process communication bus system, which relates to the technical field of communication and comprises: the access layer is in communication connection with application programs of at least two electronic devices, wherein the application programs of the at least two electronic devices comprise a first application program of a first electronic device and a second application program of a second electronic device; a software development kit in communication with the access stratum; a database communicatively coupled to the software development kit; the software development kit is used for acquiring first request information of a first application program for requesting to acquire a data object of a second application program, sending the first request information to the second application program, acquiring the data object generated by the second application program, and sending the data object to the first application program; the database is used for storing data objects. According to the scheme of the invention, the application programs of the plurality of electronic devices can realize inter-process communication only by butt joint of the VIPC, the access cost is reduced, the electronic devices can be accessed at any time and removed at any time, and other application programs are not influenced.

Description

Distributed inter-process communication bus system
Technical Field
The invention relates to the technical field of communication, in particular to a distributed inter-process communication bus system.
Background
Communication between different applications on the mobile side is now more and more frequent, such as the need to access and manipulate data information and interface services between each other between applications A, B, C on three electronic devices, respectively. In general, communication between different processes must establish an Inter-process communication (Inter-Process Communication, IPC) channel to achieve the purpose of Inter-process communication, and an IPC channel must be established between every two electronic devices to achieve end-to-end communication.
Disclosure of Invention
The embodiment of the invention provides a distributed inter-process communication bus system, which is used for solving the problems of high access cost, too high coupling degree of application modules and poor compatibility caused by communication among application programs of a plurality of electronic devices in the prior art.
In order to solve the technical problems, the invention is realized as follows:
in a first aspect, an embodiment of the present invention provides a distributed inter-process communication bus system, including:
the access layer is in communication connection with application programs of at least two electronic devices, wherein the application programs of the at least two electronic devices comprise a first application program of a first electronic device and a second application program of a second electronic device;
a software development kit in communication with the access stratum;
a database communicatively coupled to the software development kit;
the software development kit is used for acquiring first request information of the first application program, sending the first request information to the second application program, acquiring a data object generated by the second application program according to the first request information, and sending the data object to the first application program, wherein the first request information is used for requesting to acquire the data object of the second application program;
the database is used for storing the data objects.
In this way, in the embodiment of the invention, the software development kit acquires the first request information of the first application program to acquire the data object of the second application program, and sends the first request information to the second application program, and acquires the data object generated by the second application program according to the first request information, and sends the data object to the first application program, so that the application programs of a plurality of electronic devices can realize Inter-process communication only by docking a distributed Inter-process communication bus system (Vivo-Inter-Process Communication, VIPC), the access cost is reduced, the access can be realized at any time, the application programs of other electronic devices can not be influenced at any time, and the coupling degree between application modules is reduced.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the description of the embodiments of the present invention will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 illustrates a prior art communication among applications of a plurality of electronic devices;
FIG. 2 illustrates communication among applications of a plurality of electronic devices in accordance with an embodiment of the present invention;
FIG. 3 illustrates a hierarchical schematic of a VIPC in accordance with an embodiment of the present invention;
FIG. 4 is a schematic diagram of data object delivery according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
As shown in fig. 1, A, B, C, D, E are respectively application programs of 5 different electronic devices, the number of times that the 5 application programs need to establish an IPC channel is 10 times, if n (n is an integer greater than or equal to 2) ends are provided, the number of times that the IPC channel needs to be accessed is n (n-1)/2, and the whole access cost is exponentially increased, which tends to increase the access complexity, cause the access speed and the slow and very low efficiency, and is unfavorable for the backward expansion. When A and B communicate through IPC mechanism, a connection is established, module coupling is generated, any change of B will affect A, otherwise any change of A will affect B. Such a module is too high in coupling, which tends to increase the cost of code maintenance and is disadvantageous for rapid iterative development. Particularly, if the access of the C end and the D end is considered, the coupling degree is greatly increased, and the maintenance cost is greatly increased. Moreover, if there is a new requirement for each module to be updated, compatibility problems are easy to occur, such as: when the A end upgrades to the new version, the B end has the new version but the user chooses not to update, and then the problem is easy to happen. And if this is the case, the compatibility problem caused by the version differences is more pronounced. Therefore, as shown in fig. 2, in the case of 5 electronic devices, only each electronic device needs to be connected with the VIPC, the VIPC mechanism is a communication bus, data sharing and transmission of application programs of all electronic devices are in a communication channel, and communication between application programs of any electronic device and application programs of other electronic devices can be realized by accessing the VIPC once.
As shown in fig. 3, an embodiment of the present invention provides a distributed inter-process communication bus system, including:
the access layer is in communication connection with application programs of at least two electronic devices, wherein the application programs of the at least two electronic devices comprise a first application program of a first electronic device and a second application program of a second electronic device;
a software development kit in communication with the access stratum;
a database communicatively coupled to the software development kit;
the software development kit is used for acquiring first request information of the first application program, sending the first request information to the second application program, acquiring a data object generated by the second application program according to the first request information, and sending the data object to the first application program, wherein the first request information is used for requesting to acquire the data object of the second application program;
the database is used for storing the data objects.
It should be noted that the data object includes second application data acquired by the first application.
Specifically, as shown in fig. 3, the distributed inter-process communication bus system is divided into three layers from top to bottom, namely an access layer, a software development package and a database. The access layer is a distributed feature implementation, and is divided into a data generating end Producer end (i.e. a data transmitting end, generally speaking, a transmitting end) and a data consuming end consumer end (i.e. a data receiving end, generally speaking, a receiving end). The respective processes of the application programs of the plurality of electronic devices, that is, the P1 process, the P2 process, the P3 process, and the like in fig. 3 are started at the access layer.
Specifically, as shown in fig. 3, the software development kit may specifically provide a software development kit for an access layer to provide a cross-process communication connection, and the VIPC provides each electronic device with access in the manner of the software development kit. The software development kit is a characteristic implementation of cross-process communication, mainly provides some cross-process communication interfaces for an access layer to use, and can comprise a plurality of application program interfaces (Application Programming Interface, API) which can provide a series of application program interfaces for calling and using application programs of electronic equipment for the VIPC so as to realize data transfer among application programs of the electronic equipment. The Producer APIs are interface methods called by the application sending end provided for the electronic device, the Consumer APIs are interface methods called by the application receiving end provided for the electronic device, the Common APIs are interface methods commonly called by the application sending end and the receiving end provided for the electronic device, the LiveData APIs are interface methods of data objects, the LiveData is a data transfer object (namely a data object), the LiveDataProducer is responsible for sending the LiveData object, and the LiveDataConsumer is responsible for receiving the LiveData object. Libs are public libraries of third parties, such as a data encryption library Sqlicpher, a static page display control Nuwangine and the like.
Specifically, as shown in fig. 3, the database is implemented by the characteristics of the data bus, and all data is stored by one database, so that the data sharing access of the application programs of all electronic devices can be realized, and the characteristics of the data bus are achieved. Wherein, P1.db, p2.db, p3.db and the like refer to database files corresponding to application program processes of the electronic devices; C/R/U/D indicates the initial shorthand of adding a plurality of words of Create, reading Read, updating Update and deleting Delete when doing calculation processing, and data operation.
In the embodiment of the invention, the first request information of the first application program for acquiring the second application program data is acquired through the software development kit, the first request information is sent to the second application program, the data object generated by the second application program according to the first request information is acquired, and the data object is sent to the first application program, the inter-process communication is supported by the VIPC, the inter-process communication can be realized by the application programs of a plurality of electronic devices only by butting the VIPC, no module coupling exists, the access cost is reduced, the application programs of the electronic devices can be accessed at any time, the application programs of other electronic devices can not be influenced, and the application programs of the other electronic devices can be accessed at any time, namely the application programs are accessed and used at any time.
Optionally, as shown in fig. 4, the software development kit includes:
the receiving module is used for receiving the first request information and sending the first request information to the management module;
the management module is used for acquiring the data object according to the first request information and storing the data object into the database;
the monitoring module is used for acquiring the data object in the database and sending the data object to the first application program;
the receiving module, the management module and the monitoring module are in communication connection.
Optionally, as shown in fig. 4, the software development kit further includes:
the sending module is in communication connection with the management module and is used for receiving the first request information sent by the management module, sending the first request information to the second application program, acquiring the data object generated by the second application program and sending the data object to the management module.
Specifically, a first application program is connected with a receiving end of an access layer, and a second application program is connected with a transmitting end of the access layer; the first application program sends the first request information to the management module through the receiving module, the management module searches a sending module capable of obtaining a data object of a second application program according to the first request information, and sends the first request information to the sending module, then the sending module sends the first request information to the second application program, so that the second application program generates a data object (namely a data object LiveData) related to the second application program according to the first request information, the sending module obtains the data object generated by the second application program, and sends the data object to the management module, and the management module sends information of inserting the data object (namely a data object) to the database, and stores the data object in the database. The first application program can acquire the data object of the second application program in the database through the monitoring module.
Specifically, the receiving module may be specifically responsible for receiving a LiveData data object (i.e. livedataConsumer), the sending module may be specifically responsible for sending a LiveData data object (i.e. LiveDataProducer), the management module may be specifically responsible for managing the LiveData data object for the LiveDataManager, and the listening module may be a listener, which is responsible for listening and processing the received data object.
Optionally, as shown in fig. 4, the database is respectively connected with the monitoring module and the management module in a communication manner;
the database is specifically configured to store the data object acquired by the management module, and send notification information for storing the data object to the monitoring module.
Specifically, after receiving the information of the inserted data object sent by the management module, the database stores the data object in the database. After the data object is stored, the database sends a notification message of the stored data object to the monitoring module.
Optionally, as shown in fig. 4, the monitoring module is specifically configured to send, after receiving the notification information, second request information that requests to process the data object to the database; and receiving the data object sent by the database according to the second request information.
Specifically, after receiving the notification message, the monitoring module sends second request information to the database to request to process the data object, and if the database allows to process the data object, the monitoring module may acquire the data object, process the data object after acquiring the data object, and send the data object to the first application program, so that the first application program acquires the data object of the second application program.
Alternatively, as shown in fig. 4, the database may include:
the control module is in communication connection with the management module and is used for receiving the data object sent by the management module and controlling the data object to be stored in the storage module;
and the storage module is in communication connection with the control module and is used for storing the data object.
Specifically, the control module may be a class management object vipcprovider of the operation database, and the storage module stores data files of application programs of the plurality of electronic devices.
Optionally, as shown in fig. 4, the control module is in communication connection with the monitoring module, and is further configured to send the notification information to the monitoring module after the data object is saved in the storage module; and receiving the second request information sent by the monitoring module after receiving the notification information.
Specifically, the control module controls the data object to be stored in the storage module after receiving the information of the inserted data object sent by the management module. After the storage module stores the data object, the control module sends a notification message of the stored data object to the monitoring module; and the control module receives the second request information sent by the monitoring module under the condition that the monitoring module sends the second request information to the database.
Optionally, as shown in fig. 4, the control module is further configured to delete the data object from the storage module after sending the data object to the listening module according to the second request information.
Specifically, the second request information may include information requesting to read the data object, and information requesting to delete the data object stored in the database after the listening module reads the data object. After the monitoring module reads the data object, the control module controls the data object to be deleted from the storage module, so that the storage space can be saved.
In addition, in the embodiment of the present invention, a central server may be set up to provide shared storage and public services for application programs of other electronic devices, which is not limited herein.
In summary, in the above embodiment of the present invention, the VIPC access speed is fast, the complexity is low, the cost is low and controllable, no matter how many applications of the electronic devices need to be accessed to communicate with one end of the VIPC, and no workload is increased; moreover, the application programs of each accessed electronic device have no coupling degree, the rapid iteration cost is extremely low, and the modification of the application program of each accessed electronic device can not influence the application programs of other electronic devices; the inter-process communication mode can improve communication efficiency and reduce power consumption; the compatibility is excellent, and the version upgrading condition of the application program of each electronic device does not influence the application programs of other electronic devices.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising instructions for causing a terminal (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the method according to the embodiments of the present invention.
The embodiments of the present invention have been described above with reference to the accompanying drawings, but the present invention is not limited to the above-described embodiments, which are merely illustrative and not restrictive, and many forms may be made by those having ordinary skill in the art without departing from the spirit of the present invention and the scope of the claims, which are to be protected by the present invention.

Claims (7)

1. A distributed inter-process communication bus system, comprising:
the access layer is in communication connection with application programs of at least two electronic devices, wherein the application programs of the at least two electronic devices comprise a first application program of a first electronic device and a second application program of a second electronic device;
a software development kit in communication with the access stratum;
a database communicatively coupled to the software development kit;
the software development kit is used for acquiring first request information of the first application program, sending the first request information to the second application program, acquiring a data object generated by the second application program according to the first request information, and sending the data object to the first application program, wherein the first request information is used for requesting to acquire the data object of the second application program;
the database is used for storing the data objects;
the distributed inter-process communication bus system is divided into three layers from top to bottom, namely an access layer, a software development package and a database; the access layer is distributed and is divided into a data generation end and a data consumption end, and processes of application programs of a plurality of electronic devices are started at the access layer; the software development kit is a characteristic implementation of cross-process communication; the database is realized by the characteristics of a data bus, all data are stored through one database, and the data sharing access of application programs of all electronic equipment can be realized; data sharing and transmission of application programs of all electronic devices are in one communication channel;
the software development kit includes:
the receiving module is used for receiving the first request information and sending the first request information to the management module;
the management module is used for acquiring the data object according to the first request information and storing the data object into the database;
the monitoring module is used for acquiring the data object in the database and sending the data object to the first application program;
the receiving module, the management module and the monitoring module are in communication connection.
2. The system of claim 1, wherein the database is communicatively coupled to the listening module and the management module, respectively;
the database is specifically configured to store the data object acquired by the management module, and send notification information for storing the data object to the monitoring module.
3. The system according to claim 2, wherein the monitoring module is configured to send, to the database, second request information for requesting processing of the data object after receiving the notification information; and receiving the data object sent by the database according to the second request information.
4. A system according to claim 3, wherein the database comprises:
the control module is in communication connection with the management module and is used for receiving the data object sent by the management module and controlling the data object to be stored in the storage module;
and the storage module is in communication connection with the control module and is used for storing the data object.
5. The system of claim 4, wherein the control module is communicatively coupled to the listening module, the control module further configured to send the notification information to the listening module after the data object is saved to the storage module; and receiving the second request information sent by the monitoring module after receiving the notification information.
6. The system of claim 5, wherein the control module is further configured to delete the data object from the storage module after sending the data object to the listening module based on the second request information.
7. The system of claim 1, wherein the software development kit further comprises:
the sending module is in communication connection with the management module and is used for receiving the first request information sent by the management module, sending the first request information to the second application program, acquiring the data object generated by the second application program and sending the data object to the management module.
CN201911249830.7A 2019-12-09 2019-12-09 Distributed inter-process communication bus system Active CN111090530B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911249830.7A CN111090530B (en) 2019-12-09 2019-12-09 Distributed inter-process communication bus system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911249830.7A CN111090530B (en) 2019-12-09 2019-12-09 Distributed inter-process communication bus system

Publications (2)

Publication Number Publication Date
CN111090530A CN111090530A (en) 2020-05-01
CN111090530B true CN111090530B (en) 2024-03-05

Family

ID=70395397

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911249830.7A Active CN111090530B (en) 2019-12-09 2019-12-09 Distributed inter-process communication bus system

Country Status (1)

Country Link
CN (1) CN111090530B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021233103A1 (en) * 2020-05-21 2021-11-25 Guangdong Oppo Mobile Telecommunications Corp., Ltd. Method and apparatus of cross-ipc access

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101661494A (en) * 2009-09-29 2010-03-03 莱芜钢铁集团有限公司 Data interactive method for distributed middleware and database
CN105556476A (en) * 2013-07-03 2016-05-04 荷宝信息科技(香港)有限公司 Method and system for conducting mobile application to mobile application data exchange
CN106101395A (en) * 2016-06-01 2016-11-09 努比亚技术有限公司 Mobile terminal and data capture method
CN108933838A (en) * 2018-08-08 2018-12-04 网易(杭州)网络有限公司 Application data processing method and device
CN110196745A (en) * 2019-05-29 2019-09-03 维沃移动通信有限公司 Data sharing method and terminal

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101661494A (en) * 2009-09-29 2010-03-03 莱芜钢铁集团有限公司 Data interactive method for distributed middleware and database
CN105556476A (en) * 2013-07-03 2016-05-04 荷宝信息科技(香港)有限公司 Method and system for conducting mobile application to mobile application data exchange
CN106101395A (en) * 2016-06-01 2016-11-09 努比亚技术有限公司 Mobile terminal and data capture method
CN108933838A (en) * 2018-08-08 2018-12-04 网易(杭州)网络有限公司 Application data processing method and device
CN110196745A (en) * 2019-05-29 2019-09-03 维沃移动通信有限公司 Data sharing method and terminal

Also Published As

Publication number Publication date
CN111090530A (en) 2020-05-01

Similar Documents

Publication Publication Date Title
US10102242B2 (en) Bulk initial download of mobile databases
CN108282529B (en) System, method and device for publishing and subscribing data
CN102904878B (en) For the method and system of the efficient download of packet
US20030105847A1 (en) System and method for server managed modification of operating system data stored within a network device
CN110019080B (en) Data access method and device
CN102521224A (en) Directory Leasing
US20130097595A1 (en) Update scanning
CN112835904A (en) Data processing method and data processing device
CN111090530B (en) Distributed inter-process communication bus system
CN113282590A (en) Interface joint debugging method and device based on 5G message
CN104639973A (en) Information pushing method and device
CN111343220B (en) Repeater, distributed file transmission method, distributed file transmission system, medium and electronic equipment
US20130144943A1 (en) Method and system for interfacing disparate networked services
CN112115206A (en) Method and device for processing object storage metadata
US8484182B1 (en) Wireless device content searching
CN111737218A (en) File sharing method and device
CN114979308B (en) Message processing method and device
CN113741796B (en) Data persistence method and device for terminal application
CN111291038B (en) Data query method and device
CN113760860B (en) Data reading method and device
CN113747200B (en) Video processing method and device, electronic equipment and readable storage medium
US20230100936A1 (en) Method, device, and computer program product for transmitting data for object storage
JP2006113663A (en) Data storage system, its method, file server, terminal and program
CN114995201A (en) Intelligent equipment control system handover method and device
CN116339625A (en) Data storage method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant