CN102915256A - Message transmission method and device under multi-core browser - Google Patents

Message transmission method and device under multi-core browser Download PDF

Info

Publication number
CN102915256A
CN102915256A CN2012100599288A CN201210059928A CN102915256A CN 102915256 A CN102915256 A CN 102915256A CN 2012100599288 A CN2012100599288 A CN 2012100599288A CN 201210059928 A CN201210059928 A CN 201210059928A CN 102915256 A CN102915256 A CN 102915256A
Authority
CN
China
Prior art keywords
message
main frame
thread
browser
multinuclear browser
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
CN2012100599288A
Other languages
Chinese (zh)
Other versions
CN102915256B (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.)
Zhuhai Baohaowan Technology Co Ltd
Original Assignee
Beijing Kingsoft Internet Security Software Co Ltd
Conew Network Technology Beijing Co Ltd
Shell Internet Beijing Security Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Kingsoft Internet Security Software Co Ltd, Conew Network Technology Beijing Co Ltd, Shell Internet Beijing Security Technology Co Ltd filed Critical Beijing Kingsoft Internet Security Software Co Ltd
Priority to CN201210059928.8A priority Critical patent/CN102915256B/en
Publication of CN102915256A publication Critical patent/CN102915256A/en
Application granted granted Critical
Publication of CN102915256B publication Critical patent/CN102915256B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

The invention provides a message transmission method and a message transmission device under a multi-core browser, which are used for solving the problem that a window corresponding to each core under the multi-core browser processes received messages. The message transmission method under the multi-core browser comprises the following steps: any core of the multi-core browser transmits the acquired message to a main frame of the multi-core browser, and the message is processed through a processing program of the main frame. The technical scheme of the invention has the beneficial effects that: the main frame of the multi-core browser is used for uniformly processing the received messages, so that the situation that each core independently processes the received messages is avoided, the development time is saved from the development angle, the messages input by a user are uniformly processed by the main frame from the user angle, the processing results are uniformly displayed, and the user experience of the user is improved.

Description

