CN109343983A - Information interacting method, device, equipment and storage medium between functional module - Google Patents

Information interacting method, device, equipment and storage medium between functional module Download PDF

Info

Publication number
CN109343983A
CN109343983A CN201811162361.0A CN201811162361A CN109343983A CN 109343983 A CN109343983 A CN 109343983A CN 201811162361 A CN201811162361 A CN 201811162361A CN 109343983 A CN109343983 A CN 109343983A
Authority
CN
China
Prior art keywords
functional module
function
information
interactive
cache
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.)
Granted
Application number
CN201811162361.0A
Other languages
Chinese (zh)
Other versions
CN109343983B (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.)
Hunan Hillhouse Information Technology Co.,Ltd.
Original Assignee
Wuhan Douyu Network 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 Wuhan Douyu Network Technology Co Ltd filed Critical Wuhan Douyu Network Technology Co Ltd
Priority to CN201811162361.0A priority Critical patent/CN109343983B/en
Publication of CN109343983A publication Critical patent/CN109343983A/en
Application granted granted Critical
Publication of CN109343983B publication Critical patent/CN109343983B/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

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)
  • Telephonic Communication Services (AREA)

Abstract

The embodiment of the invention discloses information interacting method, device, equipment and the storage mediums between a kind of functional module.This method comprises: the first functional module obtains interactive information, and call object acquisition function, interaction protocol object is determined from the cache object variable in bottom functional module according to interactive information mark, original data type corresponding with interaction protocol object is searched from mapping table according to interactive information mark, it is original data type by the data type conversion of interaction protocol object, obtain object exchange protocol object corresponding with the second functional module, simultaneously using interactive information as function input parameters, information exchange function in invocation target interaction protocol object, interactive information is transmitted to the second functional module.Above scheme reduces dependence and direct-coupling relationship between each functional module, improves the independence between functional module, and realizing can be with the technical effect of information exchange between multiple functional modules.

Description

