Canvas-based rock debris data visualization method and apparatus, and electronic device

Through the canvas-based rock cutting data visualization method, lithologic geological figures are automatically generated, which solves the problem of data update difficulty in traditional methods, and realizes dynamic update and efficient visualization of rock cutting data.

CN120339449APending Publication Date: 2025-07-18CHENGDU WEITAI SHUZHI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510403073.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-01
Publication Date
2025-07-18

AI Technical Summary

Technical Problem

Traditional cutting data visualization methods rely on manual intervention, and data updates are difficult and cannot quickly respond to cutting data changes.

Method used

The canvas-based visualization method of rock cutting data is used to obtain lithologic information in the rock cutting data drawing file, determine the lithologic geological figures, and automatically generate lithologic geological figures using a predefined drawing method to dynamically update the rock cutting data map.

Benefits of technology

It significantly reduces the difficulty of data update, realizes automatic update of cuttings data, and improves the efficiency of data updates and the real-time and accuracy of geological analysis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120339449A_ABST
    Figure CN120339449A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a canvas-based rock debris data visualization method and device and electronic equipment, and is used for reducing the difficulty of data updating. The method comprises the steps of obtaining a rock debris data drawing file, wherein the rock debris data drawing file comprises lithology information; determining a corresponding lithologic geological graph according to the lithologic information; obtaining a predefined drawing mode of the lithologic geological graph; graph drawing is carried out according to the drawing mode, and the lithologic geological graph is generated; and generating a rock debris data graph according to the lithologic geological graph.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the technical field of cuttings data visualization, and in particular, to a cuttings data visualization method, apparatus, and electronic device based on canvas. Background Art

[0002] In traditional geological exploration and drilling engineering, the visualization of cuttings data usually relies on manual drawing or static map generation. Specifically, geological engineers need to manually record lithologic information (such as rock type, mineral composition, grain size, etc.) based on the cuttings samples collected during the drilling process, and use drawing software (such as CorelDRAW, AutoCAD, or professional geological drawing tools) to produce lithologic columnar diagrams or cross-sectional diagrams.

[0003] The prior art is generally as follows: geological personnel need to manually sort out the cuttings description data and input it into a table or database; engineers need to manually select the corresponding lithologic symbols or filling styles by referring to industry standards or enterprise internal legend libraries; use drawing tools to draw each lithologic layer segment one by one; and finally, through manual integration, complete the drawing of the cuttings data map.

[0004] The traditional method relies on manual intervention. If the cuttings data changes (such as adding new samples or correcting lithologic descriptions), the entire map must be redrawn, and the difficulty of data update is very high. Summary of the Invention

[0005] The embodiments of the present application provide a cuttings data visualization method, apparatus, and electronic device based on canvas, which can reduce the difficulty of data update.

[0006] The first aspect of the embodiments of the present application provides a cuttings data visualization method based on canvas, including:

[0007] Obtain a cuttings data drawing file, where the cuttings data drawing file includes lithologic information;

[0008] Determine the corresponding lithologic geological graph according to the lithologic information;

[0009] Obtain the predefined drawing method of the lithologic geological graph;

[0010] Draw a graph according to the drawing method to generate the lithologic geological graph;

[0011] Generate a cuttings data map according to the lithologic geological graph.

[0012] Optionally, the drawing a graph according to the drawing method to generate the lithologic geological graph includes:

[0013] Determine the target basic geometric figure and combination method corresponding to the drawing method, where the target basic geometric figure includes at least one basic geometric figure, and the basic geometric figure includes a circle, a straight line, a diverse curve, a custom polygon, an arc ellipse, text, and an isosceles triangle;

[0014] Obtain the attribute values of the target basic geometric figure from the cuttings data drawing file;

[0015] Call the generation method corresponding to the target basic geometric figure according to the attribute values to generate the target basic geometric figure;

[0016] Combine the target basic geometric figures according to the combination method to generate the lithological geological figure.

