A DCS picture loading method, device and medium
Patent Information
- Application Number
- CN202611036252.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-13
- Publication Date
- 2026-10-13
AI Technical Summary
[0004]本发明实施例提供了一种DCS画面加载方法、装置及介质,以至少解决现有技术中因运行时矢量解析与动态测点查询所导致的画面加载效率低下、内存占用过高及交互卡顿的技术问题
[0015]在本发明实施例中,通过响应于加载指令,系统直接获取预先写入测点唯一标识符与多帧位图序列的画面文件,经数据库指纹一致性校验后,依据测点唯一标识符从当前测点数据库中快速查询以获取测点实时值,进而从预先生成的位图掩码索引表中解析出对应的位图帧索引,最终从多帧位图序列中提取目标位图帧并绘制至目标画布;该方案将运行时耗时的矢量计算转化为编译期的位图预渲染与静态映射,消除了背景图元的重复矢量计算,将相同模板图元的多个实例复用同一份位图序列,并将测点查询由动态路径解析提前为编译期唯一标识符绑定,从而显著提升了画面加载速率、降低了内存占用,并避免了应急操作中的长时间等待,进而解决了现有技术中因运行时矢量解析与动态测点查询所导致的画面加载效率低下、内存占用过高及交互卡顿的技术问题。
Smart Images

