CN103593247A - Method and device for data transmission - Google Patents

Method and device for data transmission Download PDF

Info

Publication number
CN103593247A
CN103593247A CN201310576452.XA CN201310576452A CN103593247A CN 103593247 A CN103593247 A CN 103593247A CN 201310576452 A CN201310576452 A CN 201310576452A CN 103593247 A CN103593247 A CN 103593247A
Authority
CN
China
Prior art keywords
target process
source data
data
transmission channel
transmission
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
CN201310576452.XA
Other languages
Chinese (zh)
Other versions
CN103593247B (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.)
Tencent Technology Chengdu Co Ltd
Original Assignee
Tencent Technology Chengdu 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 Tencent Technology Chengdu Co Ltd filed Critical Tencent Technology Chengdu Co Ltd
Priority to CN201310576452.XA priority Critical patent/CN103593247B/en
Publication of CN103593247A publication Critical patent/CN103593247A/en
Priority to PCT/CN2014/090963 priority patent/WO2015070769A1/en
Application granted granted Critical
Publication of CN103593247B publication Critical patent/CN103593247B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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/544Buffers; Shared memory; Pipes

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)
  • Communication Control (AREA)

Abstract

The embodiment of the invention discloses a method and device for data transmission. The method comprises the steps that source data are generated and captured through a originating process and transmission channel information of each target process is obtained; the target process corresponding to the source data and the transmission mode for sending the source data to each target process are determined according to the transmission channel information; the source data are sent to the target processes; an adopted sending method for sending the source data to each target process corresponds to the determined transmission mode of each target process. The source data are captured by the originating process, the transmission channel information of each target process is obtained, the target process corresponding to the source data and the transmission mode for sending the source data to each target process are determined, then sending of the source data is accomplished, the purpose that data of one originating process are obtained by the target processes is achieved, files do not need to be completely stored according to the scheme, the target processes do not need to obtain the latest data through the polling mode, and therefore the data transmission efficiency is high.

Description

