CN107741887A - A kind of communication interaction method and apparatus of inter-module - Google Patents

A kind of communication interaction method and apparatus of inter-module Download PDF

Info

Publication number
CN107741887A
CN107741887A CN201710993268.3A CN201710993268A CN107741887A CN 107741887 A CN107741887 A CN 107741887A CN 201710993268 A CN201710993268 A CN 201710993268A CN 107741887 A CN107741887 A CN 107741887A
Authority
CN
China
Prior art keywords
shared data
component
data
mark
data identification
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.)
Pending
Application number
CN201710993268.3A
Other languages
Chinese (zh)
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.)
Shandong Inspur Genersoft Information Technology Co Ltd
Original Assignee
Shandong Inspur Genersoft Information Technology 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 Shandong Inspur Genersoft Information Technology Co Ltd filed Critical Shandong Inspur Genersoft Information Technology Co Ltd
Priority to CN201710993268.3A priority Critical patent/CN107741887A/en
Publication of CN107741887A publication Critical patent/CN107741887A/en
Pending legal-status Critical Current

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

Abstract

The invention provides a kind of communication interaction method and apparatus of inter-module, this method includes:The shared Data Identification of storage, the shared data corresponding with shared Data Identification, at least two components associated with shared data mark;The action notice that current component is sent is received, action notice includes:Current component mark, currently shared Data Identification and data change rule;According to shared Data Identification, the shared data corresponding with shared Data Identification, it is determined that the currently shared data corresponding with current shared Data Identification;Current shared data are modified according to data change rule, generation target shares data;Identified according to associated with shared data at least two components mark and current component, it is determined that with target at least one associated component that to share data associated, wherein, current component is not included at least one associated component;Target is shared into data and is sent at least one associated component.Scheme provided by the invention can reduce the inter-module degree of coupling.

Description

