Rendering detection system, method and device

By implementing rendering information interaction between the view thread and the logic thread in the mini program, the problem of rendering status detection is solved, the rendering blank situation is optimized, and the accuracy of the rendering results and user experience are ensured.

CN118550842BActive Publication Date: 2024-10-11HUNDSUN TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411032626.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-30
Publication Date
2024-10-11
Estimated Expiration
2044-07-30

AI Technical Summary

Technical Problem

In the mini program, due to the independence of the view thread and the logic thread, it is impossible to determine whether the Canvas tag content drawn by the Echarts library exists, resulting in the inability to determine the status of rendering success or failure, and the closed-loop task process of rendering instructions cannot be realized.

Method used

By creating a drawing medium node when the view thread responds to the rendering instructions of the logic thread, and feeding back the node information, the logic thread sends element drawing instructions after determining the drawing conditions based on the node information, and the view thread sends a detection request to determine the rendering status after the drawing is completed.

Benefits of technology

The rendering information interaction between the logical thread and the view thread is realized. The logical thread can obtain the rendering status, optimize the rendering blank situation, and ensure the accuracy of the rendering results and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118550842B_ABST
    Figure CN118550842B_ABST
Patent Text Reader

Abstract

Embodiments of the present specification provide a rendering detection system, method and device, wherein the rendering detection system includes a logic thread and a view thread, including: the view thread, in response to the rendering instruction submitted by the logic thread for a target rendering event, creates a drawing medium node, and feeds back the node information corresponding to the drawing medium node to the logic thread; the logic thread, when determining based on the node information that the drawing medium node meets the drawing condition, sends the element drawing instruction associated with the target rendering event to the view thread; when the view thread draws the target element on the drawing medium node in response to the element drawing instruction, sends a detection request to the view thread; the view thread determines the drawing information corresponding to the drawing medium node according to the detection request, determines the rendering status information of the target rendering event based on the drawing information, and feeds back to the logic thread.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present specification relate to the field of rendering detection technology, and more particularly to rendering detection systems, methods, and devices. Background Art

[0002] With the development of computer technology and Internet technology, the application of mini programs has become an important way to provide services in a lightweight way. In mini program applications, in order to provide users with visual information, dual-thread rendering technology of logic thread and view thread is usually used to implement the rendering logic of visual information; the logic thread creates a series of JavaScript drawing instructions through the Echarts library and passes them to the view thread in batches. The view thread receives the drawing instructions and uses the Canvas tag capability to draw charts and graphics. However, in the entire chart drawing process, the view thread and the logic thread are independent of each other. Due to the particularity of the mini program dual-thread scenario, there is no closed-loop task process in which the drawing instructions are completed and called back. This results in the view thread being unable to determine whether the content in the Canvas tag drawn by the Echarts library exists, and it is impossible to determine the state of rendering success or failure; therefore, an effective solution is urgently needed to solve the above problems. Summary of the invention

[0003] In view of this, an embodiment of the present specification provides a rendering detection system. One or more embodiments of the present specification also relate to a rendering detection method, a rendering detection device, a computing device, a computer-readable storage medium and a computer program product to solve the technical defects existing in the prior art.

[0004] According to a first aspect of an embodiment of this specification, a rendering detection system is provided, the rendering detection system comprising a logic thread and a view thread, including:

[0005] The view thread creates a drawing medium node in response to a rendering instruction submitted by the logic thread for a target rendering event, and feeds back node information corresponding to the drawing medium node to the logic thread;

[0006] The logic thread, when determining based on the node information that the drawing medium node satisfies the drawing condition, sends the element drawing instruction associated with the target rendering event to the view thread; when the view thread draws the target element on the drawing medium node in response to the element drawing instruction, sends a detection request to the view thread;

[0007] The view thread determines the drawing information corresponding to the drawing medium node according to the detection request, determines the rendering state information of the target rendering event based on the drawing information, and feeds back the information to the logic thread.

[0008] According to a second aspect of an embodiment of this specification, a rendering detection method is provided, which is applied to a client, and a target program is run on the client. The target program executes a target rendering event through a logic thread and a view thread, including:

[0009] In response to the rendering instruction submitted by the logic thread for the target rendering event, creating a drawing medium node on the view thread, and feeding back node information corresponding to the drawing medium node to the logic thread;

[0010] When it is determined based on the node information that the drawing medium node meets the drawing condition, sending the element drawing instruction associated with the target rendering event to the view thread through the logic thread;

[0011] When the view thread draws a target element on the drawing medium node in response to the element drawing instruction, sending a detection request to the view thread through the logic thread;

[0012] Determining, by the view thread, drawing information corresponding to the drawing medium node according to the detection request, and determining rendering state information of the target rendering event based on the drawing information;

[0013] The rendering task corresponding to the target rendering event is executed based on the rendering state information, and the target page corresponding to the target program is generated and displayed according to the task execution result.

[0014] According to a third aspect of an embodiment of this specification, a rendering detection device is provided, which is applied to a client, and a target program is run on the client. The target program executes a target rendering event through a logic thread and a view thread, including:

[0015] A node creation module is configured to create a drawing medium node on the view thread in response to a rendering instruction submitted by the logic thread for the target rendering event, and feed back node information corresponding to the drawing medium node to the logic thread;

[0016] a sending instruction module, configured to send an element drawing instruction associated with the target rendering event to the view thread through the logic thread when determining that the drawing medium node meets the drawing condition based on the node information;

[0017] a sending request module, configured to send a detection request to the view thread through the logic thread when the view thread draws a target element on the drawing medium node in response to the element drawing instruction;

[0018] an information determination module, configured to determine, through the view thread, drawing information corresponding to the drawing medium node according to the detection request, and determine rendering state information of the target rendering event based on the drawing information;

[0019] The display page module is configured to execute the rendering task corresponding to the target rendering event based on the rendering state information, and generate and display the target page corresponding to the target program according to the task execution result.

[0020] According to a fourth aspect of an embodiment of this specification, a computing device is provided, including:

[0021] Memory and processor;

[0022] The memory is used to store computer executable instructions, and the processor is used to execute the computer executable instructions. When the computer executable instructions are executed by the processor, the steps of the above rendering detection method are implemented.

[0023] According to a fifth aspect of the embodiments of this specification, a computer-readable storage medium is provided, which stores computer-executable instructions, and when the instructions are executed by a processor, the steps of the above-mentioned rendering detection method are implemented.

[0024] According to a sixth aspect of the embodiments of this specification, a computer program product is provided, including a computer program or instructions, which implement the steps of the above-mentioned rendering detection method when executed by a processor.

