CN110471784A - Playback terminal abnormality eliminating method and device based on Electron platform - Google Patents

Playback terminal abnormality eliminating method and device based on Electron platform Download PDF

Info

Publication number
CN110471784A
CN110471784A CN201910690014.3A CN201910690014A CN110471784A CN 110471784 A CN110471784 A CN 110471784A CN 201910690014 A CN201910690014 A CN 201910690014A CN 110471784 A CN110471784 A CN 110471784A
Authority
CN
China
Prior art keywords
exception
page
playback terminal
anomalous event
electron
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
CN201910690014.3A
Other languages
Chinese (zh)
Other versions
CN110471784B (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.)
Advanced New Technologies Co Ltd
Advantageous New Technologies Co Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201910690014.3A priority Critical patent/CN110471784B/en
Publication of CN110471784A publication Critical patent/CN110471784A/en
Application granted granted Critical
Publication of CN110471784B publication Critical patent/CN110471784B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0793Remedial or corrective actions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking

Abstract

Present disclose provides a kind of for handling the method and device of the playback terminal exception based on Electron platform.This method comprises: detection playback terminal anomalous event, the playback terminal anomalous event includes abnormal host process, rendering process exception, the page without response abnormality and/or HTML5 page exception;When detected playback terminal anomalous event is the host process exception of Electron application, module is restarted via the application in finger daemon to restart Electron using the operation to restore host process;When detected playback terminal anomalous event is to render process exception or the page without response abnormality, corresponding rendering process is restarted via the error handling module of host process;Or when detected playback terminal anomalous event is HTML5 page exception, the corresponding HTML5 page is loaded via the error handling module of rendering process.

Description