[0017] Optionally, when the target basic geometric figure includes a circle, the calling of the generation method corresponding to the target basic geometric figure according to the attribute values includes:

[0018] Determine the coordinates, diameter, border color, and fill color according to the attribute values, where the coordinates are the coordinates relative to the upper left corner of the canvas;

[0019] Call a predefined circle function for graphic generation according to the determined coordinates, diameter, border color, and fill color.

[0020] Optionally, when the target basic geometric figure includes a straight line, the calling of the generation method corresponding to the target basic geometric figure according to the attribute values includes:

[0021] Determine the coordinates, width, height, and fill color according to the attribute values, where the coordinates are the coordinates relative to the upper left corner of the canvas;

[0022] Call a predefined straight line function for graphic generation according to the determined coordinates, width, height, and fill color.

[0023] Optionally, when the target basic geometric figure includes a diverse curve, the calling of the generation method corresponding to the target basic geometric figure according to the attribute values includes:

[0024] Determine multiple coordinates and fill color according to the attribute values, where the multiple coordinates are the coordinates relative to the upper left corner of the canvas;

[0025] Call a predefined diverse curve function for graphic generation according to the determined multiple coordinates and fill color.

[0026] Optionally, when the target basic geometric figure includes a custom polygon, the calling of the generation method corresponding to the target basic geometric figure according to the attribute values includes:

[0027] Determine a coordinate array, a border color, and a fill color according to the attribute values, where the coordinate array includes at least three coordinates, and the coordinates are coordinates relative to the upper left corner of the canvas;

[0028] Call a predefined custom polygon function to generate a graphic according to the determined coordinate array, border color, and fill color.

[0029] Optionally, when the target basic geometric figure includes an arc ellipse, the calling of the generation method corresponding to the target basic geometric figure according to the attribute values includes:

[0030] Determine coordinates, a horizontal diameter, a vertical diameter, a start angle, a scan angle, a rotation angle, a border color, and a fill color according to the attribute values, where the coordinates are coordinates relative to the upper left corner of the canvas;

[0031] Call a predefined arc ellipse function to generate a graphic according to the determined coordinates, horizontal diameter, vertical diameter, start angle, scan angle, rotation angle, border color, and fill color.

[0032] A second aspect of the embodiments of the present application provides a cuttings data visualization device based on canvas, including:

[0033] A first acquisition unit for acquiring a cuttings data drawing file, where the cuttings data drawing file includes lithology information;

[0034] A determination unit for determining a corresponding lithology geological figure according to the lithology information;

[0035] A second acquisition unit for acquiring a predefined drawing method of the lithology geological figure;

[0036] A drawing unit for drawing a graphic according to the drawing method to generate the lithology geological figure;

[0037] A generation unit for generating a cuttings data map according to the lithology geological figure.

[0038] Optionally, the drawing unit includes:

[0039] A determination module for determining a target basic geometric figure and a combination method corresponding to the drawing method, where the target basic geometric figure includes at least one basic geometric figure, and the basic geometric figures include a circle, a straight line, a diverse curve, a custom polygon, an arc ellipse, text, and an isosceles triangle;

[0040] An acquisition module for acquiring attribute values of the target basic geometric figure from the cuttings data drawing file;

[0041] A first generation module, configured to call the generation method corresponding to the target basic geometric figure according to the attribute value to generate the target basic geometric figure;

[0042] A second generation module, configured to combine the target basic geometric figures according to the combination method to generate the lithological geological figure.

[0043] Optionally, when the target basic geometric figure includes a circle, the first generation module is specifically configured to:

[0044] Determine coordinates, a diameter, a border color, and a fill color according to the attribute value, where the coordinates are coordinates relative to the upper left corner of the canvas;

[0045] Call a predefined circle function for figure generation according to the determined coordinates, diameter, border color, and fill color.

[0046] Optionally, when the target basic geometric figure includes a straight line, the first generation module is specifically configured to:

