[go: up one dir, main page]

CN103593247B - Method and device for data transmission - Google Patents

Method and device for data transmission Download PDF

Info

Publication number
CN103593247B
CN103593247B CN201310576452.XA CN201310576452A CN103593247B CN 103593247 B CN103593247 B CN 103593247B CN 201310576452 A CN201310576452 A CN 201310576452A CN 103593247 B CN103593247 B CN 103593247B
Authority
CN
China
Prior art keywords
target process
source data
data
target
transmission channel
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201310576452.XA
Other languages
Chinese (zh)
Other versions
CN103593247A (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

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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 to a kind of data transferring method and device.
Background technology
Inter-process data transmits, and the scheme that typically can adopt can be as follows:
The provider of data sets up a file on hard disk, then writes data toward in this document(Closed file can be not related to, But must flush buffers), the recipient of data opens this file with sharing mode and reads content therein.
The program, needs the offer establishment file of data, and needs not stop to write file.The recipient of data can only adopt The mode taking poll obtains latest data, leads to inefficiency.During for there are many application processes as data receiver, problem Especially prominent.
For example, after photographic head obtains video, encoding software obtains video, and encoding software needs to deposit video on hard disk Store up as a file, video jukebox software needs after all storage finishes, to be read file by other application programs.
Therefore adopt above scheme, the destination of data obtains the less efficient of data.
Content of the invention
Embodiments provide a kind of data transferring method and device, realize multiple target process and obtain a source The data of process, and improve data messaging efficiency.
A kind of data transferring method, including:
Originating process generates and intercepts and captures source data, obtains the transmission channel information of each target process;
Determine the corresponding target process of described source data according to described transmission channel information, and send source data to each mesh The transmission means of mark process;
Described source data is sent to described target process;Send the sending method that source data is adopted to each target process Corresponding with the transmission means of each target process determining.
A kind of data transfer device, including:
Data generating unit, for generating source data;
Data cutout unit, for intercepting and capturing the source data that described data generating unit generates;
Information acquisition unit, for obtaining the transmission channel information of each target process;
Mode target determination unit, for determining described source according to the transmission channel information that described information acquiring unit obtains The corresponding target process of data, and send the transmission means to each target process for the source data;
Transmitting element, for being sent to described target process by described source data;Send source data to each target process institute Using sending method corresponding with the transmission means of each target process that described mode target determination unit determines.
As can be seen from the above technical solutions, the embodiment of the present invention has advantages below:Intercept and capture source number using by originating process According to, and obtain the transmission channel information of each target process, to determine the corresponding target process of source data, and send source data to The transmission means of each target process, then completes the transmission of source data, can reach multiple target process and obtain an originating process Data purpose, and the program do not need file all storage finishes it is not required that target process is obtained using polling mode Obtain latest data, therefore data messaging efficiency is higher.
Brief description
For the technical scheme being illustrated more clearly that in the embodiment of the present invention, will make to required in embodiment description below Accompanying drawing briefly introduce it should be apparent that, drawings in the following description are only some embodiments of the present invention, for this For the those of ordinary skill in field, without having to pay creative labor, it can also be obtained according to these accompanying drawings His accompanying drawing.
Fig. 1 is present invention method schematic flow sheet;
Fig. 2 is embodiment of the present invention system structure 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.
Specific embodiment
In order that the object, technical solutions and advantages of the present invention are clearer, below in conjunction with accompanying drawing the present invention is made into One step ground describes in detail it is clear that described embodiment is only present invention some embodiments, rather than whole enforcement Example.Based on the embodiment in the present invention, those of ordinary skill in the art are obtained under the premise of not making creative work All other embodiment, broadly falls into the scope of protection of the invention.
Embodiments provide a kind of data transferring method, as shown in figure 1, including:
101:Originating process generates and intercepts and captures source data, obtains the transmission channel information of each target process;
Originating process is the source providing data, and originating process can produce source data, and source data can be sound, image, flow data Deng source data species is varied, and it has no effect on the realization of the embodiment of the present invention, and therefore the embodiment of the present invention not limits to this Fixed.
Above-mentioned transmission channel information is used to identify the information being transmitted using which kind of mode, and its form of expression can be many Kind various, in addition to transmission means, can also be represented by various information the target process needing to obtain source data and The information of originating process, the different transmission channels based on transmission means can following present biography to embody using different forms Defeated channel information implement citing, as follows:
First, the mode of acquisition can be realized using monitoring thread, specific as follows:The biography of each target process of above-mentioned acquisition Defeated channel information includes:Using the transmission channel information monitoring the thread each target process of acquisition, and determine target process and mesh Whether the transmission channel information of mark process has altered.
In addition, the mark of transmission channel information can be identified in the following way, so that originating process is easily determined needs Which the target process of source data to be obtained has, specific as follows:The transmission channel information of each target process of above-mentioned acquisition includes:Obtain Take with the mark of target process mark and originating process mark to the gap marker set up.
In embodiments of the present invention, transmission means can be realized in the way of using shared memory block, shared memory block Can be shared drive, it should be noted that transmission channel can also be other system object, therefore transmission channel information also may be used To be other, below citing should not be construed as the unique restriction to the embodiment of the present invention.Come real by the way of shared memory block Existing concrete scheme is as follows:Above-mentioned gap marker indicates the destination address that source data is deposited;Above-mentioned by above-mentioned source data send Include to above-mentioned target process:Source data is left in above-mentioned destination address, reads for target process.
In embodiments of the present invention, transmission channel information can be stored in by target process, and concrete scheme is as follows:Above-mentioned acquisition The transmission channel information of each target process includes:Above-mentioned originating process is adopted after hook injection by target process, obtains by adopting hook Son injects the transmission channel information that the target process of above-mentioned originating process is stored in.
Based on a specific application, the embodiment of the present invention be can apply to the broadcasting of the audio frequency such as music, sent out based on this Bright embodiment provides following scheme, it should be noted that in addition to audio frequency is play, other enter as source as video player Journey is also permissible, and 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.Subsequent embodiment In, more detailed illustration will be given taking music player as a example.
102:Determine the corresponding target process of above-mentioned source data according to above-mentioned transmission channel information, and send source data to The transmission means of each target process;
103:Above-mentioned source data is sent to above-mentioned target process;Send the transmission that source data is adopted to each target process Mode is corresponding with the transmission means of each target process determining.
The embodiment of the present invention, intercepts and captures source data using by originating process, and obtains the transmission channel information of each target process, comes Determine the corresponding target process of source data, and send source data to the transmission means of each target process, then complete source data Transmission, the purpose that multiple target process obtain the data of originating processes can be reached, and the program not need file complete Portion's storage finishes it is not required that target process adopts polling mode to obtain latest data, and therefore data messaging efficiency is higher.Separately Outward, due to embodiment of the present invention scheme, the mode that each target process obtains source data is independent, and therefore each target process obtains Source data can't influence each other.
Based on the aforementioned implementation using shared address block, how the embodiment of the present invention deposits target data if additionally providing It is put into the specific implementation in the address of gap marker instruction, specific as follows:Above-mentioned source data is left in above-mentioned target ground Location, reads for target process and includes:
Read the address of above-mentioned gap marker instruction using transmission thread, and source data is write above-mentioned gap marker instruction Address, for target process read.
Hereinafter will be illustrated in more detail using Audio Players as originating process, the embodiment of the present invention is passed through Hook(Hook)Mode injects player process, and the play function of hook broadcasting process obtains voice data, then by shared interior Deposit and voice data is returned to other application programs use.
Hook (Hook), is Windows(Windows)One platform of message processing facility, application program is permissible Sub- journey is set above to monitor certain message of specified window, and the window being monitored can be other processes is created 's.After message reaches, before target window process function, process it.Hook Mechanism allows application program intercepting and capturing to process Windows messaging or particular event.
Detailed implementation is illustrated in fig. 2 shown below:
Introduce an implication that part is illustrated first as follows:
Application program:Want to obtain the program of voice data;Fig. 2 show n application process.
Player process:Sound data sources, are acquired the target program of sound.
Transmission channel ID(Identity, mark):Can be with program process ID and player process ID as key-value pair Set up system globally unique 64 ID, the high-order process ID for application program 32, low level is player 32 Process ID, represents which application program wishes to obtain the sound of which player.
Transmission channel allocation table:This exterior and the interior face stores transmission channel ID.
Transmission channel:This is with transmission channel ID for the globally unique shared drive block of the system of mark foundation, is used for Transmission voice data, player writes data, and application program reads out data.
Transmission channel table:This transmission channel table in player process, for storing transmission channel address.
Voice data caches buf:It is used for caching the voice data from player process intercept.
Distribution monitors thread:This thread monitors transmission channel allocation table, and when allocation table has altered, this thread can scan whole Individual table, checks each transmission channel ID, checks whether that application program is wanted to obtain the voice data of this player process, if Have, then update corresponding for this transmission channel ID transmission channel address in transmission channel table.
Transfer voice thread:This thread reads the transmission channel address in transmission channel table, then by voice data one by one The corresponding transmission channel of write.
Application program obtains the flow process of player voice data, also refers to shown in Fig. 2, specific as follows:
Step 1, application program are initially injected target and play process, then link up with the play function of broadcasting process, and distribution is slow Deposit(buf)The voice data that storage is intercepted and captured, creates distribution and monitors thread and sound line journey;
For example:Qtalk(A team's voice communication instrument supporting multi-person speech exchange)Program injection player obtains Sound.
Step 2, application program generate transmission channel ID with oneself ID and player ID for mark, and with this transmission channel ID Set up transmission channel for mark;
Step 3, application program update transmission channel ID in transmission channel allocation table, and notify player process to carry out Update;As shown in Figure 2, application process can also change transmission channel ID of itself in channel allocation table.
Step 4, the distribution of player process monitor that thread scans transmission channel allocation table monitors transmission channel allocation table Distributing altering, finds that application program wants to obtain the sound of oneself, then the address of transmission channel is stored in transmission channel table;As The situation that fruit has altered occurs, then need to update transmission channel table;
Step 5, the transfer voice thread of player process cache, from voice data, the voice data taking out intercepting and capturing buf, Then take out transmission channel address from transmission channel table, then write data to corresponding transmission channel;
Hereafter 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, repeat step(2)Arrive(6)?;If application Program is not desired to obtain voice data, just deletes transmission channel ID in transmission channel allocation table, and the distribution of player monitors line Journey detects This move and just deletes corresponding transmission channel address in local transmission channel table, simultaneously closes off corresponding transmission logical Road.
This technical scheme supports that multiple application programs obtain the voice data of destination player simultaneously, thus enable users to by The local music play shares multiple voice-enabled chat rooms simultaneously, and the switch of each application program background music is all mutual in addition Independently being independent of each other so that Qtalk background music function is easy to use and powerful, bring more preferable experience to user.
The embodiment of the present invention additionally provides a kind of data transfer device, as shown in figure 3, including:
Data generating unit 301, for generating source data;
Originating process is the source providing data, and originating process can produce source data, and source data can be sound, image, flow data Deng source data species is varied, and it has no effect on the realization of the embodiment of the present invention, and therefore the embodiment of the present invention not limits to this Fixed.
Data cutout unit 302, for intercepting and capturing the source data that above-mentioned data generating unit 301 generates;
Information acquisition unit 303, for obtaining the transmission channel information of each target process;
Mode target determination unit 304, the transmission channel information for obtaining according to above- mentioned information acquiring unit 303 determines The corresponding target process of above-mentioned source data, and send the transmission means to each target process for the source data;
Transmitting element 305, for being sent to above-mentioned target process by above-mentioned source data;Send source data to each target process The sending method being adopted is corresponding with the transmission means of each target process that aforesaid way target determination unit 304 determines.
The embodiment of the present invention, intercepts and captures source data using by originating process, and obtains the transmission channel information of each target process, comes Determine the corresponding target process of source data, and send source data to the transmission means of each target process, then complete source data Transmission, the purpose that multiple target process obtain the data of originating processes can be reached, and the program not need file complete Portion's storage finishes it is not required that target process adopts polling mode to obtain latest data, and therefore data messaging efficiency is higher.Separately Outward, due to embodiment of the present invention scheme, the mode that each target process obtains source data is independent, and therefore each target process obtains Source data can't influence each other.
Above-mentioned transmission channel information is used to identify the information being transmitted using which kind of mode, and its form of expression can be many Kind various, in addition to transmission means, can also be represented by various information the target process needing to obtain source data and The information of originating process, the different transmission channels based on transmission means can following present biography to embody using different forms Defeated channel information implement citing, as follows:
First, the mode of acquisition can be realized using monitoring thread, specific as follows:Alternatively, above- mentioned information obtains list Unit 303, for obtaining the transmission channel information of each target process using supervision thread, and determines target process and target process Transmission channel information whether have altered.
In addition, the mark of transmission channel information can be identified in the following way, so that originating process is easily determined needs Which the target process of source data to be obtained has, specific as follows:Alternatively, above- mentioned information acquiring unit 303, for obtaining with mesh The mark of mark process identification (PID) and originating process mark is to the gap marker set up.
In embodiments of the present invention, transmission means can be realized in the way of using shared memory block, shared memory block Can be shared drive, it should be noted that transmission channel can also be other system object, therefore transmission channel information also may be used To be other, below citing should not be construed as the unique restriction to the embodiment of the present invention.Come real by the way of shared memory block Existing concrete scheme is as follows:Alternatively, above- mentioned information acquiring unit 303, indicates, for gap marker, the mesh that source data is deposited Mark address;
Above-mentioned transmitting element 305, for leaving source data in above-mentioned destination address, reads for target process.
Based on the aforementioned implementation using shared address block, how the embodiment of the present invention deposits target data if additionally providing It is put into the specific implementation in the address of gap marker instruction, specific as follows:Alternatively, as shown in figure 4, above-mentioned transmitting element 305 include:
Address reading unit 401, for reading the address of above-mentioned gap marker instruction using transmission thread;
Data r/w cell 402, for writing, by source data, the above-mentioned gap marker that address above mentioned reading unit 401 reads The address indicating, reads for target process.
In embodiments of the present invention, transmission channel information can be stored in by target process, and concrete scheme is as follows:Alternatively, Above- mentioned information acquiring unit 303, for, after originating process is adopted hook injection by target process, obtaining and being injected by using hook State the transmission channel information that the target process of originating process is stored in.
The embodiment of the present invention additionally provides another kind of data transfer device, as shown in figure 5, including:
Receptor 501, emitter 502, processor 503 and memorizer 504;
Wherein processor 503, for generating and intercepting and capturing source data, obtains the transmission channel information of each target process;Foundation Above-mentioned transmission channel information determines the corresponding target process of above-mentioned source data, and sends the transmission to each target process for the source data Mode;Above-mentioned source data is sent to above-mentioned target process;Send the sending method that source data adopted to each target process with The transmission means of each target process determining corresponds to.
Originating process is the source providing data, and originating process can produce source data, and source data can be sound, image, flow data Deng source data species is varied, and it has no effect on the realization of the embodiment of the present invention, and therefore the embodiment of the present invention not limits to this Fixed.
The embodiment of the present invention, intercepts and captures source data using by originating process, and obtains the transmission channel information of each target process, comes Determine the corresponding target process of source data, and send source data to the transmission means of each target process, then complete source data Transmission, the purpose that multiple target process obtain the data of originating processes can be reached, and the program not need file complete Portion's storage finishes it is not required that target process adopts polling mode to obtain latest data, and therefore data messaging efficiency is higher.Separately Outward, due to embodiment of the present invention scheme, the mode that each target process obtains source data is independent, and therefore each target process obtains Source data can't influence each other.
Above-mentioned transmission channel information is used to identify the information being transmitted using which kind of mode, and its form of expression can be many Kind various, in addition to transmission means, can also be represented by various information the target process needing to obtain source data and The information of originating process, the different transmission channels based on transmission means can following present biography to embody using different forms Defeated channel information implement citing, as follows:
First, the mode of acquisition can be realized using monitoring thread, specific as follows:Alternatively, above-mentioned processor 503, Transmission channel information for obtaining each target process includes:For using the transmission channel monitoring the thread each target process of acquisition Information, and determine whether target process and the transmission channel information of target process have altered.
In addition, the mark of transmission channel information can be identified in the following way, so that originating process is easily determined needs Which the target process of source data to be obtained has, specific as follows:Above-mentioned processor 503, for obtaining the transmission of each target process Channel information includes:For obtaining with the mark of target process mark and originating process mark to the gap marker set up.
In embodiments of the present invention, transmission means can be realized in the way of using shared memory block, shared memory block Can be shared drive, it should be noted that transmission channel can also be other system object, therefore transmission channel information also may be used To be other, below citing should not be construed as the unique restriction to the embodiment of the present invention.Come real by the way of shared memory block Existing concrete scheme is as follows:Alternatively, above-mentioned gap marker indicates the destination address that source data is deposited;Above-mentioned processor 503, Include for above-mentioned source data is sent to above-mentioned target process:For leaving source data in above-mentioned destination address, for target Process reads.
Based on the aforementioned implementation using shared address block, how the embodiment of the present invention deposits target data if additionally providing It is put into the specific implementation in the address of gap marker instruction, specific as follows:Above-mentioned processor 503, for depositing source data It is placed on above-mentioned destination address, read for target process and include:For reading the ground of above-mentioned gap marker instruction using transmission thread Location, and source data is write the address of above-mentioned gap marker instruction, read for target process.
In embodiments of the present invention, transmission channel information can be stored in by target process, and concrete scheme is as follows:Above-mentioned process Device 503, the transmission channel information for obtaining each target process includes:For being injected using hook by target process in originating process Afterwards, obtain the transmission channel information being stored in by the target process injecting above-mentioned originating process using hook.
The embodiment of the present invention additionally provides a kind of equipment, and for distinguishing software type, this equipment can be terminal, such as Fig. 6 Shown, for convenience of description, illustrate only the part related to the embodiment of the present invention, particular technique details does not disclose, and please join According to present invention method part.This terminal can be including mobile phone, panel computer, PDA(Personal Digital Assistant, personal digital assistant)、POS(Point of Sales, point-of-sale terminal), the arbitrarily terminal unit such as vehicle-mounted computer, So that terminal is as mobile phone as a example:
Fig. 6 is illustrated that the block diagram of the part-structure of the mobile phone related to terminal provided in an embodiment of the present invention.With reference to figure 6, mobile phone includes:Radio frequency(Radio Frequency, RF)Circuit 610, memorizer 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 grade part.It will be understood by those skilled in the art that the handset structure shown in Fig. 6 does not constitute the restriction to mobile phone, Ratio can be included and illustrate more or less of part, or combine some parts, or different part arrangements.
With reference to Fig. 6, each component parts of mobile phone are specifically introduced:
RF circuit 610 can be used for receiving and sending messages or communication process in, the reception of signal and transmission, especially, by base station After downlink information receives, process to processor 680;In addition, up data is activation will be designed to base station.Generally, RF circuit bag Include but be not limited to antenna, at least one amplifier, transceiver, bonder, low-noise amplifier(Low Noise Amplifier, LNA), duplexer etc..Additionally, RF circuit 610 can also be communicated with network and other equipment by radio communication. Above-mentioned radio communication can use arbitrary communication standard or agreement, including 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), WCDMA (Wideband Code Division Multiple Access,WCDMA), Long Term Evolution(Long Term Evolution, LTE), Email, Short Message Service(Short Messaging Service, SMS)Deng.
Memorizer 620 can be used for storing software program and module, and processor 680 is stored in memorizer 620 by operation Software program and module, thus executing various function application and the data processing of mobile phone.Memorizer 620 can mainly include Storing program area and storage data field, wherein, storing program area can application journey needed for storage program area, at least one function Sequence(Such as sound-playing function, image player function etc.)Deng;Storage data field can store according to mobile phone using being created Data(Such as voice data, phone directory etc.)Deng.Additionally, memorizer 620 can include high-speed random access memory, acceptable Including nonvolatile memory, for example, at least one disk memory, flush memory device or other volatile solid-state Part.
Input block 630 can be used for numeral or the character information of receives input, and produce with the user setup of mobile phone with And the key signals input that function control is relevant.Specifically, input block 630 may include contact panel 631 and other inputs set Standby 632.Contact panel 631, also referred to as touch screen, can collect user thereon or neighbouring touch operation(Such as user uses Any suitable object such as finger, stylus or adnexa are on contact panel 631 or the operation near contact panel 631), and root Drive corresponding attachment means according to formula set in advance.Optionally, contact panel 631 may include touch detecting apparatus and touch Two parts of controller.Wherein, touch detecting apparatus detect the touch orientation of user, and detect the signal that touch operation brings, Transmit a signal to touch controller;Touch controller receives touch information from touch detecting apparatus, and is converted into touching Point coordinates, then give processor 680, and can the order sent of receiving processor 680 being executed.Furthermore, it is possible to using electricity The polytypes such as resistive, condenser type, infrared ray and surface acoustic wave realize contact panel 631.Except contact panel 631, input Unit 630 can also include other input equipments 632.Specifically, other input equipments 632 can include but is not limited to secondary or physical bond Disk, function key(Such as volume control button, switch key etc.), trace ball, mouse, one or more of action bars etc..
Display unit 640 can be used for display and by the information of user input or is supplied to the information of user and the various of mobile phone Menu.Display unit 640 may include display floater 641, optionally, can adopt liquid crystal display(Liquid Crystal Display, LCD), Organic Light Emitting Diode(Organic Light-Emitting Diode,OLED)To configure aobvious etc. form Show panel 641.Further, contact panel 631 can cover display floater 641, when contact panel 631 detect thereon or attached After near touch operation, send processor 680 to determine the type of touch event, with preprocessor 680 according to touch event Type corresponding visual output is provided on display floater 641.Although in figure 6, contact panel 631 and display floater 641 It is input and the input function to realize mobile phone as two independent parts, but in some embodiments it is possible to by touch-control Panel 631 is integrated with display floater 641 and realizes mobile phone input and output function.
Mobile phone may also include at least one sensor 650, such as optical sensor, motion sensor and other sensors. Specifically, optical sensor may include ambient light sensor and proximity transducer, and wherein, ambient light sensor can be according to ambient light The brightness to adjust display floater 641 for the light and shade, proximity transducer can cut out display floater 641 when mobile phone moves in one's ear And/or backlight.As one kind of motion sensor, accelerometer sensor can detect in all directions(Generally three axles)Acceleration Size, can detect that size and the direction of gravity when static, can be used for identify mobile phone attitude application(Such as horizontal/vertical screen is cut Change, dependent game, magnetometer pose calibrating), Vibration identification correlation function(Such as pedometer, percussion)Deng;Also may be used as mobile phone The other sensors such as the gyroscope of configuration, barometer, drimeter, thermometer, infrared ray sensor, will not be described here.
Voicefrequency circuit 660, speaker 661, microphone 662 can provide the audio interface between user and mobile phone.Audio-frequency electric The signal of telecommunication after the voice data receiving conversion can be transferred to speaker 661, is converted to sound by speaker 661 by road 660 Signal output;On the other hand, the acoustical signal of collection is converted to the signal of telecommunication by microphone 662, turns after being received by voicefrequency circuit 660 It is changed to voice data, then after voice data output processor 680 is processed, through RF circuit 610 to be sent to such as another mobile phone, Or voice data is exported to memorizer 620 to process further.
WiFi belongs to short range wireless transmission technology, and mobile phone can help user's transceiver electronicses postal by WiFi module 670 Part, browse webpage and access streaming video etc., it has provided the user wireless broadband internet and has accessed.Although Fig. 6 shows WiFi module 670, but it is understood that, it is simultaneously not belonging to must be configured into of mobile phone, can not change as needed completely Omit in the scope of the essence becoming invention.
Processor 680 is the control centre of mobile phone, using the various pieces of various interfaces and connection whole mobile phone, leads to Cross and run or software program and/or module that execution is stored in memorizer 620, and call and be stored in memorizer 620 Data, the various functions of execution mobile phone and processing data, thus carry out integral monitoring to mobile phone.Optionally, processor 680 can wrap Include one or more processing units;Preferably, processor 680 can integrated application processor and modem processor, wherein, should Mainly process operating system, user interface and application program etc. with processor, modem processor mainly processes radio communication. It is understood that above-mentioned modem processor can not also be integrated in processor 680.
Mobile phone also includes the power supply 690 powered to all parts(Such as battery)It is preferred that power supply can pass through power supply pipe Reason system is logically contiguous with processor 680, thus realizing management charging, electric discharge and power managed by power-supply management system Etc. function.
Although not shown, mobile phone can also include photographic head, bluetooth module etc., will not be described here.
In embodiments of the present invention, the processor 680 included by this terminal also has following functions:
Generate and intercept and capture source data, obtain the transmission channel information of each target process;True according to above-mentioned transmission channel information The fixed corresponding target process of above-mentioned source data, and send the transmission means to each target process for the source data;By above-mentioned source data It is sent to above-mentioned target process;Send source data to each target process sending method being adopted and each target process determining Transmission means corresponds to.
Originating process is the source providing data, and originating process can produce source data, and source data can be sound, image, flow data Deng source data species is varied, and it has no effect on the realization of the embodiment of the present invention, and therefore the embodiment of the present invention not limits to this Fixed.
The embodiment of the present invention, intercepts and captures source data using by originating process, and obtains the transmission channel information of each target process, comes Determine the corresponding target process of source data, and send source data to the transmission means of each target process, then complete source data Transmission, the purpose that multiple target process obtain the data of originating processes can be reached, and the program not need file complete Portion's storage finishes it is not required that target process adopts polling mode to obtain latest data, and therefore data messaging efficiency is higher.Separately Outward, due to embodiment of the present invention scheme, the mode that each target process obtains source data is independent, and therefore each target process obtains Source data can't influence each other.
Above-mentioned transmission channel information is used to identify the information being transmitted using which kind of mode, and its form of expression can be many Kind various, in addition to transmission means, can also be represented by various information the target process needing to obtain source data and The information of originating process, the different transmission channels based on transmission means can following present biography to embody using different forms Defeated channel information implement citing, as follows:
First, the mode of acquisition can be realized using monitoring thread, specific as follows:Alternatively, above-mentioned processor 680, Transmission channel information for obtaining each target process includes:For using the transmission channel monitoring the thread each target process of acquisition Information, and determine whether target process and the transmission channel information of target process have altered.
In addition, the mark of transmission channel information can be identified in the following way, so that originating process is easily determined needs Which the target process of source data to be obtained has, specific as follows:Above-mentioned processor 680, for obtaining the transmission of each target process Channel information includes:For obtaining with the mark of target process mark and originating process mark to the gap marker set up.
In embodiments of the present invention, transmission means can be realized in the way of using shared memory block, shared memory block Can be shared drive, it should be noted that transmission channel can also be other system object, therefore transmission channel information also may be used To be other, below citing should not be construed as the unique restriction to the embodiment of the present invention.Come real by the way of shared memory block Existing concrete scheme is as follows:Alternatively, above-mentioned gap marker indicates the destination address that source data is deposited;Above-mentioned processor 680, Include for above-mentioned source data is sent to above-mentioned target process:For leaving source data in above-mentioned destination address, for target Process reads.
Based on the aforementioned implementation using shared address block, how the embodiment of the present invention deposits target data if additionally providing It is put into the specific implementation in the address of gap marker instruction, specific as follows:Above-mentioned processor 680, for depositing source data It is placed on above-mentioned destination address, read for target process and include:For reading the ground of above-mentioned gap marker instruction using transmission thread Location, and source data is write the address of above-mentioned gap marker instruction, read for target process.
In embodiments of the present invention, transmission channel information can be stored in by target process, and concrete scheme is as follows:Above-mentioned process Device 680, the transmission channel information for obtaining each target process includes:For being injected using hook by target process in originating process Afterwards, obtain the transmission channel information being stored in by the target process injecting above-mentioned originating process using hook.
It should be noted that in above-mentioned data transfer device embodiment, included unit is simply patrolled according to function Volume divided, but be not limited to above-mentioned division, as long as being capable of corresponding function;In addition, each function list The specific name of unit also only to facilitate mutual distinguish, is not limited to protection scope of the present invention.
In addition, one of ordinary skill in the art will appreciate that realizing all or part of step in above-mentioned each method embodiment The program that can be by completes come the hardware to instruct correlation, and corresponding program can be stored in a kind of computer-readable recording medium In, storage medium mentioned above can be read only memory, disk or CD etc..
These are only the present invention preferably specific embodiment, but protection scope of the present invention is not limited thereto, any Those familiar with the art in the technical scope that the embodiment of the present invention discloses, the change that can readily occur in or replace Change, all should be included within the scope of the present invention.Therefore, protection scope of the present invention should be with the protection model of claim Enclose and be defined.

Claims (9)

1. a kind of data transferring method is it is characterised in that include:
Originating process generates and intercepts and captures source data, obtains the transmission channel information of each target process;
Determine the corresponding target process of described source data according to described transmission channel information, and send source data to enter to each target The transmission means of journey;
Described source data is sent to described target process;Send the sending method that source data adopted to each target process with really The transmission means of fixed each target process corresponds to;
The described transmission channel information obtaining each target process includes:
Using the transmission channel information monitoring the thread each target process of acquisition, and determine the transmission of target process and target process Whether channel information has altered;
Or, described originating process is adopted after hook injection by target process, obtain by the target injecting described originating process using hook The transmission channel information that process is stored in.
2. according to claim 1 method it is characterised in that the transmission channel information of each target process of described acquisition includes:
Obtain with the mark of target process mark and originating process mark to the gap marker set up.
3. according to claim 2 method it is characterised in that described gap marker indicates the target ground that source data deposits Location;Described described source data is sent to described target process includes:
Source data is left in described destination address, reads for target process.
4. according to claim 3 method it is characterised in that described leave source data in described destination address, for target Process reads and includes:
Read the address of described gap marker instruction using transmission thread, and source data is write the ground of described gap marker instruction Location, reads for target process.
5. according to Claims 1-4 any one methods described it is characterised in that described target process has two or more; Described originating process is audio player process.
6. a kind of data transfer device is it is characterised in that include:
Data generating unit, for generating source data;
Data cutout unit, for intercepting and capturing the source data that described data generating unit generates;
Information acquisition unit, for obtaining the transmission channel information of each target process;
Mode target determination unit, for determining described source data according to the transmission channel information that described information acquiring unit obtains Corresponding target process, and send the transmission means to each target process for the source data;
Transmitting element, for being sent to described target process by described source data;Send source data to be adopted to each target process Sending method corresponding with the transmission means of each target process that described mode target determination unit determines;
Described information acquiring unit, for obtaining the transmission channel information of each target process using supervision thread, and determines target Whether the transmission channel information of process and target process has altered;Or, for being noted using hook by target process in originating process After entering, obtain the transmission channel information being stored in by the target process injecting described originating process using hook.
7. according to claim 6 data transfer device it is characterised in that
Described information acquiring unit, for obtaining with the mark of target process mark and originating process mark to the passage mark set up Know.
8. according to claim 7 data transfer device it is characterised in that
Described information acquiring unit, indicates, for gap marker, the destination address that source data is deposited;
Described transmitting element, for leaving source data in described destination address, reads for target process.
9. according to claim 8 data transfer device it is characterised in that described transmitting element includes:
Address reading unit, for reading the address of described gap marker instruction using transmission thread;
Data r/w cell, for writing the ground of the described gap marker instruction that described address reading unit reads by source data Location, reads for target 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 CN103593247A (en) 2014-02-19
CN103593247B true 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)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103593247B (en) * 2013-11-18 2017-02-08 腾讯科技(成都)有限公司 Method and device for data transmission
CN104410687B (en) * 2014-11-26 2018-01-19 上海爱数信息技术股份有限公司 A kind of multigroup inter-process data transmission method based on pipeline
CN105468360B (en) * 2015-11-17 2018-09-21 南京邮电大学 A kind of data cutout method towards third party's audio player
CN105550049A (en) * 2015-12-16 2016-05-04 汉柏科技有限公司 Communication system and use method thereof
CN111045700B (en) * 2018-10-15 2023-05-05 阿里巴巴集团控股有限公司 Data updating method, device, system, storage medium and electronic equipment
CN111290744B (en) * 2020-01-22 2023-07-21 北京百度网讯科技有限公司 Flow computing job processing method, flow computing system and electronic device
CN111511045B (en) * 2020-04-10 2023-06-02 玳能科技(杭州)有限公司 Interaction method and device for mobile terminal and computer, electronic equipment and storage medium
CN115794443B (en) * 2023-01-29 2023-05-23 北京万里红科技有限公司 Method and device for multi-process communication based on shared memory
CN117938848B (en) * 2023-12-11 2025-09-16 超聚变数字技术有限公司 Data transmission method, transmission channel allocation method, computing device and management device