Playback terminal abnormality eliminating method and device based on Electron platform
Technical field
The disclosure is usually directed to Computer Applied Technology, more particularly, to for handling based on Electron platform The method and device of playback terminal exception.
Background technique
Currently, large-size screen monitors advertisement is used increasingly to carry out advertising, such as Commdity advertisement publicity, entertainment event Publicity etc..Large-size screen monitors advertisement generallys use the Broadcast Control terminal based on Electron platform development and plays out.Carrying out advertisement broadcasting When, each advertisement broadcasting has fixed duration.Once playback terminal exception occur and cannot restore in time, then will lead to wide It accuses playing duration to shorten, thereby results in loss of assets.
Summary of the invention
In view of the above problems, present disclose provides a kind of for handling the playback terminal exception based on Electron platform Method and device.Using this method and device, can detect in time and restore playback terminal exception, thus reduce loss of assets and Manpower maintenance cost.
According to one aspect of the disclosure, it provides a kind of abnormal for handling the playback terminal based on Electron platform Method, comprising: detection playback terminal anomalous event, the playback terminal anomalous event include that host process is abnormal, rendering process The abnormal, page is without response abnormality and/or HTML5 page exception;It is Electron in detected playback terminal anomalous event When the host process exception of application, module is restarted via the application in finger daemon to restart the Electron and apply to restore master The operation of process;When detected playback terminal anomalous event is to render process exception or the page without response abnormality, via master The error handling module of process restarts corresponding rendering process;Or it is in detected playback terminal anomalous event When HTML5 page exception, the corresponding HTML5 page is loaded via the error handling module of rendering process.
Optionally, in an example of above-mentioned aspect, detection playback terminal anomalous event may include: to keep via described Shield process inspects periodically whether host process in the system process list of the playback terminal detects whether to lead in operation Process exception.
Optionally, in an example of above-mentioned aspect, detection playback terminal anomalous event may include: via described The collapse abnormality detection module of Electron platform come detect whether occur rendering process exception;Or via the finger daemon Inspect periodically the rendering process in the system process list of the playback terminal whether operation come detect whether to render into Cheng Yichang.
Optionally, in an example of above-mentioned aspect, detection playback terminal anomalous event may include: via the master Process is detected using heartbeat message testing mechanism be currently running in rendering process the page whether occurs without response abnormality.
Optionally, it in an example of above-mentioned aspect, is examined via the host process using heartbeat message testing mechanism Survey be currently running in rendering process whether occur the page without response abnormality may include: via host process in being currently running Rendering process sends heartbeat message;And the response message in response to not receiving heartbeat message from rendering process, determine wash with watercolours The page occurs for dye process without response abnormality.
Optionally, in an example of above-mentioned aspect, detection playback terminal anomalous event may include: via render into Journey captures page fault events using the error handle function registered in the HTLM5 page, detects whether that the generation HTLM5 page is different Often.
Optionally, in an example of above-mentioned aspect, the error handle function includes in following error handle functions At least one: window.onerror and window.onunhandledrejection;And the page fault events packet Include at least one of following page fault events: the webglcontextlost event of WebGL, video and audio Stalled event.
According to another aspect of the present disclosure, it provides a kind of for handling the playback terminal exception based on Electron platform Device, comprising: accident detection unit detects playback terminal anomalous event, the playback terminal anomalous event include it is main into Cheng Yichang, rendering process exception, the page are without response abnormality and/or HTML5 page exception;Host process recovery unit is being detected To playback terminal anomalous event be Electron application host process exception when, via in finger daemon application restart module To restart the Electron using the operation to restore the host process;Process resumption unit is rendered, in detected broadcasting Terminal abnormal event is when rendering process exception or the page without response abnormality, to weigh via the error handling module of the host process Open corresponding rendering process;And page recovery unit, it is HTML5 page exception in detected playback terminal anomalous event When, the corresponding HTML5 page is loaded via the error handling module of the rendering process.
Optionally, in an example of above-mentioned aspect, the accident detection unit may include: host process exception Detection module inspects periodically whether the host process in the system process list of the playback terminal is transporting via the finger daemon Row is abnormal to detect whether generation host process.
Optionally, in an example of above-mentioned aspect, the accident detection unit may include: that rendering process is different Normal detection module detects whether to occur to render process exception via the collapse abnormality detection module of the Electron platform, Or inspect periodically whether the rendering process in the system process list of the playback terminal is running via the finger daemon To detect whether to occur rendering process exception.
Optionally, in an example of above-mentioned aspect, the accident detection unit may include: that page response is different Whether normal detection module, the rendering process detected via the host process using heartbeat message testing mechanism in being currently running are sent out The raw page is without response abnormality.
Optionally, in an example of above-mentioned aspect, the accident detection unit may include: page exception inspection Module is surveyed, captures page fault events using the error handle function registered in the HTLM5 page via rendering process, detection is No generation HTLM5 page exception.
According to the another aspect of the disclosure, a kind of calculating equipment is also provided, comprising: one or more processors, Yi Jiyu The memory of one or more of processor couplings, the memory store instruction, when described instruction is by one or more When a processor executes, so that at least one described processor executes as described above for handling based on Electron platform The method of playback terminal exception.
According to the another further aspect of the disclosure, a kind of machine readable storage medium is also provided, executable instruction is stored with, institute Stating instruction executes the machine as described above for handling the playback terminal based on Electron platform Abnormal method.
According to the disclosure for handling the method and device of the playback terminal exception based on Electron platform, Neng Gouji When detect and to restore the various playback terminals that occur in playback terminal abnormal, to reduce loss of assets and manpower maintenance cost.
Detailed description of the invention
By referring to following attached drawing, may be implemented to further understand the nature and advantages of present disclosure.In In attached drawing, similar assembly or feature can have identical appended drawing reference.
Fig. 1 shows according to an embodiment of the present disclosure for handling the playback terminal exception based on Electron platform The flow chart of method;
Fig. 2 shows the flow charts of an instantiation procedure of playback terminal abnormality detection according to an embodiment of the present disclosure;
Fig. 3 shows according to an embodiment of the present disclosure for detecting the schematic diagram of process of the page without response abnormality;
Fig. 4 shows the relational graph between each process in playback terminal according to an embodiment of the present disclosure;
Fig. 5 shows the block diagram of playback terminal exception handling device according to an embodiment of the present disclosure;
Fig. 6 shows an exemplary block diagram of accident detection unit according to an embodiment of the present disclosure;
Fig. 7 shows according to an embodiment of the present disclosure for handling the playback terminal exception based on Electron platform Calculate the block diagram of equipment.
Specific embodiment
Theme described herein is discussed referring now to example embodiment.It should be understood that discussing these embodiments only It is in order to enable those skilled in the art can better understand that being not to claim to realize theme described herein Protection scope, applicability or the exemplary limitation illustrated in book.It can be in the protection scope for not departing from present disclosure In the case of, the function and arrangement of the element discussed are changed.Each example can according to need, omit, substitute or Add various processes or component.For example, described method can be executed according to described order in a different order, with And each step can be added, omits or combine.In addition, feature described in relatively some examples is in other examples It can be combined.
As used in this article, term " includes " and its modification indicate open term, are meant that " including but not limited to ". Term "based" indicates " being based at least partially on ".Term " one embodiment " and " embodiment " expression " at least one implementation Example ".Term " another embodiment " expression " at least one other embodiment ".Term " first ", " second " etc. may refer to not Same or identical object.Here may include other definition, either specific or implicit.Unless bright in context It really indicates, otherwise the definition of a term is consistent throughout the specification.
As used in this article, term " Electron " refer to by Github exploitation use HTML, CSS and JavaScript constructs the open source library of cross-platform multipad.Specifically, Electron uses Node.js (as rear End) and Chromium (as front end) completion desktop GUI application program Cross-border congestion management.Currently, Electron has been created Extensive application program including VScode and Atom.
As used in this article, term " host process is abnormal " refers to that host process collapse is abnormal.Term " rendering process exception " Refer to that the collapse of rendering process is abnormal.Term " PNR is abnormal " refers to the page shown in rendering process without different caused by response Often.For example, the page leads to stuck (PNR is abnormal) due to having run error-logic, so that the page can not after PNR exception Any interactive operation is carried out with user.Term " HTML5 page exception " refers to the different of the HTML5 page shown in rendering process Often.
Under Electron platform, the operation of entire application program is run using the mode of multi-process.It is handed over for the page Mutual visualization interface is the operation in rendering process (Render Process).For managing all Render Process Process be referred to as host process (Main Process).Host process is the entrance process of application program.
In existing Electron platform technology, collapse (Crash) exception handling of Electron platform is used To play out terminal abnormal detection and restore.However, this exception handling can only detect and restore Render The collapse of Process is abnormal, and the collapse that can not handle Main Process is abnormal abnormal with the PNR of Render Process, So that abnormal restoring processing is imperfect, cause to cannot achieve abnormality detection and recovery under many abnormal conditions.
In the disclosure, a kind of technical solution that can be realized complete abnormal restoring processing, in this scenario, energy are provided It enough detects Main Process abnormal, Render Process exception, PNR exception and HTML5 page exception, and phase is provided The recovery scheme answered carries out abnormal restoring processing.
Fig. 1 shows according to an embodiment of the present disclosure for handling the playback terminal exception based on Electron platform The flow chart of method.
As shown in Figure 1, whether playback terminal of the detection based on Electron platform occurs playback terminal exception in block 110 Event.The playback terminal anomalous event includes that host process collapse is abnormal, the collapse of rendering process is abnormal, the page is without response abnormality And/or HTML5 page exception.How to detect whether the playback terminal based on Electron platform occurs playback terminal exception thing Part will be described below with reference to Fig. 2-Fig. 4.
After detecting that playback terminal anomalous event occurs for the playback terminal based on Electron platform, based on detected Playback terminal anomalous event type carry out corresponding abnormal restoring processing.
Specifically, in the Main that detected playback terminal anomalous event is Electron application (Electron APP) When Process exception, in block 121, via the application weight in finger daemon (Agent APP is referred to as " demon agent ") (APP Restart) module is opened to restart Electron using the operation to restore Main Process.Here, Agent APP It is and Electron APP application program independent of each other.In general, Agent APP and Electron APP be installed in for example with In on the playback terminal for playing advertisement.Main Process and Render Process be run in Electron APP into Journey.
When detected playback terminal anomalous event is Render Process exception, in block 123, via Main Error handle (Error Handler) module of Process restarts corresponding Render Process.
When detected playback terminal anomalous event is PNR exception, in block 125, via the Error of Main Process Handler module restarts corresponding Render Process.
When detected playback terminal anomalous event is HTML5 page exception, in block 127, via Render The Error Handler module of Process loads the corresponding HTML5 page.For example, by Error Handler module come Refresh page, record front end error log are to complete the recovery process of the entire HTLM5 page.
Fig. 2 shows the flow charts of an instantiation procedure of playback terminal abnormality detection according to an embodiment of the present disclosure.
As shown in Fig. 2, firstly, it is abnormal whether detection playback terminal occurs Main Process in block 111.For example, one In a example, Main Process in the system process list of playback terminal can be inspected periodically via Agent APP whether It is abnormal to detect whether Main Process occurs in operation.
When detecting generation Main Process exception, proceed to block 121, executes Main Process abnormal restoring mistake Journey.When generation Main Process exception is not detected, process proceeds to block 113.
In block 113, detect whether playback terminal occurs Render Process exception.It, can be with for example, in one example It detects whether that rendering process exception occurs via the collapse abnormality detection module of Electron platform.Alternatively, in another example In, it can inspect periodically whether the rendering process in the system process list of playback terminal is running, via Agent APP to examine It surveys and whether occurs to render process exception.
When detecting generation Render Process exception, proceed to block 123, it is extremely extensive to execute Render Process Multiple process.When generation Render Process exception is not detected, process proceeds to block 115.
In block 115, detect whether playback terminal occurs PNR exception.For example, in one example, it can be via host process Detect whether the rendering process in being currently running occurs the page without response abnormality using heartbeat message testing mechanism.
Fig. 3 shows according to an embodiment of the present disclosure for detecting the schematic diagram of the process of PNR exception.
As shown in figure 3, Render Process of the Main Process in being currently running sends heartbeat and disappears in block 310 Breath.Then, in block 320, Main Process monitors whether to receive the response for heartbeat message from Render Process Message (that is, heartbeat response).It will be clear that in one example, Main Process can be in predetermined monitoring period of time It inside monitors whether to receive heartbeat response from Render Process.The predetermined monitoring period of time is, for example, to disappear from having sent heartbeat One section of predetermined time after breath.
If being not received by heartbeat response, for example, if being not received by heartbeat response in predetermined monitoring period of time, In block 330, determines and PNR exception occurs.If receiving heartbeat response, in block 340, determine that there is no PNR exceptions, that is, Page response is normal.
When detecting generation PNR exception, proceed to block 125, executes PNR abnormal restoring process.Occur being not detected When PNR exception, process proceeds to block 117.
In block 117, detect whether that HTML5 page exception occurs.For example, in one example, it can be via Render Process captures page fault events using the error handle function registered in the HTLM5 page, thus detects whether to occur HTLM5 page exception.In the disclosure, the error handle function may include at least one in following error handle functions It is a: window.onerror and window.onunhandledrejection.The page fault events may include following pages At least one of face error event: webglcontextlost event, the Stalled event of video and audio of WebGL.
When detecting generation HTLM5 page exception, proceed to block 127, executes HTML5 page exception recovery process.In When generation HTML5 page exception is not detected, process proceeds to block 111, continues the monitoring of playback terminal anomalous event.
Fig. 4 shows the relational graph between each process in playback terminal according to an embodiment of the present disclosure.Such as Fig. 4 institute Show, in the disclosure, related process includes Agent APP (finger daemon), Main Process and Render Process.Main Process and Render Process are the processes run in Electron APP.
APP Restart module and monitoring the process (Process Monitor) module are provided on Agent APP. Process Monitor module can inspect periodically Main Process in the system process list of playback terminal and/or Whether Render Process is running, to detect whether that generation Main Process exception and/or Render Process are different Often.When Main Process exception occurs, APP Restart module restarts Electron application to restore Main Process Operation.
It is provided with Error Handler module on Main Process and heartbeat sends (Heart Beat Sender) mould Block.When Render Process exception or PNR exception occurs, Error Handler module restarts corresponding Render Process restores the operation of Render Process.Heart Beat Sender module is regularly to Render Process Heartbeat receive (Heart Beat Receiver) module and send heartbeat message, for detecting whether that PNR occurs is abnormal.
Be provided on Render Process Error Handler module, Heart Beat Receiver module and HTML5 fault monitoring module.The error handle function registered in the HTLM5 page can be used to catch in HTML5 fault monitoring module Page fault events are obtained, thus detect whether that HTLM5 page exception occurs.The error handle function may include Window.onerror and/or window.onunhandledrejection.The page fault events may include WebGL At least one of webglcontextlost event, video and the Stalled event of audio.When HTLM5 exception occurs, The corresponding HTML5 page of Error Handler module loading completes the recovery process of the entire HTLM5 page.
The playback terminal according to an embodiment of the present disclosure based on Electron platform is described above with reference to Fig. 1 to Fig. 4 Playback terminal abnormality eliminating method.
It will be clear that Main Process is different during playback terminal accident detection shown in figure 2 Often, Render Process exception, PNR exception and HTML5 page exception are sequence detections.In the other embodiments of the disclosure In, Main Process is abnormal, Render Process is abnormal, PNR exception and HTML5 page exception detection is also possible to solely Vertical detection.For example, in Main Process exception, Render Process exception, PNR exception and HTML5 page exception At least two be parallel detection.
Fig. 5 shows the block diagram of playback terminal exception handling device 500 according to an embodiment of the present disclosure.
As shown in figure 5, playback terminal exception handling device 500 includes abnormality detecting unit 510, host process recovery unit 520, process resumption unit 530 and page recovery unit 540 are rendered.
Accident detection unit 510 is configured as detection playback terminal anomalous event, the playback terminal anomalous event , rendering process exception abnormal including host process, the page are without response abnormality and/or HTML5 page exception.
Host process recovery unit 520 is configured as in detected playback terminal anomalous event being Electron application When host process exception, Electron is restarted via the APP Restart module in Agent APP and is applied to restore Main The operation of Process.
Rendering process resumption unit 530 is configured as in detected playback terminal anomalous event being rendering process exception Or the page without response abnormality when, corresponding Render is restarted via the Error Handler module of Main Process Process, to restore rendering process exception or the page without response abnormality.
Page recovery unit 540 is configured as when detected playback terminal anomalous event is HTML5 page exception, The corresponding HTML5 page is loaded via the Error Handler module of Render Process, it is different to restore the HTML5 page Often.
Fig. 6 shows an exemplary block diagram of accident detection unit 510 according to an embodiment of the present disclosure.Such as Shown in Fig. 6, accident detection unit 510 include host process abnormality detection module 511, rendering process exception detection module 513, Page response abnormality detection module 515 and page exception detection module 517.
Host process abnormality detection module 511 is configured as inspecting periodically the system process of playback terminal via Agent APP Whether Main Process in list is abnormal to detect whether host process occurs in operation.
Rendering process exception detection module 513 is configured as examining via the collapse abnormality detection module of Electron platform It surveys and whether occurs to render process exception, or inspected periodically in the system process list of playback terminal via Agent APP Render Process whether operation come detect whether occur rendering process exception.
Page response abnormality detection module 515 is configured as coming via Main Process using heartbeat message testing mechanism Detect whether the Render Process in being currently running occurs PNR exception.
Page exception detection module 517 is configured as using the mistake registered in the HTLM5 page via Render Process It handles function accidentally to capture page fault events, detects whether that HTLM5 page exception occurs.
Above with reference to Fig. 1 to Fig. 6, to according to the abnormal for handling the playback terminal based on Electron platform of the disclosure Method and the embodiment of playback terminal exception handling device be described.Playback terminal exception handling device above can be with Using hardware realization, can also be realized using the combination of software or hardware and software.
Fig. 7 is according to embodiment of the disclosure for handling the calculating of the playback terminal exception based on Electron platform The structural block diagram of equipment.
As shown in fig. 7, calculating equipment 700 may include at least one processor 710, memory 720, memory 730, communication Interface 740 and internal bus 750, and at least one processor 710, memory 720, memory 730 and communication interface 740 pass through It is linked together by bus 750.At least one processor 710 is executed at computer readable storage medium (that is, memory 720) At least one computer-readable instruction (that is, above-mentioned element realized in a software form) of middle storage or coding.
In one embodiment, it is stored with computer executable instructions in memory 720, makes when implemented at least One processor 710: detection playback terminal anomalous event, the playback terminal anomalous event include host process is abnormal, render into Cheng Yichang, the page are without response abnormality and/or HTML5 page exception;It is in detected playback terminal anomalous event When the host process exception of Electron application, module is restarted via the application in finger daemon to restart the Electron and apply To restore the operation of host process;It is rendering process exception or the page without response abnormality in detected playback terminal anomalous event When, corresponding rendering process is restarted via the error handling module of host process;Or it is abnormal in detected playback terminal When event is HTML5 page exception, the corresponding HTML5 page is loaded via the error handling module of rendering process.
It should be understood that the computer executable instructions stored in memory 720 make at least one when implemented Processor 710 carries out the above various operations and functions described in conjunction with Fig. 1-6 in each embodiment of the disclosure.
In the disclosure, calculating equipment 700 can include but is not limited to: personal computer, server computer, work It stands, desktop computer, laptop computer, notebook computer, mobile computing device, smart phone, tablet computer, bee Cellular telephone, personal digital assistant (PDA), hand-held device, messaging devices, wearable calculating equipment, consumer-elcetronics devices etc. Deng.
According to one embodiment, a kind of program product of such as non-transitory machine readable media is provided.Non-transitory Machine readable media can have instruction (that is, above-mentioned element realized in a software form), which when executed by a machine, makes It obtains machine and executes the above various operations and functions described in conjunction with Fig. 1-6 in each embodiment of the disclosure.
Specifically, system or device equipped with readable storage medium storing program for executing can be provided, stored on the readable storage medium storing program for executing Realize above-described embodiment in any embodiment function software program code, and make the system or device computer or Processor reads and executes the instruction being stored in the readable storage medium storing program for executing.
In this case, it is real that any one of above-described embodiment can be achieved in the program code itself read from readable medium The function of example is applied, therefore the readable storage medium storing program for executing of machine readable code and storage machine readable code constitutes of the invention one Point.
The embodiment of readable storage medium storing program for executing include floppy disk, hard disk, magneto-optic disk, CD (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD-RW), tape, non-volatile memory card and ROM.It selectively, can be by communication network Network download program code from server computer or on cloud.
It will be appreciated by those skilled in the art that each embodiment disclosed above can be in the situation without departing from invention essence Under make various changes and modifications.Therefore, protection scope of the present invention should be defined by the appended claims.
It should be noted that step and unit not all in above-mentioned each process and each system construction drawing is all necessary , certain step or units can be ignored according to the actual needs.Each step execution sequence be not it is fixed, can be according to need It is determined.Apparatus structure described in the various embodiments described above can be physical structure, be also possible to logical construction, that is, have A little units may be realized by same physical entity, be realized alternatively, some units may divide by multiple physical entities, alternatively, can be with It is realized jointly by certain components in multiple autonomous devices.
In the above various embodiments, hardware cell or module mechanically or can be realized electrically.For example, one Hardware cell, module or processor may include permanent dedicated circuit or logic (such as special processor, FPGA or ASIC) corresponding operating is completed.Hardware cell or processor can also include programmable logic or circuit (such as general processor or Other programmable processors), interim setting can be carried out by software to complete corresponding operating.Concrete implementation mode is (mechanical Mode or dedicated permanent circuit or the circuit being temporarily arranged) it can be determined based on cost and temporal consideration.
The specific embodiment illustrated above in conjunction with attached drawing describes exemplary embodiment, it is not intended that may be implemented Or fall into all embodiments of the protection scope of claims." exemplary " meaning of the term used in entire this specification Taste " be used as example, example or illustration ", be not meant to than other embodiments " preferably " or " there is advantage ".For offer pair The purpose of the understanding of described technology, specific embodiment include detail.However, it is possible in these no details In the case of implement these technologies.In some instances, public in order to avoid the concept to described embodiment causes indigestion The construction and device known is shown in block diagram form.
The foregoing description of present disclosure is provided so that any those of ordinary skill in this field can be realized or make Use present disclosure.To those skilled in the art, the various modifications carried out to present disclosure are apparent , also, can also answer generic principles defined herein in the case where not departing from the protection scope of present disclosure For other modifications.Therefore, present disclosure is not limited to examples described herein and design, but disclosed herein with meeting Principle and novel features widest scope it is consistent.