[0047] Determine coordinates, a width, a height, and a fill color according to the attribute value, where the coordinates are coordinates relative to the upper left corner of the canvas;

[0048] Call a predefined straight line function for figure generation according to the determined coordinates, width, height, and fill color.

[0049] Optionally, when the target basic geometric figure includes a variety of curves, the first generation module is specifically configured to:

[0050] Determine a plurality of coordinates and a fill color according to the attribute value, where the plurality of coordinates are coordinates relative to the upper left corner of the canvas;

[0051] Call a predefined variety of curve function for figure generation according to the determined plurality of coordinates and fill color.

[0052] Optionally, when the target basic geometric figure includes a custom polygon, the first generation module is specifically configured to:

[0053] Determine a coordinate array, a border color, and a fill color according to the attribute value, where the coordinate array includes at least three coordinates, and the coordinates are coordinates relative to the upper left corner of the canvas;

[0054] Call a predefined custom polygon function for figure generation according to the determined coordinate array, border color, and fill color.

[0055] Optionally, when the target basic geometric figure includes an arc ellipse, the first generation module is specifically configured to:

[0056] Determine the coordinates, horizontal diameter, vertical diameter, starting angle, scanning angle, rotation angle, border color, and filling color according to the attribute values, where the coordinates are the coordinates relative to the upper left corner of the canvas;

[0057] Call a predefined arc-ellipse function to generate a graph according to the determined coordinates, horizontal diameter, vertical diameter, starting angle, scanning angle, rotation angle, border color, and filling color.

[0058] A third aspect of the embodiments of the present application provides an electronic device, including:

[0059] A processor, a memory, an input-output unit, and a bus;

[0060] The processor is connected to the memory, the input-output unit, and the bus;

[0061] A program is stored in the memory, and the processor calls the program to execute the method in the first aspect and any possible implementation manner of the first aspect.

[0062] A fourth aspect of the embodiments of the present application provides a computer-readable storage medium, on which a program is stored, and when the program is executed on a computer, the computer is caused to execute the method in the first aspect and any possible implementation manner of the first aspect.

[0063] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:

[0064] The embodiments of the present application can dynamically generate cuttings data graphs, significantly reducing the difficulty of data update. When the cuttings data changes, only the original data file needs to be updated, and the server can automatically re-execute the drawing process to quickly generate the latest graph without manual intervention, thus reducing the difficulty of data update. Description of the Drawings

[0065] Figure 1 It is a schematic flowchart of an embodiment of a cuttings data visualization method based on canvas in the embodiments of the present application;

[0066] Figure 2 It is a schematic flowchart of an embodiment of generating a lithologic geological graph in the embodiments of the present application;

[0067] Figure 3 It is a schematic structural diagram of an embodiment of a cuttings data visualization device based on canvas in the embodiments of the present application;

[0068] Figure 4 It is a schematic structural diagram of an embodiment of an electronic device in the embodiments of the present application. Detailed Embodiments

[0069] The embodiments of the present application provide a method, device, and electronic device for visualizing cuttings data based on canvas, which are used to reduce the difficulty of data update.

[0070] The method of the present application can be applied to servers, terminals, or other devices with logical processing capabilities, and the present application does not limit this. For the convenience of description, the following will describe taking the server as the execution subject as an example.

[0071] The following will describe the embodiments in the present application in conjunction with the accompanying drawings.

[0072] Please refer to Figure 1 , one embodiment of the method for visualizing cuttings data based on canvas in the embodiments of the present application includes:

[0073] 101. Obtain a cuttings data drawing file, where the cuttings data drawing file includes lithology information;

[0074] The server first obtains the cuttings data drawing file from the database or file system. This file contains the lithology information of the cuttings samples collected during the drilling process, such as rock type, mineral composition, color, grain size, etc. These data are usually stored in a structured format (such as JSON, CSV, or database table), and the server extracts the required information through data interfaces or file reading technologies to provide basic data support for subsequent graph generation.