A kind of communication interaction method and apparatus of inter-module
Technical field
The present invention relates to field of computer technology, the communication interaction method and apparatus of more particularly to a kind of inter-module.
Background technology
With the development of mobile terminal, the function of various applications and interface are also more abundant, in practical application scene, warp It is commonly present the mutual calling of different inter-modules.Therefore, the communication interaction of inter-module turns into an important factor for influence application function.
In the prior art, any two inter-module is general directly calls mutually, for example, component 1 and component 2 have shared number According to when the shared data in component 1 change, the notification component 2 of component 1, being updated to shared data therein.
But this method causes the degree of coupling of inter-module higher.
The content of the invention
The embodiments of the invention provide a kind of communication interaction method and apparatus of inter-module, the coupling of inter-module can be reduced Degree.
In a first aspect, the embodiments of the invention provide a kind of communication interaction method of inter-module, including:
The shared Data Identification of storage, the shared data corresponding with the shared Data Identification and the shared data phase At least two components mark of association;
Also include:
The action notice that current component is sent is received, wherein, the action notice includes:Current component identifies, is current Shared Data Identification and data change rule;
According to the shared Data Identification, the shared data corresponding with the shared Data Identification, it is determined that working as with described The corresponding currently shared data of preceding shared Data Identification;
The currently shared data are modified according to the data change rule, generation target shares data;
According at least two components mark and current component mark associated with the shared data, it is determined that and institute State target and share the associated at least one associated component of data, wherein, do not include at least one associated component described Current component;
The target is shared into data and is sent at least one associated component.
Preferably,
After the action notice that the reception current component is sent, in the determination and the currently shared Data Identification Before corresponding currently shared data, further comprise:
Whether judge includes the current component at least two components mark identifies, if it is, performing described According to the shared Data Identification, the shared data corresponding with the shared Data Identification, it is determined that currently sharing data with described Corresponding currently shared data are identified, otherwise, terminate current process.
Second aspect, the embodiments of the invention provide a kind of communication interaction device of inter-module, including:
Memory cell, for storing shared Data Identification, the shared data corresponding with the shared Data Identification and institute State the associated at least two components mark of shared data;
Receiving unit, for receiving the action notice of current component transmission, wherein, the action notice includes:Currently Component mark, currently shared Data Identification and data change rule;
Changing unit, for according to memory cell storage to the shared Data Identification and the shared data mark Shared data corresponding to sensible, it is determined that corresponding with the current shared Data Identification that the receiving unit receives is current Shared data;The currently shared data are modified according to the data change rule, generation target shares data;According to At least two components mark and current component mark associated with the shared data, it is determined that sharing number with the target According to associated at least one associated component, wherein, the current component is not included at least one associated component;
Communication unit, the target for the changing unit to be generated share data and are sent at least one pass Join component.
Preferably,
Further comprise:
Judging unit, it is described whether at least two component for judging the memory cell storage includes in identifying The current component mark that receiving unit receives, if it is, triggering the changing unit, otherwise, terminate current process.
The third aspect, the embodiments of the invention provide a kind of computer-readable recording medium, including execute instruction, when the place of storage control When managing the device execution execute instruction, the storage control performs the method described in any of the above-described embodiment.
Fourth aspect, the embodiments of the invention provide a kind of storage control, including:Processor, memory and bus;
The memory is used to store execute instruction, and the processor is connected with the memory by the bus, when During the storage control operation, the execute instruction of memory storage described in the computing device, so that the storage Controller performs the method described in any of the above-described embodiment.
The embodiments of the invention provide a kind of communication interaction method and apparatus of inter-module, wherein, this method can be abstracted Go out the shared data of inter-module and store at least two components mark associated with shared data, when the mesh in current component When the shared data of mark change, the corresponding relation that can be identified according to shared data and component determines associated component, and by mesh The shared data of mark are sent to associated component.This method avoids inter-module from directly interacting, and can reduce the degree of coupling of inter-module.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing There is the required accompanying drawing used in technology description to be briefly described, it should be apparent that, drawings in the following description are the present invention Some embodiments, for those of ordinary skill in the art, on the premise of not paying creative work, can also basis These accompanying drawings obtain other accompanying drawings.
Fig. 1 is a kind of flow chart of the communication interaction method for inter-module that one embodiment of the invention provides;
Fig. 2 is a kind of flow chart of the communication interaction method for inter-module that another embodiment of the present invention provides;
Fig. 3 is a kind of structural representation of the communication interaction device for inter-module that one embodiment of the invention provides;
Fig. 4 is a kind of structural representation of the communication interaction device for inter-module that another embodiment of the present invention provides.
Embodiment
To make the purpose, technical scheme and advantage of the embodiment of the present invention clearer, below in conjunction with the embodiment of the present invention In accompanying drawing, the technical scheme in the embodiment of the present invention is clearly and completely described, it is clear that described embodiment is Part of the embodiment of the present invention, rather than whole embodiments, based on the embodiment in the present invention, those of ordinary skill in the art The every other embodiment obtained on the premise of creative work is not made, belongs to the scope of protection of the invention.
As shown in figure 1, the embodiments of the invention provide a kind of communication interaction method of inter-module, this method can include with Lower step:
Step 101:The shared Data Identification of storage, the shared data corresponding with shared Data Identification and shared data phase At least two components mark of association;
Step 102:The action notice that current component is sent is received, wherein, action notice includes:Current component mark, Currently shared Data Identification and data change rule;
Step 103:According to shared Data Identification, the shared data corresponding with shared Data Identification, it is determined that being total to current There are the currently shared data that Data Identification is corresponding;
Step 104:Current shared data are modified according to data change rule, generation target shares data;
Step 105:According at least two components mark and current component mark associated with shared data, it is determined that and mesh The associated at least one associated component of the shared data of mark, wherein, current component is not included at least one associated component;
Step 106:Target is shared into data and is sent at least one associated component.
This method can take out the shared data of inter-module and store at least two components associated with shared data Mark, when the target in current component, which shares data, to change, what can be identified according to shared data and component corresponding closes System, determines associated component, and target is shared into data and is sent to associated component.This method avoids inter-module from directly interacting, The degree of coupling of inter-module can be reduced.
In one embodiment of the invention, in order to be filtered to the action notice that current component is sent, work as receiving After the action notice that front assembly is sent, it is determined that it is corresponding with current shared Data Identification currently share data before, enter One step includes:
Whether judge includes current component at least two components mark identifies, if it is, performing according to shared data mark Know, the shared data corresponding with shared Data Identification, it is determined that the currently shared data corresponding with current shared Data Identification, Otherwise, current process is terminated.
When being stored with current component mark, it is legal ones to determine current component, can carry out component by this method Between communication interaction.
As shown in Fig. 2 the present invention by taking the communication interaction of three inter-modules as an example, is carried out to the communication interaction method of inter-module Detailed description, this method comprise the following steps:
Step 201:The shared Data Identification of storage, the shared data corresponding with shared Data Identification and shared data phase At least two components mark of association.
It is the shared Data Identification of storage, the shared data corresponding with shared Data Identification, associated with shared data At least two components mark is as shown in table 1.
Table 1
Shared Data Identification Shared data Component identifies
001 X a、b
002 Y a、b、c
003 Z a
Step 202:The action notice that current component is sent is received, wherein, action notice includes:Current component mark, Currently shared Data Identification and data change rule.
So that current component is a as an example, the shared data in a are changed, and a sending actions notice, action notice includes: Current component mark a, currently shared Data Identification 001 and data change rule M.
Wherein, data change rule M is the change that data X is shared caused by action, for example, shared data X is changed to W。
Step 203:Whether judge includes current component at least two components mark identifies, if it is, performing step 204, otherwise, terminate current process.
Current component is identified as a, is present in the component mark of table 1.
Step 204:According to shared Data Identification, the shared data corresponding with shared Data Identification, it is determined that being total to current There are the currently shared data that Data Identification is corresponding.
Determined currently to share data X according to table 1.
Step 205:Current shared data are modified according to data change rule, generation target shares data.
Shared data X is changed to W, then it is W that target, which shares data,.
Step 206:According at least two components mark and current component mark associated with shared data, it is determined that and mesh The associated at least one associated component of the shared data of mark, wherein, current component is not included at least one associated component.
By the component mark corresponding component work in the component mark being associated with shared data in addition to current component identifies For associated component, i.e. b.
Step 207:Target is shared into data and is sent at least one associated component.
Target is shared into data W and is sent to b.Component carries out differential operation according to the change of data, determines that current interface is It is no to need change (refreshing or Local hydrodynamic unit do not process).
It is the partial code for realizing this method below:
(1) data storage
(2) assembly initialization
(3) action manager
(4) task manager
// initialization event manager
classEventManger extend IEventManger{
constructor(){
super()
}
//Action action triggers
trigger(action,data){
switch(type){
case‘ui_one_click’:
DataContainer.removeItem();
DataContainer.Notify();
}
}
}
As shown in figure 3, the embodiments of the invention provide a kind of communication interaction device of inter-module, including:
Memory cell 301, for storing shared Data Identification, shared data corresponding with shared Data Identification, together There is at least two components mark that data are associated;
Receiving unit 302, for receiving the action notice of current component transmission, wherein, action notice includes:Current group Part mark, currently shared Data Identification and data change rule;
Changing unit 303, for according to the storage of memory cell 301 to shared Data Identification, relative with shared Data Identification The shared data answered, it is determined that the currently shared data corresponding with the current shared Data Identification that receiving unit 302 receives;Root Current shared data are modified according to data change rule, generation target shares data;According to associated with shared data At least two components identify and current component mark, it is determined that with target at least one associated component that to share data associated, its In, current component is not included at least one associated component;
Communication unit 304, the target for changing unit 303 to be generated share data and are sent at least one associated group Part.
As shown in figure 4, the device also includes:Judging unit 305, at least two stored for judging memory cell 301 Whether current component mark that receiving unit 302 receive is included in component mark, if it is, triggering changing unit 303, no Then, current process is terminated.
The contents such as the information exchange between each unit, implementation procedure in said apparatus, due to implementing with the inventive method Example is based on same design, and particular content can be found in the narration in the inventive method embodiment, and here is omitted.
The embodiments of the invention provide a kind of computer-readable recording medium, including execute instruction, when the computing device of storage control During execute instruction, storage control performs the method in any of the above-described embodiment.
The embodiments of the invention provide a kind of storage control, including:Processor, memory and bus;
Memory is used to store execute instruction, and processor is connected with memory by bus, when storage control is run, The execute instruction of computing device memory storage, so that storage control performs the method in any of the above-described embodiment.
To sum up, each embodiment of the present invention at least has the effect that:
1st, in embodiments of the present invention, this method can take out the shared data of inter-module and store and shared data Associated at least two components mark, can be according to shared number when the target in current component, which shares data, to change According to the corresponding relation identified with component, associated component is determined, and target is shared into data and is sent to associated component.This method avoids Inter-module directly interacts, and can reduce the degree of coupling of inter-module.
It should be noted that herein, such as first and second etc relational terms are used merely to an entity Or operation makes a distinction with another entity or operation, and not necessarily require or imply and exist between these entities or operation Any this actual relation or order.Moreover, term " comprising ", "comprising" or its any other variant be intended to it is non- It is exclusive to include, so that process, method, article or equipment including a series of elements not only include those key elements, But also the other element including being not expressly set out, or also include solid by this process, method, article or equipment Some key elements.In the absence of more restrictions, the key element limited by sentence "including a ...", it is not excluded that including Other identical factor in the process of the key element, method, article or equipment also be present.
One of ordinary skill in the art will appreciate that:Realizing all or part of step of above method embodiment can pass through Programmed instruction related hardware is completed, and foregoing program can be stored in computer-readable storage medium, the program Upon execution, the step of execution includes above method embodiment;And foregoing storage medium includes:ROM, RAM, magnetic disc or light Disk etc. is various can be with the medium of store program codes.
It is last it should be noted that:Presently preferred embodiments of the present invention is the foregoing is only, is merely to illustrate the skill of the present invention Art scheme, is not intended to limit the scope of the present invention.Any modification for being made within the spirit and principles of the invention, Equivalent substitution, improvement etc., are all contained in protection scope of the present invention.

