CN109936500A - A kind of data interactive method, data interaction device and electronic equipment - Google Patents

A kind of data interactive method, data interaction device and electronic equipment Download PDF

Info

Publication number
CN109936500A
CN109936500A CN201910150121.7A CN201910150121A CN109936500A CN 109936500 A CN109936500 A CN 109936500A CN 201910150121 A CN201910150121 A CN 201910150121A CN 109936500 A CN109936500 A CN 109936500A
Authority
CN
China
Prior art keywords
message
interaction
mentioned
functional module
electronic equipment
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
CN201910150121.7A
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.)
Shenzhen Launch Technology Co Ltd
Original Assignee
Shenzhen Launch 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 Shenzhen Launch Technology Co Ltd filed Critical Shenzhen Launch Technology Co Ltd
Priority to CN201910150121.7A priority Critical patent/CN109936500A/en
Publication of CN109936500A publication Critical patent/CN109936500A/en
Pending legal-status Critical Current

Links

Abstract

This application discloses a kind of data interactive method, data interaction device, electronic equipment and computer readable storage mediums, wherein the data interactive method includes: the functional module for obtaining the electronic equipment;Determine that the interaction attributes of the functional module, the interaction attributes include that message sends attribute and message sink attribute;Determine that the interaction role of the functional module, the interactive role include message issuer and message subscribing person according to the interaction attributes;Data interaction is carried out according to the interactive role.Pass through application scheme, it can determine that it interacts role by the interaction attributes of functional module, realize the flexible Application of message subscribing mode on an electronic device, help the realization lower coupling of each functional module in electronic equipment, facilitate user to safeguard and expand each functional module, while also improving the expansibility of electronic equipment Yu other equipment.

Description

