CN113398575B - Thermodynamic diagram generation method and device, computer readable medium and electronic equipment - Google Patents

Thermodynamic diagram generation method and device, computer readable medium and electronic equipment Download PDF

Info

Publication number
CN113398575B
CN113398575B CN202011216824.4A CN202011216824A CN113398575B CN 113398575 B CN113398575 B CN 113398575B CN 202011216824 A CN202011216824 A CN 202011216824A CN 113398575 B CN113398575 B CN 113398575B
Authority
CN
China
Prior art keywords
triangles
sub
subdivision
thermodynamic diagram
initial
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011216824.4A
Other languages
Chinese (zh)
Other versions
CN113398575A (en
Inventor
王超
高文
管旭东
方亮
曹文升
荆彦青
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202011216824.4A priority Critical patent/CN113398575B/en
Publication of CN113398575A publication Critical patent/CN113398575A/en
Application granted granted Critical
Publication of CN113398575B publication Critical patent/CN113398575B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/50Controlling the output signals based on the game progress
    • A63F13/52Controlling the output signals based on the game progress involving aspects of the displayed game scene
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/55Controlling game characters or game objects based on the game progress
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/40Filling a planar surface by adding surface attributes, e.g. colour or texture

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Image Generation (AREA)

Abstract

The embodiment of the application provides a thermodynamic diagram generation method and device, a computer readable medium and an electronic device. The thermodynamic diagram generation method comprises the following steps: acquiring coordinate data of a specified type in a virtual map, wherein the virtual map is a map corresponding to a virtual scene running in a terminal; performing triangulation processing based on the coordinate data to obtain a plurality of subdivision triangles; color filling is carried out on each subdivision triangle according to the vertex value of each subdivision triangle, and an initial thermodynamic diagram is generated according to each subdivision triangle after color filling; overlaying the initial thermodynamic diagram on the virtual map, and generating a thermodynamic diagram corresponding to the specified type. According to the technical scheme, thermodynamic diagrams can be generated under the condition of various types of coordinate data, so that the user can be facilitated to quickly locate various types of problems.

Description

Thermodynamic diagram generation method and device, computer readable medium and electronic equipment
Technical Field
The present application relates to the field of computer technologies, and in particular, to a thermodynamic diagram generation method, an apparatus, a computer-readable medium, and an electronic device.
Background
At present, the types of game applications are more and more, and when the game applications run, the performance condition of the game running on the client seriously affects the game experience of game players, and the good performance of the game client can bring better game experience for the game players, thereby increasing the stickiness of the game players to the game.
Therefore, the performance of a game running on a client is critical to the game running project set, whether in the development phase or the operation phase, and needs to be continuously concerned. In addition, data support can be provided for performance defect analysis and application improvement of the application by collecting performance data of the game client when the game application runs. However, the existing game client performance test method has the defects of long time consumption, low efficiency and the like.
Disclosure of Invention
The embodiment of the application provides a thermodynamic diagram generation method, a thermodynamic diagram generation device, a computer readable medium and electronic equipment, so that thermodynamic diagram generation under the condition of various types of coordinate data can be realized at least to a certain extent, and a user can be facilitated to quickly locate various types of problems.
Other features and advantages of the present application will be apparent from the following detailed description, or may be learned by practice of the application.
According to an aspect of an embodiment of the present application, there is provided a thermodynamic diagram generation method, including: acquiring coordinate data of a specified type in a virtual map, wherein the virtual map is a map corresponding to a virtual scene running in a terminal; performing triangulation processing based on the coordinate data to obtain a plurality of subdivision triangles; color filling is carried out on each subdivision triangle according to the vertex value of each subdivision triangle, and an initial thermodynamic diagram is generated according to each subdivision triangle after color filling; overlaying the initial thermodynamic diagrams on the virtual map, and generating the thermodynamic diagrams corresponding to the specified types.
According to an aspect of an embodiment of the present application, there is provided a thermodynamic diagram generation apparatus including: the terminal comprises an acquisition unit, a processing unit and a display unit, wherein the acquisition unit is configured to acquire coordinate data of a specified type in a virtual map, and the virtual map is a map corresponding to a virtual scene running in the terminal; the subdivision unit is configured to perform triangulation processing based on the coordinate data to obtain a plurality of subdivision triangles; the filling unit is configured to perform color filling on each subdivision triangle according to the vertex value of each subdivision triangle, and generate an initial thermodynamic diagram according to each subdivision triangle after the color filling; a generating unit configured to superimpose the initial thermodynamic diagram on the virtual map, generating a thermodynamic diagram corresponding to the specified type.
In some embodiments of the present application, based on the foregoing solution, the subdivision unit includes: a generating subunit configured to obtain a coordinate point set from the coordinate data, and generate an initial triangle including all coordinate points in the coordinate point set; a sub-triangle splitting unit configured to split the initial triangle by using the target coordinate points included in the initial triangle to obtain a plurality of sub-triangles, and update the number of sub-triangles included in the initial triangle by using the plurality of sub-triangles as new-added sub-triangles of the initial triangle to obtain a new initial triangle; the updating subunit is configured to continue subdivision processing and update the number of the sub-triangles included in the initial triangle based on the new initial triangle until all the coordinate points participate in subdivision processing; and the processing subunit is configured to take the sub-triangles included in the initial triangle obtained after all the coordinate points participate in the subdivision processing as the plurality of subdivision triangles.
In some embodiments of the present application, based on the foregoing solution, the subdivision subunit is configured to: determining a plurality of target triangles from the sub-triangles contained in the initial triangle, wherein the target triangles are triangles of which the circumscribed circles in the sub-triangles contain the target coordinate points; deleting common edges among the target triangles to obtain target polygons corresponding to the target triangles; and connecting the target coordinate points with each vertex of the target polygon to obtain the plurality of sub-triangles.
In some embodiments of the present application, based on the foregoing solution, the dividing unit is configured to: dividing the coordinate data according to a set time window to obtain a data set corresponding to each time window; and triangulating the data set corresponding to each time window to obtain a plurality of subdivision triangles corresponding to each time window.
In some embodiments of the application, based on the foregoing scheme, the initial thermodynamic diagram includes first thermodynamic diagrams corresponding to the respective time windows, and the generating unit is configured to: superposing the first thermodynamic diagrams corresponding to the time windows on the virtual map to generate second thermodynamic diagrams corresponding to the time windows; and generating thermodynamic diagrams corresponding to the specified types according to the second thermodynamic diagrams corresponding to the time windows.
In some embodiments of the present application, based on the foregoing solution, the apparatus further includes: the comparison unit is configured to compare the second thermodynamic diagrams corresponding to the time windows to obtain comparison results of the second thermodynamic diagrams corresponding to the time windows; and the first determination unit is configured to determine the thermodynamic variation trend of the thermodynamic diagram corresponding to the specified type according to the comparison result.
In some embodiments of the present application, based on the foregoing solution, the dividing unit is configured to: dividing the virtual map to obtain a plurality of sub-areas; and carrying out triangulation processing based on the coordinate data contained in each sub-region to obtain a plurality of subdivision triangles corresponding to each sub-region.
In some embodiments of the present application, based on the foregoing scheme, the initial thermodynamic diagram includes first thermodynamic diagrams corresponding to the respective sub-regions, and the generating unit is configured to: superposing the first thermodynamic diagrams corresponding to the sub-areas on the virtual map to generate second thermodynamic diagrams corresponding to the sub-areas; and generating thermodynamic diagrams corresponding to the specified types according to the second thermodynamic diagrams corresponding to the sub-regions.
In some embodiments of the present application, based on the foregoing solution, the apparatus further includes: the second determining unit is configured to determine the maximum coordinate data in the coordinate data contained in each sub-region according to the coordinate data contained in each sub-region; and the display unit is configured to display the maximum coordinate data on the second thermodynamic diagrams corresponding to the sub-areas.
In some embodiments of the present application, based on the foregoing scheme, the filling unit is configured to: determining a corresponding vertex value range according to the vertex values of the subdivision triangles; calculating a color channel value corresponding to the vertex value according to the vertex value, the vertex value range and a color channel value range corresponding to the vertex value range; and filling colors into the subdivision triangles based on the color channel values corresponding to the vertex values.
In some embodiments of the present application, based on the foregoing scheme, the generating unit is configured to: calculating to obtain the coordinates of each pixel point on the thermodynamic diagram corresponding to the specified type according to the coordinates of each pixel point on the initial thermodynamic diagram and the coordinates of each pixel point on the virtual map; and generating the thermodynamic diagram corresponding to the specified type according to the coordinates of each pixel point on the thermodynamic diagram corresponding to the specified type.
In some embodiments of the present application, based on the foregoing scheme, the coordinate data is reported by the terminal using a plurality of data threads, where the plurality of data threads include a data acquisition thread, a data collection thread, and a data sending thread; the data collection thread is used for collecting the coordinate data of the specified type and writing the coordinate data into a buffer area, the data collection thread is used for traversing the buffer area and sending the coordinate data of the specified type in the buffer area to the data sending thread, and the data sending thread is used for reporting the coordinate data of the specified type.
According to an aspect of embodiments of the present application, there is provided a computer-readable medium on which a computer program is stored, the computer program, when executed by a processor, implementing a method of generating a thermodynamic diagram as described in the above embodiments.
According to an aspect of an embodiment of the present application, there is provided an electronic device including: one or more processors; a storage device to store one or more programs that, when executed by the one or more processors, cause the one or more processors to implement the method of generating a thermodynamic diagram as described in the embodiments above.
According to an aspect of embodiments herein, there is provided a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The computer instructions are read by a processor of the computer device from a computer-readable storage medium, and the computer instructions are executed by the processor to cause the computer device to execute the thermodynamic diagram generation method provided in the various alternative embodiments described above.
In the technical solutions provided in some embodiments of the present application, coordinate data of a specified type in a virtual map corresponding to a virtual scene running in a terminal is obtained, triangulation is performed based on the coordinate data to obtain a plurality of subdivision triangles, after the plurality of subdivision triangles are obtained, color filling is performed on each subdivision triangle according to a vertex value of each subdivision triangle, an initial thermodynamic diagram is generated according to each subdivision triangle after the color filling, and the thermodynamic diagram corresponding to the specified type is generated by superimposing the initial thermodynamic diagram on the virtual map. Therefore, the technical scheme of the embodiment of the application realizes the generation of the thermodynamic diagrams corresponding to the specified types based on the coordinate data of the specified types in the virtual map, the flexible processing mode can be well suitable for the thermodynamic diagrams generation under various data types, the diversified requirements of users are met, meanwhile, the generated thermodynamic diagrams can help the users to quickly position and know the problems focused on, the problem positioning efficiency is improved, and the targeted optimization and the perfection are carried out.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application. It is obvious that the drawings in the following description are only some embodiments of the application, and that for a person skilled in the art, other drawings can be derived from them without inventive effort. In the drawings:
FIG. 1 is a diagram illustrating an exemplary system architecture to which aspects of embodiments of the present application may be applied;
FIG. 2 shows a flow diagram of a thermodynamic diagram generation method according to an embodiment of the present application;
FIG. 3 shows a schematic diagram of a lock-free message queue model according to one embodiment of the present application;
FIG. 4 shows a schematic diagram of a data acquisition process according to an embodiment of the present application;
FIG. 5 shows a schematic diagram of a data collection process according to an embodiment of the present application;
FIG. 6 shows a schematic diagram of a thermodynamic diagram after performing Gaussian smoothing, according to an embodiment of the present application;
FIG. 7 shows a schematic diagram of an initial thermodynamic diagram according to an embodiment of the present application;
FIG. 8 illustrates a schematic diagram of an initial thermodynamic diagram overlaid with a virtual map to generate a thermodynamic diagram corresponding to a specified type in accordance with an embodiment of the present application;
FIG. 9 shows a flow diagram of a triangulation process according to an embodiment of the application;
FIG. 10 shows a process diagram of a triangulation process according to an embodiment of the application;
FIG. 11 illustrates a data volume diagram of coordinate data according to one embodiment of the present application;
FIG. 12 shows a flow diagram of a triangulation process according to another embodiment of the present application;
FIG. 13 shows a schematic diagram of a thermodynamic diagram generation method according to an embodiment of the present application;
FIG. 14 shows a schematic diagram of a second thermodynamic diagram for each time window according to an embodiment of the application;
FIG. 15 shows a flow diagram of a triangulation process according to another embodiment of the application;
FIG. 16 illustrates a diagram of a virtual map partitioned into a plurality of sub-regions, according to an embodiment of the present application;
FIG. 17 shows a schematic diagram of a second thermodynamic diagram corresponding to a sub-region according to an embodiment of the present application;
FIG. 18 shows a schematic diagram showing maximum coordinate data, according to an embodiment of the present application;
FIG. 19 shows a detailed flowchart of step S230 according to an embodiment of the present application;
FIG. 20 shows a detailed flowchart of step S240 according to an embodiment of the present application;
FIG. 21 shows a logic diagram for a thermodynamic diagram generation method according to an embodiment of the present application;
FIG. 22 shows a block diagram of a thermodynamic diagram generation apparatus according to an embodiment of the present application;
FIG. 23 illustrates a schematic structural diagram of a computer system suitable for use in implementing the electronic device of an embodiment of the present application.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art.
Furthermore, the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the application. One skilled in the relevant art will recognize, however, that the embodiments of the present application can be practiced without one or more of the specific details, or with other methods, components, devices, steps, and so forth. In other instances, well-known methods, devices, implementations, or operations have not been shown or described in detail to avoid obscuring aspects of the application.
It is to be understood that the terminology used in the description and claims of the present application, and in the accompanying drawings described above, is for the purpose of describing the embodiments only, and is not intended to limit the scope of the present application. It will be further understood that the terms "comprises," "comprising," "includes," "including," "has," "having," and the like, when used herein, specify the presence of stated features, integers, steps, operations, elements, components, and/or groups thereof, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It will be further understood that, although the terms first, second, third, etc. may be used herein to describe various elements, these elements should not be limited by these terms. These terms are only used to distinguish one element from another. For example, a first element could be termed a second element without departing from the scope of the present invention. Similarly, a second element may be termed a first element. As used herein, the term "and/or" includes any and all combinations of one or more of the associated listed items.
The block diagrams shown in the figures are functional entities only and do not necessarily correspond to physically separate entities. I.e. these functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor means and/or microcontroller means.
The flow charts shown in the drawings are merely illustrative and do not necessarily include all of the contents and operations/steps, nor do they necessarily have to be performed in the order described. For example, some operations/steps may be decomposed, and some operations/steps may be combined or partially combined, so that the actual execution sequence may be changed according to the actual situation.
It should be understood that in the present application, "at least one" means one or more, "a plurality" means two or more.
Before further detailed description of the embodiments of the present application, terms and expressions referred to in the embodiments of the present application will be described, and the terms and expressions referred to in the embodiments of the present application will be explained below.
Thermodynamic diagram (Heatmap): the method is a visual expression mode aiming at the spatial situation and the distribution condition of a certain characteristic of a large number of data points in a certain area, namely, the position of a point in a graph is used for corresponding to the position of a geographic object, the numerical values of a certain element, characteristic and attribute of the geographic object are expressed through the influence factor of the point, linear stretching is carried out, and the size change characteristic of a third-dimensional data value is expressed on the corresponding spatial position of the geographic object.
Referring to fig. 1, which shows a schematic diagram of an exemplary system architecture to which the technical solution of the embodiment of the present application can be applied, as shown in fig. 1, a system architecture 100 at least includes a terminal 101, a network 102 and a server 103.
The terminal 101 may be, but is not limited to, a smart phone, a tablet computer, a notebook computer, a desktop computer, and the like.
The terminal 101 is installed and operated with an application program supporting the display of a virtual scene. The application program may be any one of a First-Person Shooting game (FPS), a Third-Person Shooting game (TPS), a Multiplayer Online tactical sports game (MOBA), a virtual reality application program, a three-dimensional map program, a military simulation program, or a Multiplayer gunfight type survival game.
The network 102 may be a wired network or a wireless network. Alternatively, the wireless or wired network uses standard communication techniques and/or protocols. The Network is typically the Internet, but may be any Network including, but not limited to, a Local Area Network (LAN), a Metropolitan Area Network (MAN), a Wide Area Network (WAN), a mobile, wireline or wireless Network, a private Network, or any combination of virtual private networks. In some embodiments, data exchanged over a network is represented using techniques and/or formats including Hypertext Mark-up Language (HTML), extensible Markup Language (XML), and the like. All or some of the links may also be encrypted using conventional encryption techniques such as Secure Socket Layer (SSL), transport Layer Security (TLS), virtual Private Network (VPN), internet Protocol Security (IPsec). In other embodiments, custom and/or dedicated data communication techniques may also be used in place of, or in addition to, the data communication techniques described above.
The server 103 may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing basic cloud computing services such as a cloud service, a cloud database, cloud computing, a cloud function, cloud storage, a Network service, cloud communication, a middleware service, a domain name service, a security service, a Content Delivery Network (CDN), a big data and artificial intelligence platform, and the like. The server 103 is used for providing background services for the application programs supporting the virtual scene display. The terminal 101 may establish a network connection with the server 103 by way of a wired or wireless network.
Those skilled in the art will appreciate that the number of terminals described above may be greater or fewer. For example, the number of the terminals may be only one, or several tens or hundreds of the terminals, or more. The number of terminals and the type of the device are not limited in the embodiments of the present application.
In one embodiment of the present application, the terminal 101 runs an application program supporting display of a virtual scene, and the virtual scene corresponds to a virtual map. The server 103 can acquire the coordinate data of the specified type in the virtual map, and the acquisition of the coordinate data of the specified type by the server 103 includes two cases, one case is that the terminal 101 generates the coordinate data of the specified type and actively sends the coordinate data to the server 103; in another case, when the server 103 needs to acquire the coordinate data of the specified type, a request is sent to the terminal 101, and the terminal 101 sends the coordinate data of the specified type to the server 103 after receiving the request. The specified type of coordinate data is the specified type of event which can be represented by a position point in the virtual scene or the position data of the specified type of character in the virtual map, the specified type of event can be any type of event such as katon, dropped frame, skipped frame, and dropped frame in the virtual scene, and the specified type of character can be a virtual character, an enemy character, a my character, and the like of a specified level character in the virtual scene.
In an embodiment of the application, after the server 103 obtains the coordinate data of the specified type in the virtual map, triangulation may be performed based on the coordinate data to obtain a plurality of subdivision triangles, then, the server 103 may perform color filling on each subdivision triangle according to a vertex value of each subdivision triangle, and generate an initial thermodynamic diagram according to each subdivision triangle after the color filling, and finally, the server 103 may superimpose the initial thermodynamic diagram on the virtual map, thereby generating a thermodynamic diagram corresponding to the specified type.
The thermodynamic diagram generation method provided by the embodiment of the application is generally executed by the server 103, and accordingly, the thermodynamic diagram generation device is generally arranged in the server 103. In an embodiment of the present application, the server 103 may obtain the coordinate data of the specified type in the virtual map by reporting the data of the receiving terminal 101, and then process the coordinate data of the specified type by using the thermodynamic diagram generation method provided in the embodiment of the present application.
It can be understood that the thermodynamic diagram generation method can be applied to coordinate data of a specified type in a virtual map corresponding to any virtual scene, so that thermodynamic diagrams corresponding to the specified type are generated, and a user is helped to quickly locate various types of problems.
In terms of virtual scenes in a game, the performance situation of the game running on a client is very important for a game running project set, and continuous attention is needed in both a development phase and an operation phase. However, the existing game client performance test method has the defects of long time consumption, low efficiency and the like. In contrast, in a game application scene, the terminal 101 may be a terminal device equipped with a game client, the specified type of coordinate data may be coordinate data indicating game performance, such as a pause state, a frame drop state, and the like, included in a game virtual scene, and the server 103 may perform triangulation processing based on the obtained coordinate data after obtaining the coordinate data indicating game performance, such as the pause state, the frame drop state, and the like, to obtain a plurality of triangulation triangles; then, according to the vertex values of the subdivision triangles, color filling is carried out on the subdivision triangles, and an initial thermodynamic diagram is generated according to the subdivision triangles after the color filling; finally, the thermodynamic diagrams are overlaid on the virtual map, and the thermodynamic diagrams corresponding to the specified types, namely game performance thermodynamic diagrams, are generated. The game performance thermodynamic diagram obtained by the thermodynamic diagram generation method can realize quick understanding and mastering of the whole game performance change situation, and can quickly position the performance bottleneck of a map level, so that the performance of a game version is optimized in a targeted manner.
It should be noted that the above application scenario is only an illustrative example, and does not constitute a limitation on the application scenario in the technical solution of the embodiment of the present application, and the technical solution of the embodiment of the present application may be applied to coordinate data of a specified type in a virtual map corresponding to any virtual scenario.
The implementation details of the technical solution of the embodiment of the present application are set forth in detail below:
FIG. 2 illustrates a flow diagram of a thermodynamic diagram generation method according to one embodiment of the present application, which may be applied in the implementation environment illustrated in FIG. 1. As shown in fig. 2, the thermodynamic diagram generation method may include the steps of:
step S210, coordinate data of a specified type in a virtual map is obtained, wherein the virtual map is a map corresponding to a virtual scene running in a terminal;
step S220, carrying out triangulation processing based on the coordinate data to obtain a plurality of subdivision triangles;
step S230, according to the vertex values of the subdivision triangles, color filling is carried out on the subdivision triangles, and an initial thermodynamic diagram is generated according to the subdivision triangles after the color filling;
and step S240, overlaying the initial thermodynamic diagram on the virtual map, and generating a thermodynamic diagram corresponding to the specified type.
These steps are described in detail below.
In step S210, coordinate data of a specified type in a virtual map, which is a map corresponding to a virtual scene running in the terminal, is acquired.
Specifically, the specified type of coordinate data is the specified type of event that can be represented by a location point in the virtual scene or the location data of a specified type of character in the virtual map, wherein the specified type of event that can be represented by a location point may include, but is not limited to: any type of event such as a stuck, dropped, skipped, or dropped frame in the virtual scene, and the designated type of character that can be represented by the location point may be a virtual character, an enemy character, a my character, and the like of the designated level character in the virtual scene.
The virtual scene is a virtual scene displayed (or provided) when the target application program runs on the terminal. The virtual scene may be a simulation scene of a real world, a semi-simulation semi-fictional scene, or a pure fictional scene. The virtual scene can provide a multimedia virtual world, and a user can control operable virtual objects in the virtual scene through an operation device or an operation interface, observe virtual objects such as objects, persons and scenery in the virtual scene from the perspective of the virtual objects, or interact with the virtual objects and the virtual objects such as the objects, the persons and the scenery in the virtual scene or other virtual objects, for example, attack a virtual soldier on a target enemy troops and the like.
The virtual scene may be any one of a two-dimensional virtual scene, a 2.5-dimensional virtual scene, and a three-dimensional virtual scene. The following embodiments are illustrated by the virtual scene being a three-dimensional virtual scene, but are not limited thereto. Optionally, the virtual scene is also used for virtual scene engagement between at least two virtual characters. For example, the virtual scene is used for a match between at least two virtual characters using a virtual firearm. Virtual scenes are typically generated by an application in a computer device, such as a terminal, and presented based on hardware, such as a screen, in the terminal.
The virtual map is used to display the terrain of the virtual scene, which may be a plan view or an overhead view of the virtual scene.
In an embodiment of the present application, a target application program runs in a terminal, a Software Development Kit (SDK) function may be integrated in the target application program, the Software development Kit controls an acquired state by calling a control command interface of a main thread of the target application program, and in order to ensure that an interface for calling a control command in the main thread of the target application program is not blocked, support of a message queue needs to be used, and in an embodiment, a lock-free message queue model as shown in fig. 3 may be used.
For the convenience of understanding the embodiment of the present application, the characteristics of the lock-free message queue are described first, and the lock-free message queue is implemented by using a ring data structure, and it can be understood that if the last element at the head of the queue in the message queue is an element at the tail of the queue, the ring data structure is used for the whole queue. Marking each element with HEAD of line (HEAD), TAIL of line (TAIL), and EMPTY (EMPTY) and defining the following operations, wherein the HEAD of line (HEAD) represents the HEAD of line element in the message queue, the TAIL of line (TAIL) represents the TAIL of line element in the message queue, and the EMPTY (EMPTY) is used for judging whether the message queue is EMPTY:
a) EnQueue operation (EnQueue): assuming that data x is to be queued, locating the position of TAIL, updating (TAIL, EMPTY) to (x, TAIL) by using a double Compare And Swap (double-CAS) method, and if (TAIL, EMPTY) is not found, indicating that the queue is full;
b) DeQueue operation (DeQueue): locate the HEAD, update (HEAD, x) to (EMPTY, HEAD), and return x, if x is TAIL, the declaration queue is EMPTY.
As shown in fig. 3, a total of three threads are involved in the data processing process of the software development kit tool, one is a main thread of the target application program, one is a work thread of the target application program, and one is a work thread of the software development kit tool, and all the threads are connected by using a lock-free message queue. Coordinate data of a specified type is collected in a main thread of a target application program and is inserted into a message queue, a command for controlling collection of a software development kit tool is also inserted into the main thread of the target application program, auxiliary data is also inserted into the message queue in a working thread of the target application program, the working thread of the software development kit respectively processes the data in the three message queues, the data in the three message queues can be stored into a buffer area on time after the data processing is completed, and the data in the buffer area is refreshed into a file after the data in the buffer area is full. The software development kit tool can write data into a temporary file by using a Protobuf protocol and place the temporary file into a queue to be sent, and a data sending thread sends the data to a server, wherein the Protobuf protocol is a protocol of a serialized data structure which is platform-independent, language-independent, extensible, portable and efficient, and can be used for network communication and data storage.
Specifically, the work threads of the software development kit tool may include a data collection thread, and a data sending thread, and in this embodiment, a data processing process of the software development kit tool is described in detail with reference to fig. 4 and 5.
To facilitate understanding, before proceeding with the detailed description, the following concepts are introduced:
the interface function set is as follows: and dynamically linking the function set of all the interfaces which are opened to the outside in the library. And acquiring an APMPerfDataSession instance through an instance acquisition function so as to access the internal function.
Example of APMPerfDataSession: and (3) interfacing the interface function set and the thread local variable, and simultaneously internally starting a data collection thread and a data sending thread, wherein the data collection thread is responsible for collecting information from each thread and writing the information into the cache file, and the data sending thread is responsible for sending the cache file.
Thread local variables: each thread has a thread local variable which is responsible for collecting the information of the thread, putting the information into a buffer area and waiting for a data collection thread to collect the information.
As shown in fig. 4 (b), when each frame starts, the collection cache calls an externally developed interface function set in a multi-threaded manner (thread 1, thread 2, thread 3 \8230;), obtains an APMPerfDataSession instance, collects data of the thread using thread local variables (thread local variable 1, thread local variable 2, thread local variable 3 \8230;) of each thread, and writes the collected data of each thread into the current cache of each thread. As shown in fig. 4 (a), if the current cached cache file reaches the specified size, the current cache may be closed, the current cached cache file is added to the list to be sent, and a new cache may be created.
After the APMPerfDataSession instance is obtained, the data collection thread and the data transmission thread are simultaneously started internally, as shown in fig. 5, the data collection thread traverses the cache region of each thread to obtain the thread local variable and the to-be-transmitted list of each thread, and the data is fetched, merged and written into the cache file by calling the send _ buffer _ list interface of the APMPerfDataSession instance.
The data sending thread can establish connection with the server through a Transmission Control Protocol (TCP), and the data sending thread only sends the cache file generated by the data collecting thread, because the cache file generated by the data collecting thread integrates all the data collected by the data collecting thread, the data sending thread does not need to pay attention to the cache file of the data collecting thread. The sending strategy of the data sending thread is that the cache file is sent, and the file is deleted after the sending.
Based on the embodiment, the method for integrating the software development kit in the terminal not only has convenient access, but also can directly report the coordinate data of the specified type to the server after the software development kit is integrated, thereby reducing the adjustment process in the whole process and saving the time cost.
With continued reference to fig. 2, in step S220, triangulation processing is performed based on the coordinate data to obtain a plurality of triangulation triangles.
In the fields of computer aided geometric design, surface reconstruction, finite element analysis, etc., such problems are often addressed: given a set of scattered data Pi = { xi, yi, zi } (i =1,2, \8230;, n), it is first triangulated, then an interpolated surface is constructed on the triangular domain, and finally various analyses, calculations and other processes are performed on the basis of the interpolated surface.
The optimization criteria of triangulation include circle criteria, maximum/minimum interval criteria, maximum/minimum angle criteria, maximum/minimum height criteria, thiessen criteria, and the like. One of the essential points of these specifications is to minimize the occurrence of planar triangles that are too sharp. It is known from the approximation theory that the approximation difference of the triangular surface is related to the minimum internal angle of the triangle, and it is particularly desirable to improve the accuracy of approximation and reduce the occurrence of excessively sharp triangles. The Delaunay triangulation has the property that the minimum interior angle is the largest and the average morphology ratio is the largest, and the average morphology is the most regular, so it is the best triangulation of the set of points for a given region.
Specifically, in this embodiment, after acquiring the coordinate data of the specified type, it is necessary to further convert the discrete coordinate points represented by the coordinate data into triangular surfaces, so as to facilitate subsequent color filling. The triangulation processing based on the coordinate data may be performed using Delaunay triangulation to obtain a plurality of triangulation triangles. The algorithm for implementing the Delaunay triangulation may be a divide-and-conquer algorithm, such as a Dwyer algorithm and a Chew algorithm, or may be a point-by-point interpolation method, such as a Lawson algorithm and a Bowyer-Watson algorithm, or may be a triangulation network generation method.
In step S230, color filling is performed on each of the subdivision triangles according to the vertex values of each of the subdivision triangles, and an initial thermodynamic diagram is generated according to each of the subdivision triangles after the color filling.
Specifically, after triangulation processing is performed, a plurality of subdivision triangles can be obtained, each subdivision triangle having a corresponding vertex value, where the vertex value of a subdivision triangle refers to coordinate data corresponding to a vertex of the subdivision triangle.
In order to generate the thermodynamic diagram, after the triangulation processing is performed to obtain each of the subdivision triangles, color filling may be further performed on each of the subdivision triangles according to vertex values of each of the subdivision triangles, and an initial thermodynamic diagram may be generated according to each of the subdivision triangles after the color filling.
In specific implementation, after the color of each subdivision triangle is filled, a smooth triangle patch can be obtained by rendering and drawing, and then gaussian smoothing is performed, wherein gaussian smoothing is a method for smoothing an image, and the process of gaussian smoothing mainly comprises the following steps: and aiming at each pixel point in the image, taking the result of weighted average of the pixel values of all the pixel points in the neighborhood of the pixel point as the pixel value of the pixel point, wherein the weight of each pixel point in the neighborhood is different, and the weight of each pixel point in the neighborhood is determined by a Gaussian function. The Gaussian smoothing can enable the whole image to be in uniform and smooth transition, remove details and filter noise.
Since gaussian smoothing is a process for each pixel point in the entire image, the entire image after gaussian smoothing has a color, as shown in fig. 6, not only some key regions in the image have a color, but also other regions in the entire image have a color. However, the thermodynamic diagram is not easy to view, and therefore, an image transparency algorithm can be further adopted to set the unimportant areas in the thermodynamic diagram to be transparent, so that an initial thermodynamic diagram as shown in fig. 7 can be obtained, and the thermodynamic condition can be clearly viewed from the initial thermodynamic diagram, wherein the size of the circle in the diagram represents the size of the thermodynamic area. The above-mentioned image transparency algorithm may be to change the transparency state of an image by setting Alpha channel values.
In step S240, the initial thermodynamic diagram is superimposed on the virtual map, and a thermodynamic diagram corresponding to the specified type is generated.
After the initial thermodynamic diagram is generated, a thermodynamic diagram corresponding to the specified type may be generated by superposition of the initial thermodynamic diagram with the virtual map. As shown in fig. 8, fig. 8A shows a virtual map, fig. 8B shows an initial thermodynamic diagram, and fig. 8C shows a thermodynamic diagram corresponding to a specified type obtained by superimposing fig. 8A and 8B. The size of the circle in fig. 8B and 8C represents the size of the thermal area, and the larger the circle, the larger the description area, that is, the more the number of occurrences of an event of a specified type or the larger the number of characters of a specified type. As can be seen from fig. 8C, the circle on the lower right side is largest, illustrating that the number of occurrences of the event of the specified type or the number of persons of the specified type is largest at the lower right side.
Based on the technical scheme of the embodiment, the initial thermodynamic diagrams are overlaid on the virtual map to generate the thermodynamic diagrams corresponding to the specified types, so that the purpose of generating the thermodynamic diagrams corresponding to the specified types based on the coordinate data of the specified types in the virtual map can be achieved, the flexible processing mode can be well suitable for generating the thermodynamic diagrams under various data types, the diversified requirements of users are met, and meanwhile, the generated thermodynamic diagrams can help the users to quickly locate and know the problems of important attention, so that the targeted optimization and the perfection are performed.
In an embodiment of the present application, as shown in fig. 9, step S220 may specifically include steps S910 to S940, which are described in detail as follows:
step S910, a coordinate point set is obtained according to the coordinate data, and an initial triangle containing all coordinate points in the coordinate point set is generated.
In this embodiment, since the coordinate data is the position point data, a coordinate point set can be obtained according to the coordinate data, the coordinate point set includes a plurality of coordinate points, and in the process of triangulation, an initial triangle including all the coordinate points in the coordinate point set can be first constructed, in other words, all the coordinate points in the coordinate point set are located in the initial triangle.
Step S920, using the target coordinate points included in the initial triangle to subdivide the initial triangle to obtain a plurality of sub-triangles, and using the plurality of sub-triangles as new sub-triangles of the initial triangle to update the number of sub-triangles included in the initial triangle to obtain a new initial triangle.
After the initial triangle is constructed, the subdivision processing can be performed by using the coordinate points contained in the initial triangle. The method comprises the following specific steps: and then, taking the plurality of sub-triangles as new-added sub-triangles of the initial triangle, and updating the number of the sub-triangles included in the initial triangle by using the new-added sub-triangles to obtain a new initial triangle.
In an embodiment of the present application, a specific process of performing subdivision processing on the initial triangle by using the target coordinate point may be: first, a plurality of target triangles whose circumcircles include the target coordinate point may be determined from the sub-triangles included in the initial triangle, then, the common edges between the plurality of target triangles may be deleted, thereby obtaining target polygons corresponding to the plurality of target triangles, and further, the target coordinate points may be connected with each vertex of the target polygons, thereby obtaining a plurality of sub-triangles.
And step S930, continuing to perform subdivision processing and updating the number of sub-triangles included in the initial triangle based on the new initial triangle until all coordinate points participate in subdivision processing.
After the new initial triangle is obtained, subdivision processing and the number of sub-triangles included in the initial triangle can be continuously performed on the basis of the new initial triangle until all coordinate points participate in subdivision processing.
The process of the subdivision processing and the number updating can be seen in fig. 10, an arrow shown in fig. 10 indicates the process of the subdivision processing, and as can be seen from fig. 10, as the number of times of the subdivision processing increases, the number of sub-triangles included in the outermost initial triangle also increases.
And S940, sub-triangles contained in the initial triangle obtained after all the coordinate points participate in the subdivision processing are used as a plurality of subdivision triangles.
After all coordinate points included in the initial triangle participate in the subdivision processing, sub-triangles included in the finally obtained initial triangle can be used as a plurality of subdivision triangles.
As shown in fig. 11, in some practical cases, the data volume of the coordinate data of the type specified on the virtual map is often in the order of billions, and for the processing of such a large data volume, not only the processing speed is slow, but also the effect of the finally generated thermodynamic diagram is not good. In an embodiment of the present application, for coordinate data with a higher data level, the coordinate data may be divided according to a time dimension, as shown in fig. 12, step S230 may specifically include steps S1210 to S1220, which are described in detail as follows:
and step S1210, dividing the coordinate data according to set time windows to obtain data sets corresponding to the time windows.
In this embodiment, a time window may be set, where the time window represents a period of time, and then the coordinate data is divided according to the set time window according to the timestamp information of the coordinate data, so as to obtain a data set corresponding to each time window. The size of the time window may be specifically set according to the data size of the coordinate data and the timestamp information, and the embodiment of the present application is not specifically limited herein.
As shown in fig. 13, by stream-wise dividing the acquired coordinate data, the coordinate data corresponding to time 1, the coordinate data corresponding to time 2, and the coordinate data corresponding to time 3 can be drawn into a time window 2, the coordinate data corresponding to time 4, the coordinate data corresponding to time 5, and the coordinate data corresponding to time 6 can be drawn into a time window 3, and data sets corresponding to a plurality of time windows (time window 1, time window 2, time window 3 \8230;) can be obtained by stream-wise dividing.
Step S1220, triangulating the data sets corresponding to the time windows to obtain a plurality of triangulated triangles corresponding to the time windows.
After the data sets corresponding to the time windows are obtained through partitioning, triangulation processing may be performed on the data sets corresponding to the time windows, so that a plurality of triangulation triangles corresponding to the time windows may be obtained, where the triangulation processing method may refer to the embodiment of triangulation processing described above in this application.
In an embodiment of the application, after the data set corresponding to each time window is obtained by dividing, and the plurality of split triangles corresponding to each time window are obtained through step S1220, color filling may be further performed on each split triangle according to a vertex value of each split triangle, a first thermodynamic diagram corresponding to each time window is generated according to each split triangle after the color filling, then, the first thermodynamic diagrams corresponding to each time window are superimposed on the virtual map, so that a second thermodynamic diagram corresponding to each time window as shown in fig. 13 may be generated, and finally, the second thermodynamic diagrams corresponding to each time window are superimposed, so that a thermodynamic diagram corresponding to the specified type may be generated.
Illustratively, as shown in fig. 14, at 06 of year 2019, month 08, day 11: 00:00-07:00: in the time period of 00, the time window is set to be 5 minutes, one second thermodynamic diagram can be generated every 5 minutes, and if an hourly thermodynamic diagram needs to be generated, the 12 second thermodynamic diagrams only need to be superposed.
In an embodiment of the application, after the second thermodynamic diagrams corresponding to the respective time windows are generated, the second thermodynamic diagrams corresponding to the respective time windows may be compared to obtain comparison results of the second thermodynamic diagrams corresponding to the respective time windows, so that a thermodynamic variation trend of the thermodynamic diagrams corresponding to the specified type may be determined based on the comparison results, thereby facilitating further analysis by a user.
In an embodiment of the present application, in addition to dividing the number of coordinates according to the time dimension according to the timestamp information of the coordinate data, the virtual map may be divided according to the space dimension, as shown in fig. 15, step S230 may specifically include steps S1510 to S1520, which are now described in detail as follows:
step S1510 is to divide the virtual map to obtain a plurality of sub-areas.
The virtual map may be divided by different coordinates, or may be divided by the area conditions indicated by the respective areas in the virtual map. For example, in one possible case, the virtual map may be divided into areas of equal size according to coordinates, or the areas may be divided according to roads, buildings, water areas, grass, and the like. Fig. 16 shows an example of dividing the virtual map, and as can be seen from fig. 16, the virtual map is divided into a plurality of sub-areas by the horizontal dotted line and the vertical dotted line.
Step 1520, performing triangulation processing based on the coordinate data included in each sub-region to obtain a plurality of triangulation triangles corresponding to each sub-region.
It can be understood that after the virtual map is divided into a plurality of sub-regions, triangulation processing may be performed based on coordinate data included in each sub-region, so as to obtain a plurality of triangulation triangles corresponding to each sub-region, where the triangulation processing method may refer to the above-described embodiments of triangulation processing in the present application.
In an embodiment of the application, after obtaining a plurality of subdivision triangles corresponding to each sub-region, color filling may be further performed on each subdivision triangle according to a vertex value of each subdivision triangle, a first thermodynamic diagram corresponding to each sub-region is generated according to each subdivision triangle after the color filling, then, the first thermodynamic diagram corresponding to each sub-region is superimposed on a virtual map, a second thermodynamic diagram corresponding to each sub-region may be generated, schematically, as shown in fig. 17, the second thermodynamic diagram corresponding to one of the divided sub-regions is represented, circles with different sizes in fig. 17 represent different thermodynamic conditions displayed on the second thermodynamic diagram, and finally, the second thermodynamic diagrams corresponding to each sub-region may be combined to generate a thermodynamic diagram corresponding to a specified type.
In an embodiment of the application, because each sub-region includes coordinate data, the maximum coordinate data in the coordinate data included in each sub-region can be determined according to the coordinate data included in each sub-region; then, the maximum coordinate data may be displayed on the second thermodynamic diagrams corresponding to the respective sub-regions. As shown in fig. 18, the maximum coordinate data displayed on the second thermodynamic diagram corresponding to one of the sub-regions is (600.57, 480.65).
The direct display of the maximum coordinate data on the thermodynamic diagram can facilitate the user to find problems, so that targeted optimization is performed. For example, when the specified type of coordinate data is performance coordinate data, the user can directly locate the performance bottleneck after displaying the maximum coordinate data, thereby performing performance optimization on a target.
In an embodiment of the present application, as shown in fig. 19, color filling is performed on each of the split triangles according to vertex values of each of the split triangles, which may specifically include steps S1910 to S1930, and the following details are described as follows:
and step S1910, determining a corresponding vertex value range according to the vertex values of the subdivision triangles.
In this embodiment, a plurality of vertex value ranges and a plurality of color channel value ranges are preset, and the vertex value ranges correspond to the color channel value ranges, and the vertex value ranges are different and the color channel value ranges are also different. The vertex value range refers to a range in which the vertex values of the subdivision triangles are located, and the color channel value range refers to a channel value range of three colors, namely red, green and blue.
In order to fill the colors into the respective subdivision triangles, a vertex value range in which the vertex value of each subdivision triangle is located may be determined according to the vertex value of each subdivision triangle.
Step S1920 calculates a color channel value corresponding to the vertex value according to the vertex value, the vertex value range, and the color channel value range corresponding to the vertex value range.
After the vertex value range is determined in step S1910, the corresponding color channel value range is also determined, so that the color channel value corresponding to the vertex value of each of the split triangles can be calculated according to the vertex value, the vertex value range, and the color channel value range.
Specifically, assume that the vertex value range is represented as [ value _ min, value _ max ], the color channel value range is represented as: red (0-R1), green (0-G1), blue (0-B1), and the vertex value of the subdivision triangle is represented as value, then the color channel values R, G, and B corresponding to the vertex value can be calculated by the following formula I:
Figure BDA0002760680180000191
and step S1930, based on the color channel values corresponding to the vertex values, color filling is carried out on each subdivision triangle.
After the color channel values corresponding to the vertex values of the respective subdivision triangles are obtained through calculation, color filling of the respective subdivision triangles can be further completed according to the color channel values corresponding to the vertex values.
In the embodiment, the method is not influenced by the size of the subdivision triangles, the color filling of each subdivision triangle can be completed only by determining the color channel value corresponding to the vertex value according to the vertex value of the subdivision triangle, the calculated amount is small, and the filling efficiency is high.
In an embodiment of the present application, as shown in fig. 20, the step of superimposing the initial thermodynamic diagram on the virtual map to generate a thermodynamic diagram corresponding to the specified type may specifically include steps S2010 to S2020, which is now described in detail as follows:
and step S2010, calculating to obtain the coordinates of each pixel point on the thermodynamic diagram corresponding to the specified type according to the coordinates of each pixel point on the initial thermodynamic diagram and the coordinates of each pixel point on the virtual map.
In this embodiment, both the initial thermodynamic diagram and the virtual map are composed of a plurality of pixel points, and therefore, the superposition of the initial thermodynamic diagram and the virtual map may actually be the superposition of corresponding pixel points, coordinates of each pixel point on the initial thermodynamic diagram and coordinates of each pixel point on the virtual map are obtained, and then, coordinates of each pixel point on the thermodynamic diagram corresponding to the specified type are obtained through calculation according to the obtained coordinates of each pixel point.
The coordinates of each pixel point are also the coordinates of each pixel point in the image. It should be further noted that the coordinates of each pixel point are different from the aforementioned location data of the event of the specified type or the character of the specified type represented by the location point in the virtual map, that is, the coordinate data, and the establishment of the coordinate systems of the event of the specified type or the character of the specified type in the virtual map is completely different.
Specifically, the coordinates of each pixel point on the thermodynamic diagram corresponding to the specified type can be obtained through calculation by the following formula two:
C final [i,j]=C map [i,j]*(1-α)+C heatmap [i,j]* Alpha formula two
Wherein, C final [i,j]Representing thermodynamic diagrams corresponding to specified typesCoordinates of each pixel, C map [i,j]Coordinates representing each pixel point on the virtual map, C heatmap [i,j]And coordinates of each pixel point on the initial thermodynamic diagram are represented, and alpha =0.5.
And step 2020, generating a thermodynamic diagram corresponding to the specified type according to the coordinates of each pixel point on the thermodynamic diagram corresponding to the specified type.
After the coordinates of each pixel point on the thermodynamic diagram corresponding to the specified type are obtained through calculation, the thermodynamic diagram can be generated according to the coordinates of each pixel point.
According to the technical scheme of the embodiment, the coordinates of each pixel point on the initial thermodynamic diagram and the coordinates of each pixel point on the virtual map are obtained, then the coordinates are directly superposed to generate the thermodynamic diagram corresponding to the specified type, the superposition of the images is achieved by using less computing resources, and the resource cost is greatly saved.
Fig. 21 shows a logic diagram of a thermodynamic diagram generation method according to an embodiment of the present application, and as shown in fig. 21, in this embodiment, the thermodynamic diagram generation method may specifically include the following steps:
s1, acquiring coordinate data of a specified type in a virtual map.
And S2, performing data processing on the coordinate data to obtain processed coordinate data.
Specifically, since the obtained coordinate data may have an abnormal problem, before triangulation processing is performed based on the coordinate data, data processing may be performed on the coordinate data first to ensure result accuracy in a subsequent processing process.
In some embodiments, the process of processing the coordinate data may be: after the server acquires the coordinate data, firstly, the coordinate data is filtered and cleaned according to the configured coordinate range and the configured numerical range, abnormal values which are abnormal or exceed the range are eliminated, then, the filtered coordinate data is rounded, and the rounding is performed because the coordinate data acquired by the server is floating point data, the precision of the floating point data is two bits after a small number, and the floating point data can cause the performance of subsequent triangulation processing to be low, so that the rounding operation can be performed on the filtered coordinate data, and the floating point data is rounded to be changed into integer precision coordinate data.
It should be noted that the coordinate data processing in step S2 may be performed at preset time intervals as shown in fig. 21, and may of course be performed according to a preset rule (for example, periodically, aperiodically, randomly, in real time, etc.).
And step S3: and carrying out triangulation processing based on the processed coordinate data to obtain a plurality of triangulation triangles.
And step S4: and filling colors into the subdivision triangles, and generating an initial thermodynamic diagram according to the subdivision triangles after the colors are filled.
Step S5: an initial thermodynamic diagram is superimposed on the virtual map, a thermodynamic diagram corresponding to the specified type is generated, and the maximum coordinate data may be displayed on the thermodynamic diagram.
It should be noted that step S1, step S3 to step S5 are similar to step S210 to step S240, respectively, and therefore are not described herein again.
The following describes embodiments of the apparatus of the present application, which may be used to perform the thermodynamic diagram generation method in the above-described embodiments of the present application. For details not disclosed in the embodiments of the apparatus of the present application, please refer to the embodiments of the thermodynamic diagram generation method described above in the present application.
Fig. 22 shows a block diagram of a thermal diagram generation apparatus according to an embodiment of the present application, and referring to fig. 22, a thermal diagram generation apparatus 2200 according to an embodiment of the present application includes: acquisition means 2202, division means 2204, packing means 2206, and generation means 2208.
The obtaining unit 2202 is configured to obtain coordinate data of a specified type in a virtual map, where the virtual map is a map corresponding to a virtual scene running in a terminal; the subdivision unit 2204 is configured to perform triangulation processing based on the coordinate data to obtain a plurality of subdivision triangles; the filling unit 2206 is configured to perform color filling on each of the subdivision triangles according to vertex values of the subdivision triangles, and generate an initial thermodynamic diagram according to each of the subdivision triangles after the color filling; the generating unit 2208 is configured to superimpose the initial thermodynamic diagram on the virtual map, and generate a thermodynamic diagram corresponding to the specified type.
In some embodiments of the present application, the subdivision unit 2204 comprises: a generating subunit configured to obtain a coordinate point set from the coordinate data, and generate an initial triangle including all coordinate points in the coordinate point set; the subdivision unit is configured to subdivide the initial triangle by using the target coordinate points included in the initial triangle to obtain a plurality of sub-triangles, use the plurality of sub-triangles as new-increment sub-triangles of the initial triangle, and update the number of the sub-triangles included in the initial triangle to obtain a new initial triangle; the updating subunit is configured to continue to perform subdivision processing and update the number of sub-triangles included in the initial triangle based on the new initial triangle until all coordinate points participate in subdivision processing; and the processing subunit is configured to take the sub-triangles included in the initial triangle obtained after all the coordinate points participate in the subdivision processing as the plurality of subdivision triangles.
In some embodiments of the present application, the subdivision subunit is configured to: determining a plurality of target triangles from the sub-triangles contained in the initial triangle, wherein the target triangles are triangles of which the circumscribed circles in the sub-triangles contain the target coordinate points; deleting common edges among the target triangles to obtain target polygons corresponding to the target triangles; and connecting the target coordinate points with each vertex of the target polygon to obtain the plurality of sub-triangles.
In some embodiments of the present application, the subdivision unit 2204 is configured to: dividing the coordinate data according to a set time window to obtain a data set corresponding to each time window; and triangulating the data sets corresponding to the time windows to obtain a plurality of subdivision triangles corresponding to the time windows.
In some embodiments of the present application, the initial thermodynamic diagrams include first thermodynamic diagrams corresponding to the respective time windows, and the generating unit 2208 is configured to: superposing the first thermodynamic diagrams corresponding to the time windows on the virtual map to generate second thermodynamic diagrams corresponding to the time windows; and generating thermodynamic diagrams corresponding to the specified types according to the second thermodynamic diagrams corresponding to the time windows.
In some embodiments of the present application, the apparatus further comprises: the comparison unit is configured to compare the second thermodynamic diagrams corresponding to the time windows to obtain comparison results of the second thermodynamic diagrams corresponding to the time windows; and the first determining unit is configured to determine the thermodynamic variation trend of the thermodynamic diagram corresponding to the specified type according to the comparison result.
In some embodiments of the present application, the subdivision unit 2206 is configured to: dividing the virtual map to obtain a plurality of sub-areas; and carrying out triangulation processing based on the coordinate data contained in each sub-region to obtain a plurality of subdivision triangles corresponding to each sub-region.
In some embodiments of the present application, the initial thermodynamic diagram includes first thermodynamic diagrams corresponding to the respective sub-regions, and the generating unit 2208 is configured to: superposing the first thermodynamic diagrams corresponding to the sub-areas on the virtual map to generate second thermodynamic diagrams corresponding to the sub-areas; and generating thermodynamic diagrams corresponding to the specified types according to the second thermodynamic diagrams corresponding to the sub-regions.
In some embodiments of the present application, the apparatus further comprises: the second determining unit is configured to determine the maximum coordinate data in the coordinate data contained in each sub-region according to the coordinate data contained in each sub-region; and the display unit is configured to display the maximum coordinate data on the second thermodynamic diagrams corresponding to the sub-areas.
In some embodiments of the present application, the filling unit 2206 is configured to: determining a corresponding vertex value range according to the vertex values of the subdivision triangles; calculating a color channel value corresponding to the vertex value according to the vertex value, the vertex value range and a color channel value range corresponding to the vertex value range; and filling colors into the subdivision triangles based on the color channel values corresponding to the vertex values.
In some embodiments of the present application, the generating unit 2208 is configured to: calculating to obtain the coordinates of each pixel point on the thermodynamic diagram corresponding to the specified type according to the coordinates of each pixel point on the initial thermodynamic diagram and the coordinates of each pixel point on the virtual map; and generating the thermodynamic diagram corresponding to the specified type according to the coordinates of each pixel point on the thermodynamic diagram corresponding to the specified type.
In some embodiments of the present application, the coordinate data is reported by the terminal using a plurality of data threads, where the plurality of data threads include a data acquisition thread, a data collection thread, and a data transmission thread; the data collection thread is used for collecting the coordinate data of the specified type and writing the coordinate data into a buffer area, the data collection thread is used for traversing the buffer area and sending the coordinate data of the specified type in the buffer area to the data sending thread, and the data sending thread is used for reporting the coordinate data of the specified type.
FIG. 23 illustrates a block diagram of a computer system suitable for use to implement the electronic device of an embodiment of the present application.
It should be noted that the computer system 2300 of the electronic device shown in fig. 23 is only an example, and should not bring any limitation to the functions and the scope of the application of the embodiments.
As shown in fig. 23, a computer system 2300 includes a Central Processing Unit (CPU) 2301, which can perform various appropriate actions and processes, such as performing the methods described in the above embodiments, according to a program stored in a Read-Only Memory (ROM) 2302 or a program loaded from a storage section 2308 into a Random Access Memory (RAM) 2303. In the RAM 2303, various programs and data necessary for system operation are also stored. The CPU 2301, ROM 2302, and RAM 2303 are connected to each other via a bus 2304. An Input/Output (I/O) interface 2305 is also connected to bus 2304.
The following components are connected to the I/O interface 2305: an input portion 2306 including a keyboard, a mouse, and the like; an output portion 2307 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, a speaker, and the like; a storage portion 2308 including a hard disk and the like; and a communication section 2309 including a Network interface card such as a LAN (Local Area Network) card, a modem, or the like. The communication section 2309 performs communication processing via a network such as the internet. The driver 2310 is also connected to the I/O interface 2305 as needed. A removable medium 2311 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 2310 as necessary, so that a computer program read out therefrom is mounted in the storage section 2308 as necessary.
In particular, according to embodiments of the application, the processes described above with reference to the flow diagrams may be implemented as computer software programs. For example, embodiments of the present application include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising a computer program for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication section 2309, and/or installed from the removable medium 2311. When the computer program is executed by the Central Processing Unit (CPU) 2301, various functions defined in the system of the present application are executed.
It should be noted that the computer readable medium shown in the embodiments of the present application may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a Read-Only Memory (ROM), an Erasable Programmable Read-Only Memory (EPROM), a flash Memory, an optical fiber, a portable Compact Disc Read-Only Memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present application, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In this application, however, a computer readable signal medium may include a propagated data signal with a computer program embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. The computer program embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. Each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present application may be implemented by software or hardware, and the described units may also be disposed in a processor. Wherein the names of the elements do not in some way constitute a limitation on the elements themselves.
As another aspect, the present application also provides a computer-readable medium, which may be contained in the electronic device described in the above embodiment; or may exist separately without being assembled into the electronic device. The computer readable medium carries one or more programs which, when executed by an electronic device, cause the electronic device to implement the method described in the above embodiments.
It should be noted that although in the above detailed description several modules or units of the device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functions of two or more modules or units described above may be embodied in one module or unit according to embodiments of the application. Conversely, the features and functions of one module or unit described above may be further divided into embodiments by a plurality of modules or units.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, and may also be implemented by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the embodiments of the present application.
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the embodiments disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains.
It will be understood that the present application is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the application is limited only by the appended claims.