Claims (6)

1. a kind of communication interaction method of inter-module, it is characterised in that including:
It is the shared Data Identification of storage, the shared data corresponding with the shared Data Identification, associated with the shared data At least two components mark;
Also include:
The action notice that current component is sent is received, wherein, the action notice includes:Current component mark, currently share Data Identification and data change rule;
According to the shared Data Identification, the shared data corresponding with the shared Data Identification, it is determined that being currently total to described There are the currently shared data that Data Identification is corresponding;
The currently shared data are modified according to the data change rule, generation target shares data;
Identified according to associated with the shared data at least two components mark and the current component, it is determined that with the mesh The associated at least one associated component of the shared data of mark, wherein, do not include at least one associated component described current Component;
The target is shared into data and is sent at least one associated component.
2. a kind of communication interaction method of inter-module, it is characterised in that
It is relative with the currently shared Data Identification in the determination after the action notice that the reception current component is sent Before the currently shared data answered, further comprise:
Whether judge includes the current component at least two components mark identifies, if it is, performing described according to institute Shared Data Identification, the shared data corresponding with the shared Data Identification are stated, it is determined that currently sharing Data Identification with described Corresponding currently shared data, otherwise, terminate current process.
A kind of 3. communication interaction device of inter-module, it is characterised in that including:
Memory cell, for store shared Data Identification, the shared data corresponding with the shared Data Identification, with it is described common There is at least two components mark that data are associated;
Receiving unit, for receiving the action notice of current component transmission, wherein, the action notice includes:Current component Mark, currently shared Data Identification and data change rule;
Changing unit, for according to the memory cell storage to the shared Data Identification, with the shared Data Identification phase Corresponding shared data, it is determined that corresponding with the current shared Data Identification that the receiving unit receives is current shared Data;The currently shared data are modified according to the data change rule, generation target shares data;According to institute Shared data associated at least two components mark and current component mark are stated, it is determined that sharing data phase with the target At least one associated component of association, wherein, the current component is not included at least one associated component;
Communication unit, the target for the changing unit to be generated share data and are sent at least one associated group Part.
4. the communication interaction device of a kind of inter-module, it is characterised in that further comprise:
Whether judging unit, at least two component for judging the memory cell storage include the reception in identifying The current component mark that unit receives, if it is, triggering the changing unit, otherwise, terminate current process.
5. a kind of computer-readable recording medium, it is characterised in that including execute instruction, refer to when being performed described in the computing device of storage control When making, 1 or 2 any described method of storage control perform claim requirement.
A kind of 6. storage control, it is characterised in that including:Processor, memory and bus;
The memory is used to store execute instruction, and the processor is connected with the memory by the bus, when described When storage control is run, the execute instruction of memory storage described in the computing device, so that the storage control 1 or 2 any described method of device perform claim requirement.
CN201710993268.3A 2017-10-23 2017-10-23 A kind of communication interaction method and apparatus of inter-module Pending CN107741887A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710993268.3A CN107741887A (en) 2017-10-23 2017-10-23 A kind of communication interaction method and apparatus of inter-module

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710993268.3A CN107741887A (en) 2017-10-23 2017-10-23 A kind of communication interaction method and apparatus of inter-module