A kind of data transferring method and device
Technical field
The present invention relates to field of computer technology, particularly a kind of data transferring method and device.
Background technology
Data transmission between process, the scheme that generally can adopt, can be as follows:
The provider of data creates a file on hard disk, and then, toward writing data (close file not, but must flush buffers) in this document, the take over party of data opens this file and reads content wherein with sharing mode.
This scheme, what need data provides establishment file, and need to not stop writing in files.The take over party of data can only take the mode of poll to obtain latest data, causes inefficiency.When having many application processes as data receiver, problem is particularly outstanding.
For example, camera obtains encoding software after video and obtains video, and encoding software need to be stored as video a file on hard disk, video jukebox software need to by file all storage complete after, could be read by other application programs.
Therefore adopt above scheme, the efficiency that the destination of data obtains data is lower.
Summary of the invention
The embodiment of the present invention provides a kind of data transferring method and device, realizes the data that a plurality of target process obtain an originating process, and improves data messaging efficiency.
, comprising:
Originating process generates and intercepts and captures source data, obtains the transmission channel information of each target process;
According to described transmission channel information, determine the target process that described source data is corresponding, and transmission source data are given the transmission mode of each target process;
Described source data is sent to described target process; The send mode that transmission source data adopt to each target process is corresponding with the transmission mode of each target process of determining.
, comprising:
Data generating unit, for generating source data;
Data cutout unit, the source data generating for intercepting and capturing described data generating unit;
Information acquisition unit, for obtaining the transmission channel information of each target process;
Mode target determining unit, determines for the transmission channel information of obtaining according to described information acquisition unit the target process that described source data is corresponding, and transmission source data are given the transmission mode of each target process;
Transmitting element, for sending to described target process by described source data; The send mode that transmission source data adopt to each target process is corresponding with the transmission mode of each target process that described mode target determining unit is determined.
As can be seen from the above technical solutions, the embodiment of the present invention has the following advantages: adopt by originating process and intercept and capture source data, and obtain the transmission channel information of each target process, determine the target process that source data is corresponding, and transmission source data are given the transmission mode of each target process, then complete the transmission of source data, can reach the object that a plurality of target process obtain the data of an originating process, and this scheme does not need file, and all storage is complete, also do not need target process to adopt polling mode to obtain latest data, so data messaging efficiency is higher.
Accompanying drawing explanation
In order to be illustrated more clearly in the technical scheme in the embodiment of the present invention, below the accompanying drawing of required use during embodiment is described is briefly introduced, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, do not paying under the prerequisite of creative work, can also obtain according to these accompanying drawings other accompanying drawing.
Fig. 1 is embodiment of the present invention method flow schematic diagram;
Fig. 2 is embodiment of the present invention system architecture schematic diagram;
Fig. 3 is embodiment of the present invention apparatus structure schematic diagram;
Fig. 4 is embodiment of the present invention apparatus structure schematic diagram;
Fig. 5 is embodiment of the present invention apparatus structure schematic diagram;
Fig. 6 is embodiment of the present invention terminal structure schematic diagram.
Embodiment
In order to make the object, technical solutions and advantages of the present invention clearer, below in conjunction with accompanying drawing, the present invention is described in further detail, and obviously, described embodiment is only a part of embodiment of the present invention, rather than whole embodiment.Embodiment based in the present invention, those of ordinary skills, not making all other embodiment that obtain under creative work prerequisite, belong to the scope of protection of the invention.
The embodiment of the present invention provides a kind of data transferring method, as shown in Figure 1, comprising:
101: originating process generates and intercept and capture source data, obtain the transmission channel information of each target process;
Originating process is to provide the source of data, and originating process can produce source data, and source data can be sound, image, flow data etc., and source data kind is varied, and it does not affect the realization of the embodiment of the present invention, so the embodiment of the present invention will not limit this.
Above-mentioned transmission channel information is the information that adopts which kind of mode to transmit for sign, its form of expression can be varied, except transmission mode, can also represent to obtain by various information the information of target process and the originating process of source data, different transmission channels based on transmission mode can adopt different forms to embody, below provided the specific implementation of transmission channel information for example, as follows:
First, the mode of obtaining can adopt monitor thread to realize, specific as follows: the above-mentioned transmission channel information of obtaining each target process comprises: employing monitor thread obtains the transmission channel information of each target process, and whether the transmission channel information of definite target process and target process has change.
In addition, the sign of transmission channel information can identify in the following way, make originating process easily determine which the target process that need to obtain source data has, specific as follows: the above-mentioned transmission channel information of obtaining each target process comprises: to obtain sign with target process sign and the originating process sign gap marker to foundation.
In embodiments of the present invention, transmission mode can adopt the mode of block of shared memory to realize, shared storage block can be shared drive, it should be noted that transmission channel can also be other system object, therefore transmission channel information can be also other, below should not be construed as for example the unique restriction to the embodiment of the present invention.The concrete scheme that the mode of employing block of shared memory realizes is as follows: the destination address that above-mentioned gap marker has indicated source data to deposit; Above-mentionedly send to above-mentioned target process to comprise above-mentioned source data: to leave source data in above-mentioned destination address, for target process, read.
In embodiments of the present invention, transmission channel information can be deposited in by target process, concrete scheme is as follows: the above-mentioned transmission channel information of obtaining each target process comprises: above-mentioned originating process obtains the transmission channel information being deposited in by the target process that adopts hook to inject above-mentioned originating process after being adopted hook to inject by target process.
Based on a specific application, the embodiment of the present invention can be applied to the broadcasting of the audio frequency such as music, based on this embodiment of the present invention, provide following scheme, it should be noted that except audio frequency is play, other as video player as originating process, be also passable, audio player process should not be construed as the unique restriction to the embodiment of the present invention as the scheme of originating process, specific as follows: above-mentioned target process has two or more; Above-mentioned originating process is audio player process.In subsequent embodiment, by providing, take the more illustrated in greater detail that music player is example.
102: according to above-mentioned transmission channel information, determine the target process that above-mentioned source data is corresponding, and transmission source data are given the transmission mode of each target process;
103: above-mentioned source data is sent to above-mentioned target process; The send mode that transmission source data adopt to each target process is corresponding with the transmission mode of each target process of determining.
The embodiment of the present invention, employing is intercepted and captured source data by originating process, and obtain the transmission channel information of each target process, determine the target process that source data is corresponding, and transmission source data are to the transmission mode of each target process, then complete the transmission of source data, can reach the object that a plurality of target process obtain the data of an originating process, and this scheme does not need file, and all storage is complete, also do not need target process to adopt polling mode to obtain latest data, so data messaging efficiency is higher.In addition, due to embodiment of the present invention scheme, the mode that each target process obtains source data is independently, so each target process obtains source data and can't influence each other.
Implementation based on aforementioned use shared address piece, the embodiment of the present invention also provides the specific implementation in the address that how target data is stored in to gap marker indication, specific as follows: above-mentionedly to leave source data in above-mentioned destination address, for target process, read and comprise:
Adopt transmission thread to read the address of above-mentioned gap marker indication, and source data is write to the address of above-mentioned gap marker indication, for target process, read.
The Audio Players of below usining illustrates in more detail as originating process, the embodiment of the present invention is by Hook(hook) mode injects player process, the play function of hook broadcasting process obtains voice data, then by shared drive, voice data is returned to other application programs and use.
Hook (Hook), is a platform of Windows (Windows) message processing facility, and application program can arrange sub-journey in the above to monitor certain message of specified window, and the window monitoring can be that other processes create.After message arrives, before processing function, target window processes it.Hook Mechanism allows application program to intercept and capture and processes windows messaging or particular event.
Implementation is illustrated in fig. 2 shown below in detail:
The implication of a paper part signal is as follows:
Application program: the program of wanting to obtain voice data; Figure 2 shows that n application process.
Player process: sound data sources, is acquired the target program of sound.
Transmission channel ID(Identity, sign): can take that program process ID and player process ID be that key-value pair sets up the unique ID of 64 of the system overall situation, a high position is the process ID of 32 of application programs, low level is the process ID of 32 of players, is representing which application program wishes to obtain the sound of which player.
Transmission channel allocation table: transmission channel ID is being stored in this table the inside.
Transmission channel: this is to take the unique shared drive piece of the system overall situation that transmission channel ID is that sign is set up, and is used for transmitting voice data, player data writing, application program is sense data therefrom.
Transmission channel table: this transmission channel table, in player process, is used for storing transmission channel address.
Voice data buffer memory buf: be used for the voice data of buffer memory from player process interception.
Distribute monitor thread: this thread monitors transmission channel allocation table, when allocation table has change, this thread can scan whole table, check each transmission channel ID, look into and see if there is the voice data that application program wants to obtain this player process, if had, transmission channel address corresponding to this transmission channel ID is updated in transmission channel table.
Transfer voice thread: this thread reads the transmission channel address in transmission channel table, then voice data is write to corresponding transmission channel one by one.
Application program obtains the flow process of player voice data, also refers to shown in Fig. 2, specific as follows:
First step 1, application program are injected target and are play process, then link up with the play function of broadcasting process, and the voice data that distributes buffer memory (buf) storage to intercept and capture creates and distributes monitor thread and sound line journey;
For example: team's voice communication instrument that a support multi-person speech of Qtalk(exchanges) program injection player obtains sound.
It is that sign generates transmission channel ID that step 2, application program be take own ID and player ID, and take this transmission channel ID and set up transmission channel as sign;
Step 3, application program are updated to transmission channel ID in transmission channel allocation table, and notify player process to upgrade; As shown in Figure 2, application process can also be revised in channel allocation table the transmission channel ID of self.
The distribution monitor thread scan transfer channel allocation table of step 4, player process monitors the distributing altering of transmission channel allocation table, and discovery application program wants to obtain the sound of oneself, so the address of transmission channel is deposited in transmission channel table; If have the situation of change to occur, need to upgrade transmission channel table;
The transfer voice thread of step 5, player process takes out the voice data of intercepting and capturing from voice data buffer memory buf, then from transmission channel table, takes out transmission channel address, then writes data to corresponding transmission channel;
After this step 6, application program read voice data from each self-corresponding transmission channel.
If other application programs also want to obtain the sound of this player, repeating step (2) is to (6); If application program is not wanted to have obtained voice data, just delete the transmission channel ID in transmission channel allocation table, the distribution monitor thread of player detects This move and just deletes transmission channel address corresponding in local transmission channel table, closes corresponding transmission channel simultaneously.
This technical scheme supports a plurality of application programs to obtain the voice data of destination player simultaneously, thereby the music that user can be play this locality is shared a plurality of voice-enabled chats chamber simultaneously, in addition the switch of each application program background music separate being independent of each other all, make Qtalk background music function be simple and easy to use and powerful, to user, brought better experience.
The embodiment of the present invention also provides a kind of data transfer device, as shown in Figure 3, comprising:
Data generating unit 301, for generating source data;
Originating process is to provide the source of data, and originating process can produce source data, and source data can be sound, image, flow data etc., and source data kind is varied, and it does not affect the realization of the embodiment of the present invention, so the embodiment of the present invention will not limit this.
Data cutout unit 302, the source data generating for intercepting and capturing above-mentioned data generating unit 301;
Information acquisition unit 303, for obtaining the transmission channel information of each target process;
Mode target determining unit 304, determines for the transmission channel information of obtaining according to above-mentioned information acquisition unit 303 target process that above-mentioned source data is corresponding, and transmission source data are given the transmission mode of each target process;
Transmitting element 305, for sending to above-mentioned target process by above-mentioned source data; The send mode that transmission source data adopt to each target process is corresponding with the transmission mode of each target process that aforesaid way target determining unit 304 is determined.
The embodiment of the present invention, employing is intercepted and captured source data by originating process, and obtain the transmission channel information of each target process, determine the target process that source data is corresponding, and transmission source data are to the transmission mode of each target process, then complete the transmission of source data, can reach the object that a plurality of target process obtain the data of an originating process, and this scheme does not need file, and all storage is complete, also do not need target process to adopt polling mode to obtain latest data, so data messaging efficiency is higher.In addition, due to embodiment of the present invention scheme, the mode that each target process obtains source data is independently, so each target process obtains source data and can't influence each other.
Above-mentioned transmission channel information is the information that adopts which kind of mode to transmit for sign, its form of expression can be varied, except transmission mode, can also represent to obtain by various information the information of target process and the originating process of source data, different transmission channels based on transmission mode can adopt different forms to embody, below provided the specific implementation of transmission channel information for example, as follows:
First, the mode of obtaining can adopt monitor thread to realize, specific as follows: alternatively, and above-mentioned information acquisition unit 303, be used for adopting monitor thread to obtain the transmission channel information of each target process, and whether the transmission channel information of definite target process and target process have change.
In addition, the sign of transmission channel information can identify in the following way, make originating process easily determine which the target process that need to obtain source data has, specific as follows: alternatively, above-mentioned information acquisition unit 303, for obtaining sign with target process sign and the originating process sign gap marker to foundation.
In embodiments of the present invention, transmission mode can adopt the mode of block of shared memory to realize, shared storage block can be shared drive, it should be noted that transmission channel can also be other system object, therefore transmission channel information can be also other, below should not be construed as for example the unique restriction to the embodiment of the present invention.The concrete scheme that the mode of employing block of shared memory realizes is as follows: alternatively, and above-mentioned information acquisition unit 303, the destination address of having indicated source data to deposit for gap marker;
Above-mentioned transmitting element 305, for source data being left in to above-mentioned destination address, reads for target process.
Implementation based on aforementioned use shared address piece, the embodiment of the present invention also provides the specific implementation in the address that how target data is stored in to gap marker indication, specific as follows: alternatively, as shown in Figure 4, above-mentioned transmitting element 305 comprises:
Address reading unit 401, for adopting transmission thread to read the address of above-mentioned gap marker indication;
Data r/w cell 402, for source data being write to the address of the above-mentioned gap marker indication that address above mentioned reading unit 401 reads, reads for target process.
In embodiments of the present invention, transmission channel information can be deposited in by target process, concrete scheme is as follows: alternatively, above-mentioned information acquisition unit 303, after being adopted hook to inject at originating process by target process, obtain the transmission channel information being deposited in by the target process that adopts hook to inject above-mentioned originating process.
The embodiment of the present invention also provides another kind of data transfer device, as shown in Figure 5, comprising:
Receiver 501, transmitter 502, processor 503 and storer 504;
Wherein processor 503, for generating and intercept and capture source data, obtain the transmission channel information of each target process; According to above-mentioned transmission channel information, determine the target process that above-mentioned source data is corresponding, and transmission source data are given the transmission mode of each target process; Above-mentioned source data is sent to above-mentioned target process; The send mode that transmission source data adopt to each target process is corresponding with the transmission mode of each target process of determining.
Originating process is to provide the source of data, and originating process can produce source data, and source data can be sound, image, flow data etc., and source data kind is varied, and it does not affect the realization of the embodiment of the present invention, so the embodiment of the present invention will not limit this.
The embodiment of the present invention, employing is intercepted and captured source data by originating process, and obtain the transmission channel information of each target process, determine the target process that source data is corresponding, and transmission source data are to the transmission mode of each target process, then complete the transmission of source data, can reach the object that a plurality of target process obtain the data of an originating process, and this scheme does not need file, and all storage is complete, also do not need target process to adopt polling mode to obtain latest data, so data messaging efficiency is higher.In addition, due to embodiment of the present invention scheme, the mode that each target process obtains source data is independently, so each target process obtains source data and can't influence each other.
Above-mentioned transmission channel information is the information that adopts which kind of mode to transmit for sign, its form of expression can be varied, except transmission mode, can also represent to obtain by various information the information of target process and the originating process of source data, different transmission channels based on transmission mode can adopt different forms to embody, below provided the specific implementation of transmission channel information for example, as follows:
First, the mode of obtaining can adopt monitor thread to realize, specific as follows: alternatively, above-mentioned processor 503, for the transmission channel information of obtaining each target process, comprise: for adopting monitor thread to obtain the transmission channel information of each target process, and whether the transmission channel information of definite target process and target process has change.
In addition, the sign of transmission channel information can identify in the following way, make originating process easily determine which the target process that need to obtain source data has, specific as follows: above-mentioned processor 503, comprises for obtaining the transmission channel information of each target process: for obtaining sign with target process sign and the originating process sign gap marker to foundation.
In embodiments of the present invention, transmission mode can adopt the mode of block of shared memory to realize, shared storage block can be shared drive, it should be noted that transmission channel can also be other system object, therefore transmission channel information can be also other, below should not be construed as for example the unique restriction to the embodiment of the present invention.The concrete scheme that the mode of employing block of shared memory realizes is as follows: alternatively, and the destination address that above-mentioned gap marker has indicated source data to deposit; Above-mentioned processor 503, for sending to above-mentioned target process to comprise above-mentioned source data: for source data being left in to above-mentioned destination address, read for target process.
Implementation based on aforementioned use shared address piece, the embodiment of the present invention also provides the specific implementation in the address that how target data is stored in to gap marker indication, specific as follows: above-mentioned processor 503, for leaving source data in above-mentioned destination address, for target process, read and comprise: for adopting transmission thread to read the address of above-mentioned gap marker indication, and source data is write to the address that above-mentioned gap marker is indicated, for target process, read.
In embodiments of the present invention, transmission channel information can be deposited in by target process, concrete scheme is as follows: above-mentioned processor 503, for obtaining the transmission channel information of each target process, comprise: after being adopted hook to inject at originating process by target process, obtain the transmission channel information being deposited in by the target process that adopts hook to inject above-mentioned originating process.
The embodiment of the present invention also provides a kind of equipment, and for distinguishing software type, this equipment can be terminal, as shown in Figure 6, for convenience of explanation, only show the part relevant to the embodiment of the present invention, concrete ins and outs do not disclose, and please refer to embodiment of the present invention method part.This terminal can be for comprising mobile phone, panel computer, PDA(Personal Digital Assistant, personal digital assistant), POS(Point of Sales, point-of-sale terminal), the terminal device arbitrarily such as vehicle-mounted computer, take terminal as mobile phone be example:
Shown in Fig. 6 is the block diagram of the part-structure of the mobile phone that the terminal that provides to the embodiment of the present invention is relevant.With reference to figure 6, mobile phone comprises: radio frequency (Radio Frequency, RF) parts such as circuit 610, storer 620, input block 630, display unit 640, sensor 650, voicefrequency circuit 660, Wireless Fidelity (wireless fidelity, WiFi) module 670, processor 680 and power supply 690.It will be understood by those skilled in the art that the handset structure shown in Fig. 6 does not form the restriction to mobile phone, can comprise the parts more more or less than diagram, or combine some parts, or different parts are arranged.
Below in conjunction with Fig. 6, each component parts of mobile phone is carried out to concrete introduction:
RF circuit 610 can be used for receiving and sending messages or communication process in, the reception of signal and transmission, especially, after the downlink information of base station is received, process to processor 680; In addition, the up data of design are sent to base station.Conventionally, RF circuit includes but not limited to antenna, at least one amplifier, transceiver, coupling mechanism, low noise amplifier (Low Noise Amplifier, LNA), diplexer etc.In addition, RF circuit 610 can also be by radio communication and network and other devices communicatings.Above-mentioned radio communication can be used arbitrary communication standard or agreement, include but not limited to global system for mobile communications (Global System of Mobile communication, GSM), general packet radio service (General Packet Radio Service, GPRS), CDMA (Code Division Multiple Access, CDMA), Wideband Code Division Multiple Access (WCDMA) (Wideband Code Division Multiple Access, WCDMA), Long Term Evolution (Long Term Evolution, LTE), Email, Short Message Service (Short Messaging Service, SMS) etc.
Storer 620 can be used for storing software program and module, and processor 680 is stored in software program and the module of storer 620 by operation, thereby carries out various function application and the data processing of mobile phone.Storer 620 can mainly comprise storage program district and storage data field, wherein, and the application program (such as sound-playing function, image player function etc.) that storage program district can storage operation system, at least one function is required etc.; The data (such as voice data, phone directory etc.) that create according to the use of mobile phone etc. can be stored in storage data field.In addition, storer 620 can comprise high-speed random access memory, can also comprise nonvolatile memory, for example at least one disk memory, flush memory device or other volatile solid-state parts.
Input block 630 can be used for receiving numeral or the character information of input, and generation arranges with the user of mobile phone and function is controlled relevant key signals input.Particularly, input block 630 can comprise contact panel 631 and other input equipments 632.Contact panel 631, also referred to as touch-screen, can collect user or near touch operation (using any applicable object or near the operations of annex on contact panel 631 or contact panel 631 such as finger, stylus such as user) thereon, and drive corresponding coupling arrangement according to predefined formula.Optionally, contact panel 631 can comprise touch detecting apparatus and two parts of touch controller.Wherein, touch detecting apparatus detects user's touch orientation, and detects the signal that touch operation is brought, and sends signal to touch controller; Touch controller receives touch information from touch detecting apparatus, and converts it to contact coordinate, then gives processor 680, and the order that energy receiving processor 680 is sent is also carried out.In addition, can adopt the polytypes such as resistance-type, condenser type, infrared ray and surface acoustic wave to realize contact panel 631.Except contact panel 631, input block 630 can also comprise other input equipments 632.Particularly, other input equipments 632 can include but not limited to one or more in physical keyboard, function key (controlling button, switch key etc. such as volume), trace ball, mouse, control lever etc.
Display unit 640 can be used for showing the information inputted by user or the various menus of the information that offers user and mobile phone.Display unit 640 can comprise display panel 641, optionally, can adopt the forms such as liquid crystal display (Liquid Crystal Display, LCD), Organic Light Emitting Diode (Organic Light-Emitting Diode, OLED) to configure display panel 641.Further, contact panel 631 can cover display panel 641, when contact panel 631 detect thereon or near touch operation after, send processor 680 to determine the type of touch event, corresponding vision output is provided according to the type of touch event with preprocessor 680 on display panel 641.Although in Fig. 6, contact panel 631 and display panel 641 be as two independently parts realize input and the input function of mobile phone, but in certain embodiments, can contact panel 631 and display panel 641 is integrated and realize the input and output function of mobile phone.
Mobile phone also can comprise at least one sensor 650, such as optical sensor, motion sensor and other sensors.Particularly, optical sensor can comprise ambient light sensor and proximity transducer, and wherein, ambient light sensor can regulate according to the light and shade of ambient light the brightness of display panel 641, proximity transducer can, when mobile phone moves in one's ear, cut out display panel 641 and/or backlight.A kind of as motion sensor; accelerometer sensor can detect the size of the acceleration that (is generally three axles) in all directions; when static, can detect size and the direction of gravity, can be used for identifying application (such as horizontal/vertical screen switching, dependent game, magnetometer pose calibrating), Vibration identification correlation function (such as passometer, knock) of mobile phone attitude etc.; As for mobile phone other sensors such as configurable gyroscope, barometer, hygrometer, thermometer, infrared ray sensor also, do not repeat them here.
Voicefrequency circuit 660, loudspeaker 661, microphone 662 can provide the audio interface between user and mobile phone.Voicefrequency circuit 660 can be transferred to loudspeaker 661 by the electric signal after the voice data conversion receiving, and is converted to voice signal exports by loudspeaker 661; On the other hand, microphone 662 is converted to electric signal by the voice signal of collection, after being received by voicefrequency circuit 660, be converted to voice data, after again voice data output processor 680 being processed, through RF circuit 610, to send to such as another mobile phone, or export voice data to storer 620 to further process.
WiFi belongs to short range wireless transmission technology, mobile phone by WiFi module 670 can help that user sends and receive e-mail, browsing page and access streaming video etc., it provides wireless broadband internet access for user.Although Fig. 6 shows WiFi module 670, be understandable that, it does not belong to must forming of mobile phone, completely can be as required in not changing the essential scope of invention and omit.
Processor 680 is control centers of mobile phone, utilize the various piece of various interface and the whole mobile phone of connection, by moving or carry out software program and/or the module being stored in storer 620, and call the data that are stored in storer 620, carry out various functions and the deal with data of mobile phone, thereby mobile phone is carried out to integral monitoring.Optionally, processor 680 can comprise one or more processing units; Preferably, processor 680 can integrated application processor and modem processor, and wherein, application processor is mainly processed operating system, user interface and application program etc., and modem processor is mainly processed radio communication.Be understandable that, above-mentioned modem processor also can not be integrated in processor 680.
Mobile phone also comprises that the power supply 690(powering to all parts is such as battery), preferred, power supply can be connected with processor 680 logics by power-supply management system, thereby realizes the functions such as management charging, electric discharge and power managed by power-supply management system.
Although not shown, mobile phone can also comprise camera, bluetooth module etc., does not repeat them here.
In embodiments of the present invention, the included processor 680 of this terminal also has following functions:
Generate and intercept and capture source data, obtain the transmission channel information of each target process; According to above-mentioned transmission channel information, determine the target process that above-mentioned source data is corresponding, and transmission source data are given the transmission mode of each target process; Above-mentioned source data is sent to above-mentioned target process; The send mode that transmission source data adopt to each target process is corresponding with the transmission mode of each target process of determining.
Originating process is to provide the source of data, and originating process can produce source data, and source data can be sound, image, flow data etc., and source data kind is varied, and it does not affect the realization of the embodiment of the present invention, so the embodiment of the present invention will not limit this.
The embodiment of the present invention, employing is intercepted and captured source data by originating process, and obtain the transmission channel information of each target process, determine the target process that source data is corresponding, and transmission source data are to the transmission mode of each target process, then complete the transmission of source data, can reach the object that a plurality of target process obtain the data of an originating process, and this scheme does not need file, and all storage is complete, also do not need target process to adopt polling mode to obtain latest data, so data messaging efficiency is higher.In addition, due to embodiment of the present invention scheme, the mode that each target process obtains source data is independently, so each target process obtains source data and can't influence each other.
Above-mentioned transmission channel information is the information that adopts which kind of mode to transmit for sign, its form of expression can be varied, except transmission mode, can also represent to obtain by various information the information of target process and the originating process of source data, different transmission channels based on transmission mode can adopt different forms to embody, below provided the specific implementation of transmission channel information for example, as follows:
First, the mode of obtaining can adopt monitor thread to realize, specific as follows: alternatively, above-mentioned processor 680, for the transmission channel information of obtaining each target process, comprise: for adopting monitor thread to obtain the transmission channel information of each target process, and whether the transmission channel information of definite target process and target process has change.
In addition, the sign of transmission channel information can identify in the following way, make originating process easily determine which the target process that need to obtain source data has, specific as follows: above-mentioned processor 680, comprises for obtaining the transmission channel information of each target process: for obtaining sign with target process sign and the originating process sign gap marker to foundation.
In embodiments of the present invention, transmission mode can adopt the mode of block of shared memory to realize, shared storage block can be shared drive, it should be noted that transmission channel can also be other system object, therefore transmission channel information can be also other, below should not be construed as for example the unique restriction to the embodiment of the present invention.The concrete scheme that the mode of employing block of shared memory realizes is as follows: alternatively, and the destination address that above-mentioned gap marker has indicated source data to deposit; Above-mentioned processor 680, for sending to above-mentioned target process to comprise above-mentioned source data: for source data being left in to above-mentioned destination address, read for target process.
Implementation based on aforementioned use shared address piece, the embodiment of the present invention also provides the specific implementation in the address that how target data is stored in to gap marker indication, specific as follows: above-mentioned processor 680, for leaving source data in above-mentioned destination address, for target process, read and comprise: for adopting transmission thread to read the address of above-mentioned gap marker indication, and source data is write to the address that above-mentioned gap marker is indicated, for target process, read.
In embodiments of the present invention, transmission channel information can be deposited in by target process, concrete scheme is as follows: above-mentioned processor 680, for obtaining the transmission channel information of each target process, comprise: after being adopted hook to inject at originating process by target process, obtain the transmission channel information being deposited in by the target process that adopts hook to inject above-mentioned originating process.
It should be noted that, in above-mentioned data transfer device embodiment, included unit is just divided according to function logic, but be not limited to above-mentioned division, as long as can realize corresponding function; In addition, the concrete title of each functional unit also, just for the ease of mutual differentiation, is not limited to protection scope of the present invention.
In addition, one of ordinary skill in the art will appreciate that all or part of step realizing in above-mentioned each embodiment of the method is to come the hardware that instruction is relevant to complete by program, corresponding program can be stored in a kind of computer-readable recording medium, the above-mentioned storage medium of mentioning can be ROM (read-only memory), disk or CD etc.
These are only preferably embodiment of the present invention; but protection scope of the present invention is not limited to this; anyly be familiar with those skilled in the art in the technical scope that the embodiment of the present invention discloses, the variation that can expect easily or replacement, within all should being encompassed in protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion with the protection domain of claim.