Claims (14)

1. a kind of method for handling the playback terminal exception based on Electron platform, comprising:
Playback terminal anomalous event is detected, the playback terminal anomalous event includes that host process is abnormal, renders process exception, the page Without response abnormality and/or HTML5 page exception;
When detected playback terminal anomalous event is the host process exception of Electron application, via in finger daemon The Electron is restarted using module is restarted using the operation to restore host process;
Detected playback terminal anomalous event be rendering process exception or the page without response abnormality when, via the master into The error handling module of journey restarts corresponding rendering process;Or
When detected playback terminal anomalous event is HTML5 page exception, via the error handling module of rendering process To load the corresponding HTML5 page.
2. the method for claim 1, wherein detection playback terminal anomalous event includes:
It is whether next in operation that the host process in the system process list of the playback terminal is inspected periodically via the finger daemon It detects whether that host process exception occurs.
3. the method for claim 1, wherein detection playback terminal anomalous event includes:
It detects whether that rendering process exception occurs via the collapse abnormality detection module of the Electron platform;Or
Inspect periodically whether the rendering process in the system process list of the playback terminal is running via the finger daemon To detect whether to occur rendering process exception.
4. the method for claim 1, wherein detection playback terminal anomalous event includes:
Whether the rendering process detected via the host process using heartbeat message testing mechanism in being currently running occurs the page Without response abnormality.
5. method as claimed in claim 4, wherein detected via the host process using heartbeat message testing mechanism Whether running rendering process occurs the page without response abnormality
Heartbeat message is sent via rendering process of the host process in being currently running;And
In response to not receiving the response message of the heartbeat message from the rendering process, determine that the rendering process occurs The page is without response abnormality.
6. the method for claim 1, wherein detection playback terminal anomalous event includes:
Page fault events are captured using the error handle function registered in the HTLM5 page via rendering process, are detected whether HTLM5 page exception occurs.
7. method as claimed in claim 6, wherein the error handle function include in following error handle functions at least One: window.onerror and window.onunhandledrejection;And
The page fault events include at least one of following page fault events: the webglcontextlost of WebGL The Stalled event of event, video and audio.
8. a kind of for handling the device of the playback terminal exception based on Electron platform, comprising:
Accident detection unit, detects playback terminal anomalous event, the playback terminal anomalous event include host process it is abnormal, Process exception, the page are rendered without response abnormality and/or HTML5 page exception;
Host process recovery unit, when detected playback terminal anomalous event is the host process exception of Electron application, Module is restarted via the application in finger daemon to restart the Electron using the operation to restore host process;
Process resumption unit is rendered, is rendering process exception or the page without response abnormality in detected playback terminal anomalous event When, corresponding rendering process is restarted via the error handling module of the host process;And
Page recovery unit, when detected playback terminal anomalous event is HTML5 page exception, via rendering process Error handling module loads the corresponding HTML5 page.
9. device as claimed in claim 8, wherein the accident detection unit includes:
Host process abnormality detection module, is inspected periodically in the system process list of the playback terminal via the finger daemon Whether host process is abnormal to detect whether host process occurs in operation.
10. device as claimed in claim 8, wherein the accident detection unit includes:
Process exception detection module is rendered, detects whether to occur via the collapse abnormality detection module of the Electron platform Render process exception, or via the finger daemon inspect periodically the rendering in the system process list of the playback terminal into Journey whether operation come detect whether occur rendering process exception.
11. device as claimed in claim 8, wherein the accident detection unit includes:
Page response abnormality detection module is detected via the host process using heartbeat message testing mechanism in being currently running Whether rendering process occurs the page without response abnormality.
12. device as claimed in claim 8, wherein the accident detection unit includes:
Page exception detection module captures the page using the error handle function registered in the HTLM5 page via rendering process Error event detects whether that HTLM5 page exception occurs.
13. a kind of calculating equipment, comprising:
One or more processors, and
The memory coupled with one or more of processors, the memory store instruction, when described instruction is by described one When a or multiple processors execute, so that one or more of processors are executed as described in any one of claims 1 to 7 Method.
14. a kind of machine readable storage medium, is stored with executable instruction, described instruction makes the machine upon being performed Execute the method as described in any one of claims 1 to 7.
CN201910690014.3A 2019-07-29 2019-07-29 Play terminal exception handling method and device based on Electron platform Active CN110471784B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910690014.3A CN110471784B (en) 2019-07-29 2019-07-29 Play terminal exception handling method and device based on Electron platform

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910690014.3A CN110471784B (en) 2019-07-29 2019-07-29 Play terminal exception handling method and device based on Electron platform