Publications (1)

Publication Number Publication Date
CN107741887A true CN107741887A (en) 2018-02-27

Family

ID=61236837

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710993268.3A Pending CN107741887A (en) 2017-10-23 2017-10-23 A kind of communication interaction method and apparatus of inter-module

Country Status (1)

Country Link
CN (1) CN107741887A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110083356A (en) * 2019-04-28 2019-08-02 成都四方伟业软件股份有限公司 Component style synchronized methods, device and server
CN111580812A (en) * 2019-02-18 2020-08-25 阿里巴巴集团控股有限公司 Data visualization component communication method and system, electronic device and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101009516A (en) * 2006-01-26 2007-08-01 华为技术有限公司 A method and system for data synchronization
CN102404387A (en) * 2011-10-25 2012-04-04 上海聚力传媒技术有限公司 Method, device and equipment for information synchronization with other nodes
CN104253872A (en) * 2014-10-16 2014-12-31 深圳市中兴移动通信有限公司 Synchronous information updating method, system and terminal
CN105159788A (en) * 2015-09-11 2015-12-16 Tcl集团股份有限公司 Method and system for dynamic resource sharing between Android applications
CN106126197A (en) * 2016-05-31 2016-11-16 美通云动(北京)科技有限公司 Make the method and device of the mobile terminal application page and PC end application page synchronization
US20170118165A1 (en) * 2014-11-08 2017-04-27 Ashish Kumar System and method for controlled sharing and synchronizing information across a plurality of mobile client application computers

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101009516A (en) * 2006-01-26 2007-08-01 华为技术有限公司 A method and system for data synchronization
CN102404387A (en) * 2011-10-25 2012-04-04 上海聚力传媒技术有限公司 Method, device and equipment for information synchronization with other nodes
CN104253872A (en) * 2014-10-16 2014-12-31 深圳市中兴移动通信有限公司 Synchronous information updating method, system and terminal
US20170118165A1 (en) * 2014-11-08 2017-04-27 Ashish Kumar System and method for controlled sharing and synchronizing information across a plurality of mobile client application computers
CN105159788A (en) * 2015-09-11 2015-12-16 Tcl集团股份有限公司 Method and system for dynamic resource sharing between Android applications
CN106126197A (en) * 2016-05-31 2016-11-16 美通云动(北京)科技有限公司 Make the method and device of the mobile terminal application page and PC end application page synchronization

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111580812A (en) * 2019-02-18 2020-08-25 阿里巴巴集团控股有限公司 Data visualization component communication method and system, electronic device and storage medium
CN110083356A (en) * 2019-04-28 2019-08-02 成都四方伟业软件股份有限公司 Component style synchronized methods, device and server