Information interacting method, device, equipment and storage medium between functional module
Technical field
The present embodiments relate between field of computer technology more particularly to a kind of functional module information interacting method, Device, equipment and storage medium.
Background technique
In order to improve the development efficiency of application software, software development is carried out usually in a manner of function modoularization, i.e., will Each function division in application software is independent functional module and carries out software development.For example, will be connect to barrage message It receives, the parsing and function division of processing such as to send be barrage module, barrage message will be filtered and the data processings such as operation Function division be data processing module, be display module by the function division for the processing such as barrage message being rendered and being shown Deng.
Currently, being used when information exchange in the application software based on android system exploitation between each functional module Bottom functional module realizes the information exchange between barrage module and display module as the effect of bridge joint, reduces each Direct-coupling between functional module, but bottom functional module is merely able to the interface pair in one functional module of caching every time As just cannot achieve the information exchange between multiple functional modules when the quantity of functional module has multiple.
Summary of the invention
The embodiment of the present invention provides information interacting method, device, equipment and the storage medium between a kind of functional module, with reality Now in the applied software development based on android system, information exchange between multiple separate functional blocks reduces each function Dependence and direct-coupling relationship between module, improve the technical effect of functional module independence.
In a first aspect, the embodiment of the invention provides the information interacting methods between a kind of functional module, comprising:
First functional module obtains interactive information;Wherein, the interactive information includes interactive information mark;
First functional module calls object acquisition function, according to interactive information mark from bottom functional module Cache object variable in determine interaction protocol object, and according to the interactive information mark from mapping table search and institute The corresponding original data type of interaction protocol object is stated, is described original by the data type conversion of the interaction protocol object Data type obtains object exchange protocol object corresponding with the second functional module;Wherein, first functional module and Two functional modules are the top-level functionality module of the bottom functional module, and the object acquisition function is the bottom functional module In pre-defined function, and have private permission modifier;At least one interaction protocol is stored in the cache object variable Object, and at least one described interaction protocol object inherits different interactive interface agreements;
First functional module calls the object exchange protocol object using the interactive information as function input parameters In information exchange function, the interactive information is transmitted to second functional module;Wherein, the information exchange function root Interactive interface agreement is inherited according to the information exchange object in second functional module and is obtained, and the interactive interface agreement is institute Interaction protocol predetermined in bottom functional module is stated, the interaction protocol of each second functional module is different.
Second aspect, the embodiment of the invention also provides the information interactive devices between a kind of functional module, including the first function Energy module, the second functional module and bottom functional module, wherein first functional module includes:
Interactive information acquiring unit, for obtaining interactive information;Wherein, the interactive information includes interactive information mark;
Object exchange protocol object acquisition unit, for calling object acquisition function, according to the interactive information mark from Interaction protocol object is determined in cache object variable in bottom functional module, and is closed according to interactive information mark from mapping It is that original data type corresponding with the interaction protocol object is searched in table, by the data type of the interaction protocol object The original data type is converted to, object exchange protocol object corresponding with the second functional module is obtained;Wherein, described One functional module and the second functional module are the top-level functionality module of the bottom functional module, and the object acquisition function is institute The pre-defined function in bottom functional module is stated, and there is private permission modifier;Stored in the cache object variable to A few interaction protocol object, and at least one described interaction protocol object inherits different interactive interface agreements;
Interactive information transmission unit, for using the interactive information as function input parameters, calling target interaction association The information exchange function in object is discussed, the interactive information is transmitted to second functional module;Wherein, the information exchange Function is inherited interactive interface agreement according to the information exchange object in second functional module and is obtained, the interactive interface association View is interaction protocol predetermined in the bottom functional module, and the interaction protocol of each second functional module is different.
The third aspect, the embodiment of the invention also provides a kind of equipment, the equipment includes:
One or more processors;
Storage device, for storing one or more programs,
When one or more of programs are executed by one or more of processors, so that one or more of processing Device realizes the information interacting method between functional module provided by any embodiment of the invention.
Fourth aspect, the embodiment of the invention also provides a kind of computer readable storage mediums, are stored thereon with computer Program, the computer program realize that the information between functional module provided by any embodiment of the invention is handed over when being executed by processor Mutual method.
The technical solution of the embodiment of the present invention obtains interactive information by the first functional module, and calls object acquisition letter Number determines interaction protocol object according to interactive information mark from the cache object variable in bottom functional module, and from mapping Original data type corresponding with interaction protocol object is searched in relation table, the data type conversion by interaction protocol object is Original data type obtains object exchange protocol object corresponding with the second functional module;Simultaneously using interactive information as function Parameter is inputted, interactive information is transmitted to the second functional module, solved by the information exchange function in invocation target interaction protocol object Bottom functional module in the prior art of having determined can only cache an interface object in a functional module, can not be suitable for multiple The technical issues of information exchange between standalone module, at least one standalone feature mould can be cached by realizing bottom functional module Interface object in block, so that making can be with information exchange, each functional module independence of raising between multiple separate functional blocks Technical effect.
Detailed description of the invention
Fig. 1 is the flow chart of the information interacting method between a kind of functional module that the embodiment of the present invention one provides;
Fig. 2 is the structural schematic diagram of the information interactive device between a kind of functional module provided by Embodiment 2 of the present invention;
Fig. 3 is a kind of structural schematic diagram for equipment that the embodiment of the present invention three provides.
Specific embodiment
The present invention is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched The specific embodiment stated is used only for explaining the present invention rather than limiting the invention.It also should be noted that in order to just Only the parts related to the present invention are shown in description, attached drawing rather than entire infrastructure.
Embodiment one
Fig. 1 is the flow chart of the information interacting method between a kind of functional module that the embodiment of the present invention one provides, this implementation Example is applicable to the case where at least two independent functional modules carry out information exchange, particularly for based on Android Each functional module carries out the scene of information exchange in systematic difference software development, while can be used for other and needing to utilize Functional module carries out in the application scenarios of information exchange.This method can be executed by the information interactive device between functional module, The device can be realized that it includes multiple independent function that the device, which can integrate being equipped with internal, by the mode of software and/or hardware In the equipment of the application software of energy module, such as typically subscriber terminal equipment, such as mobile phone, tablet computer or desktop computer Deng.Referring to Fig. 1, the method for the present embodiment specifically comprises the following steps:
S110, the first functional module obtain interactive information;Wherein, the interactive information includes interactive information mark.
Wherein, functional module refers to the module for realizing certain specific functions in applied software development.First functional module can To be but not limited to any module in barrage module, data processing module and display module.Interactive information refers to the first function The information that can be interacted between module and the second functional module.Second functional module is also possible to but is not limited to barrage mould Any module in block, data processing module and display module.
Illustratively, if the first functional module is barrage module, the second functional module is display module, then barrage module obtains The interactive information taken can be barrage message, so as to the barrage message that barrage module can will acquire be transmitted in display module into Row display processing.Interactive information in the present embodiment can be barrage message or such as data acquisition request and data processing knot The message that other needs such as fruit feedback interact.
Specifically, the first functional module can obtain interactive information by receiving the information that issues of server, can also be with It is the interactive information that itself is generated, wherein can also include that interactive information identifies in interactive information, it should be noted that interaction letter Breath mark be it is unique, can be according to interactive information identifier lookup to IT policy object corresponding thereto.The present embodiment Without limitation to the acquisition modes of interactive information.
S120, the first functional module call object acquisition function, according to interactive information mark from bottom functional module Interaction protocol object is determined in cache object variable, and lookup and interaction protocol from mapping table are identified according to interactive information The data type conversion of interaction protocol object is original data type, obtained and the by the corresponding original data type of object The corresponding object exchange protocol object of two functional modules.
Wherein, first functional module and second functional module are the top-level functionality mould of the bottom functional module Block, the object acquisition function is the pre-defined function in the bottom functional module, and has public permission modifier and quiet State type modifier;At least one interaction protocol object is stored in the cache object variable.
Specifically, bottom functional module is the module for bridging the first functional module and each second functional module, and Its bottom for being located at software development architecture, so that the first functional module and each second functional module can pass through bottom functional module Carry out information exchange.Here mentioned bottom functional module is relative to where the first functional module and each second functional module Software development architecture level for, i.e. the first functional module and the second functional module software development architecture a upper level, Next level of the bottom functional module in a upper level.The quantity of second functional module is either one or more, can Choosing, the quantity of the second functional module is five, each the second functional module can have same or different friendship Mutual interface protocol.If interactive interface agreement corresponding from each second functional module is different, and defines in interactive interface agreement Data type it is also not identical, then the data type of interaction protocol object corresponding with each second functional module also not phase Together.It, can be by interaction in order to store interaction protocol object corresponding with each second functional module in layer function module on earth Protocol object stores map (enume, object) predetermined in layer function module on earth, it can interaction protocol object Data type is object type data.The information exchange object that can be understood as the second functional module inherits interactive interface agreement, The data type of obtained IT policy object can be different, in order to which IT policy object is stored layer function on earth It is object type data by the data type conversion of IT policy object in module, obtaining data type is object's Interaction protocol object.
Object acquisition function is the pre-defined function deposited in bottom functional module.The modification of object acquisition function Symbol is private permission modifier private.Cache object variable is located in bottom functional module, for storing interaction protocol pair As, it can be understood as storing data type is the cache object variable of object type data.Mapping table can be understood as bottom It is predetermined in layer function module, for storing interactive information mark and interactive interface agreement.It can be according to interactive information mark Know the interactive interface agreement really corresponding thereto from mapping table, may thereby determine that the initial data of interaction protocol object Type.
Specifically, the first functional module is believed by calling the object acquisition function in bottom functional module, and according to interaction The interactive information for including in breath is identified from the cache object variable in bottom functional module, determining opposite with interactive information mark Interaction protocol object is answered, it should be noted that the data type of the interaction protocol object got at this time is object type data. In order to realize the information exchange between the first functional module and each second functional module, need the data class of interaction protocol object Type is converted to original data type.It can be identified to find from mapping table according to interactive information and identify phase with interactive information Corresponding interactive interface agreement, so that it is determined that the original data type of interaction protocol object, by the data class of interaction protocol object Type is converted to original data type, is converted into the interaction protocol object of original data type as object exchange protocol object, And then also it is assured that the second functional module corresponding with object exchange protocol object.
Optionally, it is identified according to interactive information from enumerating in mapping table, is searched corresponding with interactive information mark Original data type, and be original data type by the data type conversion of interaction protocol object;Wherein, mapping table is enumerated To be predetermined in bottom functional module, original data type and interactive information for storing interaction protocol object identify it Between corresponding relationship.
Mapping table is enumerated specifically, pre-defining in bottom functional module, that is, enumerates mapping variable, storage interaction Corresponding relationship between message identification and interaction protocol.Illustratively, enumerating mapping variable can be with is defined as: private enum kToInterface{
KEY_A(IFuncModuleA)
KEY_B(IFuncModuleB)
KEY_C(IFuncModuleC)
}
Map (enume, object) predetermined in bottom functional module, wherein the key in map, which can be, to be enumerated Some in kToInterface enumerates value information, can determine number corresponding with its enumerated value according to the KEY of enumerated value According to type.Illustratively, interactive information identifies, i.e., KEY value is KEY_A, can determine and KEY_A phase from enumerating in mapping variable Corresponding data type is IFuncModuleA type, it can be understood as by Object data class corresponding to the KEY_A in Map Type is converted to the data information of IFuncModuleA type.
In the present embodiment, IT policy object corresponding with interaction protocol object can be stored the bottom of in advance In layer function module, wherein IT policy object is information exchange object in each second functional module by a series of Handle obtained object.First functional module can be identified according to interactive information from bottom function by calling object acquisition function The identical IT policy object with interactive information mark can be filtered out in module, and be determined from enumerating in mapping table, The object data type of interaction protocol object is converted to and is handed over by original data type corresponding with interactive information mark Mutual information identifies corresponding original data type, can be converted into the interaction protocol object of original data type as target Interaction protocol object.Since IT policy object is generated according to the information exchange object in the second functional module, from And object exchange protocol object is also to be generated according to the information exchange object in the second functional module, so as to the first functional module The information exchange with the second functional module can be realized by object exchange protocol object, while can determine that information exchange is assisted The number of the object of view can be identical as the number of the second functional module.
Optionally, it is wrapped in the module dependency attribute of the first functional module and the corresponding configuration file of each second functional module The dependence of the functional module containing bottom adds sentence.
Wherein, the configuration instruction file of functional module when configuration file is software development.
Specifically, in the module dependency attribute of the corresponding configuration file build.gradle of the first functional module In dependence, the dependence by adding bottom functional module adds sentence compile basemodule to realize the Reference of one functional module to bottom functional module.Similarly, in the corresponding configuration file of each second functional module In the module dependency attribute dependence of build.gradle, the dependence by adding bottom functional module adds sentence Compile basemodule realizes reference of each second functional module to bottom functional module, thus the present embodiment according to One bottom functional module constructs the bridge joint relationship between the first functional module and each second functional module.
Optionally, before S120, further includes:
Information exchange object in each second functional module inherits interactive interface agreement respectively, and it is to be processed to obtain at least one Original data type at least one IT policy object to be processed is converted to number of targets by IT policy object According to type, IT policy object is obtained;Bottom functional module is by the interactive information mark of IT policy object to be processed Know and original data type storage is to enumerating in mapping table;Each second functional module calls target cache function, to extremely A few IT policy object is cached, and obtains at least one cache object, at least one cache object is stored in slow It deposits in object variable;Wherein, target cache function is the pre-defined function in bottom functional module, and has public permission modification Symbol and static types modifier;Cache object is for storing the IT policy object obtained from the second functional module
Wherein, there may be information exchange objects in each second functional module, and each information exchange object It can inherit different interactive interface agreements respectively, at least one available IT policy object, wherein information exchange The data type of protocol object be also possible to it is not identical, using IT policy object at this time as information exchange to be processed Protocol object.Interactive interface agreement refers to the interface predetermined for being used to carry out information exchange, each second functional module Interactive interface agreement is different, and data type defined in interactive interface agreement can also be different.It can be in interactive interface agreement Include interactive function predetermined, i.e. information exchange function.Target cache function be it is predetermined, for cache object Function.
In order to be defined in bottom functional module in IT policy object storage to be processed on earth layer function module The data type of storage is map (enume, object), can be by the data type conversion of IT policy object to be processed For object type data, i.e. processing is target data type, obtains interaction protocol object.Meanwhile in order to ensure can be quick The data type of IT policy object is obtained, interactive information can be identified with interaction protocol storage to enumerating mapping relations In table.
In the embodiment of the present invention, target cache function is used for the IT policy object in each second functional module It is cached respectively into the cache object of bottom functional module
Specifically, different interactive interface agreement IFuncModule is pre-defined in bottom functional module, so that the first function Energy module is interacted with each second functional module according to the interactive interface agreement, it should be noted that each second function mould The interactive interface agreement of block can be the same or different.Each second more can each information exchange object in module can be after Different interactive interface agreements is held, the data type of the IT policy object obtained accordingly can also be different, by information The data type conversion of interaction protocol object is object type data, storage on earth map defined in layer function module (enume, Object in).It is arrived at the same time it can also which interactive information is identified interactive interface agreement storage corresponding with each second functional module It enumerates in mapping table, can quickly to determine original data type corresponding thereto according to interactive information mark.
Information exchange object can be inherited the interactive interface of bottom functional module by the second functional module in the present embodiment Agreement, to obtain the IT policy object of interface type.When the second functional module obtains IT policy object, IT policy object can be stored to bottom with the execution of the target cache function in automatic trigger bottom functional module Functional module.
Optionally, target cache function, which is achieved by the steps of, caches IT policy object, is delayed Deposit the function of object: bottom functional module judge respectively target cache function input parameter whether be target cache function mesh Mark input parameter;If so, being obtained by existing object keyword by IT policy target cache to cache object variable Obtain cache object, wherein cache object variable is bottom functional module object variable predetermined, for storing at least one Cache object;Cache object variable has private permission modifier.
Wherein, cache object variable has been pre-defined in the bottom functional module of the present embodiment, to cache each second function IT policy object in module is into cache object variable
Specifically, each second functional module can call target cache function, and bottom functional module specifically executes pair As cache function.Bottom functional module can get what needs cached from the function input parameters fun of target cache function Object.Later, whether the input parameter that target cache function is determined by determining fun==null is that target inputs parameter. If the input parameter of target cache function is that target inputs parameter, show to be cached;If target cache function is defeated Entering parameter not is target input parameter, then shows not cached, can call directly return at this time to terminate cache flow Journey.Pass through in the present embodiment and judges whether the input parameter of target cache function is that target inputs parameter, and program can be improved Robustness.
Optionally, the information exchange object in each second functional module inherits interactive interface agreement respectively, obtains at least one A IT policy object, comprising: each second functional module passes through information exchange object respectively, and invocation protocol is inherited crucial Word inherits interactive interface agreement, obtains IT policy object, includes information exchange function in IT policy object.
Wherein, protocol inheritance keyword is the keyword that interface protocol succession is carried out specified in Java language.
Specifically, each second functional module can be by protocol inheritance difference keyword implement, to bottom function mould Different interactive interface agreement IFuncModule is inherited in block, so that each second functional module can obtain information exchange Protocol object.Due to including information exchange function in interactive interface agreement, so that the second functional module is connect by inheriting the interaction Mouthful agreement also includes the information exchange function in the IT policy object of acquisition.It is connect due to needing to inherit distinct interaction The IT policy target cache of mouth agreement is into bottom functional module, it is therefore desirable to by the data of IT policy object Type is converted, in storage on earth layer function module.
Optionally, object acquisition function is achieved by the steps of obtains and the second functional module from bottom functional module The function of corresponding object exchange protocol object:
Bottom functional module judges whether target cache object corresponding with interactive information mark is sky object;If it is not, Functional value return function is then called, the IT policy object in target cache object is sent to the first functional module, is made For object exchange protocol object.
Specifically, at least one cache object is preset in bottom functional module, for storing from each second function The IT policy object obtained in module.The object acquisition function in bottom functional module is called in the first functional module When, bottom functional module is identified according to interactive information, is determined from least one cache object stored in caching object variable Target cache object, bottom functional module can be determined by judging whether target cache object is sky object (null object) Whether IT policy object is stored in cache object.If cache object is non-empty object, show to deposit in cache object IT policy object is contained, bottom functional module is by calling directly functional value return function Return at this time, by target IT policy object in cache object is sent in the first functional module, i.e., by the information exchange in target cache object Protocol object is determined as the object exchange protocol object in the first functional module.If cache object is empty object, show target There are no storage IT policy object in cache object, interaction flow can be suspended at this time, until in target cache object Be stored with from the second functional module obtain IT policy object when, continue the interaction flow of functional module.
The letter of S130, the first functional module using interactive information as function input parameters, in invocation target interaction protocol object Interaction function is ceased, interactive information is transmitted to the second functional module.
Wherein, information exchange function is inherited interactive interface agreement according to the information exchange object in the second functional module and is obtained , interactive interface agreement is interaction protocol predetermined in bottom functional module, and the interaction protocol of each second functional module It is identical.
Specifically, according to the above description, the object exchange protocol object in the first functional module is by the second function Information exchange object in energy module, inherits interactive interface agreement and obtains, and in IT policy object includes information Interaction function, so that object exchange protocol object also includes information exchange function.Illustratively, according to interactive interface agreement The definition of information exchange function onEvent is it is found that need to resolve to interactive information into a character string in advance in IFuncModule The eventMsg data of the eventType data of String type and an object Object type, wherein eventType is to hand over Mutual information mark, eventMsg is interactive information body, to input ginseng for interactive information as the function in information exchange function Number, passes through information exchange function onEvent (the Stirng eventType, Object in invocation target interaction protocol object EventMsg), interactive information is transmitted in the second functional module, to be based on bottom functional module, completes the first function Information exchange between module and the second functional module.Certainly, the IT policy object stored in bottom functional module has At least one, also may be implemented the information exchange between the first functional module and other second functional modules.
The technical solution of the embodiment of the present invention obtains interactive information by the first functional module, and calls object acquisition letter Number determines interaction protocol object according to interactive information mark from the cache object variable in bottom functional module, and from mapping Original data type corresponding with interaction protocol object is searched in relation table, the data type conversion by interaction protocol object is Original data type obtains object exchange protocol object corresponding with the second functional module;Simultaneously using interactive information as function Parameter is inputted, interactive information is transmitted to the second functional module, solved by the information exchange function in invocation target interaction protocol object Bottom functional module in the prior art of having determined can only cache an interface object in a functional module, can not be suitable for multiple The technical issues of information exchange between standalone module, at least one standalone feature mould can be cached by realizing bottom functional module Interface object in block, so that making can be with information exchange, each functional module independence of raising between multiple separate functional blocks Technical effect.
The embodiment of the information interactive device between functional module provided in an embodiment of the present invention below, the device with it is above-mentioned Information interacting method between the functional module of each embodiment belongs to the same inventive concept, the information exchange dress between functional module The detail content of not detailed description in the embodiment set, can be with reference to the implementation of the information interacting method between above-mentioned functional module Example.
Embodiment two
Fig. 2 is the structural schematic diagram of the information interactive device between a kind of functional module provided by Embodiment 2 of the present invention.Ginseng See Fig. 2, the information interactive device between the functional module includes: the first functional module 210, the second functional module 220 and bottom function Energy module 230, wherein the first functional module 210 includes: interactive information acquiring unit 211, object exchange protocol object acquisition list Member 212 and interactive information transmission unit 213.
Wherein, interactive information acquiring unit 211, for obtaining interactive information;Wherein, the interactive information includes interaction letter Breath mark;Object exchange protocol object acquisition unit 212 is identified for calling object acquisition function according to the interactive information Interaction protocol object is determined from the cache object variable in bottom functional module, and is identified according to the interactive information from mapping Original data type corresponding with the interaction protocol object is searched in relation table, by the data class of the interaction protocol object Type is converted to the original data type, obtains object exchange protocol object corresponding with the second functional module;Wherein, described First functional module and the second functional module are the top-level functionality module of the bottom functional module, and the object acquisition function is Pre-defined function in the bottom functional module, and there is private permission modifier;It is stored in the cache object variable At least one interaction protocol object, and at least one described interaction protocol object inherits different interactive interface agreements;Interaction letter Transmission unit 213 is ceased, for calling the letter in the object exchange protocol object using the interactive information as function input parameters Interaction function is ceased, the interactive information is transmitted to second functional module;Wherein, the information exchange function is according to Information exchange object in second functional module is inherited interactive interface agreement and is obtained, and the interactive interface agreement is the bottom The interaction protocol of interaction protocol predetermined in functional module, each second functional module is different.
Optionally, it obtains object exchange protocol object unit to be also used to: according to interactive information mark from enumerating mapping relations In table, original data type corresponding with interactive information mark is searched, and be by the data type conversion of interaction protocol object Original data type;Wherein, mapping table is enumerated to be predetermined in bottom functional module, for storing interaction protocol pair Corresponding relationship between interactive interface agreement and the interactive information mark of elephant.
Optionally, the second functional module 220 includes:
IT policy object acquisition unit: the information exchange object in each second functional module is inherited interaction respectively and is connect Mouth agreement, obtains at least one IT policy object to be processed, will at least one described IT policy pair to be processed Original data type as in is converted to target data type, obtains the IT policy object;
Bottom functional module deposits the interactive information mark and interactive interface agreement of IT policy object to be processed It stores up and enumerates in mapping table.
Target cache function calling cell, for calling target cache function, at least one described IT policy Object is cached, at least one cache object is obtained, at least one described cache object is stored in cache object variable;Its In, the target cache function is the pre-defined function in the bottom functional module, and has public permission modifier and quiet State type modifier;Cache object is for storing the IT policy object obtained from the second functional module.
Optionally, bottom functional module 230 includes target cache function execution unit, for being achieved by the steps of pair IT policy object is cached, and the function of cache object is obtained:
Judge respectively the target cache function input parameter whether be the target cache function target input ginseng Number;If so, by the IT policy target cache to cache object variable, obtaining institute by existing object keyword State cache object, wherein the cache object variable is the bottom functional module object variable predetermined, for storing At least one cache object;The cache object variable has private permission modifier and static types modifier.
Optionally, IT policy object acquisition unit, is specifically used for:
For each second functional module respectively by the information exchange object, invocation protocol inherits keyword, inherits institute Interactive interface agreement is stated, the IT policy object is obtained, is handed in the IT policy object comprising the information Mutual function.
Optionally, bottom functional module 230 includes interface definition unit, is used for: in each second functional module Information exchange object inherits interactive interface agreement respectively, before obtaining at least one IT policy object, the bottom function Interactive interface agreement described in energy module definition and the information exchange function in the interactive interface agreement, the interactive interface Agreement is the interface type with public permission modifier.
Optionally, it is wrapped in the module dependency attribute of the first functional module and the corresponding configuration file of each second functional module The dependence of the functional module containing bottom adds sentence.
The technical solution of the embodiment of the present invention obtains interactive information by the first functional module, and calls object acquisition letter Number determines interaction protocol object according to interactive information mark from the cache object variable in bottom functional module, and according to friendship Mutual information mark searches original data type corresponding with interaction protocol object from mapping table, by interaction protocol object Data type conversion be original data type, obtain object exchange protocol object corresponding with the second functional module;Simultaneously Using interactive information as function input parameters, information exchange function in invocation target interaction protocol object transmits interactive information To the second functional module, an interface pair in a functional module can only be cached by solving bottom functional module in the prior art As, can not be suitable for multiple standalone modules between information exchange the technical issues of, realizing bottom functional module can cache Interface object at least one separate functional blocks, so that making can be with information exchange, raising between multiple separate functional blocks The technical effect of each functional module independence.
Any embodiment of that present invention institute can be performed in information interactive device between functional module provided by the embodiment of the present invention Information interacting method between the functional module of offer has the corresponding functional module of information interacting method between perform function module And beneficial effect.
It is worth noting that, included each unit and module are only in the embodiment of above-mentioned barrage massage transmission device It is to be divided according to the functional logic, but be not limited to the above division, as long as corresponding functions can be realized;Separately Outside, the specific name of each functional unit is also only for convenience of distinguishing each other, the protection scope being not intended to restrict the invention.
Embodiment three
Referring to Fig. 3, a kind of equipment 300 is present embodiments provided comprising: one or more processors 320;Storage device 310, for storing one or more programs, when one or more programs are executed by one or more processors 320, so that one Or multiple processors 320 realize the information interacting method between functional module provided by the embodiment of the present invention, comprising:
First functional module obtains interactive information;Wherein, the interactive information includes interactive information mark;
First functional module calls object acquisition function, according to interactive information mark from bottom functional module Cache object variable in determine interaction protocol object, and according to the interactive information mark from mapping table search and institute The corresponding original data type of interaction protocol object is stated, is described original by the data type conversion of the interaction protocol object Data type obtains object exchange protocol object corresponding with the second functional module;Wherein, first functional module and Two functional modules are the top-level functionality module of the bottom functional module, and the object acquisition function is the bottom functional module In pre-defined function, and have private permission modifier;At least one interaction protocol is stored in the cache object variable Object, and at least one described interaction protocol object inherits different interactive interface agreements;
First functional module calls the object exchange protocol object using the interactive information as function input parameters In information exchange function, the interactive information is transmitted to second functional module;Wherein, the information exchange function root Interactive interface agreement is inherited according to the information exchange object in second functional module and is obtained, and the interactive interface agreement is institute Interaction protocol predetermined in bottom functional module is stated, the interactive interface agreement of each second functional module is different.
Certainly, it will be understood by those skilled in the art that processor 320 can also realize that any embodiment of that present invention is provided Functional module between information interacting method technical solution.
The equipment 300 that Fig. 3 is shown is only an example, should not function to the embodiment of the present invention and use scope bring Any restrictions.
As shown in figure 3, the equipment 300 includes processor 320, storage device 310, input unit 330 and output device 340;The quantity of processor 320 can be one or more in equipment, in Fig. 3 by taking a processor 320 as an example;Place in equipment Reason device 320, storage device 310, input unit 330 can be connected with output device 340 by bus or other modes, in Fig. 3 For being connected by bus 350.
Storage device 310 is used as a kind of computer readable storage medium, and it is executable to can be used for storing software program, computer Program and module, such as the corresponding program instruction of the information interacting method between the functional module in the embodiment of the present invention/module (example Such as, the first functional module 210 in the information interactive device between functional module, the second functional module 220 and bottom functional module 230, wherein the first functional module 210 includes interactive information acquiring unit 211,212 and of object exchange protocol object acquisition unit Interactive unit 213).
Storage device 310 can mainly include storing program area and storage data area, wherein storing program area can store operation Application program needed for system, at least one function;Storage data area, which can be stored, uses created data etc. according to terminal. In addition, storage device 310 may include high-speed random access memory, it can also include nonvolatile memory, for example, at least One disk memory, flush memory device or other non-volatile solid state memory parts.In some instances, storage device 310 It can further comprise the memory remotely located relative to processor 320, these remote memories can be by being connected to the network extremely Equipment.The example of above-mentioned network includes but is not limited to internet, intranet, local area network, mobile radio communication and combinations thereof.
Input unit 330 can be used for receiving the number or character information of input, and generate with the user setting of equipment with And the related key signals input of function control.Output device 340 may include that display screen etc. shows equipment.
Example IV
The present embodiment provides a kind of storage mediums comprising computer executable instructions, and computer executable instructions are by counting For executing the information interacting method between a kind of functional module when calculation machine processor executes, this method comprises:
First functional module obtains interactive information;Wherein, the interactive information includes interactive information mark;
First functional module calls object acquisition function, according to interactive information mark from bottom functional module Cache object variable in determine interaction protocol object, and according to the interactive information mark from mapping table search and institute The corresponding original data type of interaction protocol object is stated, is described original by the data type conversion of the interaction protocol object Data type obtains object exchange protocol object corresponding with the second functional module;Wherein, first functional module and Two functional modules are the top-level functionality module of the bottom functional module, and the object acquisition function is the bottom functional module In pre-defined function, and have private permission modifier;At least one interaction protocol is stored in the cache object variable Object, and at least one described interaction protocol object inherits different interactive interface agreements;
First functional module calls the object exchange protocol object using the interactive information as function input parameters In information exchange function, the interactive information is transmitted to second functional module;Wherein, the information exchange function root Interactive interface agreement is inherited according to the information exchange object in second functional module and is obtained, and the interactive interface agreement is institute Interaction protocol predetermined in bottom functional module is stated, and the interactive interface agreement of each second functional module is different.
Certainly, a kind of storage medium comprising computer executable instructions, computer provided by the embodiment of the present invention Executable instruction is not limited to method operation as above, can also be performed between functional module provided by any embodiment of the invention Relevant operation in information interacting method.
By the description above with respect to embodiment, it is apparent to those skilled in the art that, the present invention It can be realized by software and required common hardware, naturally it is also possible to which by hardware realization, but in many cases, the former is more Good embodiment.Based on this understanding, technical solution of the present invention substantially in other words contributes to the prior art Part can be embodied in the form of software products, which can store in computer readable storage medium In, floppy disk, read-only memory (Read-Only Memory, ROM), random access memory (Random such as computer Access Memory, RAM), flash memory (FLASH), hard disk or CD etc., including some instructions are with so that a computer is set Standby (can be personal computer, server or the network equipment etc.) executes function mould provided by each embodiment of the present invention Information interacting method between block.
Note that the above is only a better embodiment of the present invention and the applied technical principle.It will be appreciated by those skilled in the art that The present invention is not limited to specific embodiments here, be able to carry out for a person skilled in the art it is various it is apparent variation, again Adjustment and substitution are without departing from protection scope of the present invention.Therefore, although by above embodiments to the present invention carried out compared with For detailed description, but the present invention is not limited to the above embodiments only, without departing from the inventive concept, can be with Including more other equivalent embodiments, and the scope of the invention is determined by the scope of the appended claims.