[0025] The rendering detection system provided in this embodiment is to enable the view thread and the logic thread to interact with each other in the applet to monitor the rendering blank situation for optimization. In the rendering stage, the view thread can create a drawing medium node in response to the rendering instruction submitted by the logic thread for the target rendering event, and feed back the node information corresponding to the drawing medium node to the logic thread. At this time, the logic thread can send the element drawing instruction associated with the target rendering event to the view thread when it determines that the drawing medium node meets the drawing condition based on the node information. And when the view thread draws the target element on the drawing medium node in response to the element drawing instruction, it sends a detection request to the view thread. At this time, the view thread can determine the drawing information corresponding to the drawing medium node according to the detection request, determine the rendering status information of the target rendering event based on the drawing information, and feed it back to the logic thread. When the logic thread and the view thread perform rendering operations, the rendering information corresponding to the interactive node between the logic thread and the view thread can be supported, so that the logic thread can obtain the rendering status information to determine the rendering status of the node, so that reasonable optimization can be made in the case of rendering blank. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] Figure 1 is a schematic diagram of a rendering detection system provided by an embodiment of this specification;

[0027] Figure 2 is a structural schematic diagram of a rendering detection system provided by an embodiment of this specification;

[0028] Figure 3 is a processing flow chart of a rendering detection system provided by an embodiment of the present specification;

[0029] Figure 4 is a flow chart of a rendering detection method provided by an embodiment of this specification;

[0030] Figure 5 is a structural schematic diagram of a rendering detection device provided by an embodiment of this specification;

[0031] Figure 6 It is a structural block diagram of a computing device provided by an embodiment of this specification. DETAILED DESCRIPTION

[0032] Many specific details are described in the following description to facilitate a full understanding of this specification. However, this specification can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the connotation of this specification, so this specification is not limited to the specific implementation disclosed below.

[0033] The terms used in one or more embodiments of this specification are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of this specification. The singular forms of "a", "said" and "the" used in one or more embodiments of this specification and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used in one or more embodiments of this specification refers to and includes any or all possible combinations of one or more associated listed items.

[0034] It should be understood that although the terms first, second, etc. may be used to describe various information in one or more embodiments of this specification, this information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of this specification, the first may also be referred to as the second, and similarly, the second may also be referred to as the first. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0035] In addition, it should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in one or more embodiments of this specification are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0036] First, the terms involved in one or more embodiments of this specification are explained.

[0037] Echarts: is a JavaScript-based data visualization chart library that can run smoothly on PCs and mobile devices and is compatible with most browsers.

[0038] In this specification, a rendering detection system is provided. This specification also relates to a rendering detection method, a rendering detection apparatus, a computing device, a computer-readable storage medium and a computer program product, which are described in detail one by one in the following embodiments.

[0039] See also Figure 1 As shown in the schematic diagram, the rendering detection system provided by this embodiment can realize that the view thread and the logic thread can interact with the rendering status of the drawing medium node in the applet, so as to monitor the rendering blank situation for optimization; in the rendering stage, the view thread can create a drawing medium node in response to the rendering instruction submitted by the logic thread for the target rendering event, and feed back the node information corresponding to the drawing medium node to the logic thread; at this time, the logic thread can send the element drawing instruction associated with the target rendering event to the view thread when it determines based on the node information that the drawing medium node meets the drawing condition; and when the view thread draws the target element on the drawing medium node in response to the element drawing instruction, it sends a detection request to the view thread; at this time, the view thread can determine the drawing information corresponding to the drawing medium node according to the detection request, determine the rendering status information of the target rendering event based on the drawing information, and feed it back to the logic thread. When the logic thread and the view thread perform rendering operations, the rendering information corresponding to the interactive node between the logic thread and the view thread can be supported, so that the logic thread can obtain the rendering status information to determine the rendering status of the node, so that reasonable optimization can be made in the case of rendering blank.

[0040] See also Figure 2 , Figure 2 A schematic diagram of the structure of a rendering detection system provided according to an embodiment of the present specification is shown. The rendering detection system 200 includes a logic thread 220 and a view thread 210, including:

[0041] The view thread 210 creates a drawing medium node in response to a rendering instruction submitted by the logic thread for a target rendering event, and feeds back node information corresponding to the drawing medium node to the logic thread;

[0042] The logic thread 220, when determining based on the node information that the drawing medium node satisfies the drawing condition, sends the element drawing instruction associated with the target rendering event to the view thread; when the view thread draws the target element on the drawing medium node in response to the element drawing instruction, sends a detection request to the view thread;

[0043] The view thread 210 determines the drawing information corresponding to the drawing medium node according to the detection request, determines the rendering state information of the target rendering event based on the drawing information, and feeds back the information to the logic thread.

[0044] The rendering detection system provided in this embodiment is applied to the mini-programs running in the terminal device, and is used to realize the detection of rendering blank problems by cooperating between the logic thread and the view thread, so that the view thread can interact with the logic thread in the current state of the rendering state information, so as to facilitate rendering optimization when problems arise later. Among them, the mini-program can be a mini-program that provides any service to the user, such as navigation, payment, query, shooting, monitoring, control, etc. This embodiment does not make any limitation here.

[0045] Specifically, the target rendering event specifically refers to the rendering event corresponding to the content that the applet needs to display on the page in the current state. For example, if the applet is a navigation applet, the map of point A needs to be displayed according to the user input, then the event of rendering the map content of point A is the target rendering event; or, if the applet is an information monitoring applet, the monitoring data table needs to be displayed according to the user input, then the event of drawing the monitoring data table is the target rendering event. Correspondingly, the rendering instruction specifically refers to the rendering instruction submitted by the logic thread to the view thread for the target rendering event, which is used to construct a drawing medium node in the view thread to realize the drawing of the target element associated with the target rendering event in the drawing drawing node; wherein, the drawing medium node specifically refers to the canvas used to provide element drawing content in the view thread, that is, the Canvas node; accordingly, the target element is the content that needs to be displayed to the user at present, such as tables, text, images, etc. Correspondingly, the node information specifically refers to the attribute information corresponding to the drawing medium node, including but not limited to the size information of the drawing medium node, whether the construction is completed, etc.

[0046] Correspondingly, the drawing condition specifically refers to the condition for detecting whether a drawing medium node is constructed in the view thread according to the node information; correspondingly, the element drawing instruction specifically refers to the instruction associated with the target rendering event, and the target element needs to be drawn on the drawing medium node, and the instruction carries the drawing information of the target element. Correspondingly, the detection request specifically refers to the request sent by the logic thread to the view thread to detect whether there is a successfully drawn element in the drawing medium node when determining that the view thread draws the target element, so as to achieve subsequent rendering optimization based on the detection result. Correspondingly, the drawing information is the descriptive information corresponding to the drawing target element on the drawing medium node, which is used to characterize whether the target element is drawn successfully and determine the rendering status information. Correspondingly, the rendering status information specifically refers to the information reflecting whether the view thread has a rendering blank state. After feeding it back to the logic thread, it can support the logic thread to determine whether there is a rendering blank problem based on the rendering status information, so as to facilitate the subsequent rendering optimization based on the information, such as re-rendering, refreshing the page, etc.