A kind of data interactive method, data interaction device and electronic equipment
Technical field
The application belongs to data interaction technology field more particularly to a kind of data interactive method, data interaction device, electronics Equipment and computer readable storage medium.
Background technique
The inside of electronic equipment includes multiple functional modules, meanwhile, after electronic equipment is connected with external equipment, may be used also To be circumscribed with functional module.Usually, it generally requires to carry out function interaction, specifically, above-mentioned friendship between these functional modules Mutual behavior can be the interaction between inner function module, be also possible to the interaction of inner function module Yu external connecting function module, It can also be that external connecting function module is interacted by electronic equipment.Interactive object involved in above-mentioned different interactive process is each It is not identical, and the communication protocol between each interactive object is also difficult to keep unified.In the prior art, it is often based on electronics Each interactive process that equipment may participate in generates the code of each functional module of electronic equipment, it would be possible to which there are interacted The functional module of journey is together with each interactive object close coupling, and fixed each functional module and its interactive object are in interactive process Among the role that serves as.When the demand of interactive object sends variation, alternatively, when interactive object has increasing to change, electronic equipment The code of the corresponding function module is also required to do corresponding change, leads to the poor for expansion of electronic equipment, it is difficult to realize function The expansion of energy.
Summary of the invention
It can in view of this, this application provides a kind of data interactive method, data interaction device, electronic equipment and computers Read storage medium, it can be achieved that each functional module in electronic equipment lower coupling, facilitate user to each functional module carry out Maintenance and expansion, while also improving the expansibility of electronic equipment Yu other equipment.
The first aspect of the application provides a kind of data interactive method, is applied to electronic equipment, above-mentioned data interaction side Method includes:
Obtain the functional module of above-mentioned electronic equipment;
Determine that the interaction attributes of above-mentioned functional module, above-mentioned interaction attributes include that message sends attribute and message sink category Property;
The interaction role of above-mentioned functional module is determined according to above-mentioned interaction attributes, above-mentioned interactive role includes message issuer With message subscribing person;
Data interaction is carried out according to above-mentioned interactive role.
Optionally, the interaction attributes of the above-mentioned functional module of above-mentioned determination, specifically include: determining above-mentioned function according to interaction scenarios The interaction attributes of energy module;
The above-mentioned interaction role that above-mentioned functional module is determined according to above-mentioned interaction attributes, specifically includes: when above-mentioned function mould Block determines the interaction role of above-mentioned functional module for message hair when the interaction attributes of above-mentioned interaction scenarios are that message sends attribute Cloth person;When above-mentioned functional module above-mentioned interaction scenarios interaction attributes be message sink attribute when, determine above-mentioned functional module Interaction role be message subscribing person.
Optionally, above-mentioned electronic equipment includes Message Agent bus, above-mentioned to carry out data interaction according to above-mentioned interactive role, It specifically includes:
Information to be released is transferred to above-mentioned Message Agent bus by control message publisher;
Determine the target message subscriber for currently having subscribed to above-mentioned message to be released;
It controls above-mentioned Message Agent bus and transmits above-mentioned message to be released to above-mentioned target message subscriber.
Optionally, before message to be released is transferred to above-mentioned Message Agent bus by above-mentioned control message publisher, on State method further include:
Optionally, the target message subscriber of above-mentioned message to be released has currently been subscribed in above-mentioned determination, specifically includes:
Obtain the message subject and/or message content of above-mentioned message to be released;
According to the matching result of above-mentioned message subject and the subscription theme of message subscribing person, and/or, according in above-mentioned message Hold the matching result with the subscription condition of message subscribing person, determines that the target message for currently having subscribed to above-mentioned message to be released is subscribed to Person.
The second aspect of the application provides a kind of data interaction device, comprising:
Module acquiring unit, for obtaining the functional module of above-mentioned electronic equipment;
Attribute determining unit, for determining that the interaction attributes of above-mentioned functional module, above-mentioned interaction attributes include that message is sent Attribute and message sink attribute;
Role's determination unit, for determining the interaction role of above-mentioned functional module, above-mentioned interaction according to above-mentioned interaction attributes Role includes message issuer and message subscribing person;
Data interaction unit, for carrying out data interaction according to above-mentioned interactive role.
Optionally, above-mentioned attribute determining unit, specifically for determining that the interaction of above-mentioned functional module belongs to according to interaction scenarios Property;
Above-mentioned role's determination unit is message specifically for working as above-mentioned functional module in the interaction attributes of above-mentioned interaction scenarios When sending attribute, determine that the interaction role of above-mentioned functional module is message issuer;When above-mentioned functional module is in above-mentioned interactive field When the interaction attributes of scape are message sink attribute, determine that the interaction role of above-mentioned functional module is message subscribing person.
Optionally, above-mentioned electronic equipment includes Message Agent bus, and above-mentioned data interaction unit includes:
First control subelement, is transferred to above-mentioned Message Agent bus for information to be released for control message publisher;
Target determines subelement, for determining the target message subscriber for currently having subscribed to above-mentioned message to be released;
Second control subelement, for control above-mentioned Message Agent bus to above-mentioned target message subscriber transmission it is above-mentioned to It gives out information.
Optionally, above-mentioned data interaction device further include:
Subscription registration unit receives the subscription theme of simultaneously registration message subscriber for controlling above-mentioned Message Agent bus And/or subscription condition.
Optionally, above-mentioned target determines that subelement includes:
Subelement is obtained, for obtaining the message subject and/or message content of above-mentioned message to be released;
Coupling subelement, for the matching result according to above-mentioned message subject and the subscription theme of message subscribing person, and/ Or, determination has currently been subscribed to above-mentioned to be released according to the matching result of above-mentioned message content and the subscription condition of message subscribing person The target message subscriber of message.
The third aspect of the application provides a kind of electronic equipment, above-mentioned electronic equipment include memory, processor and It is stored in the computer program that can be run in above-mentioned memory and on above-mentioned processor, above-mentioned processor executes above-mentioned computer The step of method of first aspect as above is realized when program.
The fourth aspect of the application provides a kind of computer readable storage medium, and above-mentioned computer readable storage medium is deposited Computer program is contained, above-mentioned computer program realizes the method for first aspect as above when being executed by processor the step of.
The 5th aspect of the application provides a kind of computer program product, and above-mentioned computer program product includes computer Program, when above-mentioned computer program is executed by one or more processors the step of the realization such as method of above-mentioned first aspect.
Therefore in application scheme, the functional module of above-mentioned electronic equipment is obtained first, then determines above-mentioned function The interaction attributes of energy module, above-mentioned interaction attributes include that message sends attribute and message sink attribute, then according to above-mentioned interaction Attribute determines that the interaction role of above-mentioned functional module, above-mentioned interactive role include message issuer and message subscribing person, last root Data interaction is carried out according to above-mentioned interactive role.By application scheme, its interaction can be determined by the interaction attributes of functional module Role realizes the flexible Application of message subscribing mode on an electronic device, helps the reality of each functional module in electronic equipment Existing lower coupling, facilitates user to safeguard and expand each functional module, while also improving electronic equipment and other equipment Expansibility.
Detailed description of the invention
It in order to more clearly explain the technical solutions in the embodiments of the present application, below will be to embodiment or description of the prior art Needed in attached drawing be briefly described.
Fig. 1 is the implementation process schematic diagram of data interactive method provided by the embodiments of the present application;
Fig. 2 is the configuration diagram of electronic equipment and other equipment in data interactive method provided by the embodiments of the present application;
Fig. 3 is the structural block diagram of data interaction device provided by the embodiments of the present application;
Fig. 4 is the structural schematic diagram of electronic equipment provided by the embodiments of the present application.
Specific embodiment
In being described below, for illustration and not for limitation, the tool of such as particular system structure, technology etc is proposed Body details, so as to provide a thorough understanding of the present application embodiment.In other situations, omit to well-known system, device, circuit with And the detailed description of method, so as not to obscure the description of the present application with unnecessary details.
Currently, for each functional module in electronic equipment often together with external equipment close coupling, this sets outside When standby demand has altered, the code of each functional module in electronic equipment is also required to make change.For example, new when increasing External equipment when being connected with electronic equipment to obtain data, each functional module in electronic equipment, which requires first to know, to be worked as Before what new external equipment increased, can just send the data to corresponding newly-increased external equipment, during this, need to modify The code of each functional module;In another example being not that each external equipment can go to request when having multiple external equipments simultaneously The data of identical function module, this just needs to be customized each functional module, to determine which functional module needs to send Data, which functional module is no need to send data, during this, it is also desirable to modify the code of each functional module;For another example When the inside what's new module of electronic equipment, which is also required to carry out with other existing functional modules Interaction, during this, it is also desirable to the code for the functional module that modification is interacted with the newly-increased functional module;Further for example, outer Between portion's equipment, can also by electronic equipment as communications intermediary to carry out data interaction, during this, it is also desirable to modification electricity The code of the functional module of sub- equipment.The code of the functional module of modification electronic equipment is required due to changing every time, this causes The expansibility of electronic equipment is poor.Based on this, the embodiment of the present application proposes a kind of data interactive method, data interaction device And electronic equipment, publish-subscribe model is applied in electronic equipment, and the inner function module and external connecting function of electronic equipment Interaction scenarios according to locating for itself are dynamically determined its interaction role under publish-subscribe model by module, realize functional module Between decoupling, promote the expansibility of electronic equipment.In order to illustrate the above-mentioned technical solution of the application, below by specific reality Example is applied to be illustrated.
Embodiment one
A kind of data interactive method provided by the embodiments of the present application is described below, above-mentioned data interactive method application In electronic equipment.Referring to Fig. 1, the data interactive method in the embodiment of the present application includes:
In a step 101, the functional module of above-mentioned electronic equipment is obtained;
In the embodiment of the present application, for the product type of electronic equipment, which can be equipped with multiple Functional module, to realize different functions.For example, if above-mentioned electronic equipment is remote information processor (Telematics BOX, TBOX) on this automobile for controlling the embedded device of tracking motor, then can have multiple functions in the TBOX Module, including location information function module, vehicle data functional module, warning message functional module and other informational function modules Deng.Further, above-mentioned electronic equipment can also be connected with other external equipments, then above-mentioned electronic equipment can by with it is outer Portion's equipment connection mode load other function, it is believed that when being connect with external equipment, above-mentioned electronic equipment obtain with The relevant function of said external equipment namely electronic equipment can be with external some functional modules, these external connecting function modules are real It is set on border in the external equipment being connected with electronic equipment.
In a step 102, the interaction attributes of above-mentioned functional module are determined;
In the embodiment of the present application, above-mentioned interaction attributes include that message sends attribute and message sink attribute.Any double During side's interaction, necessarily having a side is message sender, and another party is message receiver.Thus, in order to realize function mould Interaction between block, it is thus necessary to determine that the interaction attributes of above-mentioned functional module, namely determine functional module be when interacting into Row message sends or carries out message sink.
In step 103, the interaction role of above-mentioned functional module is determined according to above-mentioned interaction attributes;
In the embodiment of the present application, above-mentioned interactive role includes message issuer and message subscribing person.Specifically, can recognize It is message issuer for the role that interaction attributes are the functional module that message sends attribute, the process for sending message is message The process of publication;And the functional module role that interaction attributes are message sink attribute is message recipient, receives the mistake of message Journey is message subscribing process.
At step 104, data interaction is carried out according to above-mentioned interactive role.
In the embodiment of the present application, after above-mentioned interactive role has been determined, that is, the message in message interaction process has been determined Publisher and message subscribing person, can application message subscribing mode between, realize the transmitting and interaction of message.
It should be noted that the interaction attributes of above-mentioned two functional module can in the interactive process of two functional modules It is remained unchanged with predefining good and static state, is also possible to dynamic and keeps variation;Correspondingly, if two functional modules Interaction attributes are that dynamic keeps variation, then it interacts role and can also be adjusted according to the variation of its interaction attributes.For example, It include global position system GPS module in most electronic equipments, which can be realized simultaneously subscriber and publisher Function, specifically, under a certain scene, user actively obtains GPS data by point touching screen, then the touch screen can be to disappear Publisher, response of the GPS module as the touch screen are ceased, which is subscriber;And when the GPS data of GPS module needs When being broadcasted to other functional modules, GPS module is message issuer, and it is that message is ordered that other, which need the data of the GPS, Reader.Certainly, since the functional module for needing the GPS data may have multiple, thus the quantity of above-mentioned message subscribing person can also It is multiple to have.In other words, when the interaction attributes of functional module are to be dynamically determined, above-mentioned steps 102 include: according to interaction field Scape determines the interaction attributes of above-mentioned functional module, and above-mentioned steps 103 include: when above-mentioned functional module is in the friendship of above-mentioned interaction scenarios When mutual attribute is that message sends attribute, determine that the interaction role of above-mentioned functional module is message issuer;When above-mentioned functional module When the interaction attributes of above-mentioned interaction scenarios are message sink attribute, determine that the interaction role of above-mentioned functional module is message subscribing Person.
Optionally, further include Message Agent bus in above-mentioned electronic equipment, then above-mentioned steps 104 specifically include:
Information to be released is transferred to above-mentioned Message Agent bus by A1, control message publisher;
A2, the target message subscriber for currently having subscribed to above-mentioned message to be released is determined;
Wherein, Message Agent bus can be continued to test by electronic equipment and currently ordered after receiving message to be released Read the target message subscriber of above-mentioned message to be released.Wherein, above-mentioned target message subscriber is associated with above-mentioned electronic equipment, One in the functional module of specially above-mentioned electronic equipment, it can be the function of inner function module namely electronic equipment internal It can module;It is also possible to external connecting function module, namely the functional module for the external equipment connecting with electronic equipment.It should be noted that It is that a message subscribing person tends not to subscribe to all message simultaneously, and message ordered by different messages subscriber is also past Past different from, thus, in this step, need to filter out to the above-mentioned interested message subscribing person of message to be released, namely The target message subscriber of above-mentioned message to be released is currently subscribed to.
A3, the above-mentioned Message Agent bus of control transmit above-mentioned message to be released to above-mentioned target message subscriber.
Wherein, after the target message subscriber of above-mentioned message to be released has been determined, above-mentioned electronic equipment be can control Above-mentioned Message Agent bus transmits above-mentioned message to be released to above-mentioned target message subscriber, and specifically, above-mentioned transmission process needs It to be determined according to the present position of target message subscriber.For example, if above-mentioned message subscribing person is the function in electronic equipment Energy module then can transmit above-mentioned message to be released to above-mentioned target message subscriber by way of bus transfer;If above-mentioned Message subscribing person is other external connecting function modules such as cloud platform, then can be upward in such a way that the mobile networks such as 4G, 3G are transmitted It states target message subscriber and transmits above-mentioned message to be released.Thus, the transmission mode of above-mentioned message to be released is not made herein It limits.
By taking electronic equipment is TBOX as an example, configuration diagram when being interacted Fig. 2 shows electronic equipment with other equipment, Fig. 2 is referred to, the external connecting function module of electronic equipment can be the cloud platform being connected with electronic equipment, automobile middle control instrument, hand The functional module of machine application program (Application, APP) and other external equipments;And the inner function module of electronic equipment Can be obtain location information functional module, obtain the functional module of information of vehicles, obtain warning message functional module and Obtain the other function module of other information.Further, there are also Message Agent bus, each function moulds in above-mentioned electronic equipment Data interaction is carried out by the Message Agent bus between block.Optionally, there are several types of the modes of data interaction:
B1, when external connecting function module needs to obtain the data of electronic equipment, (such as to be set to cloud flat for external connecting function module Platform, automobile middle control instrument, cell phone application or other external equipments etc.) can be message subscribing person, the built-in function mould of electronic equipment Block (such as obtain location information functional module, obtain the functional module of information of vehicles, obtain warning message functional module and Obtain the other function module of other information) it can be message issuer, data of the electronic equipment to external equipment are realized with this Transmission;
B2, when the functional module of electronic equipment internal needs to respond the request of external connecting function module, electronic equipment it is interior Portion's functional module can be message subscribing person, external connecting function module can be message issuer, realize external equipment to electricity with this The data of sub- equipment are transmitted;
B3, when between the inner function module of electronic equipment carry out data interaction when, each inner function module can root According to its functional requirement, itself is set as message issuer or message subscribing person, the data between inner function module are realized with this Transmission;
B4, when external connecting function module carries out data interaction as communications intermediary using electronic equipment, external connecting function module can be with According to self-demand, itself is set as message issuer or message subscribing person, realizes that the data between external equipment are transmitted with this.
Optionally, above-mentioned data interactive method further include:
Control subscription theme and/or subscription condition that above-mentioned Message Agent bus receives simultaneously registration message subscriber.At this Apply in embodiment, message subscribing person may be only interested in the message of certain themes or the message of certain contents, is based on message The interested content of subscriber, message subscribing person can subscribe to message, specially message subscribing person will subscribe to theme and Subscription condition is registered in the Message Agent bus of above-mentioned electronic equipment.After the completion of registration, whenever Message Agent bus On when having increased message to be released newly, each message subscribing person can obtain its institute based on itself subscription theme and subscription condition Interested message, in other words, above-mentioned A2 can be with specifically:
C1, the message subject and/or message content for obtaining above-mentioned message to be released;
C2, the matching result according to the subscription theme of above-mentioned message subject and message subscribing person, and/or, disappeared according to above-mentioned The matching result of content and the subscription condition of message subscribing person is ceased, determines the target message for currently having subscribed to above-mentioned message to be released Subscriber.
Under a kind of application scenarios, message subscribing person is by subscribing to screening of the theme realization to each message to be released, then Above-mentioned steps 102 specifically:
The subscription theme of D1, the message subject for obtaining above-mentioned message to be released and each message subscribing person;
D2, successively detect whether above-mentioned message subject matches with the subscription theme of each message subscribing person;
D3, subscription theme and the message subscribing person that above-mentioned message subject matches are determined as above-mentioned target message subscription Person.
In the embodiment of the present application, each message to be released has its message subject.When message issuer disappears to be released When breath is distributed to a certain theme, as long as a certain message subscribing person has subscribed the theme, then message subscribing person will receive the master The lower message to be released increased newly of topic.In other words, message subscribing person will receive all message on theme ordered by it, and And all message subscribing persons for subscribing to same subject will receive same message.
Under another application scenarios, message subscribing person realizes the screening to each message to be released by subscription condition, Then above-mentioned steps 102 specifically:
The subscription condition of E1, the message content for obtaining above-mentioned message to be released and each message subscribing person;
E2, the subscription condition whether above-mentioned message content meets each message subscribing person is successively detected;
E3, it is directed to any message subscribing person, it, will when above-mentioned message content meets the subscription condition of above-mentioned message subscribing person Above-mentioned message subscribing person is determined as above-mentioned target message subscriber.
In the embodiment of the present application, it can also treat to give out information by message content and be screened.Specifically, each to disappear The subscription condition interested to it can be set in breath subscriber, as long as the message content of message to be released meets message subscribing person institute When the subscription condition of setting, which can be delivered to message subscribing person.Further, above-mentioned subscription condition In can also can also then be screened by treating the attribute to give out information comprising to the screening conditions of attribute, ordered with determination The target message subscriber of the message to be released is read.
It should be noted that above-mentioned two application scenarios can also can be applied simultaneously with independent utility;At the same time using upper When stating two application scenarios, the subscription theme of only message subscribing person is identical as the message subject of above-mentioned message to be released, and on It could above-mentioned message subscribing person be really mesh when stating the message content of message to be released and meeting the subscription condition of above-mentioned message subscribing person Mark message subscribing person.By above-mentioned two application scenarios, message to be released is carried out in a manner of theme screening and Content Selection Filtering.When the inner function module of multiple external connecting function modules and electronic equipment carries out data interaction, although its communication is situated between Matter is different, communication protocol is different, interactive object is different, interaction data is different, but by the embodiment of the present application, still can be electronics Each function that equipment is realized carries out module divides, and defining each functional module according to demand is message issuer or message Subscriber.It does exercises in inner function module as request and the progress for receiving external function module or other inner function module When data processing, this inner function module is message subscribing person needs that it is arranged and subscribes to theme and subscription condition, then registers Onto Message Agent bus, the message that waits message issuer to be received to be issued;Outside inner function module is sent to message When connection function module or other inner function module, this inner function module is message issuer, need news release to pair It answers on theme, is used for message subscribing person.Correspondingly, the interaction either between external function module and inner function module, Or the friendship carried out using electronic equipment as communications intermediary between the interaction or each external connecting function module between inner function module Mutually, it can be divided into message issuer and message subscribing person according to its own demand, realize the request of data, handle and answer It answers.
Therefore by the embodiment of the present application, Message Agent bus has been increased newly in the electronic device to order using publication Mode is read, each each functional module in external equipment and electronic equipment is decoupled, when newly increasing external equipment and electronic equipment Between, between the functional module inside vehicle-mounted embedded type, the functional requirement between external equipment, need carry out between number When according to interaction, message required by new functional requirement can be increased in Message Agent bus by publication and subscription, it is real The extension of existing function increases the maintainability of electronic equipment convenient for the Function Extension of electronic equipment.Also, electronic equipment is interior Interaction scenarios according to locating for itself are dynamically determined it under publish-subscribe model with external connecting function module by portion's functional module Interaction role realizes the flexible Application of message subscribing mode in the electronic device.
It should be understood that the size of the serial number of each step is not meant that the order of the execution order in above-described embodiment, each process Execution sequence should be determined by its function and internal logic, the implementation process without coping with the embodiment of the present application constitutes any limit It is fixed.
Embodiment two
The embodiment of the present application provides a kind of data interaction device, as shown in figure 3, the data interaction in the embodiment of the present application fills Setting 300 includes:
Module acquiring unit 301, for obtaining the functional module of above-mentioned electronic equipment;
Attribute determining unit 302, for determining that the interaction attributes of above-mentioned functional module, above-mentioned interaction attributes include message hair Send attribute and message sink attribute;
Role's determination unit 303, for determining the interaction role of above-mentioned functional module, above-mentioned friendship according to above-mentioned interaction attributes Mutual role includes message issuer and message subscribing person;
Data interaction unit 304, for carrying out data interaction according to above-mentioned interactive role.
Optionally, above-mentioned attribute determining unit 302, specifically for determining the interaction of above-mentioned functional module according to interaction scenarios Attribute;
Above-mentioned role's determination unit 303, specifically for being in the interaction attributes of above-mentioned interaction scenarios when above-mentioned functional module When message sends attribute, determine that the interaction role of above-mentioned functional module is message issuer;When above-mentioned functional module is in above-mentioned friendship When the interaction attributes of mutual scene are message sink attribute, determine that the interaction role of above-mentioned functional module is message subscribing person.
Optionally, above-mentioned electronic equipment includes Message Agent bus, and above-mentioned data interaction unit 304 includes:
First control subelement, is transferred to above-mentioned Message Agent bus for information to be released for control message publisher;
Target determines subelement, for determining the target message subscriber for currently having subscribed to above-mentioned message to be released;
Second control subelement, for control above-mentioned Message Agent bus to above-mentioned target message subscriber transmission it is above-mentioned to It gives out information.
Optionally, above-mentioned data interaction device 300 further include:
Subscription registration unit receives the subscription theme of simultaneously registration message subscriber for controlling above-mentioned Message Agent bus And/or subscription condition.
Optionally, above-mentioned target determines that subelement includes:
Subelement is obtained, for obtaining the message subject and/or message content of above-mentioned message to be released;
Coupling subelement, for the matching result according to above-mentioned message subject and the subscription theme of message subscribing person, and/ Or, determination has currently been subscribed to above-mentioned to be released according to the matching result of above-mentioned message content and the subscription condition of message subscribing person The target message subscriber of message.
Therefore by the embodiment of the present application, data interaction device has increased Message Agent bus newly in the electronic device To apply publish-subscribe model, each each functional module in external equipment and electronic equipment is decoupled, is set when newly increasing outside Between standby functional module between electronic equipment, inside vehicle-mounted embedded type, the functional requirement between external equipment, need to carry out When data interaction each other, message required by new functional requirement can be increased into message generation by publication and subscription It manages in bus, realizes the extension of function, convenient for the Function Extension of electronic equipment, increase the maintainability of electronic equipment.Also, electricity Interaction scenarios according to locating for itself are dynamically determined it with external connecting function module and ordered in publication by the inner function module of sub- equipment The interaction role under mode is read, realizes the flexible Application of message subscribing mode in the electronic device.
Embodiment three
Fig. 4 shows the embodiment of the present application and provides the structural schematic diagram of a kind of electronic equipment, the electronic equipment 4 of the embodiment Include: processor 40, memory 41 and is stored in the calculating that can be run in above-mentioned memory 41 and on above-mentioned processor 40 Machine program 42, such as the data interaction program in data interactive method.When above-mentioned processor 40 executes above-mentioned computer program 42 Realize the step in above-mentioned each data interactive method embodiment, such as step S101 to 103 shown in FIG. 1.
Above-mentioned electronic equipment 4 may include, but be not limited only to, processor 40, memory 41.Those skilled in the art can manage Solution, Fig. 4 is only the example of electronic equipment 4, does not constitute the restriction to electronic equipment 4, may include more or more than illustrating Few component perhaps combines certain components or different components, such as above-mentioned electronic equipment 4 can also include network insertion Equipment, Message Agent bus etc..
Above-mentioned processor 40 can be central processing module (Central Processing Unit, CPU), can also be Other general processors, digital signal processor (Digital Signal Processor, DSP), specific integrated circuit (Application Specific Integrated Circuit, ASIC), field programmable gate array (Field- Programmable Gate Array, FPGA) either other programmable logic device, discrete gate or transistor logic, Discrete hardware components etc..General processor can be microprocessor or the processor is also possible to any conventional processor Deng.
Above-mentioned memory 41 can be the storage inside module of above-mentioned electronic equipment 4, such as the hard disk or interior of electronic equipment 4 It deposits.Above-mentioned memory 41 is also possible to the External memory equipment of above-mentioned electronic equipment 4, such as be equipped on above-mentioned electronic equipment 4 Plug-in type hard disk, intelligent memory card (Smart Media Card, SMC), secure digital (Secure Digital, SD) card dodge Deposit card (Flash Card) etc..Further, above-mentioned memory 41 can also both include the storage inside mould of above-mentioned electronic equipment 4 Block also includes External memory equipment.Above-mentioned memory 41 is for storing needed for above-mentioned computer program and above-mentioned electronic equipment 4 Other programs and data.Above-mentioned memory 41 can be also used for temporarily storing the data that has exported or will export.
Illustratively, when above-mentioned electronic equipment 4 carries out data interaction, processor 40 is stored in memory 41 by operation It is performed the steps of when above-mentioned computer program
Obtain the functional module of above-mentioned electronic equipment;
Determine that the interaction attributes of above-mentioned functional module, above-mentioned interaction attributes include that message sends attribute and message sink category Property;
The interaction role of above-mentioned functional module is determined according to above-mentioned interaction attributes, above-mentioned interactive role includes message issuer With message subscribing person;
Data interaction is carried out according to above-mentioned interactive role.
Optionally, the interaction attributes of the above-mentioned functional module of above-mentioned determination, specifically include: determining above-mentioned function according to interaction scenarios The interaction attributes of energy module;
The above-mentioned interaction role that above-mentioned functional module is determined according to above-mentioned interaction attributes, specifically includes: when above-mentioned function mould Block determines the interaction role of above-mentioned functional module for message hair when the interaction attributes of above-mentioned interaction scenarios are that message sends attribute Cloth person;When above-mentioned functional module above-mentioned interaction scenarios interaction attributes be message sink attribute when, determine above-mentioned functional module Interaction role be message subscribing person.
Optionally, above-mentioned electronic equipment includes Message Agent bus, above-mentioned to carry out data interaction according to above-mentioned interactive role, It specifically includes:
Information to be released is transferred to above-mentioned Message Agent bus by control message publisher;
Determine the target message subscriber for currently having subscribed to above-mentioned message to be released;
It controls above-mentioned Message Agent bus and transmits above-mentioned message to be released to above-mentioned target message subscriber.
Optionally, before message to be released is transferred to above-mentioned Message Agent bus by above-mentioned control message publisher, on State method further include:
Optionally, the target message subscriber of above-mentioned message to be released has currently been subscribed in above-mentioned determination, specifically includes:
Obtain the message subject and/or message content of above-mentioned message to be released;
According to the matching result of above-mentioned message subject and the subscription theme of message subscribing person, and/or, according in above-mentioned message Hold the matching result with the subscription condition of message subscribing person, determines that the target message for currently having subscribed to above-mentioned message to be released is subscribed to Person.
Illustratively, above-mentioned computer program 42 can be divided into one or more module/units, said one or Multiple module/units are stored in above-mentioned memory 41, and are executed by above-mentioned processor 40, to complete the application.
Therefore by the embodiment of the present application, Message Agent bus has been increased newly in the electronic device to order using publication Mode is read, each each functional module in external equipment and electronic equipment is decoupled, when newly increasing external equipment and electronic equipment Between, between the functional module inside vehicle-mounted embedded type, the functional requirement between external equipment, need carry out between number When according to interaction, message required by new functional requirement can be increased in Message Agent bus by publication and subscription, it is real The extension of existing function increases the maintainability of electronic equipment convenient for the Function Extension of electronic equipment.Also, electronic equipment is interior Interaction scenarios according to locating for itself are dynamically determined it under publish-subscribe model with external connecting function module by portion's functional module Interaction role realizes the flexible Application of message subscribing mode in the electronic device.
It is apparent to those skilled in the art that for convenience and simplicity of description, foregoing description it is specific The course of work can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
In several embodiments provided herein, it should be understood that disclosed system, server and method, it can To realize by another way.Above-mentioned module as illustrated by the separation member may or may not be physically separate , the component shown as module may or may not be physical module.It can select according to the actual needs wherein Some or all of the modules achieve the purpose of the solution of this embodiment.
It, can be with if above-mentioned function is realized and when sold or used as an independent product in the form of software function module It is stored in a computer readable storage medium.Based on this understanding, the technical solution of the application is substantially in other words The part of the part that contributes to existing technology or the technical solution can be embodied in the form of software products, the meter Calculation machine software product is stored in a storage medium, including some instructions are used so that a computer equipment (can be a People's computer, server or network equipment etc.) execute each embodiment above method of the application all or part of the steps. And storage medium above-mentioned includes: that USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), arbitrary access are deposited The various media that can store program code such as reservoir (RAM, Random Access Memory), magnetic or disk.
The above is only the preferred embodiments of the application, not to limit the application, it is all in spirit herein and Made any modifications, equivalent replacements, and improvements etc., should be included within the scope of protection of this application within principle.

Claims (10)

1. a kind of data interactive method, which is characterized in that be applied to electronic equipment, the data interactive method includes:
Obtain the functional module of the electronic equipment;
Determine that the interaction attributes of the functional module, the interaction attributes include that message sends attribute and message sink attribute;
Determine that the interaction role of the functional module, the interactive role include message issuer and disappear according to the interaction attributes Cease subscriber;
Data interaction is carried out according to the interactive role.
2. data interactive method according to claim 1, which is characterized in that the interaction of the determination functional module belongs to Property, it specifically includes: determining the interaction attributes of the functional module according to interaction scenarios;
The interaction role that the functional module is determined according to the interaction attributes, specifically includes: when the functional module exists When the interaction attributes of the interaction scenarios are that message sends attribute, determine that the interaction role of the functional module is news release Person;When the functional module the interaction scenarios interaction attributes be message sink attribute when, determine the functional module Interaction role is message subscribing person.
3. data interactive method according to claim 1 or 2, which is characterized in that the electronic equipment includes Message Agent Bus, it is described that data interaction is carried out according to the interactive role, it specifically includes:
Information to be released is transferred to the Message Agent bus by control message publisher;
Determine the target message subscriber for currently having subscribed to the message to be released;
It controls the Message Agent bus and transmits the message to be released to the target message subscriber.
4. data interactive method according to claim 3, which is characterized in that the control message publisher will be to be released Message is transferred to before the Message Agent bus, the data interactive method further include:
Control subscription theme and/or subscription condition that the Message Agent bus receives simultaneously registration message subscriber.
5. data interactive method according to claim 4, which is characterized in that the determination has currently been subscribed to described to be released The target message subscriber of message, specifically includes:
Obtain the message subject and/or message content of the message to be released;
According to the matching result of the subscription theme of the message subject and message subscribing person, and/or, according to the message content with The matching result of the subscription condition of message subscribing person determines the target message subscriber for currently having subscribed to the message to be released.
6. a kind of data interaction device characterized by comprising
Module acquiring unit, for obtaining the functional module of the electronic equipment;
Attribute determining unit, for determining that the interaction attributes of the functional module, the interaction attributes include that message sends attribute With message sink attribute;
Role's determination unit, for determining the interaction role of the functional module, the interactive role according to the interaction attributes Including message issuer and message subscribing person;
Data interaction unit, for carrying out data interaction according to the interactive role.
7. data interaction device as claimed in claim 6, which is characterized in that the attribute determining unit is specifically used for basis Interaction scenarios determine the interaction attributes of the functional module;
Role's determination unit is message transmission specifically for working as the functional module in the interaction attributes of the interaction scenarios When attribute, determine that the interaction role of the functional module is message issuer;When the functional module is in the interaction scenarios When interaction attributes are message sink attribute, determine that the interaction role of the functional module is message subscribing person.
8. data interaction device as claimed in claims 6 or 7, which is characterized in that the electronic equipment includes that Message Agent is total Line, the data interaction unit include:
First control subelement, is transferred to the Message Agent bus for information to be released for control message publisher;
Target determines subelement, for determining the target message subscriber for currently having subscribed to the message to be released;
Second control subelement, it is described to be released to target message subscriber transmission for controlling the Message Agent bus Message.
9. a kind of electronic equipment, including memory, processor and storage are in the memory and can be on the processor The computer program of operation, which is characterized in that the processor realizes such as claim 1 to 5 when executing the computer program The step of any one the method.
10. a kind of computer readable storage medium, the computer-readable recording medium storage has computer program, and feature exists In when the computer program is executed by processor the step of any one of such as claim 1 to 5 of realization the method.
CN201910150121.7A 2019-02-28 2019-02-28 A kind of data interactive method, data interaction device and electronic equipment Pending CN109936500A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910150121.7A CN109936500A (en) 2019-02-28 2019-02-28 A kind of data interactive method, data interaction device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910150121.7A CN109936500A (en) 2019-02-28 2019-02-28 A kind of data interactive method, data interaction device and electronic equipment

Publications (1)

Publication Number Publication Date
CN109936500A true CN109936500A (en) 2019-06-25

Family

ID=66986143

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910150121.7A Pending CN109936500A (en) 2019-02-28 2019-02-28 A kind of data interactive method, data interaction device and electronic equipment

Country Status (1)

Country Link
CN (1) CN109936500A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111585596A (en) * 2020-05-21 2020-08-25 智车优行科技(北京)有限公司 Vehicle-mounted TBOX device and automobile
CN111770009A (en) * 2020-06-29 2020-10-13 深圳市金蝶天燕云计算股份有限公司 Data transmission method and related equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1509000A (en) * 2002-12-15 2004-06-30 华为技术有限公司 Network element inside real-time data synchronizing method
CN1988448A (en) * 2005-12-23 2007-06-27 华为技术有限公司 Communication device and its interactive method between modules
CN106716294A (en) * 2014-08-29 2017-05-24 微软技术许可有限责任公司 Active and passive chained subscriptions

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1509000A (en) * 2002-12-15 2004-06-30 华为技术有限公司 Network element inside real-time data synchronizing method
CN1988448A (en) * 2005-12-23 2007-06-27 华为技术有限公司 Communication device and its interactive method between modules
CN106716294A (en) * 2014-08-29 2017-05-24 微软技术许可有限责任公司 Active and passive chained subscriptions

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111585596A (en) * 2020-05-21 2020-08-25 智车优行科技(北京)有限公司 Vehicle-mounted TBOX device and automobile
CN111585596B (en) * 2020-05-21 2022-03-15 智车优行科技(北京)有限公司 Vehicle-mounted TBOX device and automobile
CN111770009A (en) * 2020-06-29 2020-10-13 深圳市金蝶天燕云计算股份有限公司 Data transmission method and related equipment

Similar Documents

Publication Publication Date Title
CN109005220B (en) Service implementation method of Internet of things terminal and Internet of things access gateway
CN110351378A (en) A kind of control method and system of internet of things equipment
CN110113381A (en) The method and device of theme is subscribed in a kind of block chain
JP2003058412A (en) Portable storage medium and method for utilizing remote storage unit on network as auxiliary memory of local computer by using the same
EP3861706A2 (en) Framework for dynamic brokerage and management of topics and data at the service layer
CN109194736A (en) Message De-weight method, device, electronic equipment, medium and unmanned vehicle
CN109815731A (en) Permission processing method and relevant device
CN104065618A (en) Method, terminal and server for controlling user permission
CN106209769B (en) Data interactive method, cloud server and intelligent terminal
CN109491671A (en) Diagnostic software method for down loading, device, terminal device and storage medium
CN109936500A (en) A kind of data interactive method, data interaction device and electronic equipment
CN105933378B (en) Radio gang control method and system
CN109348434A (en) A kind of sending method of scene information, sending device and terminal device
CN115883669A (en) Data distribution method, system, equipment and medium
CN111277983A (en) RFID middleware, publish-subscribe system and data transmission method
CN108494851B (en) Application program recommended method, device and server
CN106302432B (en) A kind of communication device and control method based on car networking
CN109862083A (en) A kind of Activiation method of internet of things equipment, device and equipment
CN108647315A (en) Collecting method and system
CN114221829B (en) Edge side intelligent home management method and system
CN108021639A (en) Information-pushing method, device, server and storage medium
CN113139196B (en) Personal privacy information management method and system for intelligent terminal
CN112380411B (en) Sensitive word processing method, device, electronic equipment, system and storage medium
CN116346842A (en) Cross-ecological device management and control method and device, storage medium and electronic device
CN108063723A (en) A kind of reminding method and electronic equipment

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

Application publication date: 20190625

RJ01 Rejection of invention patent application after publication