Claims (13)

1. a data transferring method, is characterized in that, comprising:
Originating process generates and intercepts and captures source data, obtains the transmission channel information of each target process;
According to described transmission channel information, determine the target process that described source data is corresponding, and transmission source data are given the transmission mode of each target process;
Described source data is sent to described target process; The send mode that transmission source data adopt to each target process is corresponding with the transmission mode of each target process of determining.
2. method according to claim 1, is characterized in that, described in obtain each target process transmission channel information comprise:
Employing monitor thread obtains the transmission channel information of each target process, and whether the transmission channel information of definite target process and target process has change.
3. method according to claim 2, is characterized in that, described in obtain each target process transmission channel information comprise:
Obtain sign with target process sign and the originating process sign gap marker to foundation.
4. method according to claim 3, is characterized in that the destination address that described gap marker has indicated source data to deposit; Describedly send to described target process to comprise described source data:
Leave source data in described destination address, for target process, read.
5. method according to claim 4, is characterized in that, describedly leaves source data in described destination address, for target process, reads and comprises:
Adopt transmission thread to read the address of described gap marker indication, and source data is write to the address of described gap marker indication, for target process, read.
6. method according to claim 1, is characterized in that, described in obtain each target process transmission channel information comprise:
Described originating process obtains the transmission channel information being deposited in by the target process that adopts hook to inject described originating process after being adopted hook to inject by target process.
7. according to method described in claim 1 to 6, it is characterized in that, described target process has two or more; Described originating process is audio player process.
8. a data transfer device, is characterized in that, comprising:
Data generating unit, for generating source data;
Data cutout unit, the source data generating for intercepting and capturing described data generating unit;
Information acquisition unit, for obtaining the transmission channel information of each target process;
Mode target determining unit, determines for the transmission channel information of obtaining according to described information acquisition unit the target process that described source data is corresponding, and transmission source data are given the transmission mode of each target process;
Transmitting element, for sending to described target process by described source data; The send mode that transmission source data adopt to each target process is corresponding with the transmission mode of each target process that described mode target determining unit is determined.
9. data transfer device according to claim 8, is characterized in that,
Described information acquisition unit, for adopting monitor thread to obtain the transmission channel information of each target process, and whether the transmission channel information of definite target process and target process has change.
10. data transfer device according to claim 9, is characterized in that,
Described information acquisition unit, for obtaining sign with target process sign and the originating process sign gap marker to foundation.
11. data transfer devices according to claim 10, is characterized in that,
Described information acquisition unit, the destination address of having indicated source data to deposit for gap marker;
Described transmitting element, for source data being left in to described destination address, reads for target process.
12. according to data transfer device described in claim 11, it is characterized in that, described transmitting element comprises:
Address reading unit, for adopting transmission thread to read the address of described gap marker indication;
Data r/w cell, for source data being write to the address of the described gap marker indication that described address reading unit reads, reads for target process.
13. data transfer devices according to claim 8, is characterized in that,
Described information acquisition unit, after being adopted hook to inject at originating process by target process, obtains the transmission channel information being deposited in by the target process that adopts hook to inject described originating process.
CN201310576452.XA 2013-11-18 2013-11-18 Method and device for data transmission Active CN103593247B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201310576452.XA CN103593247B (en) 2013-11-18 2013-11-18 Method and device for data transmission
PCT/CN2014/090963 WO2015070769A1 (en) 2013-11-18 2014-11-13 Data transfer method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310576452.XA CN103593247B (en) 2013-11-18 2013-11-18 Method and device for data transmission