[0075] 102. Determine the corresponding lithological geological graph according to the lithology information;

[0076] The server parses the lithology information and matches the corresponding lithological geological graph template according to the preset lithology classification rules. For example, sandstone may correspond to a specific texture pattern, and shale may be represented by another filling style. The server queries the lithology-graph mapping table to ensure that each lithology can be accurately associated with a standardized geological symbol or graphical representation, providing a basis for subsequent drawing.

[0077] 103. Obtain the drawing method of the predefined lithological geological graph;

[0078] The server loads the predefined drawing method of the lithological geological graph from the configuration file, including parameters such as the shape, color, texture, and scale of the graph. These definitions may be based on industry standards (such as geological legend specifications) or user-defined rules to ensure that the generated graph is both scientific and meets actual needs. The server determines how to convert the lithology information into visual elements by reading these rules.

[0079] 104. Draw the graph according to the drawing method to generate a lithological geological graph;

[0080] The server uses the graphics rendering engine Canvas to convert lithology information into graphics according to the drawing method. For example, corresponding patterns or colors are filled according to the lithology type, and the graphics are arranged according to depth or position information. This step may involve dynamically generating vector graphics or bitmaps, and finally forming a lithology geological graphic file that can be embedded in a web page or downloaded.

[0081] 105. Generate a cuttings data map based on the lithology geological graphic.

[0082] The server combines the generated lithology geological graphic with other geological data (such as depth scale, wellbore trajectory) to integrate a complete cuttings data map. This map may be output in the form of an interactive chart or a static picture, supporting users to view the lithology distribution at different depths. The server can also store or push the results to the front end for further use by geological analysts.

[0083] In this embodiment, the server can dynamically generate a cuttings data map, significantly reducing the difficulty of data update. When the cuttings data changes, only the original data file needs to be updated, and the server can automatically re - execute the drawing process to quickly generate the latest graphics without manual intervention. This dynamic processing not only improves efficiency but also ensures the real - time and accuracy of geological analysis, providing efficient visualization support for oil and gas exploration or geological research.

[0084] Please refer to Figure 2 , in some embodiments of the present application, step 104 in the above - mentioned embodiment performs graphic drawing according to the drawing method to generate a lithology geological graphic, which may include the following steps:

[0085] 201. Determine the target basic geometric graphics and combination methods corresponding to the drawing method. The target basic geometric graphics include at least one basic geometric graphic, where the basic geometric graphics include circles, straight lines, diverse curves, custom polygons, arc - ellipses, text, and isosceles triangles;

[0086] The server parses the predefined drawing method to determine which basic geometric graphics (such as circles, straight lines, diverse curves, custom polygons, etc.) are required for the current lithology information and their combination methods (such as superposition, splicing, filling, etc.). For example, shale may be represented by the superposition of multiple wavy lines, while sandstone may be represented by dotted - filled circles. This step ensures clear underlying logic for graphic generation and provides clear instructions for subsequent specific drawing.

[0087] 202. Obtain the attribute values of the target basic geometric graphics from the cuttings data drawing file;

[0088] The server extracts the attribute values related to the target basic geometric figures from the cuttings data, such as the radius of a circle, the length and angle of a straight line, the vertex coordinates of a polygon, the font size of text, etc. These attribute values may directly come from lithological descriptions (such as the grain size determines the radius of a circle), or be obtained through rule calculations (such as color coding mapped to RGB values). The accurate extraction of data is the key to the accurate rendering of the graphics.

[0089] 203. Call the generation method corresponding to the target basic geometric figure according to the attribute value to generate the target basic geometric figure;

[0090] The server calls a graphics library (such as D3.js, OpenGL or a custom rendering tool) according to the attribute value to generate a single basic geometric figure. For example, generate a circle through the center coordinates and radius, or draw a polygon according to the vertex list. This step may involve dynamic parameter adjustment (such as the scaling ratio to adapt to different depth layers) to ensure the proportion coordination of the graphics in the overall map.