Claims (14)

1. A thermodynamic diagram generation method, comprising:
acquiring coordinate data of a specified type in a virtual map, wherein the virtual map is a map corresponding to a virtual scene running in a terminal;
carrying out triangulation processing based on the coordinate data to obtain a plurality of triangulation triangles;
according to the vertex values of the subdivision triangles, color filling is carried out on the subdivision triangles, and an initial thermodynamic diagram is generated according to the subdivision triangles after the color filling;
overlaying the initial thermodynamic diagrams on the virtual map to generate thermodynamic diagrams corresponding to the specified types;
wherein, triangulating based on the coordinate data to obtain a plurality of subdivision triangles comprises:
obtaining a coordinate point set according to the coordinate data, and generating an initial triangle containing all coordinate points in the coordinate point set;
utilizing a target coordinate point contained in the initial triangle to subdivide the initial triangle to obtain a plurality of sub-triangles, taking the plurality of sub-triangles as new sub-triangles of the initial triangle, and updating the number of the sub-triangles contained in the initial triangle to obtain a new initial triangle;
continuing to perform subdivision processing and updating the number of sub-triangles contained in the initial triangle based on the new initial triangle until all coordinate points participate in subdivision processing;
and taking sub-triangles contained in the initial triangle obtained after all the coordinate points participate in the subdivision treatment as the plurality of subdivision triangles.
2. The method of claim 1, wherein the subdividing the initial triangle by using the target coordinate points included in the initial triangle to obtain a plurality of sub-triangles comprises:
determining a plurality of target triangles from the sub-triangles contained in the initial triangle, wherein the target triangles are triangles of which the circumscribed circles in the sub-triangles contain the target coordinate points;
deleting common edges among the target triangles to obtain target polygons corresponding to the target triangles;
and connecting the target coordinate points with each vertex of the target polygon to obtain the plurality of sub-triangles.
3. The method of claim 1, wherein triangulating based on the coordinate data to obtain a plurality of triangulated triangles comprises:
dividing the coordinate data according to a set time window to obtain a data set corresponding to each time window;
and triangulating the data sets corresponding to the time windows to obtain a plurality of subdivision triangles corresponding to the time windows.
4. The method of claim 3, wherein the initial thermodynamic diagram comprises first thermodynamic diagrams corresponding to the respective time windows, and wherein superimposing the initial thermodynamic diagrams onto the virtual map generates a thermodynamic diagram corresponding to the specified type, comprising:
superposing the first thermodynamic diagrams corresponding to the time windows on the virtual map to generate second thermodynamic diagrams corresponding to the time windows;
and generating a thermodynamic diagram corresponding to the specified type according to the second thermodynamic diagrams corresponding to the time windows.
5. The method of claim 4, further comprising:
comparing the second thermodynamic diagrams corresponding to the time windows to obtain comparison results of the second thermodynamic diagrams corresponding to the time windows;
and determining the thermodynamic variation trend of the thermodynamic diagram corresponding to the specified type according to the comparison result.
6. The method of claim 1, wherein triangulating based on the coordinate data to obtain a plurality of triangulated triangles comprises:
dividing the virtual map to obtain a plurality of sub-areas;
and performing triangulation processing based on the coordinate data contained in each sub-region to obtain a plurality of subdivision triangles corresponding to each sub-region.
7. The method of claim 6, wherein the initial thermodynamic diagram comprises a first thermodynamic diagram corresponding to the respective sub-region, and wherein superimposing the initial thermodynamic diagram onto the virtual map generates a thermodynamic diagram corresponding to the specified type, comprising:
superposing the first thermodynamic diagrams corresponding to the sub-areas on the virtual map to generate second thermodynamic diagrams corresponding to the sub-areas;
and generating a thermodynamic diagram corresponding to the specified type according to the second thermodynamic diagrams corresponding to the sub-regions.
8. The method of claim 7, further comprising:
determining the maximum coordinate data in the coordinate data contained in each sub-area according to the coordinate data contained in each sub-area;
and displaying the maximum coordinate data on the second thermodynamic diagrams corresponding to the sub-areas.
9. The method of claim 1, wherein color filling each split triangle according to its vertex value comprises:
determining a corresponding vertex value range according to the vertex values of the subdivision triangles;
calculating a color channel value corresponding to the vertex value according to the vertex value, the vertex value range and a color channel value range corresponding to the vertex value range;
and filling colors into the subdivision triangles based on the color channel values corresponding to the vertex values.
10. The method of claim 1, wherein superimposing the initial thermodynamic diagram on the virtual map generates a thermodynamic diagram corresponding to the specified type, comprising:
calculating to obtain the coordinates of each pixel point on the thermodynamic diagram corresponding to the specified type according to the coordinates of each pixel point on the initial thermodynamic diagram and the coordinates of each pixel point on the virtual map;
and generating the thermodynamic diagram corresponding to the specified type according to the coordinates of each pixel point on the thermodynamic diagram corresponding to the specified type.
11. The method according to claim 1, wherein the coordinate data is reported by the terminal using a plurality of data threads, the plurality of data threads including a data collection thread, and a data transmission thread;
the data collection thread is used for collecting the coordinate data of the specified type and writing the coordinate data into a buffer area, the data collection thread is used for traversing the buffer area and sending the coordinate data of the specified type in the buffer area to the data sending thread, and the data sending thread is used for reporting the coordinate data of the specified type.
12. An apparatus for generating a thermodynamic diagram, the apparatus comprising:
the terminal comprises an acquisition unit, a processing unit and a display unit, wherein the acquisition unit is configured to acquire coordinate data of a specified type in a virtual map, and the virtual map is a map corresponding to a virtual scene running in the terminal;
the subdivision unit is configured to perform triangulation processing based on the coordinate data to obtain a plurality of subdivision triangles;
the filling unit is configured to perform color filling on each subdivision triangle according to the vertex value of each subdivision triangle, and generate an initial thermodynamic diagram according to each subdivision triangle after the color filling;
a generating unit configured to superimpose the initial thermodynamic diagram on the virtual map, and generate a thermodynamic diagram corresponding to the specified type;
the subdivision unit comprises:
a generating subunit, configured to obtain a coordinate point set according to the coordinate data, and generate an initial triangle including all coordinate points in the coordinate point set;
the subdivision unit is configured to subdivide the initial triangle by using the target coordinate points included in the initial triangle to obtain a plurality of sub-triangles, use the plurality of sub-triangles as new-increment sub-triangles of the initial triangle, and update the number of the sub-triangles included in the initial triangle to obtain a new initial triangle;
the updating subunit is configured to continue to perform subdivision processing and update the number of sub-triangles included in the initial triangle based on the new initial triangle until all coordinate points participate in subdivision processing; and the processing subunit is configured to take the sub-triangles included in the initial triangle obtained after all the coordinate points participate in the subdivision processing as the plurality of subdivision triangles.
13. A computer-readable medium, on which a computer program is stored which, when being executed by a processor, carries out a method of generating a thermodynamic diagram as claimed in any one of claims 1 to 11.
14. An electronic device, comprising:
one or more processors;
storage means for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement the thermodynamic diagram generation method as claimed in any one of claims 1 to 11.
CN202011216824.4A 2020-11-04 2020-11-04 Thermodynamic diagram generation method and device, computer readable medium and electronic equipment Active CN113398575B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011216824.4A CN113398575B (en) 2020-11-04 2020-11-04 Thermodynamic diagram generation method and device, computer readable medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011216824.4A CN113398575B (en) 2020-11-04 2020-11-04 Thermodynamic diagram generation method and device, computer readable medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN113398575A CN113398575A (en) 2021-09-17
CN113398575B true CN113398575B (en) 2022-12-16