Message delivery method under the multinuclear browser and device
Technical field
The invention belongs to browser technology, relate to a kind of message delivery method, relate to more specifically message delivery method and device under a kind of multinuclear browser.
Background technology
In window application, forms are by the thread creation of the specific type of a kind of being called " UI thread (User Interface Thread) ".At first, the UI thread is a kind of " thread ", so it has all features that a thread should have, such as a thread function and a Thread Id are arranged.Secondly, " UI thread " is again " special ", and this is because can create a kind of special object---forms in the thread function of UI thread, simultaneously, also be responsible in the lump creating the various controls on the forms.Forms and control have the function that receives user's operation, they are media that the user uses whole application program, do not have such medium, the user is with regard to the operation of uncontrollable whole application program and stop, and often also can't directly see operational process and the net result of program.
But, forms and control do not possess again the function that responds independently user's operation (such as keyboard and mouse action), such as clicked a button with mouse, and seen that mouse " falls into ", then again reduction, afterwards, will see that program carried out the corresponding task of this button at display, in fact, why forms and control can respond user's operation, key is that the UI thread of being responsible for this operation of establishment has one " message circulation (Message Loop) ", and this message circulation is responsible for startup by thread function.
And in the multinuclear browser, each nuclear can have a UI thread, that is to say that each nuclear has the ability of independent process user operation, so, for the multinuclear browser, all want correspondence for each nuclear and develop a cover user operating result, and concerning the user, identical executable operations is received by different nuclear, and it shows that the result will be different.
Therefore, in the prior art, exist each nuclear to advance to process and the problem of the waste of exploiting natural resources that brings to the message that gets access in the multinuclear browser.
Summary of the invention
The present invention discloses message delivery method and the device under a kind of multinuclear browser, can process the problem of exploiting natural resources and wasting of bringing for what the solution prior art existed to the message that gets access to because existing each to examine in the multinuclear browser.
For achieving the above object, according to an aspect of the present invention, provide the message delivery method under a kind of multinuclear browser, and by the following technical solutions:
Message delivery method under the multinuclear browser comprises: arbitrary nuclear of multinuclear browser passes to the message that gets access to the main frame of described multinuclear browser, by the handling procedure of described main frame described message is processed.
Further, arbitrary nuclear of described multinuclear browser passes to the message that gets access to the main frame of described multinuclear browser, by the handling procedure of described main frame described message is processed to comprise: the corresponding UI thread of arbitrary nuclear of described multinuclear browser gets access to described message; The corresponding UI thread of described arbitrary nuclear sends to described main frame with described message by the corresponding IO thread of described arbitrary nuclear; The IO thread of described main frame receives described message and described message is passed to the UI thread of described main frame.
According to another aspect of the present invention, provide the message transfer device under a kind of multinuclear browser, and by the following technical solutions:
Message transfer device under the multinuclear browser comprises: transmit module, the arbitrary nuclear that is used for the multinuclear browser passes to the message that gets access to the main frame of described multinuclear browser, and by the handling procedure of described main frame described message is processed.
Further, described transmission module comprises: acquisition module, and the corresponding UI thread of arbitrary nuclear that is used for described multinuclear browser gets access to described message; Sending module is used for the corresponding UI thread of described arbitrary nuclear described message is sent to described main frame by the corresponding IO thread of described arbitrary nuclear; Receiver module, the IO thread that is used for described main frame receive described message and described message are passed to the UI thread of described main frame.
According to technique scheme of the present invention, main frame by the multinuclear browser carries out unified processing to the message that receives, avoid each nuclear to process alone, angle from exploitation, save the development time, from user's angle, unified the message of process user input by main frame, and unify to present result, the user who has improved the user experiences.
Except purpose described above, feature and advantage, the present invention also has other purpose, feature and advantage.The below is with reference to figure, and the present invention is further detailed explanation.
Description of drawings
Accompanying drawing is used to provide a further understanding of the present invention, consists of the application's a part, and illustrative examples of the present invention and explanation thereof are used for explaining the present invention, do not consist of improper restriction of the present invention.In the accompanying drawings:
Fig. 1 represents the schematic diagram that concerns between the embodiment of the invention described multinuclear browser main frame and the many kernels;
Fig. 2 represents the main process flow diagram of the message delivery method under the embodiment of the invention one described multinuclear browser;
Fig. 3 represents the schematic diagram of the message delivery method under the embodiment of the invention two described multinuclear browsers;
Fig. 4 represents the primary structure schematic diagram of the message transfer device under the described multinuclear browser of the embodiment of the invention.
Embodiment
Below in conjunction with accompanying drawing embodiments of the invention are elaborated, but the multitude of different ways that the present invention can be defined by the claims and cover is implemented.
Fig. 1 represents the schematic diagram that concerns between the embodiment of the invention described multinuclear browser main frame and the many kernels.
The present embodiment has two class subprocesss as example take the host process of multinuclear browser main frame browser, two class subprocesss can be the subprocess of any kernel, such as the chrome_render among Fig. 1 and ie_render, in Fig. 1, browser is the main frame of this multinuclear browser.
Fig. 2 represents the main process flow diagram of the message delivery method under the embodiment of the invention one described multinuclear browser.
Referring to shown in Figure 2, the message delivery method under the multinuclear browser comprises:
S101: arbitrary nuclear of multinuclear browser passes to the message that gets access to the main frame of described multinuclear browser;
S103: the handling procedure by described main frame is processed described message.
In step S101, the multinuclear browser passes to the message that gets access to the main frame of described multinuclear browser, mean no matter which of multinuclear browser examined the message that forms in other words intercept, all forbid processing this message, the corresponding handling procedure of main frame that this message is passed to the multinuclear browser is processed.The advantage of the method can describe with a concrete example, the technique effect of prior art is: carry out the operation of a mouse click " right button " in the forms of user in the multinuclear browser, receive the forms of this message, after this message processed, can provide the result of a processing, the result who is shown to the user presents one " menu " at these forms exactly, if this operates on the another one forms and carries out, the result who then shows is exactly another one forms corresponding " menus ", like this, two " menus " of presenting to the user are exactly different, as a same reason, if this operation is received rear by the main frame of multinuclear browser and processes, " menu " and the first two of presenting to the user are different all just.And adopt technical scheme of the present invention, all message are processed by main frame, accordingly, also just as long as one " menu " of exploitation, no matter the operation of user's a mouse click " right button " is received by that window, all this message can be passed to main frame, be processed by the handling procedure that main frame is corresponding, " menu " that be shown to the user namely only has one.
Fig. 3 represents the main process flow diagram of the message delivery method under the embodiment of the invention two described multinuclear browsers;
The present embodiment is the situation that the IE render nuclear of multinuclear browser has been intercepted and captured message.
Referring to shown in Figure 3, the message delivery method under the multinuclear browser comprises:
The UI thread of S201:IE render is intercepted and captured message;
S202: the IO thread by IE render is issued main frame browser;
After the IO thread of S203:Browser was received this message, the UI thread that offers Browser was processed.
Particularly, keyboard and the input equipment such as mouse of operating system on can supervisory control comuter is each incoming event (operated caused by the user, pressed certain key such as the user) message of generation.Situation when occuring according to event (is responsible for receiving user key-press such as the forms of current activation, and the coordinate that User is clicked the mouse can know the user has clicked mouse in which form region), operating system can be determined this message should issue for which forms object.The message of these generations can be placed on first in one " system message queue (system message queue) " uniformly temporarily, then, operating system has a special thread to be responsible for taking out message from this formation, according to the destination object (being exactly the handle of forms) of message, it is moved in the corresponding message queue of UI thread that creates it.Operating system is when establishment process and thread, all recorded simultaneously a large amount of control information (such as the process that can find by process control block (PCB) and handle table all threads that create and the kernel object of quoting), therefore, determine according to the forms handle which UI thread is this message should belong to, in step S201, when determining that according to foregoing description this message belongs to the UI thread of IE render process, can issue by the IO thread of IE render process the UI thread of main frame Browser.The IO thread of IE render is received this message, and offers the IO thread of IE render, and is processed by the UI thread that the IO thread of IE render passes to IE render.
Fig. 4 represents the primary structure schematic diagram of the message transfer device under the described multinuclear browser of the embodiment of the invention.
Referring to shown in Figure 4, the message transfer device under the multinuclear browser comprises transmission module 40, is used for the main frame that the multinuclear browser passes to the message that gets access to described multinuclear browser, by the corresponding handling procedure of described main frame described message is processed.
Preferably, transmit module 40 and comprise acquisition module 41, the corresponding UI thread of arbitrary nuclear that is used for described multinuclear browser gets access to described message; Sending module 43 is used for the corresponding UI thread of described arbitrary nuclear described message is sent to described main frame by the corresponding IO thread of described arbitrary nuclear; Receiver module 45, the IO thread that is used for described main frame receive described message and described message are passed to the UI thread of described main frame.
According to technique scheme of the present invention, main frame by the multinuclear browser carries out unified processing to the message that receives, avoid each nuclear to process alone, angle from exploitation, save the development time, from user's angle, unified the message of process user input by main frame, and unify to present result, the user who has improved the user experiences.