Claims (10)

1. the information interacting method between a kind of functional module characterized by comprising
First functional module obtains interactive information;Wherein, the interactive information includes interactive information mark;
First functional module calls object acquisition function, slow from bottom functional module according to interactive information mark It deposits and determines interaction protocol object in object variable, and searched and the friendship from mapping table according to interactive information mark The data type conversion of the interaction protocol object is the initial data by the corresponding original data type of mutual protocol object Type obtains object exchange protocol object corresponding with the second functional module;Wherein, first functional module and the second function Energy module is the top-level functionality module of the bottom functional module, and the object acquisition function is in the bottom functional module Pre-defined function, and there is private permission modifier;At least one interaction protocol object is stored in the cache object variable, And at least one described interaction protocol object inherits different interactive interface agreements;
First functional module is called in the object exchange protocol object using the interactive information as function input parameters The interactive information is transmitted to second functional module by information exchange function;Wherein, the information exchange function is according to institute It states the information exchange object in the second functional module to inherit interactive interface agreement and obtain, the interactive interface agreement is the bottom The interaction protocol of interaction protocol predetermined in layer function module, each second functional module is different.
2. the method according to claim 1, wherein described identify according to the interactive information from mapping table It is middle to search corresponding with interaction protocol object original data type and include:
According to interactive information mark from enumerating in mapping table, search corresponding original with interactive information mark Data type, and be original data type by the data type conversion of interaction protocol object;Wherein, described to enumerate mapping table To be predetermined in bottom functional module, for store interaction protocol object interactive interface agreement and the interactive information mark Corresponding relationship between knowledge.
3. according to the method described in claim 2, it is characterized in that, first functional module call object acquisition function it Before, further includes:
Information exchange object in each second functional module inherits interactive interface agreement respectively, obtains at least one information to be processed Original data type at least one described IT policy object to be processed is converted to number of targets by interaction protocol object According to type, the IT policy object is obtained;
The bottom functional module deposits the interactive information mark and interactive interface agreement of IT policy object to be processed Store up described enumerate in mapping table;
Each second functional module calls target cache function, delays at least one described IT policy object It deposits, obtains at least one cache object, at least one described cache object is stored in cache object variable;
Wherein, the target cache function is the pre-defined function in the bottom functional module, and has public permission modification Symbol;Cache object is for storing the IT policy object obtained from the second functional module.
4. according to the method described in claim 3, it is characterized in that, the target cache function be achieved by the steps of it is described The IT policy object is cached, the function of the cache object is obtained:
The bottom functional module judges whether the input parameter of the target cache function is the target cache function respectively Target input parameter;
If so, by the IT policy target cache to cache object variable, obtaining institute by existing object keyword State cache object, wherein the cache object variable is the bottom functional module object variable predetermined, for storing At least one cache object;The cache object variable has private permission modifier.
5. according to the method described in claim 2, it is characterized in that, the information exchange object in each second functional module divides Not Ji Cheng interactive interface agreement, obtain at least one IT policy object, comprising:
Each second functional module respectively by the information exchange object, inherit keyword, inherit the friendship by invocation protocol Mutual interface protocol obtains the IT policy object, includes the information exchange letter in the IT policy object Number.
6. according to the method described in claim 5, it is characterized in that, information exchange object in each second functional module Interactive interface agreement is inherited respectively, before obtaining at least one IT policy object, further includes:
The bottom functional module defines the information exchange letter in the interactive interface agreement and the interactive interface agreement Number, the interactive interface agreement are the interface type with public permission modifier.
7. according to the method described in claim 3, it is characterized in that, first functional module and each second functional module The dependence comprising the bottom functional module adds sentence in the module dependency attribute of corresponding configuration file.
8. the information interactive device between a kind of functional module characterized by comprising the first functional module, the second functional module And bottom functional module, wherein first functional module includes:
Interactive information acquiring unit, for obtaining interactive information;Wherein, the interactive information includes interactive information mark;
Object exchange protocol object acquisition unit is identified according to the interactive information from bottom for calling object acquisition function Interaction protocol object is determined in cache object variable in functional module, and is identified according to the interactive information from mapping table It is middle to search original data type corresponding with the interaction protocol object, by the data type conversion of the interaction protocol object For the original data type, object exchange protocol object corresponding with the second functional module is obtained;Wherein, first function Energy module and the second functional module are the top-level functionality module of the bottom functional module, and the object acquisition function is the bottom Pre-defined function in layer function module, and there is private permission modifier;At least one is stored in the cache object variable A interaction protocol object, and at least one described interaction protocol object inherits different interactive interface agreements;
Interactive information transmission unit, for calling the object exchange protocol pair using the interactive information as function input parameters The interactive information is transmitted to second functional module by the information exchange function as in;Wherein, the information exchange function Interactive interface agreement is inherited according to the information exchange object in second functional module and is obtained, and the interactive interface agreement is The interaction protocol of interaction protocol predetermined in the bottom functional module, each second functional module is different.
9. a kind of equipment, which is characterized in that the equipment includes:
One or more processors;
Storage device, for storing one or more programs,
When one or more of programs are executed by one or more of processors, so that one or more of processors are real The now information interacting method between the functional module as described in any in claim 1-7.
10. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the computer program The information interacting method between the functional module as described in any in claim 1-7 is realized when being executed by processor.
CN201811162361.0A 2018-09-30 2018-09-30 Information interaction method, device, equipment and storage medium between function modules Active CN109343983B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811162361.0A CN109343983B (en) 2018-09-30 2018-09-30 Information interaction method, device, equipment and storage medium between function modules

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811162361.0A CN109343983B (en) 2018-09-30 2018-09-30 Information interaction method, device, equipment and storage medium between function modules