Figure CN122903051A_ABST
Abstract
Description
Technical Field
[0001] This invention discloses a DCS screen loading method, device, and medium, belonging to the field of intelligent equipment fault diagnosis technology. Background Technology
[0002] Traditional DCS image engines are mostly based on vector drawing. When loading an image, they need to parse the line segments, Bézier curves, and fill instructions of all graphic elements one by one, and query the measurement point identifiers of template graphic elements online to obtain the real-time values of the measurement points for drawing. This method has significant drawbacks: static background graphic elements, which account for more than 90% of the total image, have their vector paths repeatedly calculated in every frame, resulting in computational redundancy; a large number of identical template graphic elements are created as independent object instances in memory, resulting in wasted video memory; when loading an image containing a large number of template graphic elements, the parsing and querying process takes several seconds or even longer, which seriously affects the timeliness of emergency operation response.
[0003] There is currently no effective solution to the above problems. Summary of the Invention
[0004] This invention provides a DCS screen loading method, apparatus, and medium to at least solve the technical problems of low screen loading efficiency, high memory usage, and interactive lag caused by runtime vector analysis and dynamic measurement point query in the prior art.
[0005] According to one aspect of the present invention, in order to achieve the above-mentioned objective, a DCS screen loading method is provided, comprising: in response to a loading instruction for a target DCS screen, obtaining a screen file of the target DCS screen, the screen file including a pre-written database fingerprint signature, a measurement point unique identifier of at least one template element, and a multi-frame bitmap sequence corresponding to the template element; performing a consistency check on the current measurement point database based on the database fingerprint signature, and in response to the check passing, querying the current measurement point database according to the measurement point unique identifier to obtain the real-time value of the measurement point; based on the real-time value of the measurement point, parsing the corresponding bitmap frame index from a pre-generated bitmap mask index table; extracting the corresponding target bitmap frame from the multi-frame bitmap sequence according to the bitmap frame index, and drawing the target bitmap frame onto a target canvas to complete the loading of the target DCS screen.
[0006] Furthermore, the multi-frame bitmap sequence is pre-generated through the following steps: in response to a save command for the template primitive, all visual states corresponding to the template primitive are obtained; the vector graphics corresponding to all visual states are rendered into consecutively arranged bitmap frames; and the consecutively arranged bitmap frames are stored as a single large-size bitmap strip in memory or video memory.
[0007] Furthermore, the bitmap frames in the bitmap strip are arranged sequentially according to the binary order of the visual state combination status codes of the template primitives, and each bitmap frame has a uniform width and height.
[0008] Furthermore, the unique identifier of the measurement point and the fingerprint signature of the database are pre-written into the screen file through the following steps: in response to the save command for the target DCS screen, all template elements referenced by the target DCS screen are traversed; the measurement point database is queried based on the measurement point path mapping table associated with each template element to obtain the corresponding unique identifier of the measurement point; the fingerprint signature of the measurement point database at the current time is associated with the unique identifier of the measurement point and written into the screen file.
[0009] Furthermore, it also includes: the measurement point path mapping table is a set of key-value pairs pre-generated based on template primitives, where the key of the key-value pair set is the measurement point path associated with the template primitive, and the value is the unique identifier of the measurement point obtained from the measurement point database; the database fingerprint signature is calculated using a Merkle tree structure and is used to represent a global hash snapshot of the status of all measurement points in the measurement point database associated with the target DCS screen.
[0010] Furthermore, the bitmap mask index table is generated through the following steps: obtaining all discrete process measurement point values associated with the template primitives; compressing the discrete process measurement point values into unique combined status codes according to preset bit operation rules or logical combination rules; and establishing a mapping relationship between the combined status codes and the bitmap frame numbers in the multi-frame bitmap sequence to generate the bitmap mask index table.
[0011] Furthermore, after the step of querying the current measurement point database based on the unique identifier of the measurement point to obtain the real-time value of the measurement point, the method further includes: compressing the currently obtained real-time value of the measurement point into a runtime combination status code according to the preset bit operation rules or logical combination rules, and querying the bitmap mask index table using the runtime combination status code as the index key to obtain the bitmap frame index.
[0012] Furthermore, the steps for extracting the corresponding target bitmap frame from a multi-frame bitmap sequence based on the bitmap frame index specifically include: calculating the offset in the bitmap strip based on the bitmap frame index and the width of a single frame bitmap in the bitmap strip; determining the drawing rectangle based on the offset; and performing a bit block transfer operation on the video memory cache corresponding to the drawing rectangle to copy it to the specified coordinates of the target canvas.
[0013] According to one embodiment of the present invention, a DCS screen loading device is also provided, comprising: an acquisition module, configured to acquire a screen file of the target DCS screen in response to a loading command for the target DCS screen, the screen file including a pre-written database fingerprint signature, a measurement point unique identifier of at least one template element, and a multi-frame bitmap sequence corresponding to the template element; a verification module, configured to perform a consistency verification on the current measurement point database based on the database fingerprint signature, and in response to the verification passing, query the current measurement point database based on the measurement point unique identifier to obtain the real-time value of the measurement point; a parsing module, configured to parse the corresponding bitmap frame index from a pre-generated bitmap mask index table based on the measurement point real-time value; and an extraction module, configured to extract the corresponding target bitmap frame from the multi-frame bitmap sequence according to the bitmap frame index, and draw the target bitmap frame onto a target canvas to complete the loading of the target DCS screen.
[0014] According to another aspect of the present invention, a computer-readable storage medium is also provided, the computer-readable storage medium including a stored executable program, wherein, when the executable program is executed, it controls the device where the computer-readable storage medium is located to perform the methods of various embodiments of the present invention.
[0015] In this embodiment of the invention, in response to a loading command, the system directly obtains a screen file pre-written with a unique identifier for measurement points and a multi-frame bitmap sequence. After database fingerprint consistency verification, it quickly queries the current measurement point database based on the unique identifier for the measurement points to obtain the real-time values of the measurement points. Then, it parses the corresponding bitmap frame index from the pre-generated bitmap mask index table, and finally extracts the target bitmap frame from the multi-frame bitmap sequence and draws it onto the target canvas. This scheme transforms runtime-consuming vector calculations into compile-time bitmap pre-rendering and static mapping, eliminates redundant vector calculations for background primitives, reuses the same bitmap sequence for multiple instances of the same template primitives, and binds the measurement point query to the compile-time unique identifier in advance from dynamic path resolution. This significantly improves the screen loading speed, reduces memory usage, and avoids long waiting times during emergency operations. Thus, it solves the technical problems of low screen loading efficiency, high memory usage, and interactive lag caused by runtime vector resolution and dynamic measurement point query in the prior art. Attached Figure Description
[0016] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and, together with their description, serve to explain the invention and do not constitute an undue limitation thereof. In the drawings: Figure 1 This is a flowchart of a DCS screen loading method according to one embodiment of the present invention; Figure 2This is a structural block diagram of a DCS screen loading device according to one embodiment of the present invention. Detailed Implementation
[0017] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0018] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0019] According to an embodiment of the present invention, a DCS screen loading method embodiment is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0020] This method embodiment can be executed in an electronic device or similar computing device that includes a memory and a processor. Taking operation on a vehicle terminal as an example, the vehicle terminal may include one or more processors (processors may include, but are not limited to, central processing units (CPUs), graphics processing units (GPUs), digital signal processing (DSP) chips, microcontroller units (MCUs), field-programmable gate arrays (FPGAs), neural network processors (NPUs), tensor processors (TPUs), artificial intelligence (AI) type processors, etc.) and a memory for storing data. Optionally, the vehicle terminal may also include transmission devices, input / output devices, and display devices for communication functions. Those skilled in the art will understand that the above structural description is merely illustrative and does not limit the structure of the vehicle terminal. For example, the vehicle terminal may include more or fewer components than described above, or have a different configuration than described above.
[0021] The memory can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to the CS screen data offline caching and emergency monitoring method in this embodiment of the invention. The processor executes various functional applications and data processing by running the computer program stored in the memory, thereby realizing the aforementioned CS screen data offline caching and emergency monitoring method. The memory may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include memory remotely located relative to the processor, and these remote memories can be connected to the mobile terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0022] The transmission device is used to receive or send data via a network. Specific examples of the network mentioned above may include a wireless network provided by the mobile terminal's communication provider. In one example, the transmission device includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device may be a Radio Frequency (RF) module, used for wireless communication with the Internet.
[0023] Display devices can be, for example, touchscreen liquid crystal displays (LCDs) and touch displays (also referred to as "touchscreens" or "touch displays"). The LCD allows users to interact with the user interface of the mobile terminal. In some embodiments, the mobile terminal has a graphical user interface (GUI), which allows users to interact with the GUI through finger contact and / or gestures on a touch-sensitive surface. Optional human-computer interaction functions include: creating web pages, drawing, word processing, creating electronic documents, playing games, video conferencing, instant messaging, sending and receiving emails, call interfaces, playing digital video, playing digital music, and / or web browsing, etc. Executable instructions for performing the above human-computer interaction functions are configured / stored in one or more processor-executable computer program products or readable storage media.
[0024] Figure 1 This is a flowchart of a DCS screen loading method according to one embodiment of the present invention, such as... Figure 1 As shown, the method includes the following steps: Step S110: In response to the loading command for the target DCS screen, obtain the screen file of the target DCS screen. The screen file includes a pre-written database fingerprint signature, a unique identifier for at least one template element, and a multi-frame bitmap sequence corresponding to the template element. The specific contents are as follows: In step S110, in response to a loading command initiated by the user or system for the target DCS screen, the client engine calls the screen file parsing interface to read the screen file corresponding to the target DCS screen from the persistent storage medium. The screen file is pre-built and written during compilation (i.e., the screen saving stage), and it contains at least the following three types of preset data: First, the database fingerprint signature, which is a global hash snapshot value calculated using a Merkle tree structure based on the state of all template elements in the measurement point database associated with the target DCS screen when saving the target DCS screen. This signature is used to characterize the consistency state snapshot of the measurement point database at the time of saving.
[0025] Second, at least one template element has a unique identifier for measurement points. This unique identifier (OID) is obtained when saving the target DCS screen by traversing each template element referenced in the target DCS screen, querying the measurement point database based on the pre-generated measurement point path mapping table (i.e., the mapping relationship where the key is the measurement point path and the value is the measurement point OID), and directly writing the OID into the screen file to replace the original measurement point path string, thereby avoiding path parsing and database querying again during loading.
[0026] Third, the multi-frame bitmap sequence corresponding to the template primitive is pre-generated during the template primitive's own storage phase: for all discrete visual states defined by the template primitive (such as vector graphics corresponding to valve open, closed, fault, etc.), they are rendered as continuously arranged bitmap frames and stored in the screen file or associated resource file in the form of a single large-size bitmap strip; each frame bitmap corresponds to a visual representation of the template primitive, and each frame bitmap has a uniform width and height, and is arranged sequentially according to the binary order of the preset visual state combination status code.
[0027] By acquiring the aforementioned pre-set data, the client engine can obtain all the static resources required for subsequent signature verification, data binding, and rendering without parsing vector graphics or querying measurement point paths during loading.
[0028] Step S120: Perform consistency verification on the current measurement point database based on the database fingerprint signature. In response to successful verification, query the current measurement point database to obtain the real-time value of the measurement point based on the unique identifier of the measurement point. The specific content is as follows: In step S120, in response to obtaining the screen file of the target DCS screen, the client engine performs database fingerprint consistency verification and real-time value query operations, as follows: First, the client engine extracts the pre-written database fingerprint signature from the screen file and requests its real-time fingerprint signature from the currently running measurement point database. The database fingerprint signature is a global hash snapshot value calculated using a Merkle tree structure based on the measurement point states associated with all template primitives referenced by the target DCS screen in the measurement point database when saving the target DCS screen. The client engine then compares the database fingerprint signature stored in the screen file with the real-time fingerprint signature returned by the current measurement point database.
[0029] If the comparison result is consistent (i.e., verification passes), it indicates that the measurement point information (including measurement point structure, unique measurement point identifier, and its mapping relationship) related to the target DCS screen in the current measurement point database has not changed since the screen was saved. In this case, the client engine does not need to re-parse the measurement point path or rebuild the mapping relationship. Instead, it directly uses the unique measurement point identifier (OID) pre-written in the screen file as the query key to initiate a data query request to the current measurement point database. The current measurement point database quickly locates the corresponding measurement point record in its index structure based on the unique measurement point identifier and returns the real-time value of that measurement point (e.g., analog quantity value, switch quantity status, or string information).
[0030] Through the above verification and query process, the client engine avoids the time-consuming operations of parsing the measurement point path string and dynamically querying the measurement point OID during loading, which are common in traditional solutions, while ensuring data consistency. This enables the rapid and deterministic acquisition of real-time measurement point values, providing a data foundation for subsequent bitmap state parsing and rendering.
[0031] Step S140: Based on the real-time values of the measurement points, the corresponding bitmap frame index is parsed from the pre-generated bitmap mask index table. The specific content is as follows: In step S140, after obtaining the real-time value of the measurement point from the current measurement point database based on the unique identifier of the measurement point, the client engine performs the state parsing and bitmap frame index mapping operation.
[0032] Specifically, the client engine obtains the real-time values of all discrete process measurement points associated with the template primitive. These real-time values include, but are not limited to, analog quantity values (such as pressure, temperature, and liquid level) or switch quantity statuses (such as open-position signals, closed-position signals, and fault flag bits). Then, the client engine calls a bitmap mask index table pre-stored in memory. This bitmap mask index table is pre-generated during the template primitive saving stage, and its generation method is as follows: based on the user-preset bit operation rules or logical combination rules (for example, concatenating multiple switch quantities bit by bit, or mapping the analog quantity threshold comparison result to a bit flag), all possible combinations of discrete process measurement point values of the template primitive are compressed into a unique combined status code; and this combined status code is used as an index key to establish its mapping relationship with the bitmap frame sequence number in a multi-frame bitmap sequence.
[0033] The client engine takes the currently acquired real-time measurement point value as input and compresses it into a runtime combined status code according to the same preset bit operation rules or logical combination rules used when generating the bitmap mask index table. Then, the client engine uses the runtime combined status code as the index key to query the bitmap mask index table: if a match is found, the bitmap frame number corresponding to that combined status code is extracted from the bitmap mask index table as the basis for subsequently extracting the target bitmap frame; if a match fails (e.g., the combination of real-time measurement point values is not defined in the index table), it is processed according to the default rules (such as returning the bitmap frame index corresponding to the fault status or the first frame).
[0034] Through the above steps, the client engine quickly and deterministically converts the original real-time values of industrial process measurement points into bitmap frame indices corresponding to the visual states required to be displayed by the template primitives, avoiding the overhead of complex logical branch judgments and vector graphics recalculation for multiple measurement point values at runtime in traditional solutions.
[0035] Step S160: Based on the bitmap frame index, extract the corresponding target bitmap frame from the multi-frame bitmap sequence, and draw the target bitmap frame onto the target canvas to complete the loading of the target DCS screen. The specific content is as follows: In step S160, after the client engine parses the bitmap frame index corresponding to the current template primitive from the bitmap mask index table, it performs the extraction and drawing operation of the target bitmap frame.
[0036] Specifically, the client engine retrieves a multi-frame bitmap sequence corresponding to the pre-stored template primitives. This multi-frame bitmap sequence is generated during the template primitive saving phase, where the vector graphics representing all visual states are rendered into consecutively arranged bitmap frames, and stored in memory or video memory as a single large bitmap strip. This bitmap strip has the following characteristics: each frame bitmap has a uniform width W and a uniform height H, and they are arranged horizontally in the binary order of the template primitive visual state combination status codes. Therefore, the total width of the entire bitmap strip is the number of bitmap frames N multiplied by the single frame width W, and the total height is H.
[0037] The client engine calculates the offset within the bitmap strip according to claim 8, based on the bitmap frame index N_index (ranging from 0 to N-1) and the width W of a single bitmap frame: offset = N_index × W. Then, based on this offset, a drawing rectangle is determined, with the offset as the starting X-coordinate, 0 as the starting Y-coordinate, a width of W, and a height of H; that is, the rectangular area is (offset, 0, W, H).
[0038] The client engine calls the graphics library's texture mapping or bit-block transfer interface to perform a bit-block transfer operation on the data in the video memory cache area corresponding to the drawing rectangle, directly copying it to the specified coordinates on the target canvas (e.g., the predetermined position of the template primitive instance in the target canvas). This process requires no vector graphics parsing or pixel-level blending calculations; the drawing of a single template primitive can be completed with just one memory copy.
[0039] Repeat the above process until all template element instances referenced in the target DCS screen have been drawn. At the same time, combine the bitmap data of static background elements (such as pipelines, containers, and plant structures) stored in the screen file and render them together to finally complete the loading and display of the target DCS screen.
[0040] Based on steps S110 to S160 above, in this embodiment of the invention, in response to a loading command, the system directly obtains a screen file pre-written with a unique identifier for measurement points and a multi-frame bitmap sequence. After database fingerprint consistency verification, it quickly queries the current measurement point database based on the unique identifier for measurement points to obtain real-time values of the measurement points. Then, it parses the corresponding bitmap frame index from the pre-generated bitmap mask index table, and finally extracts the target bitmap frame from the multi-frame bitmap sequence and draws it onto the target canvas. This scheme transforms runtime-consuming vector calculations into compile-time bitmap pre-rendering and static mapping, eliminates redundant vector calculations of background primitives, reuses the same bitmap sequence for multiple instances of the same template primitives, and binds the measurement point query to the compile-time unique identifier in advance from dynamic path resolution. This significantly improves the screen loading speed, reduces memory usage, and avoids long waiting times during emergency operations. Thus, it solves the technical problems of low screen loading efficiency, high memory usage, and interactive stuttering caused by runtime vector resolution and dynamic measurement point query in the prior art.
[0041] The method of the embodiments of the present invention generates a multi-frame bitmap sequence in advance through the following steps: in response to a save instruction for a template primitive, all visual states corresponding to the template primitive are obtained; the vector graphics corresponding to all visual states are rendered into consecutively arranged bitmap frames; the consecutively arranged bitmap frames are stored as a single large-size bitmap strip in memory or video memory, so that primitive drawing can be completed with only one bit block transfer during rendering, thereby eliminating the overhead of repeated vector parsing and significantly improving the efficiency of screen loading and rendering.
[0042] Furthermore, the bitmap frames in the bitmap strip are arranged sequentially according to the binary order of the visual state combination status codes of the template primitives, and each bitmap frame has a uniform width and height, thereby simplifying the state resolution process into constant-level arithmetic operations and avoiding the overhead of table lookup or hash calculation.
[0043] In this embodiment, the unique identifier of the measurement point and the fingerprint signature of the database are pre-written into the screen file through the following steps: in response to the save command for the target DCS screen, all template elements referenced by the target DCS screen are traversed; the measurement point database is queried based on the measurement point path mapping table associated with each template element to obtain the corresponding unique identifier of the measurement point; the fingerprint signature of the measurement point database at the current time is associated with the unique identifier of the measurement point and written into the screen file, thereby avoiding the overhead of repeated database pattern queries and string parsing when the screen is loaded, and providing a deterministic basis for fast consistency verification.
[0044] In this embodiment, the system further includes: a measurement point path mapping table, which is a set of key-value pairs pre-generated based on template primitives. The key of the key-value pair set is the measurement point path associated with the template primitive, and the value is the unique identifier of the measurement point obtained from the measurement point database. The database fingerprint signature is calculated using a Merkle tree structure and is used to represent a global hash snapshot of the status of all measurement points associated with the target DCS screen in the measurement point database. This allows for consistency verification to be completed with only one lightweight root hash comparison during loading, avoiding redundant verification of each measurement point while ensuring data integrity, and significantly reducing the query and verification overhead during loading.
[0045] In this embodiment, the bitmap mask index table is generated through the following steps: obtaining all discrete process measurement point values associated with the template primitives; compressing the discrete process measurement point values into unique combined status codes according to preset bit operation rules or logical combination rules; establishing a mapping relationship between the combined status codes and the bitmap frame numbers in the multi-frame bitmap sequence to generate the bitmap mask index table, thereby transforming multi-condition logical branch judgments into constant-level mapping queries and avoiding the overhead of frame-by-frame parsing and vector redrawing.
[0046] Furthermore, after the step of querying the current measurement point database based on the unique identifier of the measurement point to obtain the real-time value of the measurement point, the method further includes: compressing the currently obtained real-time value of the measurement point into a runtime combination status code according to the preset bit operation rules or logical combination rules, and querying the bitmap mask index table with the runtime combination status code as the index key to obtain the bitmap frame index, thereby transforming the multi-condition logical judgment into a constant-level table lookup operation, avoiding the runtime branch prediction overhead and condition-by-condition evaluation delay.
[0047] Specifically, the steps for extracting the corresponding target bitmap frame from a multi-frame bitmap sequence based on the bitmap frame index include: calculating the offset in the bitmap strip based on the bitmap frame index and the width of a single frame bitmap in the bitmap strip; determining the drawing rectangle based on the offset; and performing a bit block transfer operation on the video memory cache corresponding to the drawing rectangle to copy it to the specified coordinates of the target canvas. This transforms primitive drawing from time-consuming vector parsing and pixel filling into a single memory copy, thereby achieving extreme simplification of the rendering path and deterministic improvement in drawing efficiency.
[0048] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods of the various embodiments of the present invention.
[0049] This invention also provides a DCS screen loading device for implementing the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0050] Figure 2 According to one embodiment of the present invention, a DCS screen loading device includes: The acquisition module 201 is used to acquire the image file of the target DCS image in response to the loading command for the target DCS image. The image file includes a pre-written database fingerprint signature, a unique identifier of at least one template element, and a multi-frame bitmap sequence corresponding to the template element. Verification module 202 is used to perform consistency verification on the current measurement point database based on the database fingerprint signature. In response to the verification passing, it queries the current measurement point database to obtain the real-time value of the measurement point based on the unique identifier of the measurement point. The parsing module 203 is used to parse the corresponding bitmap frame index from the pre-generated bitmap mask index table based on the real-time value of the measurement point; The extraction module 204 is used to extract the corresponding target bitmap frame from the multi-frame bitmap sequence according to the bitmap frame index, and draw the target bitmap frame onto the target canvas to complete the loading of the target DCS screen.
[0051] It should be noted that the above modules can be implemented by software or hardware. For the latter, they can be implemented in the following ways, but are not limited to: all the above modules are located in the same processor; or, the above modules are located in different processors in any combination.
[0052] According to one embodiment of the present invention, an electronic device is also provided, including: a memory storing an executable program; and a processor for running the program, wherein the program executes the above-described method for offline caching and emergency monitoring of CS screen data during runtime.
[0053] Optionally, in this embodiment, the processor can be configured to perform the following steps via a computer program: Step S1: In response to the loading command for the target DCS screen, obtain the screen file of the target DCS screen. The screen file includes a pre-written database fingerprint signature, a unique identifier of at least one template element, and a multi-frame bitmap sequence corresponding to the template element. Step S2: Perform consistency verification on the current measurement point database based on the database fingerprint signature. In response to the verification passing, query the current measurement point database according to the measurement point unique identifier to obtain the real-time value of the measurement point. Step S3: Based on the real-time values of the measurement points, parse the corresponding bitmap frame index from the pre-generated bitmap mask index table; Step S4: Based on the bitmap frame index, extract the corresponding target bitmap frame from the multi-frame bitmap sequence, and draw the target bitmap frame onto the target canvas to complete the loading of the target DCS screen.
[0054] According to one embodiment of the present invention, a computer-readable storage medium is also provided, the computer-readable storage medium including a stored executable program, wherein, when the executable program is running, it controls the device where the storage medium is located to execute the above-described CS screen data offline caching and emergency monitoring method.
[0055] Optionally, in this embodiment, the storage medium may be configured to store a computer program for performing the following steps: Step S1: In response to the loading command for the target DCS screen, obtain the screen file of the target DCS screen. The screen file includes a pre-written database fingerprint signature, a unique identifier of at least one template element, and a multi-frame bitmap sequence corresponding to the template element. Step S2: Perform consistency verification on the current measurement point database based on the database fingerprint signature. In response to the verification passing, query the current measurement point database according to the measurement point unique identifier to obtain the real-time value of the measurement point. Step S3: Based on the real-time values of the measurement points, parse the corresponding bitmap frame index from the pre-generated bitmap mask index table; Step S4: Based on the bitmap frame index, extract the corresponding target bitmap frame from the multi-frame bitmap sequence, and draw the target bitmap frame onto the target canvas to complete the loading of the target DCS screen.
[0056] Optionally, in this embodiment, the storage medium may include, but is not limited to, various media capable of storing computer programs, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0057] According to one embodiment of the present invention, a computer program product is also provided, including a computer program that, when executed by a processor, implements the above-described method for offline CS screen data caching and emergency monitoring.
[0058] Optionally, in this embodiment, the above-mentioned computer program product can be configured as a computer program that performs the following steps: Step S1: In response to the loading command for the target DCS screen, obtain the screen file of the target DCS screen. The screen file includes a pre-written database fingerprint signature, a unique identifier of at least one template element, and a multi-frame bitmap sequence corresponding to the template element. Step S2: Perform consistency verification on the current measurement point database based on the database fingerprint signature. In response to the verification passing, query the current measurement point database according to the measurement point unique identifier to obtain the real-time value of the measurement point. Step S3: Based on the real-time values of the measurement points, parse the corresponding bitmap frame index from the pre-generated bitmap mask index table; Step S4: Based on the bitmap frame index, extract the corresponding target bitmap frame from the multi-frame bitmap sequence, and draw the target bitmap frame onto the target canvas to complete the loading of the target DCS screen.
[0059] Optionally, specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementations, and will not be repeated here.
[0060] In the above embodiments of the present invention, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0061] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual couplings, direct couplings, or communication connections may be through some interfaces; indirect couplings or communication connections between units or modules may be electrical or other forms.
[0062] The units described as separate components may or may not be physically separate. Similarly, the components shown as units may or may not be physical units; they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment, depending on actual needs.
[0063] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0064] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0065] The above are merely preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A DCS screen loading method, characterized in that, include: In response to a loading command for a target DCS screen, the screen file of the target DCS screen is obtained. The screen file includes a pre-written database fingerprint signature, a unique identifier for at least one template element, and a multi-frame bitmap sequence corresponding to the template element. Based on the database fingerprint signature, the consistency of the current measurement point database is verified. In response to the verification passing, the real-time value of the measurement point is obtained by querying the current measurement point database according to the unique identifier of the measurement point. Based on the real-time values of the measurement points, the corresponding bitmap frame index is parsed from the pre-generated bitmap mask index table; Based on the bitmap frame index, the corresponding target bitmap frame is extracted from the multi-frame bitmap sequence, and the target bitmap frame is drawn onto the target canvas to complete the loading of the target DCS screen.
2. The method according to claim 1, characterized in that, The multi-frame bitmap sequence is generated in advance through the following steps: In response to the save command for the template primitive, all visual states corresponding to the template primitive are obtained; the vector graphics corresponding to all visual states are rendered into consecutively arranged bitmap frames. The consecutively arranged bitmap frames are stored as a single large bitmap strip in memory or video memory.
3. The method according to claim 2, characterized in that, The bitmap frames in the bitmap strip are arranged sequentially according to the binary order of the visual state combination status codes of the template primitives, and each bitmap frame has a uniform width and height.
4. The method according to claim 1, characterized in that, The unique identifier of the measurement point and the fingerprint signature in the database are pre-written into the image file through the following steps: In response to a save command for the target DCS screen, all template elements referenced by the target DCS screen are traversed. Based on the measurement point path mapping table associated with each template element, the measurement point database is queried to obtain the corresponding unique identifier of the measurement point; The fingerprint signature of the measurement point database at the current moment is associated with the unique identifier of the measurement point and written into the screen file.
5. The method according to claim 4, characterized in that, Also includes: The measurement point path mapping table is a set of key-value pairs pre-generated based on the template primitives. The key of the set of key-value pairs is the measurement point path associated with the template primitives, and the value is the unique identifier of the measurement point obtained from the measurement point database. The database fingerprint signature is calculated using a Merkle tree structure and is used to represent a global hash snapshot of the status of all measurement points in the measurement point database associated with the target DCS screen.
6. The method according to claim 1, characterized in that, The bitmap mask index table is generated through the following steps: Obtain all discrete process measurement point values associated with the template primitive; compress the discrete process measurement point values into a unique combined status code according to preset bit operation rules or logical combination rules; A mapping relationship is established between the combined status code and the bitmap frame number in the multi-frame bitmap sequence to generate the bitmap mask index table.
7. The method according to claim 6, characterized in that, After the step of querying the current measurement point database based on the measurement point's unique identifier to obtain the measurement point's real-time value, the method further includes: Based on the preset bit operation rules or logical combination rules, the currently acquired real-time value of the measurement point is compressed into a runtime combined status code, and the bitmap mask index table is queried using the runtime combined status code as the index key to obtain the bitmap frame index.
8. The method according to claim 2, characterized in that, The step of extracting the corresponding target bitmap frame from the multi-frame bitmap sequence based on the bitmap frame index specifically includes: Based on the bitmap frame index and the width of a single frame bitmap in the bitmap strip, calculate the offset in the bitmap strip; determine the rectangle to be drawn based on the offset; Perform a bit block transfer operation on the video memory cache corresponding to the drawn rectangle to copy it to the specified coordinates of the target canvas.
9. A DCS screen loading device, characterized in that, include: The acquisition module is used to acquire the image file of the target DCS image in response to the loading command for the target DCS image. The image file includes a pre-written database fingerprint signature, a unique identifier of at least one template element, and a multi-frame bitmap sequence corresponding to the template element. The verification module is used to perform consistency verification on the current measurement point database based on the database fingerprint signature. In response to the verification passing, it queries the current measurement point database to obtain the real-time value of the measurement point based on the unique identifier of the measurement point. The parsing module is used to parse the corresponding bitmap frame index from a pre-generated bitmap mask index table based on the real-time value of the measurement point. The extraction module is used to extract the corresponding target bitmap frame from the multi-frame bitmap sequence according to the bitmap frame index, and draw the target bitmap frame onto the target canvas to complete the loading of the target DCS screen.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it is based on the DCS screen loading method as described in any one of claims 1 to 8.