Claims (4)

1. the message delivery method under the multinuclear browser is characterized in that, comprising:
Arbitrary nuclear of multinuclear browser passes to the message that gets access to the main frame of described multinuclear browser, by the handling procedure of described main frame described message is processed.
2. message delivery method as claimed in claim 1 is characterized in that, arbitrary nuclear of described multinuclear browser passes to the message that gets access to the main frame of described multinuclear browser, by the handling procedure of described main frame described message is processed to comprise:
The corresponding UI thread of arbitrary nuclear of described multinuclear browser gets access to described message;
The corresponding UI thread of described arbitrary nuclear sends to described main frame with described message by the corresponding IO thread of described arbitrary nuclear;
The IO thread of described main frame receives described message and described message is passed to the UI thread of described main frame.
3. the message transfer device under the multinuclear browser is characterized in that, comprising:
Transmit module, the arbitrary nuclear that is used for the multinuclear browser passes to the message that gets access to the main frame of described multinuclear browser, and by the handling procedure of described main frame described message is processed.
4. message transfer device as claimed in claim 3 is characterized in that, described transmission module comprises:
Acquisition module, the corresponding UI thread of arbitrary nuclear that is used for described multinuclear browser gets access to described message;
Sending module is used for the corresponding UI thread of described arbitrary nuclear described message is sent to described main frame by the corresponding IO thread of described arbitrary nuclear;
Receiver module, the IO thread that is used for described main frame receive described message and described message are passed to the UI thread of described main frame.
CN201210059928.8A 2012-03-08 2012-03-08 Message transmission method and device under multi-core browser Active CN102915256B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210059928.8A CN102915256B (en) 2012-03-08 2012-03-08 Message transmission method and device under multi-core browser

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210059928.8A CN102915256B (en) 2012-03-08 2012-03-08 Message transmission method and device under multi-core browser