Publications (2)

Publication Number Publication Date
CN109343983A true CN109343983A (en) 2019-02-15
CN109343983B CN109343983B (en) 2021-07-23

Family

ID=65308104

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811162361.0A Active CN109343983B (en) 2018-09-30 2018-09-30 Information interaction method, device, equipment and storage medium between function modules

Country Status (1)

Country Link
CN (1) CN109343983B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112506681A (en) * 2020-12-22 2021-03-16 深圳市优必选科技股份有限公司 Parameter calling method and device, electronic equipment and storage medium
CN112988125A (en) * 2019-12-02 2021-06-18 武汉斗鱼鱼乐网络科技有限公司 Data bridging method, device, equipment and storage medium
CN113495794A (en) * 2020-04-03 2021-10-12 武汉斗鱼鱼乐网络科技有限公司 Module bridging method and device for Android system, electronic equipment and storage medium
CN114116560A (en) * 2020-08-31 2022-03-01 华为技术有限公司 Information interaction method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140372970A1 (en) * 2013-06-13 2014-12-18 International Business Machines Corporation Method to auto generate jax-rs rest service implementation classes from existing interfaces
CN106648563A (en) * 2015-10-30 2017-05-10 阿里巴巴集团控股有限公司 Method and device for dependence decoupling processing of shared module in application program
CN107203419A (en) * 2016-03-17 2017-09-26 阿里巴巴集团控股有限公司 Intermodule call method, apparatus and system in application program
CN107908397A (en) * 2017-10-09 2018-04-13 上海壹账通金融科技有限公司 The method for building up and application server of software frame based on IOS systems
CN108023808A (en) * 2017-12-07 2018-05-11 深圳乐信软件技术有限公司 message distributing method and device in application program

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140372970A1 (en) * 2013-06-13 2014-12-18 International Business Machines Corporation Method to auto generate jax-rs rest service implementation classes from existing interfaces
CN106648563A (en) * 2015-10-30 2017-05-10 阿里巴巴集团控股有限公司 Method and device for dependence decoupling processing of shared module in application program
CN107203419A (en) * 2016-03-17 2017-09-26 阿里巴巴集团控股有限公司 Intermodule call method, apparatus and system in application program
CN107908397A (en) * 2017-10-09 2018-04-13 上海壹账通金融科技有限公司 The method for building up and application server of software frame based on IOS systems
CN108023808A (en) * 2017-12-07 2018-05-11 深圳乐信软件技术有限公司 message distributing method and device in application program

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
SNSPORTS: "android module解耦组件化总体概述", 《简书》 *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112988125A (en) * 2019-12-02 2021-06-18 武汉斗鱼鱼乐网络科技有限公司 Data bridging method, device, equipment and storage medium
CN112988125B (en) * 2019-12-02 2023-09-12 广州铭诚计算机科技有限公司 Data bridging method, device, equipment and storage medium
CN113495794A (en) * 2020-04-03 2021-10-12 武汉斗鱼鱼乐网络科技有限公司 Module bridging method and device for Android system, electronic equipment and storage medium
CN113495794B (en) * 2020-04-03 2022-09-09 武汉斗鱼鱼乐网络科技有限公司 Module bridging method and device for Android system, electronic equipment and storage medium
CN114116560A (en) * 2020-08-31 2022-03-01 华为技术有限公司 Information interaction method and device
CN112506681A (en) * 2020-12-22 2021-03-16 深圳市优必选科技股份有限公司 Parameter calling method and device, electronic equipment and storage medium
CN112506681B (en) * 2020-12-22 2023-08-29 深圳市优必选科技股份有限公司 Parameter calling method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN109343983B (en) 2021-07-23