Publications (2)

Publication Number Publication Date
CN110471784A true CN110471784A (en) 2019-11-19
CN110471784B CN110471784B (en) 2023-03-14

Family

ID=68508371

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910690014.3A Active CN110471784B (en) 2019-07-29 2019-07-29 Play terminal exception handling method and device based on Electron platform

Country Status (1)

Country Link
CN (1) CN110471784B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112464124A (en) * 2020-12-11 2021-03-09 Oppo广东移动通信有限公司 Anomaly detection method, device and computer-readable storage medium
CN114791835A (en) * 2022-03-16 2022-07-26 青岛海尔科技有限公司 Program restarting method and device, storage medium and electronic device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07271611A (en) * 1994-03-31 1995-10-20 Fujitsu Ltd Automatic process restarting and processing system
US20170212807A1 (en) * 2014-10-10 2017-07-27 Beijing Kingsoft Internet Security Software Co., Ltd. Method for detecting abnormal application and mobile terminal
CN109582317A (en) * 2018-11-30 2019-04-05 百度在线网络技术(北京)有限公司 Method and apparatus for debugging boarding application
CN110032487A (en) * 2018-11-09 2019-07-19 阿里巴巴集团控股有限公司 Keep Alive supervision method, apparatus and electronic equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07271611A (en) * 1994-03-31 1995-10-20 Fujitsu Ltd Automatic process restarting and processing system
US20170212807A1 (en) * 2014-10-10 2017-07-27 Beijing Kingsoft Internet Security Software Co., Ltd. Method for detecting abnormal application and mobile terminal
CN110032487A (en) * 2018-11-09 2019-07-19 阿里巴巴集团控股有限公司 Keep Alive supervision method, apparatus and electronic equipment
CN109582317A (en) * 2018-11-30 2019-04-05 百度在线网络技术(北京)有限公司 Method and apparatus for debugging boarding application

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
CONARDLI: "electron程序保护措施(崩溃监控,开机自启,托盘关闭)", 《HTTPS://SEGMENTFAULT.COM/A/1190000016933562》 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112464124A (en) * 2020-12-11 2021-03-09 Oppo广东移动通信有限公司 Anomaly detection method, device and computer-readable storage medium
CN114791835A (en) * 2022-03-16 2022-07-26 青岛海尔科技有限公司 Program restarting method and device, storage medium and electronic device
CN114791835B (en) * 2022-03-16 2023-11-28 青岛海尔科技有限公司 Program restarting method and device, storage medium and electronic device