Similar Documents

Publication Publication Date Title
CN109241772B (en) Invoice block chain recording method, invoice block chain recording device, block chain gateway server and invoice block chain recording medium
CN105468302B (en) A kind of method, apparatus and system of processing data
CN104572446B (en) A kind of automated testing method and system
CN107404740B (en) Method for switching network, device and the terminal device of safety
CN106023642A (en) Parking stall reservation method, corresponding terminal, server and device
CN112766646B (en) Method, device, equipment and storage medium for generating and processing task flow
CN109656986A (en) A kind of householder method that business datum summarizes, device and electronic equipment
CN106569898A (en) Resource distribution method and mobile terminal
CN109582458A (en) Resource information loading method, device, storage medium and processor
CN107741887A (en) A kind of communication interaction method and apparatus of inter-module
CN113312560B (en) Group detection method and device and electronic equipment
CN104407808B (en) The method and apparatus for writing data
CN108733536B (en) Monitoring management system and method
CN115328621B (en) Transaction processing method, device, equipment and storage medium based on block chain
CN108022056B (en) BIM-based structure dynamic response safety monitoring system and method
CN109245941A (en) A kind of service compensation method and device
CN105095119B (en) A kind of method and device to communicate with ADB equipment
CN108984238A (en) Gesture processing method, device and the electronic equipment of application program
CN105138666B (en) A kind of method and terminal of data processing
JP6564067B2 (en) Service management method and apparatus
CN108228340A (en) terminal control method and device, terminal device and computer readable storage medium
CN112053125A (en) Countersigning method and device, electronic equipment and computer readable storage medium
CN108376314B (en) Material allocation method, device, server and storage medium
CN106530068A (en) Value-added tax management system and method
CN112506626A (en) Application program starting method, computer equipment and storage medium

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20180227