Publications (2)

Publication Number Publication Date
CN102915256A true CN102915256A (en) 2013-02-06
CN102915256B CN102915256B (en) 2015-02-18

Family

ID=47613629

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210059928.8A Active CN102915256B (en) 2012-03-08 2012-03-08 Message transmission method and device under multi-core browser

Country Status (1)

Country Link
CN (1) CN102915256B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103544068A (en) * 2013-10-18 2014-01-29 北京奇虎科技有限公司 Process to process communication method and device for browsers and browser
CN104516885A (en) * 2013-09-26 2015-04-15 腾讯科技(深圳)有限公司 Implementation method and device of browse program double-kernel assembly
CN113032166A (en) * 2021-03-26 2021-06-25 黑芝麻智能科技(上海)有限公司 Inter-core communication method, processor, inter-core communication system, and computer-readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1967484A (en) * 2006-05-26 2007-05-23 华为技术有限公司 Method and apparatus for opening window
CN101609470A (en) * 2009-07-02 2009-12-23 腾讯科技(深圳)有限公司 A kind of preventing apparent death of multi-page browser method and device
CN101655863A (en) * 2009-04-24 2010-02-24 北京搜狗科技发展有限公司 Method for loading web pages in browser and browser
CN101996095A (en) * 2009-08-26 2011-03-30 阿里巴巴集团控股有限公司 Method and device for accessing instant messaging program to plugin

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1967484A (en) * 2006-05-26 2007-05-23 华为技术有限公司 Method and apparatus for opening window
CN101655863A (en) * 2009-04-24 2010-02-24 北京搜狗科技发展有限公司 Method for loading web pages in browser and browser
CN101609470A (en) * 2009-07-02 2009-12-23 腾讯科技(深圳)有限公司 A kind of preventing apparent death of multi-page browser method and device
CN101996095A (en) * 2009-08-26 2011-03-30 阿里巴巴集团控股有限公司 Method and device for accessing instant messaging program to plugin

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104516885A (en) * 2013-09-26 2015-04-15 腾讯科技(深圳)有限公司 Implementation method and device of browse program double-kernel assembly
CN104516885B (en) * 2013-09-26 2019-04-16 腾讯科技(深圳)有限公司 The implementation method and device of browser dual core component
CN103544068A (en) * 2013-10-18 2014-01-29 北京奇虎科技有限公司 Process to process communication method and device for browsers and browser
CN103544068B (en) * 2013-10-18 2017-05-24 北京奇虎科技有限公司 Process to process communication method and device for browsers and browser
CN113032166A (en) * 2021-03-26 2021-06-25 黑芝麻智能科技(上海)有限公司 Inter-core communication method, processor, inter-core communication system, and computer-readable storage medium
US11948021B2 (en) 2021-03-26 2024-04-02 Black Sesame Technologies Inc. Method for inter-core communication, processor, inter-core communication system and computer readable storage medium
CN113032166B (en) * 2021-03-26 2024-05-24 黑芝麻智能科技(上海)有限公司 Inter-core communication method, processor, inter-core communication system, and computer-readable storage medium