Citations (2)

* 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
CN102819455A (en) * 2012-07-31 2012-12-12 深圳市共进电子股份有限公司 Method for managing progresses at application layer and managing system

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8606950B2 (en) * 2005-06-08 2013-12-10 Logitech Europe S.A. System and method for transparently processing multimedia data
CN100421469C (en) * 2005-12-23 2008-09-24 华为技术有限公司 System and method for realizing real-time video information sharing
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
US8171483B2 (en) * 2007-10-20 2012-05-01 Citrix Systems, Inc. Method and system for communicating between isolation environments
CN101296130B (en) * 2008-05-30 2011-04-06 北京同步科技有限公司 System and method for multi-process sharing port receiving network message
CN103150220B (en) * 2011-12-07 2016-08-31 腾讯科技(深圳)有限公司 Communication means between process and communication system
CN103593247B (en) * 2013-11-18 2017-02-08 腾讯科技(成都)有限公司 Method and device for data transmission

Patent Citations (2)

* 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
CN102819455A (en) * 2012-07-31 2012-12-12 深圳市共进电子股份有限公司 Method for managing progresses at application layer and managing system

Also Published As

Publication number Publication date
CN103593247A (en) 2014-02-19
WO2015070769A1 (en) 2015-05-21

Similar Documents

Publication Publication Date Title
CN103593247B (en) Method and device for data transmission
CN103294515B (en) A kind of methods, devices and systems for obtaining application program
CN105025314B (en) Multimedia live broadcast method and apparatus
CN103929796B (en) The method and device of shared access point
CN106162316A (en) The data processing method of a kind of video flowing, device and system
CN103475914B (en) Video playing method, video playing device, terminal equipment and server
CN106791892A (en) It is a kind of to take turns the live methods, devices and systems of wheat
CN103501259B (en) A kind of method of packet loss detection and detection device
CN103473092B (en) A kind of download the processing method of application, device and terminal unit
CN106331826A (en) Method, device and system for setting live broadcast template and video mode
CN106231379A (en) A kind of methods, devices and systems playing live video
CN103699309B (en) A kind of method for recording of synchronization video, device and mobile terminal
CN106454404A (en) Live video playing method, device and system
CN105788612A (en) Method and device for testing tone quality
CN106791955A (en) A kind of method and system for determining live duration
CN106506321A (en) One population message treatment method and terminal device
CN103391473A (en) Methods and devices for providing and acquiring audios and videos
CN106375774A (en) Live broadcast room display content control method, apparatus and system
CN106781402A (en) Remote control thereof and device
CN104240710B (en) A kind of method, system and the terminal device of information transmission
CN103227832B (en) Share method for processing resource and device
CN106303605A (en) A kind of methods, devices and systems sent a notification message
CN103458064A (en) Method, device and terminal equipment for transmitting address information of multimedia information
CN106547874A (en) Multimedia recommendation method and device
CN106878153A (en) A kind of message sharing method and device and mobile terminal, server

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