[0091] 204. Combine the target basic geometric figures according to the combination method to generate the lithological geological figure.

[0092] According to the preset combination method (such as layered filling, grid arrangement or topological connection), the server integrates the generated basic geometric figures into a complete lithological geological figure. For example, combine multiple isosceles triangles into a "fish scale shape" to represent schist, or label the lithological code with a text label. The combination process needs to follow the geological legend specification and also support dynamic adjustment (such as rotation, transparency processing), and finally output a standardized graphic unit that can be embedded in the cuttings data map.

[0093] In this embodiment, the server realizes the modular and automated construction of the lithological geological figure. The flexible combination of basic geometric figures not only meets the diverse expression needs of complex lithologies, but also improves the efficiency and maintainability of graphic generation. When the lithological data or drawing standards are updated, only the attributes or combination rules of the basic figures need to be adjusted to quickly adapt to the new requirements, further strengthening the dynamic generation ability and providing real-time and accurate visualization support for geological analysis.

[0094] Among them, when step 203 in the above embodiment calls the generation method corresponding to the target basic geometric figure according to the attribute value, when the target basic geometric figure includes a circle, the attribute values may include coordinates, diameter, border color and filling color. The coordinates are the coordinates relative to the upper left corner of the canvas (the coordinates described below are all relative to the upper left corner of the canvas, and will not be repeated later). At this time, the server can locate according to the coordinates, then draw a circle according to the diameter, and set the color of the circle according to the border color and filling color.

[0095] When the target basic geometric figure includes a straight line, the attribute values can include coordinates, width, height, and fill color. At this time, the server can locate according to the coordinates, and then draw the straight line according to the width and height. Starting from the coordinates, it extends along the X-axis according to the width and along the Y-axis according to the height. Then, the color of the straight line is set according to the fill color.

[0096] When the target basic geometric figure includes diverse curves, the attribute values can include multiple coordinates and fill color. At this time, the server can call the canvas method lineTo(x, y) to draw the broken line between multiple coordinates, and then use the Catmull-Rom spline interpolation formula to calculate the x and y coordinates for curve drawing to make the curve smooth. Finally, the color of the diverse curve is set according to the fill color.

[0097] When the target basic geometric figure includes a custom polygon, the attribute values can include an array of coordinates, border color, and fill color. The array of coordinates includes at least three coordinates. At this time, the server can call the beginPath() method of the canvas to indicate the start of path drawing, and then call lineTo(x coordinate, y coordinate) of the canvas to draw the lines in sequence, and then call closePath() of the canvas to indicate the end of path drawing to form a closed loop, thus completing the drawing of the custom polygon. Finally, the color of the custom polygon is set according to the border color and fill color.

[0098] When the target basic geometric figure includes an arc ellipse, the attribute values can include coordinates, horizontal diameter, vertical diameter, start angle, sweep angle, rotation angle, border color, and fill color. At this time, the server can convert the angle to radians (such as formula 1), and calculate the center point (such as formula 2). If the rotation angle is not equal to 0, it calls translate(center point x, center point y) of the canvas for translation, and then calls rotate(rotate) for rotation. Then, it calls beginPath of the canvas to start drawing the path, and calls ellipse(center point x, center point y, horizontal diameter / 2, vertical diameter / 2, 0, start radian, start radian + sweep radian, false) of the canvas to draw the arc. Finally, the color of the arc ellipse is set according to the border color and fill color.

[0099]

[0100] Among them, StartRad is the start radian, is the start angle, sweepRad is the sweep radian, and sweepAngle is the sweep radian.

[0101]

[0102] Among them, centerX is the x - coordinate of the center point, centerY is the y - coordinate of the center point, width is the horizontal diameter, and height is the vertical diameter.