Also Published As

Publication number Publication date
CN102915256B (en) 2015-02-18

Similar Documents

Publication Publication Date Title
CN107786730B (en) Task management method and terminal
US10298469B2 (en) Automatic asynchronous handoff identification
US10257316B2 (en) Monitoring of node.js applications
CN104881273B (en) A kind of analysis method and terminal device of webpage rendering
US20170147462A1 (en) Agent dynamic service
CN106951550A (en) Data processing method, device and mobile terminal
CN104461546A (en) Application based computing device optimizing method and device
EP3289464A1 (en) Detection of node.js memory leaks
CN104063071A (en) Content input method and device
CN102541549A (en) Method and device for integrating television application modules
CN110781009A (en) Method and device for real-time communication of browser page
CN102915256A (en) Message transmission method and device under multi-core browser
CN110442819A (en) Data processing method, device, storage medium and terminal
CN104486149B (en) A kind of finite state machine method for ground test
CN110928706A (en) Applet interaction method and device, electronic equipment and storage medium
CN107016262A (en) Application program right management method and client
CN112929254A (en) Message processing method and device and electronic equipment
CN105812543A (en) Information integration system and method
CN103744573A (en) Data quick viewing and analyzing system based on graphic device interface
CN116112457A (en) Method, device, computer equipment and storage medium for notifying message
CN109460278A (en) Cloud desktop architectural design software management method, device and computer equipment
CN101923624B (en) RFID (Radio Frequency Identification Devices) event processing method based on channel flow
CN112988426A (en) Message processing method and device
CN110704203B (en) Interruptible remote procedure calling method and interruptible remote procedure calling device
CN102722376B (en) Method for secondary encoding and decoding based on video monitoring drawing and device thereof

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CP01 Change in the name or title of a patent holder
CP01 Change in the name or title of a patent holder

Address after: 100085 Beijing City, Haidian District Road 33, Jinshan building Xiaoying

Co-patentee after: CONEW NETWORK TECHNOLOGY (BEIJING) Co.,Ltd.

Patentee after: BEIJING KINGSOFT INTERNET SECURITY SOFTWARE Co.,Ltd.

Co-patentee after: Beijing Cheetah Mobile Technology Co.,Ltd.

Address before: 100085 Beijing City, Haidian District Road 33, Jinshan building Xiaoying

Co-patentee before: CONEW NETWORK TECHNOLOGY (BEIJING) Co.,Ltd.

Patentee before: BEIJING KINGSOFT INTERNET SECURITY SOFTWARE Co.,Ltd.

Co-patentee before: SHELL INTERNET (BEIJING) SECURITY TECHNOLOGY Co.,Ltd.

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20181214

Address after: Room 105-53967, No. 6 Baohua Road, Hengqin New District, Zhuhai City, Guangdong Province

Patentee after: Zhuhai Leopard Fun Technology Co.,Ltd.

Address before: 100085 Jinshan Building, 33 Xiaoying West Road, Haidian District, Beijing

Co-patentee before: CONEW NETWORK TECHNOLOGY (BEIJING) Co.,Ltd.

Patentee before: BEIJING KINGSOFT INTERNET SECURITY SOFTWARE Co.,Ltd.

Co-patentee before: Beijing Cheetah Mobile Technology Co.,Ltd.