Also Published As

Publication number Publication date
CN110471784B (en) 2023-03-14

Similar Documents

Publication Publication Date Title
CN107908494B (en) Abnormal event processing method and device, electronic equipment and storage medium
CN105843741B (en) Information processing method and device for application program
US8584083B2 (en) Software application recreation
US8904238B2 (en) System and method for capturing logging information
US9355003B2 (en) Capturing trace information using annotated trace output
US20130326074A1 (en) Mobile network application test
CN105955881A (en) Automated test step recording and playback method and apparatus
JP5986602B2 (en) Method, apparatus, terminal and server for synchronizing an exact copy of a terminal data set
US9921950B2 (en) Second failure data capture in co-operating multi-image systems
US9122803B1 (en) Collaborative software defect detection
US10108474B2 (en) Trace capture of successfully completed transactions for trace debugging of failed transactions
US20140201842A1 (en) Identifying stored security vulnerabilities in computer software applications
CN110471784A (en) Playback terminal abnormality eliminating method and device based on Electron platform
US20130290938A1 (en) Testing applications
CN107423090B (en) Flash player abnormal log management method and system
CN109408361A (en) Monkey tests restored method, device, electronic equipment and computer readable storage medium
US9734004B2 (en) Analytics output for detection of change sets system and method
US9015116B2 (en) Consistent replication of transactional updates
CN111309606B (en) Page exception handling method and device, computer equipment and storage medium
US20120311206A1 (en) Facilitating processing in a communications environment using stop signaling
US10691524B2 (en) Diagnostic system and method
US9990274B2 (en) Testing integrated business systems
US11715494B2 (en) Diagnostic system and method
CN115953715B (en) Video detection method, device, equipment and storage medium
EP4168896A1 (en) Diagnostic system and method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20201012

Address after: English genus

Applicant after: Innovative advanced technology Co.,Ltd.

Address before: English genus

Applicant before: Advanced innovation technology Co.,Ltd.

Effective date of registration: 20201012

Address after: English genus

Applicant after: Advanced innovation technology Co.,Ltd.

Address before: A four-storey 847 mailbox in Grand Cayman Capital Building, British Cayman Islands

Applicant before: Alibaba Group Holding Ltd.

GR01 Patent grant
GR01 Patent grant