[0103] When the target basic geometric figure includes text, the attribute values can include coordinates, horizontal diameter, vertical diameter, text to be drawn, rotation angle, text size, and text color. At this time, the server can call the canvas.translate() method of the canvas to translate the pen to the center point of the text, then call the canvas.rotate() method to adjust the text, then call the canvas.beginPath() method to start drawing the trajectory path, call the canvas.font() method to set the text size, call the canvas.fillStyle() method to set the text color, and call the canvas.fillText() method to fill the text, thus completing the drawing of the text.

[0104] When the target basic geometric figure includes an isosceles triangle, the attribute values can include coordinates, the base length of the triangle, border color, background color, and rotation angle.

[0105] At this time, the server can calculate the coordinates of the three vertices based on the coordinates and the base length of the triangle, and calculate the coordinates of the center point. Among them, the coordinates of vertex 1 are the coordinates in the attribute values, the coordinates of vertex 2 are (x - size / 2, y + size), the coordinates of vertex 3 are (x + size / 2, y + size), and the coordinates of the center point are (x, y + 2*size / 3). x is the x - coordinate of the coordinates in the attribute values, y is the y - coordinate in the attribute values, and size is the base length of the triangle. Then the server can determine whether there is rotation based on whether there is a rotation angle in the attribute values. If not, it proceeds to the next step. If so, it converts the rotation angle to radians (calculated according to formula 3), and then calculates the new coordinates of vertex 1 (calculated according to formula 4). The coordinates of vertices 2 and 3 also need to be recalculated, and the calculation method is similar to that of vertex 1, which will not be elaborated here. After that, the server can call the beginPath() method of the canvas to start drawing the graphic path, call the moveTo(x - coordinate of vertex 1, y - coordinate of vertex 1) of the canvas to move the pen to the vertex, call the lineTo(x - coordinate of vertex 2, y - coordinate of vertex 2) of the canva to draw a line, call the lineTo(x - coordinate of vertex 3, y - coordinate of vertex 3) of the canva to draw a line, and call the closePath() of the canvas to close the path drawing, thus completing the drawing of the isosceles triangle. Finally, the server can set the color of the isosceles triangle according to the border color and fill color.

[0106]

[0107] Among them, θ rad represents the converted radian, and θ represents the rotation angle.

[0108] x' = cos(θ rad ) × (x - cx) - sin(θ rad ) × (y - cy) + cx

[0109] y' = sin(θ rad ) × (x - cx) + cos(θ rad ) × (y - cy) + cy

[0110] Formula 4

[0111] Among them, (x', y') represents the new coordinates; cx and cy represent the coordinates of the center point; x and y are the original coordinates.

[0112] Please refer to Figure 3 , an embodiment of the cuttings data visualization device based on canvas in the embodiments of the present application includes:

[0113] The first acquisition unit 301 is used to acquire a cuttings data drawing file, and the cuttings data drawing file includes lithology information;

[0114] The determination unit 302 is used to determine the corresponding lithological geological graph according to the lithology information;

[0115] The second acquisition unit 303 is used to acquire the drawing method of the predefined lithological geological graph;

[0116] The drawing unit 304 is used to draw a graph according to the drawing method to generate a lithological geological graph;

[0117] The generation unit 305 is used to generate a cuttings data graph according to the lithological geological graph.

[0118] In this embodiment, the server can dynamically generate a cuttings data graph, significantly reducing the difficulty of data update. When the cuttings data changes, only the original data file needs to be updated, and the server can automatically re - execute the drawing process to quickly generate the latest graph without manual intervention. This dynamic processing not only improves efficiency but also ensures the real - time and accuracy of geological analysis, providing efficient visualization support for oil and gas exploration or geological research.

[0119] Optionally, the drawing unit 304 includes:

[0120] A determination module, configured to determine a target basic geometric figure and a combination method corresponding to a drawing method, where the target basic geometric figure includes at least one basic geometric figure, and the basic geometric figure includes a circle, a straight line, a diverse curve, a custom polygon, an arc ellipse, text, and an isosceles triangle;