Similar Documents

Publication Publication Date Title
CN109343983A (en) Information interacting method, device, equipment and storage medium between functional module
CN109032815A (en) Information interacting method, device, equipment and storage medium between functional module
CN1879082B (en) Method and apparatus for composing software
KR101432128B1 (en) M2M platform for converting resources into abstracted device object on M2M network
CN110249307A (en) System and method for executing primary contract on block chain
US9917889B2 (en) Enterprise service bus routing system
CN107105061A (en) A kind of service registry method and device
CN103297475A (en) Mock service system and processing method of Mock service
CN108023808A (en) message distributing method and device in application program
WO2022007406A1 (en) K8s-based service deployment method, apparatus, device, and medium
US20100070524A1 (en) Apparatus and method for parsing domain profile in software communication architecture
WO2016141783A1 (en) Method for access control, policy acquisition, attribute acquisition and related apparatus
CN109388388A (en) Information interacting method, device, equipment and storage medium between functional module
WO2024016547A1 (en) Data query method and device based on multi-party collaboration
CN106649488A (en) Method and device for invoking multi-data-source interaction interface
CN105049530A (en) Adaption device and method for plurality of distributed cache systems
US11057242B2 (en) Address system
CN112243016B (en) Middleware platform, terminal equipment, 5G artificial intelligence cloud processing system and processing method
CN110324722A (en) The acquisition methods, device of data, equipment and storage medium in direct broadcasting room
CN106293679B (en) A kind of element term conflict processing method and device
CN113918149A (en) Interface development method and device, computer equipment and storage medium
CN109343982A (en) Information interacting method, device, equipment and storage medium between functional module
CN106656936B (en) A kind of access control method, PRP entity, PDP entity and PEP entity
CN117041179A (en) Method, device and storage medium for opening computing power network
KR101190597B1 (en) Method port apparatus and composition method for robot software component

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
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20240318

Address after: 412007 Room 201, Building 11-12, Fujingyuan Community, No. 11, Huanghe South Road, Mount Taishan Road Street, Tianyuan District, Zhuzhou City, Hunan Province

Patentee after: Hunan Gaoling Information Technology Co.,Ltd.

Country or region after: China

Address before: 11 / F, building B1, phase 4.1, software industry, No.1, Software Park East Road, Wuhan East Lake Development Zone, Wuhan City, Hubei Province, 430070

Patentee before: WUHAN DOUYU NETWORK TECHNOLOGY Co.,Ltd.

Country or region before: China

CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: 412007 Room 201, Building 11-12, Fujingyuan Community, No. 11, Huanghe South Road, Mount Taishan Road Street, Tianyuan District, Zhuzhou City, Hunan Province

Patentee after: Hunan Hillhouse Information Technology Co.,Ltd.

Country or region after: China

Address before: 412007 Room 201, Building 11-12, Fujingyuan Community, No. 11, Huanghe South Road, Mount Taishan Road Street, Tianyuan District, Zhuzhou City, Hunan Province

Patentee before: Hunan Gaoling Information Technology Co.,Ltd.

Country or region before: China