Family

ID=77677454

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011216824.4A Active CN113398575B (en) 2020-11-04 2020-11-04 Thermodynamic diagram generation method and device, computer readable medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN113398575B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106621336A (en) * 2015-10-30 2017-05-10 网易(杭州)网络有限公司 FPS (first-person shooting) game scene map design visual verification method and system
CN109272351A (en) * 2018-08-31 2019-01-25 京东方科技集团股份有限公司 Passenger flow moving-wire and passenger flow hot-zone determine method and device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106621336A (en) * 2015-10-30 2017-05-10 网易(杭州)网络有限公司 FPS (first-person shooting) game scene map design visual verification method and system
CN109272351A (en) * 2018-08-31 2019-01-25 京东方科技集团股份有限公司 Passenger flow moving-wire and passenger flow hot-zone determine method and device

Also Published As

Publication number Publication date
CN113398575A (en) 2021-09-17

Similar Documents

Publication Publication Date Title
US8199156B2 (en) Collaborative environments in a graphical information system
EP3882865A1 (en) Object loading method, device, storage medium, and electronic device
Perrot et al. Large interactive visualization of density functions on big data infrastructure
EP1764744A2 (en) Streaming geometry data using a quasi-pyramidal structure
CA2834575A1 (en) Method of rendering a terrain stored in a massive database
US20150178976A1 (en) View Dependent Level-of-Detail for Tree-Based Replicated Geometry
US20110242271A1 (en) Synthesizing Panoramic Three-Dimensional Images
CN114596423A (en) Model rendering method and device based on virtual scene gridding and computer equipment
CN116012507A (en) Rendering data processing method and device, electronic equipment and storage medium
CN109410309A (en) Weight illumination method and device, electronic equipment and computer storage medium
CN111142967A (en) Augmented reality display method and device, electronic equipment and storage medium
CN110389981A (en) Data display method, device, electronic equipment and computer readable storage medium
CN113398575B (en) Thermodynamic diagram generation method and device, computer readable medium and electronic equipment
WO2019009935A1 (en) Semantic vector tiles
CN117237502A (en) Three-dimensional rendering method, device, equipment and medium
CN114428573B (en) Special effect image processing method and device, electronic equipment and storage medium
CN115131531A (en) Virtual object display method, device, equipment and storage medium
CN114494623A (en) LOD-based terrain rendering method and device
US8847949B1 (en) Streaming replicated geographic data for display in a three-dimensional environment
CN110738719A (en) Web3D model rendering method based on visual range hierarchical optimization
US20230177763A1 (en) Method for Adapting the Rendering of a Scene
CN115100364B (en) Visualization method, device, equipment and medium for laser point cloud data of power transmission line
CN117112950B (en) Rendering method, device, terminal and storage medium for objects in electronic map
CN117197319B (en) Image generation method, device, electronic equipment and storage medium
Kang et al. An efficient simplification and real-time rendering algorithm for large-scale terrain

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40051744

Country of ref document: HK

GR01 Patent grant
GR01 Patent grant