[0121] An acquisition module, configured to acquire the attribute values of the target basic geometric figure from a cuttings data drawing file;

[0122] A first generation module, configured to call a generation method corresponding to the target basic geometric figure according to the attribute values to generate the target basic geometric figure;

[0123] A second generation module, configured to combine the target basic geometric figures according to the combination method to generate a lithological geological figure.

[0124] Optionally, when the target basic geometric figure includes a circle, the first generation module is specifically configured to:

[0125] Determine coordinates, a diameter, a border color, and a fill color according to the attribute values, where the coordinates are the coordinates relative to the upper left corner of the canvas;

[0126] Call a predefined circle function to generate a figure according to the determined coordinates, diameter, border color, and fill color.

[0127] Optionally, when the target basic geometric figure includes a straight line, the first generation module is specifically configured to:

[0128] Determine coordinates, a width, a height, and a fill color according to the attribute values, where the coordinates are the coordinates relative to the upper left corner of the canvas;

[0129] Call a predefined straight line function to generate a figure according to the determined coordinates, width, height, and fill color.

[0130] Optionally, when the target basic geometric figure includes a diverse curve, the first generation module is specifically configured to:

[0131] Determine multiple coordinates and a fill color according to the attribute values, where the multiple coordinates are the coordinates relative to the upper left corner of the canvas;

[0132] Call a predefined diverse curve function to generate a figure according to the determined multiple coordinates and fill color.

[0133] Optionally, when the target basic geometric figure includes a custom polygon, the first generation module is specifically configured to:

[0134] Determine a coordinate array, a border color, and a fill color according to the attribute values, where the coordinate array includes at least three coordinates, and the coordinates are the coordinates relative to the upper left corner of the canvas;

[0135] A predefined custom polygon function is called for graphic generation according to the determined coordinate array, border color, and fill color.

[0136] Optionally, when the target basic geometric figure includes an arc ellipse, the first generation module is specifically configured to:

[0137] Determine coordinates, horizontal diameter, vertical diameter, starting angle, scanning angle, rotation angle, border color, and fill color according to the attribute values. The coordinates are relative to the upper left corner of the canvas.

[0138] A predefined arc ellipse function is called for graphic generation according to the determined coordinates, horizontal diameter, vertical diameter, starting angle, scanning angle, rotation angle, border color, and fill color.

[0139] In this embodiment, the functions of each unit and module correspond to the steps in the foregoing Figures 1 to 2 illustrated embodiment and will not be elaborated herein.

[0140] Please refer to Figure 4 , an embodiment of the electronic device in the embodiment of the present application includes:

[0141] A processor 401, a memory 402, an input / output unit 403, and a bus 404;

[0142] The processor 401 is connected to the memory 402, the input / output unit 403, and the bus 404;

[0143] A program is stored on the memory 402, and the processor 401 calls the program to execute Figures 1 to 2 the steps in the illustrated embodiment.

[0144] In this embodiment, the function of the processor 401 corresponds to the steps in the foregoing Figures 1 to 2 illustrated embodiment and will not be elaborated herein.

[0145] The embodiment of the present application further provides a computer-readable storage medium on which a program is stored. When the program is executed on a computer, the computer is caused to execute the method in any one of the foregoing Figures 1 to 2 possible implementation manners.

[0146] Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the above-described systems, devices, and units can refer to the corresponding processes in the foregoing method embodiments and will not be elaborated herein.

[0147] In several embodiments provided by the present application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections to each other can be through some interfaces, and the indirect couplings or communication connections of the devices or units can be in electrical, mechanical, or other forms.

[0148] The units described as separate components may or may not be physically separated. The components displayed as units may or may not be physical units, that is, they can be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0149] In addition, the functional units in each embodiment of the present application can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.

[0150] If the above-mentioned integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in each embodiment of the present application. The foregoing storage medium includes: USB flash drives, mobile hard disks, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical discs and other various media that can store program codes.

Claims

1. A visualization method for cuttings data based on canvas, characterized in that Including: Obtain a cuttings data drawing file, the cuttings data drawing file including lithology information; Determine a corresponding lithological geological graph according to the lithology information; Obtain a predefined drawing method for the lithological geological graph; Perform graph drawing according to the drawing method to generate the lithological geological graph; Generate a cuttings data graph according to the lithological geological graph.

2. The method according to claim 1, wherein The performing graph drawing according to the drawing method to generate the lithological geological graph includes: Determine a target basic geometric graph and a combination method corresponding to the drawing method, the target basic geometric graph including at least one basic geometric graph, wherein the basic geometric graph includes a circle, a straight line, a diverse curve, a custom polygon, an arc ellipse, text, and an isosceles triangle; Obtain an attribute value of the target basic geometric graph from the cuttings data drawing file; Call a generation method corresponding to the target basic geometric graph according to the attribute value to generate the target basic geometric graph; Combine the target basic geometric graphs according to the combination method to generate the lithological geological graph.

3. The method according to claim 2, wherein When the target basic geometric graph includes a circle, the calling a generation method corresponding to the target basic geometric graph according to the attribute value includes: Determine coordinates, a diameter, a border color, and a fill color according to the attribute value, the coordinates being coordinates relative to the upper left corner of the canvas; Call a predefined circle function for graph generation according to the determined coordinates, diameter, border color, and fill color.

4. The method according to claim 2, wherein When the target basic geometric graph includes a straight line, the calling a generation method corresponding to the target basic geometric graph according to the attribute value includes: Determine coordinates, a width, a height, and a fill color according to the attribute value, the coordinates being coordinates relative to the upper left corner of the canvas; Call a predefined straight line function for graph generation according to the determined coordinates, width, height, and fill color.

5. The method according to claim 2, characterized in that When the target basic geometric graph includes a diverse curve, the calling a generation method corresponding to the target basic geometric graph according to the attribute value includes: Determine multiple coordinates and a fill color according to the attribute value, the multiple coordinates being coordinates relative to the upper left corner of the canvas; Call a predefined diverse curve function for graph generation according to the determined multiple coordinates and fill color.

6. The method according to claim 2, characterized in that, When the target basic geometric graph includes a custom polygon, the calling a generation method corresponding to the target basic geometric graph according to the attribute value includes: Determine a coordinate array, a border color, and a fill color according to the attribute value, the coordinate array including at least three coordinates, the coordinates being coordinates relative to the upper left corner of the canvas; Call a predefined custom polygon function for graph generation according to the determined coordinate array, border color, and fill color.

7. The method according to claim 2, wherein When the target basic geometric graph includes an arc ellipse, the calling a generation method corresponding to the target basic geometric graph according to the attribute value includes: Determine coordinates, a horizontal diameter, a vertical diameter, a start angle, a sweep angle, a rotation angle, a border color, and a fill color according to the attribute value, the coordinates being coordinates relative to the upper left corner of the canvas; Call a predefined arc ellipse function for graphic generation according to the determined coordinates, horizontal diameter, vertical diameter, starting angle, scanning angle, rotation angle, border color, and filling color.

8. A cuttings data visualization device based on canvas, characterized in that Including: A first acquisition unit for acquiring a cuttings data drawing file, where the cuttings data drawing file includes lithology information; A determination unit for determining a corresponding lithological geological graphic according to the lithology information; A second acquisition unit for acquiring a predefined drawing method of the lithological geological graphic; A drawing unit for performing graphic drawing according to the drawing method to generate the lithological geological graphic; A generation unit for generating a cuttings data map according to the lithological geological graphic.

9. An electronic device, characterized in that, Including: A processor, a memory, an input / output unit, and a bus; The processor is connected to the memory, the input / output unit, and the bus; The memory stores a program, and the processor calls the program to execute the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, where a program is stored on the computer-readable storage medium, and when the program is executed on a computer, the computer is caused to execute the method according to any one of claims 1 to 7.