[0047] In actual applications, the reason why the mini program has a blank rendering problem during the rendering stage may be that the Canvas node has not been loaded when Echarts is initialized; or the Canvas node size is set incorrectly, or the Echarts configuration is abnormal, resulting in blank rendering. Therefore, in order to detect the rendering status and determine the cause of the blank rendering problem, during the rendering stage of the mini program, the view thread can create a drawing medium node in response to the rendering instruction submitted by the logic thread for the target rendering event, and feed back the node information corresponding to the drawing medium node to the logic thread; at this time, the logic thread can determine based on the node information that the drawing medium node meets the drawing conditions, and send the element drawing instruction associated with the target rendering event to the view thread; and when the view thread draws the target element on the drawing medium node in response to the element drawing instruction, send a detection request to the view thread; at this time, the view thread can determine the drawing information corresponding to the drawing medium node according to the detection request, determine the rendering status information of the target rendering event based on the drawing information, and feed it back to the logic thread. The interactive rendering results between the logic thread and the view thread are realized, so that it is convenient to make optimizations in time when the rendering is blank.

[0048] For example, when the mini program running on the mobile phone needs to draw a target table in response to the user's input command, the logic layer that supports the mini program rendering mechanism will send a rendering command to the view layer; the view layer will create a Canvas real node according to the rendering command, and feedback the size information and existence result of the Canvas real node to the logic layer. If the logic layer determines that there is no Canvas real node in the view layer according to the feedback result, it is determined that the view layer has not loaded the Canvas real node, and the rendering command can continue to be sent to the view layer; until the feedback result is received to determine that there is a Canvas real node in the view layer, then according to the size information received at this time, it is determined whether the size of the Canvas real node in the view layer is incorrect, that is, whether the width or height in the size information is 0; if so, it means that the size of the Canvas real node is incorrect, and the rendering command is sent to the view layer again, so that the view layer rebuilds the Canvas real node. When it is determined that there is a Canvas real node in the view layer and the size is correct, it can be used for subsequent specific drawing operations.

[0049] Furthermore, when the logic layer determines that the construction of the Canvas real node is complete, the drawing instruction of the associated target table can be fed back to the view layer, so that the view layer can draw the target table on the Canvas real node according to the instruction. During the table drawing process, the logic layer can send a detection request to the view layer to detect whether the view layer successfully draws the target table on the Canvas real node. At this time, the view layer will feed back the drawing information to the logic layer according to the request; the drawing information records the description of whether the target table is successfully drawn on the Canvas real node. After that, the logic layer can determine the rendering status of the target table drawn by the view layer on the Canvas real node according to the drawing information. If the rendering status is successful, it can be displayed to the user; if the rendering status is failed, a refresh page instruction or a redraw table instruction can be generated to achieve the correct drawing and display of the table.

[0050] In actual applications, when the view thread and the logic thread poll to build the drawing medium node, you can set a set time interval to trigger an interaction and set a polling upper limit. If it still fails, you can output an error log.

[0051] To sum up, when the logic thread and the view thread perform rendering operations, the rendering information corresponding to the interactive nodes between the logic thread and the view thread can be supported, so that the logic thread can obtain the rendering status information to determine the rendering status of the node, so that reasonable optimization can be made in the case of rendering blanks.

[0052] Furthermore, in order to avoid the problem of rendering blank when the view thread draws the target element on the drawing medium node, the logic thread can initialize the target page information after determining the target rendering event, and perform subsequent rendering and detection of rendering results based on this. In this embodiment, the logic thread initializes the target page information associated with the target rendering event, constructs a virtual medium node according to the initialization result; constructs a rendering instruction based on the object data corresponding to the virtual medium node, and sends the rendering instruction to the view thread;

[0053] The view thread extracts the object data from the rendering instruction, creates a drawing medium node according to the object data, extracts node information corresponding to the drawing medium node, and sends the node information to the logic thread.

[0054] Specifically, initializing the target page information specifically refers to the operation of initializing the content contained in the target page associated with the target rendering event. Accordingly, the virtual medium node specifically refers to the Canvas virtual node constructed in the logic thread. Accordingly, the object data specifically refers to the data used to construct the drawing medium node in the view thread, which records the size information of the drawing medium node, etc.

[0055] Based on this, when a target rendering event is triggered, the target page information associated with the target rendering event can be initialized by the logical thread, and a virtual media node can be constructed based on the initialization result; on this basis, in order to enable the view thread to construct a drawing media node that meets the current event, a rendering instruction can be constructed based on the object data corresponding to the virtual media node, and the rendering instruction can be sent to the view thread; at this time, the view thread can extract the object data in the rendering instruction, and create a drawing medium node based on the object data; on this basis, the node information corresponding to the drawing medium node can be extracted, and the node information can be sent to the logical thread for subsequent element drawing operations.

[0056] Continuing with the above example, when the mini program running on the mobile phone needs to draw a target table in response to the user's input instructions, the page content of the target table to be drawn on the mini program can be initialized at the logic layer, including the Canvas tag. At this time, a Canvas virtual node will be formed and a rendering instruction will be generated. After the instruction is sent to the view layer, the view layer can create a Canvas real node according to the rendering instruction to facilitate the subsequent drawing operation of the target table.

[0057] In summary, by initializing the target page information, it is possible to successfully draw the target element on the relevant page later.

[0058] Furthermore, after receiving the node information, the logic thread can first detect whether the drawing medium node is normal according to the node information, and then perform subsequent rendering and detection operations in order to ensure the monitoring of the rendering event throughout its life cycle. In this embodiment, the logic thread parses the node information to obtain node existence information and node size information; if the view thread determines that the drawing medium node exists according to the node existence information, it detects whether the node size information meets the preset size threshold; if so, it determines that the drawing medium node meets the drawing condition, and executes the step of sending the element drawing instruction associated with the target rendering event to the view thread.

[0059] Specifically, the node existence information specifically refers to the descriptive information that characterizes whether the view thread successfully constructs the drawing medium node; correspondingly, the size information specifically refers to the attribute information such as the length, width, and height corresponding to the drawing medium node; correspondingly, the preset size threshold specifically refers to the threshold that is compared with the size information to determine whether the drawing medium node has an incorrect size, which can be set according to actual needs, and this embodiment does not make any limitation here.

[0060] Based on this, after receiving the node information submitted by the view thread, the logic thread can obtain the node existence information and node size information by parsing the node information; when it is determined according to the node existence information that the view thread does not have a drawing medium node, it means that the view thread has not completed the construction of the drawing medium node at this time, and the rendering instruction can be repeatedly sent to the view thread to ensure that the view thread can successfully build the drawing medium node. When it is determined according to the node existence information that the view thread has a drawing medium node, it means that the view thread has completed the construction of the drawing medium node. On this basis, in order to avoid the problem of construction size errors, it can be detected whether the node size information meets the preset size threshold; if not, it means that there is a problem with the drawing medium node drawn by the view thread, and the rendering instruction can be resent to rebuild the drawing medium node; if so, it means that the drawing medium node is determined to meet the drawing conditions, and the step of sending the element drawing instruction associated with the target rendering event to the view thread can be continued.

[0061] In actual applications, from detecting whether the drawing medium node exists to detecting whether the drawing medium node is of the correct size, if the drawing medium node has not been created successfully, it will affect the subsequent drawing operations, resulting in blank rendering. Therefore, a polling mechanism can be used to set the time interval (such as 60ms) and the number of polling times (such as 50 times) for judgment. If the time threshold (such as 3s) is exceeded, an error log can be output.

[0062] Continuing with the above example, after the view layer feeds back the size information and existence result of the Canvas real node to the logic layer, if the logic layer determines that there is no Canvas real node in the view layer based on the feedback result, it is determined that the view layer has not loaded the Canvas real node, and the rendering instruction can be resent to the view layer at an interval of 60ms; until the feedback result is received to confirm that there is a Canvas real node in the view layer, it is detected whether the size information received at this time is 0, so as to determine whether there is an incorrect size problem of the Canvas real node in the view layer; if so, it means that the size of the Canvas real node is incorrect, and the rendering instruction is resent to the view layer, so that the view layer rebuilds the Canvas real node. When it is determined that there is a Canvas real node in the view layer and the size is correct, it can be used for subsequent specific drawing operations.

[0063] In summary, by adopting the polling mechanism to construct the drawing medium node, it can ensure that the logic thread and the view thread do a good job of basic work before drawing, thereby ensuring that the subsequent rendering is smoother.

[0064] After the logic thread determines that the view thread has completed the construction of the drawing medium node, the logic thread can send an element rendering instruction to the view thread, and the view thread will trigger the processing of rendering the target element. In this embodiment, the logic thread performs an element data initialization operation, constructs an element rendering instruction corresponding to the target rendering event according to the initialization result, and sends the element rendering instruction to the view thread;

[0065] The view thread draws a target element on the drawing medium node in response to the element rendering instruction;

[0066] The logic thread creates a detection request for detecting the drawing information in the drawing medium node based on a preset callback function, and sends the detection request to the view thread.

[0067] Specifically, the element data initialization operation specifically refers to the operation of the logic thread executing the Echarts chart data initialization. Correspondingly, the preset callback function specifically refers to the function that initiates the detection of the drawing medium node content in the view layer in the event monitoring, which is used to construct a detection request and send it to the view thread.

[0068] Based on this, after the logic thread determines that the view thread has drawn the drawing medium node that satisfies the target rendering event, the logic thread can perform the element data initialization operation to build the element rendering instruction corresponding to the target rendering event according to the initialization result, and send it to the view thread; at this time, the view thread can draw the target element on the drawing medium node in response to the element rendering instruction; in this process, in order to enable the logic thread to determine whether there is a rendering blank problem in the view thread, thereby triggering the corresponding optimization strategy, the logic thread can create a detection request for the drawing information in the drawing medium node based on the preset callback function, and send the detection request to the view thread for monitoring the rendering results.

[0069] Using the above example, after the logic layer determines that the view layer has completed the construction of the Canvas real node, the logic layer can perform the Echarts chart data initialization operation, such as:

[0070] var myChart = echarts.init(chartDom); / / instantiate echarts

[0071] var option = {...}

[0072] myChart.setOption(option); / / Render data to draw chart style

[0073] At this point, the logic layer can pass the generated chart drawing instructions to the view layer, and the view layer can draw the chart graphics on the Canvas real node according to the received chart drawing instructions; in this process, since the Echarts library in the logic layer provides a callback function finished for completing the drawing, a detection request for the content of the Canvas real node (#canvasIdXXX) in the view layer can be initiated in the rendering event listener. The request is as follows:

[0074] Interface request: checkCanvasContent(canvasId, startData, callback).

[0075] Parameter canvasId: indicates the Dom node id,

[0076] Parameter startData: indicates the Canvas node data value at initialization.

[0077] Parameter callback: indicates that the interface returns a callback function. A value of false indicates an exception, and a value of true indicates a normal condition.

[0078] After the detection request is sent to the view layer, the view layer can feedback corresponding drawing information to the logic layer in response to the request, so that the logic layer can determine whether the view layer successfully draws the target table.

[0079] In summary, during the target element drawing phase of the view thread, a detection request is triggered to be sent to the view thread, so that the logic thread can monitor the rendering result of the view thread.

[0080] After the view thread receives the detection request, the view thread can collect relevant information according to the request and feed it back to the logic thread, so that the logic thread can accurately identify the rendering status of the view thread. In this embodiment, the view thread calls the access interface associated with the drawing medium node according to the detection request, collects pixel information for the specified area of ​​the drawing medium node, and determines the node coding information corresponding to the drawing medium node; and uses the collected target pixel information and the node coding information as drawing information.

[0081] Specifically, the designated area specifically refers to the area in the drawing medium node used to draw the target element. Since the target element needs to be drawn in this area, its pixels will change. Accordingly, the target pixel information specifically refers to the information structure composed of the pixel values ​​corresponding to the pixels in the designated area. Accordingly, the node encoding information specifically refers to the base64 value corresponding to the drawing medium node.

[0082] Based on this, in order to support the logic thread to accurately monitor the rendering status of the view thread, after receiving the detection request, the view thread can call the access interface of the associated drawing medium node according to the detection request, and collect pixel information for the specified area of ​​the drawing medium node. At the same time, it can also determine the node coding information corresponding to the drawing medium node; then, the collected target pixel information and node coding information are used as drawing information, so that the logic thread can complete the monitoring of the drawing results of the target elements in the view thread from multiple dimensions.

[0083] In summary, by adopting a multi-dimensional information collection method to construct drawing information, the logical thread can monitor the rendering results from multiple dimensions, thereby ensuring the accuracy of rendering detection.

[0084] On this basis, when the logic thread receives the target pixel information and node encoding information fed back by the view thread, it can determine the rendering status of the target element in the view thread in combination with the target pixel information and the node encoding information, thereby ensuring the rendering detection accuracy. In this embodiment, the view thread traverses the target pixel information according to a preset traversal strategy, and determines the target pixel values ​​corresponding to multiple target pixel points respectively according to the traversal results; compares the target pixel values ​​corresponding to each target pixel point with a preset pixel value threshold; determines the reference node encoding information corresponding to the drawing medium node in the node construction stage when it is determined according to the comparison result that there is a target pixel point greater than the preset pixel value threshold; compares the reference node encoding information with the node encoding information, and determines the rendering status information of the target rendering event according to the comparison result.

[0085] In addition, in order to support the logic thread to monitor the result of rendering the target element of the view thread by comparing the coding information at different stages, the reference node coding information corresponding to the drawing medium node at this stage can be directly calculated when the view thread completes the drawing medium node construction, so that the consistency of the node coding information before and after can be compared in the drawing stage to determine whether there is a rendering blank problem. In this embodiment, in the drawing medium node construction stage, the logic thread can obtain the reference node coding information corresponding to the drawing medium node in the node construction stage according to the preset drawing medium conversion rule, and send the reference node coding information to the view thread.

[0086] Specifically, the traversal strategy specifically refers to a strategy for traversing the target pixel information, and the strategy can filter out a set number of target pixel points from the target pixel information to detect pixel values. For example, the pixel points can be determined according to multiples of a specified value, or the pixel points can be filtered according to an arithmetic progression, and this embodiment does not make any limitation here. Correspondingly, the reference node encoding information specifically refers to the base64 value calculated when the drawing medium node is constructed and the target element has not yet been drawn.

[0087] Based on this, after the view thread completes the construction of the drawing medium node, the logic thread can directly obtain the reference node encoding information corresponding to the drawing medium node in the node construction stage according to the preset drawing medium conversion rules, and send the reference node encoding information to the view thread for recording. When the view thread starts to draw the target element, it will receive the detection request sent by the logic thread. At this time, the view thread can traverse the target pixel information according to the preset traversal strategy, and select multiple target pixel points and the target pixel values ​​corresponding to each target pixel point from the pixel points according to the traversal results. Since the rendering result of the element will affect the change of the pixel value, the target pixel value corresponding to each target pixel point can be compared with the preset pixel value threshold.

[0088] If the comparison result shows that there is no target pixel point greater than the preset pixel value threshold, it means that the target element is not successfully drawn in the specified area, that is, there may be a rendering blank problem. Therefore, the rendering status information can be directly determined as rendering failure status information, that is, there is a rendering blank problem.

[0089] If it is determined based on the comparison result that there is a target pixel point greater than the preset pixel value threshold, it means that the target element may be drawn in the specified area. In order to ensure the detection accuracy, the reference node coding information corresponding to the drawing medium node in the node construction stage can also be determined; at this time, the reference node coding information can be compared with the node coding information.

[0090] If the reference node encoding information is the same as the node encoding information, it means that the drawing medium node is the same in the construction phase and in the element drawing phase, which further indicates that the drawing medium node has not changed. Therefore, it can be determined that the rendering status information of the target rendering event is rendering failure status information, that is, there is a rendering blank problem.

[0091] If the reference node encoding information is different from the node encoding information, it means that the drawing medium node is different in the construction phase and in the element drawing phase, which further indicates that the drawing medium node has changed. Therefore, it can be determined that the rendering status information of the target rendering event is the rendering success status information, that is, there is no rendering blank problem.

[0092] Continuing with the above example, after the view layer completes the construction of the Canvas real node, the logic layer can obtain the base64 value of the Canvas node in the current initial state according to the Canvas toDataURL method, and define it as startData for subsequent comparison of rendering state changes. Furthermore, when the view layer is drawing the target table, the logic layer will send a detection command to the view layer. After receiving the detection command, the view layer can collect pixel information of the specified area through the Canvas series API built into the browser of the applet, as follows:

[0093] const canvas = document.querySelector("#canvasIdXXX"); / / Get the real canvas node

[0094] const context = canvas.getContext("2d");

[0095] const { width, height} = canvas.getBoundingClientRect(); / / Get the actual width and height of the canvas node

[0096] var imageData = context.getImageData(0, 0, width, height); / / Get pixel data on Canvas

[0097] At this time, the acquired imageData data format is the Uint8ClampedArray type in JavaScript, which describes a one-dimensional array containing data in RGBA order, and the data is represented by integers from 0 to 255 (inclusive). At this time, based on the collected imageData data, it can be judged whether there is image information in the acquired data. During the judgment process, each pixel representing transparency in the one-dimensional array of pixels can be traversed, that is, the pixels are selected with a tolerance of 4 (for example: 3, 7, 11, 15...), and then it can be judged whether there is an item greater than 0 in the pixel value of the filtered pixels. If it exists, it means that there is image content on the Canvas canvas; otherwise, it means that the rendering is blank, and the status value of rendering failure can be returned to the logic layer.

[0098] Furthermore, when the checkCanvasPixelContent function returns true, it indicates that there are visible pixels on the Canvas. To ensure the accuracy of the detection, the base64 value of the current Canvas node can be obtained through the toDataURL method of Canvas. Then the base64 value of the Canvas node is compared with the base64 value of the Canvas node in the initial state. If the two are different, it means that there is new rendering content; if the two are the same, it means that there is no new rendering content, and the status value of rendering failure can be returned to the logic layer.

[0099] In summary, by combining the pixel dimension and the encoding dimension to detect the rendering state, the rendering detection result can be effectively improved, thereby ensuring that the logic thread can determine the rendering state of the view thread and make reasonable optimization.

[0100] After the logic thread receives the rendering status information, different processing can be performed based on different rendering status information. In this embodiment, the logic thread receives the rendering status information; if the rendering status information is rendering success status information, the logic thread sends a display instruction to the view thread; the view thread, in response to the display instruction, displays the target element on the target page corresponding to the target rendering event; or

[0101] The logic thread receives the rendering status information; when the rendering status information is rendering failure status information, triggers and executes an update rendering task for the target page corresponding to the target rendering event; or, refreshes the target page corresponding to the target rendering event, and constructs a target rendering instruction based on the refresh result; and sends the target rendering instruction to the view thread as the rendering instruction associated with the target rendering event.

[0102] Specifically, the display instruction refers to an instruction to display the target page corresponding to the target rendering event and the target element in the page. Correspondingly, the update rendering task refers to a task of re-rendering operation, that is, a task of re-rendering operation in cooperation between the logic thread and the view thread.

[0103] Based on this, after the logic thread receives the rendering status information; if the rendering status information is rendering success status information, it means that the rendering detection is passed at this time, so a display instruction can be sent to the view thread; so that the view thread can respond to the display instruction to display the target element on the target page corresponding to the target rendering event.

[0104] If the rendering status information is a rendering failure status information, it means that there is a problem of rendering blank. In order to display the target element to the user, you can choose to trigger the update rendering task for the target page corresponding to the target rendering event and execute it, so that the logic thread and the view thread can re-perform the above operations to successfully render the target element. In addition, you can also refresh the target page corresponding to the target rendering event, initialize the target page, and then re-build the target rendering instruction according to the refresh result; send the target rendering instruction as the rendering instruction associated with the target rendering event to the view thread; and realize that the view thread re-builds the elements in the updated page.

[0105] The rendering detection system provided in this embodiment is to enable the view thread and the logic thread to interact with each other in the applet to monitor the rendering blank situation for optimization. In the rendering stage, the view thread can create a drawing medium node in response to the rendering instruction submitted by the logic thread for the target rendering event, and feed back the node information corresponding to the drawing medium node to the logic thread. At this time, the logic thread can send the element drawing instruction associated with the target rendering event to the view thread when it determines that the drawing medium node meets the drawing condition based on the node information. And when the view thread draws the target element on the drawing medium node in response to the element drawing instruction, it sends a detection request to the view thread. At this time, the view thread can determine the drawing information corresponding to the drawing medium node according to the detection request, determine the rendering status information of the target rendering event based on the drawing information, and feed it back to the logic thread. When the logic thread and the view thread perform rendering operations, the rendering information corresponding to the interactive node between the logic thread and the view thread can be supported, so that the logic thread can obtain the rendering status information to determine the rendering status of the node, so that reasonable optimization can be made in the case of rendering blank.

[0106] The following combination Figure 3 , taking the application of the rendering detection system provided in this specification in the mini-program rendering scenario as an example, the rendering detection system is further described. Figure 3 A processing flow chart of a rendering detection system provided by an embodiment of the present specification is shown, which specifically includes the following steps.

[0107] Step S302, the logic thread initializes the target page information associated with the target rendering event, constructs a virtual media node according to the initialization result; constructs a rendering instruction based on the object data corresponding to the virtual media node, and sends the rendering instruction to the view thread.

[0108] Step S304: the view thread extracts object data from the rendering instruction, creates a drawing medium node according to the object data, extracts node information corresponding to the drawing medium node, and sends the node information to the logic thread.

[0109] Step S306, the logic thread parses the node information to obtain the node existence information and the node size information; if it is determined according to the node existence information that the view thread has a drawing medium node, it detects whether the node size information meets the preset size threshold; if so, it is determined that the drawing medium node meets the drawing condition.

[0110] Step S308: the logic thread executes the element data initialization operation, constructs the element rendering instruction corresponding to the target rendering event according to the initialization result, and sends the element rendering instruction to the view thread.

[0111] Step S310: the view thread draws a target element on a drawing medium node in response to an element rendering instruction.

[0112] Step S312: the logic thread creates a detection request for detecting the drawing information in the drawing medium node based on a preset callback function, and sends the detection request to the view thread.

[0113] Step S314, the view thread calls the access interface of the associated drawing medium node according to the detection request, collects pixel information for the designated area of ​​the drawing medium node, and determines the node coding information corresponding to the drawing medium node; and uses the collected target pixel information and node coding information as drawing information.

[0114] Step S316, the view thread traverses the target pixel information according to the preset traversal strategy, determines the target pixel values ​​corresponding to the multiple target pixel points respectively according to the traversal results; and compares the target pixel value corresponding to each target pixel point with the preset pixel value threshold.

[0115] Step S318, the view thread, based on the comparison result, determines that there is a target pixel point whose value is greater than the preset pixel value threshold, and then determines the reference node coding information corresponding to the drawing medium node in the node construction stage; compares the reference node coding information with the node coding information, determines the rendering status information of the target rendering event based on the comparison result, and feeds it back to the logic thread.

[0116] Step S320: the logic thread receives rendering status information; if the rendering status information is rendering success status information, the logic thread sends a display instruction to the view thread; the view thread displays the target element on the target page corresponding to the target rendering event in response to the display instruction; or

[0117] Step S322, the logical thread receives rendering status information; when the rendering status information is rendering failure status information, triggers and executes the update rendering task for the target page corresponding to the target rendering event; or, refreshes the target page corresponding to the target rendering event, and constructs a target rendering instruction based on the refresh result; sends the target rendering instruction to the view thread as the rendering instruction associated with the target rendering event.

[0118] In summary, in order to enable the view thread and the logic thread to interact with each other in the applet to exchange the rendering status of the drawing medium node, so as to monitor the rendering blank situation for optimization; in the rendering stage, the view thread can create a drawing medium node in response to the rendering instruction submitted by the logic thread for the target rendering event, and feed back the node information corresponding to the drawing medium node to the logic thread; at this time, the logic thread can determine based on the node information that the drawing medium node meets the drawing condition, and send the element drawing instruction associated with the target rendering event to the view thread; and when the view thread draws the target element on the drawing medium node in response to the element drawing instruction, send a detection request to the view thread; at this time, the view thread can determine the drawing information corresponding to the drawing medium node according to the detection request, determine the rendering status information of the target rendering event based on the drawing information, and feed it back to the logic thread. When the logic thread and the view thread perform rendering operations, the rendering information corresponding to the interactive node between the logic thread and the view thread can be supported, so that the logic thread can obtain the rendering status information to determine the rendering status of the node, so that reasonable optimization can be made in the case of rendering blank.

[0119] Corresponding to the above system embodiment, this specification also provides a rendering detection method embodiment. Figure 4 FIG. 2 shows a flowchart of a rendering detection method provided by an embodiment of the present specification. Figure 4 As shown, the method is applied to a client, a target program is run on the client, and the target program executes a target rendering event through a logic thread and a view thread, including:

[0120] Step S402, in response to the rendering instruction submitted by the logic thread for the target rendering event, creating a drawing medium node on the view thread, and feeding back node information corresponding to the drawing medium node to the logic thread;

[0121] Step S404, when it is determined based on the node information that the drawing medium node meets the drawing condition, sending the element drawing instruction associated with the target rendering event to the view thread through the logic thread;

[0122] Step S406, when the view thread draws the target element on the drawing medium node in response to the element drawing instruction, sending a detection request to the view thread through the logic thread;

[0123] Step S408, determining, by the view thread, drawing information corresponding to the drawing medium node according to the detection request, and determining rendering state information of the target rendering event based on the drawing information;

[0124] Step S410: executing a rendering task corresponding to the target rendering event based on the rendering state information, generating and displaying a target page corresponding to the target program according to a task execution result.

[0125] In an optional embodiment, the logic thread initializes target page information associated with the target rendering event, constructs a virtual media node according to the initialization result; constructs a rendering instruction based on object data corresponding to the virtual media node, and sends the rendering instruction to the view thread;

[0126] The view thread extracts the object data from the rendering instruction, creates a drawing medium node according to the object data, extracts node information corresponding to the drawing medium node, and sends the node information to the logic thread.

[0127] In an optional embodiment, the logic thread parses the node information to obtain node existence information and node size information; when determining that the view thread has the drawing medium node based on the node existence information, detects whether the node size information meets a preset size threshold; if so, determines that the drawing medium node meets the drawing conditions, and executes the step of sending the element drawing instruction associated with the target rendering event to the view thread.

[0128] In an optional embodiment, the logic thread performs an element data initialization operation, constructs an element rendering instruction corresponding to the target rendering event based on the initialization result, and sends the element rendering instruction to the view thread; the view thread draws the target element on the drawing medium node in response to the element rendering instruction; the logic thread creates a detection request for detecting the drawing information in the drawing medium node based on a preset callback function, and sends the detection request to the view thread.

[0129] In an optional embodiment, the view thread calls an access interface associated with the drawing medium node according to the detection request, collects pixel information for a specified area of ​​the drawing medium node, and determines node coding information corresponding to the drawing medium node; and uses the collected target pixel information and the node coding information as drawing information.

[0130] In an optional embodiment, the view thread traverses the target pixel information according to a preset traversal strategy, and determines target pixel values ​​corresponding to multiple target pixel points respectively according to the traversal results; compares the target pixel value corresponding to each target pixel point with a preset pixel value threshold; when it is determined according to the comparison result that there is a target pixel point greater than the preset pixel value threshold, determines the reference node encoding information corresponding to the drawing medium node in the node construction stage; compares the reference node encoding information with the node encoding information, and determines the rendering status information of the target rendering event according to the comparison result.

[0131] In an optional embodiment, the logic thread obtains reference node encoding information corresponding to the drawing medium node in the node construction phase according to a preset drawing medium conversion rule, and sends the reference node encoding information to the view thread.

[0132] In an optional embodiment, the logic thread receives the rendering status information; when the rendering status information is rendering success status information, the logic thread sends a display instruction to the view thread; the view thread displays the target element on the target page corresponding to the target rendering event in response to the display instruction; or,

[0133] The logic thread receives the rendering status information; when the rendering status information is rendering failure status information, triggers and executes an update rendering task for the target page corresponding to the target rendering event; or, refreshes the target page corresponding to the target rendering event, and constructs a target rendering instruction based on the refresh result; and sends the target rendering instruction to the view thread as the rendering instruction associated with the target rendering event.

[0134] The rendering detection method provided in this embodiment is to enable the view thread and the logic thread to interact with each other in the applet to determine the rendering status of the drawing medium node, so as to monitor the rendering blank situation for optimization. In the rendering stage, the view thread can create a drawing medium node in response to the rendering instruction submitted by the logic thread for the target rendering event, and feed back the node information corresponding to the drawing medium node to the logic thread. At this time, the logic thread can determine that the drawing medium node meets the drawing condition based on the node information, and send the element drawing instruction associated with the target rendering event to the view thread. And when the view thread draws the target element on the drawing medium node in response to the element drawing instruction, the detection request is sent to the view thread. At this time, the view thread can determine the drawing information corresponding to the drawing medium node according to the detection request, determine the rendering status information of the target rendering event based on the drawing information, and feed it back to the logic thread. When the logic thread and the view thread perform rendering operations, the rendering information corresponding to the interactive node between the logic thread and the view thread can be supported, so that the logic thread can obtain the rendering status information to determine the rendering status of the node, so that reasonable optimization can be made in the case of rendering blank.

[0135] The above is a schematic scheme of a rendering detection method of this embodiment. It should be noted that the technical scheme of the rendering detection method and the technical scheme of the rendering detection system described above are of the same concept, and the details not described in detail in the technical scheme of the rendering detection method can be referred to the description of the technical scheme of the rendering detection system described above.

[0136] Corresponding to the above method embodiment, this specification also provides a rendering detection device embodiment, Figure 5 FIG. 2 shows a schematic diagram of a rendering detection device provided by an embodiment of the present specification. Figure 5 As shown, the device is applied to a client, a target program is run on the client, and the target program executes a target rendering event through a logic thread and a view thread, including:

[0137] A node creation module 502 is configured to create a drawing medium node on the view thread in response to a rendering instruction submitted by the logic thread for the target rendering event, and feed back node information corresponding to the drawing medium node to the logic thread;

[0138] The sending instruction module 504 is configured to send the element drawing instruction associated with the target rendering event to the view thread through the logic thread when it is determined that the drawing medium node meets the drawing condition based on the node information;

[0139] A sending request module 506 is configured to send a detection request to the view thread through the logic thread when the view thread draws a target element on the drawing medium node in response to the element drawing instruction;

[0140] An information determination module 508 is configured to determine, through the view thread, drawing information corresponding to the drawing medium node according to the detection request, and determine rendering state information of the target rendering event based on the drawing information;

[0141] The display page module 510 is configured to execute the rendering task corresponding to the target rendering event based on the rendering state information, and generate and display the target page corresponding to the target program according to the task execution result.

[0142] The above is a schematic scheme of a rendering detection device of this embodiment. It should be noted that the technical scheme of the rendering detection device and the technical scheme of the rendering detection method described above are of the same concept, and the details not described in detail in the technical scheme of the rendering detection device can be referred to the description of the technical scheme of the rendering detection method described above.

[0143] Figure 6 The block diagram of a computing device 600 according to an embodiment of the present specification is shown. The components of the computing device 600 include but are not limited to a memory 610 and a processor 620. The processor 620 is connected to the memory 610 via a bus 630, and the database 650 is used to store data.

[0144] The computing device 600 also includes an access device 640 that enables the computing device 600 to communicate via one or more networks 660. Examples of these networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet. The access device 640 may include one or more of any type of network interface (e.g., a network interface card (NIC)) that is wired or wireless, such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a world-wide interoperability for microwave access (Wi-MAX) interface, an Ethernet interface, a universal serial bus (USB) interface, a cellular network interface, a Bluetooth interface, and a near field communication (NFC).

[0145] In one embodiment of the present specification, the above components of the computing device 600 and Figure 6 Other components not shown in the figure may also be connected to each other, for example, via a bus. It should be understood that Figure 6 The computing device structure block diagram shown is only for the purpose of illustration, and is not intended to limit the scope of this specification. Those skilled in the art can add or replace other components as needed.

[0146] The computing device 600 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook, etc.), a mobile phone (e.g., a smart phone), a wearable computing device (e.g., a smart watch, smart glasses, etc.), or other types of mobile devices, or a stationary computing device such as a desktop computer or a personal computer (PC). The computing device 600 may also be a mobile or stationary server.

[0147] The processor 620 is used to execute the following computer executable instructions, which implement the steps of the above rendering detection method when executed by the processor.

[0148] The above is a schematic scheme of a computing device of this embodiment. It should be noted that the technical scheme of the computing device and the technical scheme of the above rendering detection method belong to the same concept, and the details not described in detail in the technical scheme of the computing device can be referred to the description of the technical scheme of the above rendering detection method.

[0149] An embodiment of the present specification further provides a computer-readable storage medium storing computer-executable instructions, which can implement the steps of the above-mentioned rendering detection method when executed by a processor.

[0150] The above is a schematic scheme of a computer-readable storage medium of this embodiment. It should be noted that the technical scheme of the storage medium and the technical scheme of the above rendering detection method belong to the same concept, and the details not described in detail in the technical scheme of the storage medium can be referred to the description of the technical scheme of the above rendering detection method.

[0151] An embodiment of the present specification further provides a computer program product, including a computer program or instructions, which implement the steps of the above rendering detection method when executed by a processor.

[0152] The above is a schematic solution of a computer program product of this embodiment. It should be noted that the technical solution of the computer program product and the technical solution of the above rendering detection method belong to the same concept, and the details not described in detail in the technical solution of the computer program product can be referred to the description of the technical solution of the above rendering detection method.

[0153] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0154] The computer instructions include computer program codes, which may be in source code form, object code form, executable files or some intermediate forms, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer-readable medium may be appropriately increased or decreased according to the requirements of patent practice. For example, in some regions, according to patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.

[0155] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the embodiments of this specification are not limited by the order of the actions described, because according to the embodiments of this specification, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the embodiments of this specification.

[0156] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0157] The preferred embodiments of this specification disclosed above are only used to help explain this specification. The optional embodiments do not describe all the details in detail, nor do they limit the invention to the specific implementation methods described. Obviously, many modifications and changes can be made according to the content of the embodiments of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the embodiments of this specification, so that technicians in the relevant technical field can understand and use this specification well.

Claims

1. A rendering detection system, characterized in that: The rendering detection system includes a logic thread and a view thread, including: The view thread creates a drawing medium node in response to a rendering instruction submitted by the logic thread for a target rendering event, and feeds back node information corresponding to the drawing medium node to the logic thread; The logic thread, when determining based on the node information that the drawing medium node satisfies the drawing condition, sends the element drawing instruction associated with the target rendering event to the view thread; when the view thread draws the target element on the drawing medium node in response to the element drawing instruction, sends a detection request to the view thread; The view thread determines the drawing information corresponding to the drawing medium node according to the detection request, determines the rendering state information of the target rendering event based on the drawing information, and feeds back the information to the logic thread.

2. The rendering detection system according to claim 1, characterized in that: The logic thread initializes target page information associated with the target rendering event, and constructs a virtual medium node according to the initialization result; Constructing a rendering instruction based on the object data corresponding to the virtual medium node, and sending the rendering instruction to the view thread; The view thread extracts the object data from the rendering instruction and creates a drawing medium node according to the object data; Node information corresponding to the drawing medium node is extracted, and the node information is sent to the logic thread.

3. The rendering detection system according to claim 1, characterized in that: The logic thread parses the node information to obtain node existence information and node size information; When it is determined that the view thread has the drawing medium node according to the node existence information, detect whether the node size information meets a preset size threshold; if so, determine that the drawing medium node meets the drawing condition, and execute the step of sending the element drawing instruction associated with the target rendering event to the view thread.

4. The rendering detection system according to claim 1, characterized in that: The logic thread executes an element data initialization operation, constructs an element rendering instruction corresponding to the target rendering event according to the initialization result, and sends the element rendering instruction to the view thread; The view thread draws a target element on the drawing medium node in response to the element rendering instruction; The logic thread creates a detection request for detecting the drawing information in the drawing medium node based on a preset callback function, and sends the detection request to the view thread.

5. The rendering detection system according to claim 1, characterized in that: The view thread calls the access interface associated with the drawing medium node according to the detection request, collects pixel information for a specified area of ​​the drawing medium node, and determines the node coding information corresponding to the drawing medium node; and uses the collected target pixel information and the node coding information as drawing information.

6. The rendering detection system according to claim 5, characterized in that: The view thread traverses the target pixel information according to a preset traversal strategy, and determines target pixel values ​​corresponding to a plurality of target pixel points respectively according to the traversal result; Compare the target pixel value corresponding to each target pixel point with a preset pixel value threshold; When it is determined according to the comparison result that there is a target pixel point whose pixel value is greater than the preset pixel value threshold, determining the reference node encoding information corresponding to the drawing medium node in the node construction stage; The reference node encoding information is compared with the node encoding information, and the rendering state information of the target rendering event is determined according to the comparison result.

7. The rendering detection system according to claim 6, characterized in that: The logic thread obtains the reference node encoding information corresponding to the drawing medium node in the node construction phase according to a preset drawing medium conversion rule, and sends the reference node encoding information to the view thread.

8. The rendering detection system according to any one of claims 1 to 7, characterized in that: The logic thread receives the rendering status information; when the rendering status information is rendering success status information, sends a display instruction to the view thread; the view thread displays the target element on the target page corresponding to the target rendering event in response to the display instruction; or, The logic thread receives the rendering status information; when the rendering status information is rendering failure status information, triggers and executes an update rendering task for a target page corresponding to the target rendering event; or refreshes the target page corresponding to the target rendering event, and constructs a target rendering instruction according to the refresh result; The target rendering instruction is used as the rendering instruction associated with the target rendering event and is sent to the view thread.

9. A rendering detection method, characterized in that: Applied to a client, the target program is run on the client, and the target program executes a target rendering event through a logic thread and a view thread, including: In response to the rendering instruction submitted by the logic thread for the target rendering event, creating a drawing medium node on the view thread, and feeding back node information corresponding to the drawing medium node to the logic thread; When it is determined based on the node information that the drawing medium node meets the drawing condition, sending the element drawing instruction associated with the target rendering event to the view thread through the logic thread; When the view thread draws a target element on the drawing medium node in response to the element drawing instruction, sending a detection request to the view thread through the logic thread; Determining, by the view thread, drawing information corresponding to the drawing medium node according to the detection request, and determining rendering state information of the target rendering event based on the drawing information; The rendering task corresponding to the target rendering event is executed based on the rendering state information, and the target page corresponding to the target program is generated and displayed according to the task execution result.

10. A rendering detection device, characterized in that: Applied to a client, the target program is run on the client, and the target program executes a target rendering event through a logic thread and a view thread, including: A node creation module is configured to create a drawing medium node on the view thread in response to a rendering instruction submitted by the logic thread for the target rendering event, and feed back node information corresponding to the drawing medium node to the logic thread; a sending instruction module, configured to send an element drawing instruction associated with the target rendering event to the view thread through the logic thread when determining that the drawing medium node meets the drawing condition based on the node information; a sending request module, configured to send a detection request to the view thread through the logic thread when the view thread draws a target element on the drawing medium node in response to the element drawing instruction; an information determination module, configured to determine, through the view thread, drawing information corresponding to the drawing medium node according to the detection request, and determine rendering state information of the target rendering event based on the drawing information; The display page module is configured to execute the rendering task corresponding to the target rendering event based on the rendering state information, and generate and display the target page corresponding to the target program according to the task execution result.

11. A computing device, characterized in that: include: Memory and processor; The memory is used to store computer executable instructions, and the processor is used to execute the computer executable instructions. When the computer executable instructions are executed by the processor, the steps of the method according to claim 9 are implemented.

12. A computer-readable storage medium, characterized in that: It stores computer executable instructions, which implement the steps of the method according to claim 9 when executed by a processor.

13. A computer program product, characterized in that The method comprises a computer program or an instruction, which implements the steps of the method according to claim 9 when the computer program or the instruction is executed by a processor.