Publications (2)

Publication Number Publication Date
CN103593247A true CN103593247A (en) 2014-02-19
CN103593247B CN103593247B (en) 2017-02-08

Family

ID=50083402

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310576452.XA Active CN103593247B (en) 2013-11-18 2013-11-18 Method and device for data transmission

Country Status (2)

Country Link
CN (1) CN103593247B (en)
WO (1) WO2015070769A1 (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104410687A (en) * 2014-11-26 2015-03-11 上海爱数软件有限公司 Method for transmitting data among multiple groups of courses on basis of pipe
WO2015070769A1 (en) * 2013-11-18 2015-05-21 Tencent Technology (Shenzhen) Company Limited Data transfer method and apparatus
CN105468360A (en) * 2015-11-17 2016-04-06 南京邮电大学 Third-party audio player oriented data interception method
CN111045700A (en) * 2018-10-15 2020-04-21 阿里巴巴集团控股有限公司 Data updating method, device, system, storage medium and electronic equipment
CN111290744A (en) * 2020-01-22 2020-06-16 北京百度网讯科技有限公司 Stream computing job processing method, stream computing system and electronic device
CN115794443A (en) * 2023-01-29 2023-03-14 北京万里红科技有限公司 Method and device for multi-process communication based on shared memory

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111511045B (en) * 2020-04-10 2023-06-02 玳能科技(杭州)有限公司 Interaction method and device for mobile terminal and computer, electronic equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1852431A (en) * 2005-12-23 2006-10-25 华为技术有限公司 System and method for realizing video frequency information sharing
CN1892654A (en) * 2005-06-08 2007-01-10 罗技欧洲公司 System and method for transparently processing multimedia data
US20070214461A1 (en) * 2005-06-08 2007-09-13 Logitech Europe S.A. System and method for transparently processing multimedia data
CN102819455A (en) * 2012-07-31 2012-12-12 深圳市共进电子股份有限公司 Method for managing progresses at application layer and managing system
US20130014122A1 (en) * 2007-10-20 2013-01-10 Nord Joseph Method and system for communicating between isolation environments
CN103150220A (en) * 2011-12-07 2013-06-12 腾讯科技(深圳)有限公司 Method and system for interprocess communications

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7613597B2 (en) * 2006-01-20 2009-11-03 International Business Machines Corporation Non-intrusive method for simulation or replay of external events related to an application process, and a system implementing said method
CN101296130B (en) * 2008-05-30 2011-04-06 北京同步科技有限公司 System and method for multi-process sharing port receiving network message
CN103593247B (en) * 2013-11-18 2017-02-08 腾讯科技(成都)有限公司 Method and device for data transmission

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1892654A (en) * 2005-06-08 2007-01-10 罗技欧洲公司 System and method for transparently processing multimedia data
US20070214461A1 (en) * 2005-06-08 2007-09-13 Logitech Europe S.A. System and method for transparently processing multimedia data
CN1852431A (en) * 2005-12-23 2006-10-25 华为技术有限公司 System and method for realizing video frequency information sharing
US20130014122A1 (en) * 2007-10-20 2013-01-10 Nord Joseph Method and system for communicating between isolation environments
CN103150220A (en) * 2011-12-07 2013-06-12 腾讯科技(深圳)有限公司 Method and system for interprocess communications
CN102819455A (en) * 2012-07-31 2012-12-12 深圳市共进电子股份有限公司 Method for managing progresses at application layer and managing system

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015070769A1 (en) * 2013-11-18 2015-05-21 Tencent Technology (Shenzhen) Company Limited Data transfer method and apparatus
CN104410687A (en) * 2014-11-26 2015-03-11 上海爱数软件有限公司 Method for transmitting data among multiple groups of courses on basis of pipe
CN104410687B (en) * 2014-11-26 2018-01-19 上海爱数信息技术股份有限公司 A kind of multigroup inter-process data transmission method based on pipeline
CN105468360A (en) * 2015-11-17 2016-04-06 南京邮电大学 Third-party audio player oriented data interception method
CN105468360B (en) * 2015-11-17 2018-09-21 南京邮电大学 A kind of data cutout method towards third party's audio player
CN111045700A (en) * 2018-10-15 2020-04-21 阿里巴巴集团控股有限公司 Data updating method, device, system, storage medium and electronic equipment
CN111045700B (en) * 2018-10-15 2023-05-05 阿里巴巴集团控股有限公司 Data updating method, device, system, storage medium and electronic equipment
CN111290744A (en) * 2020-01-22 2020-06-16 北京百度网讯科技有限公司 Stream computing job processing method, stream computing system and electronic device
CN115794443A (en) * 2023-01-29 2023-03-14 北京万里红科技有限公司 Method and device for multi-process communication based on shared memory

Also Published As

Publication number Publication date
CN103593247B (en) 2017-02-08
WO2015070769A1 (en) 2015-05-21

Similar Documents

Publication Publication Date Title
CN104113782B (en) Based on the method for registering of video, terminal, server and system
CN103593247A (en) Method and device for data transmission
CN103634717B (en) A kind of method, device and the terminal device of the control of utilization earphone
CN103594103A (en) Audio processing method and related device
CN103546766A (en) Video processing method, related equipment and communication system
CN104168175A (en) Message group sensing method and terminal in instant messaging
CN104699973A (en) Method and device for controlling logic of questionnaires
CN102833419B (en) Method and terminal for controlling screen state
CN103699309B (en) A kind of method for recording of synchronization video, device and mobile terminal
CN104602100A (en) Method and device for recording video and audio in applications
CN105554522A (en) Method for playing audio in group, server and terminal
CN103500227A (en) Video frame storage management method, related device and related communication system
TW201516844A (en) Apparatus and method for selecting object
CN106506321A (en) One population message treatment method and terminal device
CN104571979A (en) Method and device for realizing split-screen views
CN103312907B (en) Voice channel allocation management method, voice server and communication system
CN105959481A (en) Control method of scene sound effect, and electronic equipment
CN106254924A (en) The player method of a kind of multi-medium data, system and relevant device
CN104426926B (en) The processing method and processing device of data is issued in timing
WO2015010611A1 (en) Method, apparatus, and communication system of updating user data
CN104240710B (en) A kind of method, system and the terminal device of information transmission
CN104243394A (en) Multimedia file playing method and device
CN105550316A (en) Pushing method and device of audio list
CN104135504A (en) An application-based service providing method, device and system
CN105335434B (en) Log management method and device and electronic equipment

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant