A PDF engineering drawing cross-end synchronization method and system based on operation instruction serialization and a storage medium

By employing semantic serialization and incremental compression transmission methods, the issues of data correlation and device DPI differences in cross-device synchronization of PDF engineering drawings were resolved, achieving efficient, accurate cross-device synchronization and consistent display.

CN121233555BActive Publication Date: 2026-08-25HANGZHOU DINGHONG TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511284299.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-09
Publication Date
2026-08-25
Estimated Expiration
2045-09-09

AI Technical Summary

Technical Problem

Existing cross-device synchronization technologies for PDF engineering drawings have failed to effectively address the complex relationships between data elements within the drawings, leading to command conflicts and synchronization errors. Furthermore, directly transmitting high-precision coordinates and layer dependencies causes performance bottlenecks and synchronization delays, while differences in DPI between devices result in inconsistent rendering results.

Method used

The method employs operation command serialization, incremental compression transmission, and device adaptation parsing. By semantically serializing operation commands, a dependency graph is constructed to identify critical paths. Only modified commands are transmitted, and device adaptation parsing is performed to ensure the accuracy and efficiency of synchronization.

Benefits of technology

It improves synchronization efficiency, reduces network bandwidth pressure, ensures that instructions are executed in the correct order, reduces synchronization conflicts, and achieves consistency in multi-terminal display.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121233555B_ABST
    Figure CN121233555B_ABST
Patent Text Reader

Abstract

The application discloses a PDF engineering drawing cross-terminal synchronization method and system based on operation instruction serialization and a storage medium, and belongs to the technical field of cross-terminal engineering drawing collaborative processing. The method comprises the following steps: capturing operation instructions for a PDF engineering drawing in multiple terminals, extracting operation types, target object IDs and parameters as semantic metadata; constructing a dependency graph of the operation instructions based on the target object IDs, and identifying key path instructions; encoding the operation instructions and the dependency into a serialized format, and transmitting only the instructions of the changed part; analyzing the serialized instructions at a receiving terminal, detecting conflicts based on the semantic metadata, and executing the instructions according to the dependency; and dynamically adapting the rendering result according to device parameters, including coordinate system conversion and symbol mapping. Thus, the problems of synchronization efficiency and accuracy in the prior art are solved, and the effect of real-time, efficient and synchronous consistency of engineering drawings in multiple terminals is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of collaborative processing and cross-device synchronization of engineering drawings, and in particular to a method, system and storage medium for cross-device synchronization of PDF engineering drawings based on operation instruction serialization. This method is applicable to application scenarios that maintain real-time consistency of engineering drawing editing operations across multiple devices (including but not limited to desktop and mobile PDF readers and editors). Background Technology

[0002] In many industries such as construction and manufacturing, cross-platform synchronization of PDF engineering drawings is a key aspect of project collaboration.

[0003] However, existing general PDF document cross-platform synchronization technologies have not solved the significant defects in engineering drawing synchronization: First, they ignore the complex relationships between data elements within engineering drawings, such as the precise matching between dimensions and geometric shapes, which often leads to command conflicts and synchronization errors; second, directly transmitting the entire drawing data containing high-precision coordinates and layer dependencies not only consumes a lot of bandwidth but also easily causes performance bottlenecks and synchronization delays; finally, the DPI difference between different devices (e.g., 96 DPI on desktop and 300 DPI on mobile) causes a display deviation of 2-3 pixels for the same wireframe, and the inconsistency in command parsing methods further exacerbates the inconsistency of rendering results, affecting the accuracy of synchronization.

[0004] Therefore, synchronization efficiency and the accuracy of synchronized data are problems that need to be solved. Summary of the Invention

[0005] The present invention aims to provide a cross-device synchronization method, system, and storage medium for PDF engineering drawings based on operation instruction serialization, so as to at least solve the above-mentioned problems in the prior art.

[0006] Specifically, this invention proposes a cross-device synchronization method for PDF engineering drawings based on operation instruction serialization, incremental compression transmission, and device adaptation parsing technology. This method effectively solves the problems in the prior art through the following technical means:

[0007] Semantic serialization: Converts user operation instructions into a serialized format containing semantic metadata. This metadata explicitly indicates the operation type (e.g., size modification, layer adjustment, etc.), the target object ID (e.g., a specific geometry or annotation), and its related parameters, thereby ensuring the integrity and parsability of the instructions during transmission.

[0008] Dependency Encoding and Critical Path Identification: By constructing a directed acyclic graph (DAG) of operation instructions, this invention can accurately identify the dependencies between instructions and determine the critical path instructions, ensuring that these instructions are executed in the correct logical order during synchronization, thereby avoiding synchronization conflicts caused by incorrect instruction order.

[0009] Incremental compression transmission: This invention transmits only the modified instructions and uses advanced differential coding technology to compress the transmitted data; wherein, the differential coding only retains the instruction differences from the baseline version, which significantly reduces the amount of data transmission, improves synchronization efficiency, and alleviates the pressure on network bandwidth.

[0010] Device Adaptation Resolution and Dynamic Rendering Adjustment: To address the issues of DPI differences and inconsistencies in command parsing methods among different operating devices, this invention provides a device adaptation resolution mechanism that can dynamically adjust the coordinate system, symbol library, and rendering parameters to ensure the consistency and accuracy of multi-device display results.

[0011] In a first aspect, embodiments of this application provide a method for cross-device synchronization of PDF engineering drawings based on operation instruction serialization, including:

[0012] Capture operation commands from multiple devices to PDF engineering drawings, and extract operation type, target object ID and parameters as semantic metadata;

[0013] Construct a dependency graph of operation instructions based on the target object ID to identify critical path instructions;

[0014] The operation instructions and dependencies are encoded into a serialized format, and only the modified parts of the instructions are transmitted;

[0015] The receiving end parses the serialization instructions, detects conflicts based on semantic metadata, and executes the instructions according to dependencies;

[0016] The rendering results are dynamically adapted based on device parameters, including coordinate system transformation and symbol mapping.

[0017] In some embodiments, the semantic metadata includes at least the operation type, target object ID, and operation parameters.

[0018] In some embodiments, the dependency graph refers to a graphical structure representing the logical dependencies between operation instructions in the form of a directed acyclic graph (DAG).

[0019] In some embodiments, the serialization format is a custom binary format, including at least:

[0020] The operation type field (4 digits) is used to identify different operation categories;

[0021] The Target Object ID field (32 bits) is used to uniquely identify a specific object in the PDF engineering drawing;

[0022] The parameter length field (8 bits) is used to indicate the byte length of subsequent parameter fields;

[0023] The parameter field (variable length) is used to store the specific parameter values ​​required for the operation.

[0024] In some embodiments, the detection of the operational conflict is based on the timestamp information in the semantic metadata and the device ID information that initiated the command;

[0025] Specifically, when multiple devices simultaneously modify the ID of the same target object (e.g., the desktop and mobile devices simultaneously modify the same dimension annotation "dim_id_456"), it is determined to be a conflict.

[0026] Furthermore, the conflict resolution strategy is as follows: first, filter out conflicting instructions without dependencies (e.g., color adjustment instructions for independent layers) based on the dependency graph and then automatically merge them;

[0027] Furthermore, for conflicting instructions that have dependencies, the latest version of the timestamp is retained and the conflict status is marked for subsequent processing by the user (for example, displaying "This dimension annotation has been modified on multiple platforms, please confirm the version to retain" on the interface).

[0028] In some embodiments, the dynamic adaptation of rendering results based on device parameters includes coordinate system transformation, specifically calculating the coordinate scaling ratio based on different device DPIs, with the formula: actual coordinates = original coordinates × (device DPI / standard DPI).

[0029] In some embodiments, the dynamic adaptation of rendering results based on device parameters also includes symbol mapping, specifically mapping ISO standard symbols to local symbols supported by the device.

[0030] Secondly, embodiments of the present invention also provide a cross-end synchronization system for PDF engineering drawings based on operation instruction serialization, comprising:

[0031] The instruction capture module is used to intercept and capture user operation instructions;

[0032] The semantic extraction module is used to extract semantic metadata from the operation instructions;

[0033] The serialization and encoding module is used to construct the operation instruction dependency graph and serialize the instructions into binary format;

[0034] A compression transmission module is used to compress serialized instructions using differential encoding; wherein the differential encoding only retains the parts of the instruction that differ from the base version;

[0035] The decompression and parsing module is used to receive and decompress the differentially compressed change instruction and restore the serialized instruction structure;

[0036] The conflict handling module is used to detect conflicts based on device ID and timestamp, and to process command merging.

[0037] The dependency execution module is used to execute instructions in an ordered manner according to the dependency graph;

[0038] The device adaptation module is used to dynamically adjust the rendering output based on device parameters.

[0039] Furthermore, the device adapter module includes:

[0040] The coordinate system transformation submodule is used to calculate the coordinate scaling ratio based on the DPI of different devices;

[0041] The symbol mapping submodule is used to map standard engineering symbols to device-supported local symbols.

[0042] Thirdly, embodiments of this application also provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method as described in any one of claims 1-7.

[0043] Compared with the prior art, the present invention has the following advantages or beneficial effects:

[0044] Improved synchronization efficiency: Incremental compression transmission transmits only the modified instructions, reducing bandwidth consumption.

[0045] Improved synchronization accuracy: Semantic serialization and dependency encoding ensure instructions are executed in the correct order, reducing synchronization conflict rates. Dynamic adaptation of coordinate systems and symbol libraries enhances multi-platform compatibility and ensures consistent display across multiple devices. Attached Figure Description

[0046] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this invention, illustrate exemplary embodiments of the invention and are used to explain the invention, but do not constitute an undue limitation of the invention. In the drawings:

[0047] Figure 1 This is a flowchart of a cross-platform synchronization method for PDF engineering drawings based on operation instruction serialization, according to an embodiment of this application.

[0048] Figure 2 This is a serialization instruction format for a cross-end synchronization method of PDF engineering drawings based on operation instruction serialization according to an embodiment of this application;

[0049] Figure 3This is a system architecture diagram of a cross-end synchronization method for PDF engineering drawings based on operation instruction serialization according to an embodiment of this application;

[0050] Figure 4 This is a schematic diagram of the structure of an electronic device according to an embodiment of the present invention.

[0051] Reference numerals: 21. Instruction capture module; 22. Semantic extraction module; 23. Serialization encoding module; 24. Compression transmission module; 25. Decompression and parsing module; 26. Conflict handling module; 27. Dependency execution module; 28. Device adaptation module; 281. Coordinate system transformation submodule; 282. Symbol mapping submodule. Detailed Implementation

[0052] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present invention and are not intended to limit the present invention. All other embodiments obtained by those skilled in the art based on the embodiments provided by the present invention without creative effort are within the scope of protection of the present invention.

[0053] Obviously, the accompanying drawings described below are merely some examples or embodiments of the present invention. Those skilled in the art can apply the present invention to other similar scenarios based on these drawings without any inventive effort. Furthermore, it is understood that although the effort involved in such development may be complex and lengthy, for those skilled in the art related to the content disclosed in this invention, making some design, manufacturing, or production modifications based on the technical content disclosed in this invention is merely a conventional technical means and should not be construed as insufficient disclosure of the present invention.

[0054] In this invention, the reference to "embodiment" means that a specific feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of the invention. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it a mutually exclusive, independent, or alternative embodiment. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described in this invention may be combined with other embodiments without conflict.

[0055] Unless otherwise defined, the technical or scientific terms used in this invention shall have the ordinary meaning understood by one of ordinary skill in the art to which this invention pertains. The terms "a," "an," "an," "the," and similar words used in this invention do not indicate quantity limitation and may indicate singular or plural. The terms "comprising," "including," "having," and any variations thereof used in this invention are intended to cover non-exclusive inclusion; for example, a process, method, apparatus, product, or device that includes a series of steps or modules (units) is not limited to the listed steps or units, but may also include steps or units not listed, or may include other steps or units inherent to these processes, methods, products, or devices. The terms "connected," "linked," "coupled," and similar words used in this invention are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "A plurality" in this invention refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships may exist; for example, "A and / or B" can represent: A alone, A and B simultaneously, and B alone. The character " / " generally indicates that the preceding and following objects have an "or" relationship. The terms "first," "second," and "third" used in this invention are merely to distinguish similar objects and do not represent a specific ordering of the objects.

[0056] Existing cross-device synchronization technologies for PDF engineering drawings do not consider the interrelationships of data within the drawings, such as command conflicts caused by mismatches between dimensions and geometry. Furthermore, operations on engineering drawings involve high-precision coordinates and layer dependencies; direct transmission can lead to performance bottlenecks and synchronization delays. Moreover, different devices have inconsistent DPI; if different devices interpret commands differently (e.g., differences in coordinate origins), significant differences in rendering results (e.g., wireframe deviations) can occur, compromising accuracy.

[0057] Example 1

[0058] like Figure 1 As shown, this application provides a cross-platform synchronization method for PDF engineering drawings based on operation instruction serialization, the method comprising:

[0059] Step S11: Capture operation commands from multiple terminals to the PDF engineering drawing, and extract the operation type, target object ID, and parameters as semantic metadata.

[0060] Furthermore, based on user actions, user actions can be intercepted through hook technology, such as mouse clicks or keyboard input.

[0061] Furthermore, raw instructions are generated based on these user actions.

[0062] Furthermore, parsing the original instructions includes:

[0063] The extraction operation type can be a measurement operation or a labeling operation;

[0064] Extract the target object ID, which can be a geometric shape ID or text;

[0065] Extract parameters, which can be size values. Ensure semantic metadata is obtained.

[0066] Step S12: Construct a dependency graph of operation instructions based on the target object ID and identify critical path instructions.

[0067] Furthermore, a directed acyclic graph (DAG) is constructed based on the target object ID, for example, a dependency graph between dimension annotations and geometry IDs is constructed.

[0068] Furthermore, by performing topological sorting on the directed acyclic graph (DAG), the critical path for instruction execution can be determined, thereby ensuring that dependent instructions are executed in the correct logical order.

[0069] Step S13: Encode the operation instructions and dependencies into a serialized format, and transmit only the changed parts of the instructions.

[0070] Furthermore, user operation instructions are converted into a serialized format containing semantic metadata and encoded into a custom binary format (such as...). Figure 2 As shown, this metadata explicitly indicates the operation type (e.g., size modification, layer adjustment, etc.), the target object ID (e.g., a specific geometry or annotation), and its related parameters, thereby ensuring the integrity and resolvability of the instructions during transmission.

[0071] Furthermore, differential encoding is used to compress serialized instructions, retaining only the parts that differ from the baseline version.

[0072] Furthermore, the specific steps of the differential coding include:

[0073] Set the base version as the instruction sequence of the last successful synchronization, calculate the hash value (such as SHA-256) of each instruction in the base version and store it;

[0074] For the current sequence of instructions to be transmitted, calculate the hash value for each instruction and compare it with the hash value of the baseline version;

[0075] Extract only instructions with mismatched hash values ​​(i.e., change instructions) and record the position information of the instruction in the sequence;

[0076] Packaging and transmitting change instructions and location information can effectively save bandwidth usage.

[0077] Step S14: The receiving end parses the serialization instructions, detects conflicts based on semantic metadata, and executes the instructions according to dependencies.

[0078] Further, the instructions for the modified portion are received and decompressed, and the serialization instructions are restored.

[0079] Furthermore, the timestamp information in the semantic metadata and the device ID information that initiated the command are used to detect conflicts. When multiple devices simultaneously modify the same target object ID (e.g., the desktop and mobile devices simultaneously modify the same dimension annotation "dim_id_456"), it is determined to be a conflict. The conflict resolution strategy is as follows:

[0080] First, filter out conflicting instructions with no dependencies (e.g., color adjustment instructions for independent layers) based on the dependency graph and then automatically merge them;

[0081] Preferably, for conflicting instructions that have dependencies, the latest version of the timestamp is retained and the conflict status is marked for subsequent processing by the user (for example, displaying "This dimension annotation has been modified on multiple platforms, please confirm the version to retain" on the interface).

[0082] Preferably, the timestamp can be a logical timestamp mechanism (e.g., based on a vector clock algorithm) or a timestamp uniformly allocated by the collaborative server, in order to better ensure the consistency of time logic between different devices.

[0083] Step S15: Dynamically adapt the rendering results according to the device parameters, including coordinate system transformation and symbol mapping.

[0084] The rendering output is dynamically adjusted based on the device parameters.

[0085] Furthermore, the rendering results are dynamically adapted based on device parameters, including coordinate system transformation. Specifically, the coordinate scaling ratio is calculated based on the DPI of different devices, with the formula: Actual coordinates = Original coordinates × (Device DPI / Standard DPI).

[0086] Furthermore, dynamically adapting the rendering results based on device parameters also includes symbol mapping, specifically mapping ISO standard symbols to device-supported local symbols (e.g., mapping "⌀" to "Φ" on mobile devices) to ensure consistent display.

[0087] Example 2

[0088] The method for modifying dimension annotations on PDF engineering drawings on a desktop (Windows system, DPI 96) and syncing the engineering drawings on a mobile device (Android system, DPI 300) includes:

[0089] Step 1, Command Capture: The desktop client intercepts the user's operation of modifying the dimension annotation (mouse dragging dim_id_456, changing the parameter from 45±0.1 to 50±0.1) using Hook technology, and generates the original command;

[0090] Step 2, semantic extraction: extract operation type dimension_edit (encoding 0001), target object ID dim_id_456 (32-bit binary 0x000001C8), parameter 50±0.1;

[0091] Step 3 depends on the coding: Construct a DAG, associate dim_id_456 with the corresponding geometric figure geom_id_123, and determine the critical path of "first synchronize the position of geom_id_123 → then perform dim_id_456 modification";

[0092] Step 4, Incremental transmission: Differential encoding is used to transmit only the parameter change part of dim_id_456 (compared to the previous synchronization version, only 8 bytes of parameter data need to be transmitted). Under a 10Mbps network, the transmission time is less than 0.1 seconds.

[0093] Step 5, Conflict Detection: The mobile device receives the command and, based on the timestamp (desktop command timestamp 2025-05-2010:00:00.123) and device ID (desktop IDPC-001), detects no concurrent conflicts;

[0094] Step 6, Device Adaptation: Convert the coordinate system according to the formula "Actual coordinates = Original coordinates × (300 / 96)" and map the symbol "⌀" to the mobile-compatible "Φ". Finally, the size annotation displayed on the mobile device is completely consistent with that on the desktop, and the wireframe deviation is less than 0.5 pixels.

[0095] In summary, the present invention has the following advantages or beneficial effects:

[0096] Improved synchronization efficiency: Incremental compression transmission transmits only the modified instructions, reducing bandwidth consumption.

[0097] Improved synchronization accuracy: Semantic serialization and dependency encoding ensure instructions are executed in the correct order, reducing synchronization conflict rates. Dynamic adaptation of coordinate systems and symbol libraries enhances multi-platform compatibility and ensures consistent display across multiple devices.

[0098] It should be noted that the above modules can be functional modules or program modules, and can be implemented through software or hardware. For modules implemented through hardware, the above modules can reside in the same processor; or the above modules can be located in different processors in any combination.

[0099] It should be noted that the steps shown in the above process or in the flowchart of the accompanying drawings can be executed in a computer device such as a set of computer-executable instructions, and 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.

[0100] This embodiment also provides a cross-platform synchronization system for PDF engineering drawings based on operation instruction serialization. Figure 3 This is a structural diagram of a cross-end synchronization system for PDF engineering drawings based on operation instruction serialization, according to an embodiment of this application. Figure 3 As shown, the system includes: 21. Instruction capture module; 22. Semantic extraction module; 23. Serialization encoding module; 24. Compression and transmission module; 25. Decompression and parsing module; 26. Conflict handling module; 27. Dependency execution module; 28. Device adaptation module, wherein:

[0101] The instruction capture module is used to intercept and capture user operation instructions;

[0102] The semantic extraction module is used to extract semantic metadata from the operation instructions;

[0103] The serialization and encoding module is used to construct the operation instruction dependency graph and serialize the instructions into binary format;

[0104] A compression transmission module is used to compress serialized instructions using differential encoding; wherein the differential encoding only retains the parts of the instruction that differ from the base version;

[0105] The decompression and parsing module is used to receive and decompress the differentially compressed change instruction and restore the serialized instruction structure;

[0106] The conflict handling module is used to detect conflicts based on device ID and timestamp, and to process command merging.

[0107] The dependency execution module is used to execute instructions in an ordered manner according to the dependency graph;

[0108] The device adaptation module is used to dynamically adjust the rendering output based on device parameters.

[0109] Furthermore, the device adapter module includes:

[0110] The coordinate system transformation submodule is used to calculate the coordinate scaling ratio based on the DPI of different devices;

[0111] The symbol mapping submodule is used to map standard engineering symbols to device-supported local symbols.

[0112] The above system achieves the following advantages or beneficial effects:

[0113] Improved synchronization efficiency: Incremental compression transmission transmits only the modified instructions, reducing bandwidth consumption.

[0114] Improved synchronization accuracy: Semantic serialization and dependency encoding ensure instructions are executed in the correct order, reducing synchronization conflict rates. Dynamic adaptation of coordinate systems and symbol libraries enhances multi-platform compatibility and ensures consistent display across multiple devices.

[0115] It should be noted that the above modules can be functional modules or program modules, and can be implemented through software or hardware. For modules implemented through hardware, the above modules can reside in the same processor; or the above modules can be located in different processors in any combination.

[0116] This invention also provides an electronic device, including a memory and a processor. The memory stores a computer program, and the processor is configured to run the computer program to execute the steps of a cross-device synchronization method for PDF engineering drawings based on operation instruction serialization according to any embodiment of this invention. The detailed implementation process of the cross-device synchronization method for PDF engineering drawings based on operation instruction serialization has been described in detail in this specification and will not be repeated here.

[0117] This invention also provides a computer-readable storage medium, characterized in that the storage medium stores a computer program, which, when read and loaded into memory by a processor, implements the steps of a cross-device synchronization method for PDF engineering drawings based on operation instruction serialization according to any embodiment of this invention. The detailed implementation process of the cross-device synchronization method for PDF engineering drawings based on operation instruction serialization has been described in detail in this specification and will not be repeated here.

[0118] In one embodiment, Figure 4 This is a schematic diagram of an electronic device according to an embodiment of the present invention. The electronic device is connected to a network interface, a processor, memory, and a storage controller via an internal system bus. The network interface is used for communication with external terminals via a network connection; the storage controller is connected to at least one non-volatile storage medium, which stores an operating system and computer programs; the processor provides computing and control capabilities; the memory is a volatile memory responsible for loading the operating system and computer programs from the storage medium into the runtime environment; the processor implements a cross-terminal synchronization method for PDF engineering drawings based on operation instruction serialization by executing program instructions in memory.

[0119] Those skilled in the art will understand that Figure 4The structures shown are merely schematic diagrams of some structures related to the present invention and do not constitute a limitation on the application of the present invention to other electronic devices. Specifically, electronic devices may include more or fewer components than those shown in the figures, or combine certain components, or have different component arrangements.

[0120] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This computer program can be stored in a computer-readable storage medium, and when run, it can execute the processes of the above method embodiments. The terms "memory," "storage," "database," or "other media" as used herein all encompass the scope of storage media. Storage media include, but are not limited to: read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), flash memory, magnetic disks, or optical disks, etc.

[0121] Those skilled in the art should understand that the technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments have been described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0122] The embodiments described above are merely illustrative of several implementations of the present invention, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these all fall within the protection scope of the present invention. Therefore, the protection scope of this invention patent should be determined by the appended claims.

Claims

1. A method for cross-platform synchronization of PDF engineering drawings based on operation instruction serialization, characterized in that, include: Capture operation commands from multiple devices to PDF engineering drawings, and extract operation type, target object ID and parameters as semantic metadata; A dependency graph of operation instructions is constructed based on the target object ID to identify critical path instructions. The dependency graph is a graphical structure representing the logical dependencies between operation instructions in the form of a directed acyclic graph. By performing topological sorting on the directed acyclic graph, the critical path of instruction execution is determined to ensure that instructions with dependencies are executed in the correct logical order. The operation instructions and dependencies are encoded into a serialized format, and the serialized instructions are compressed using differential encoding, transmitting only the modified parts of the instructions; wherein, the differential encoding method only retains the parts of the instructions that differ from the base version; The receiving end parses the serialized instructions, detects conflicts based on semantic metadata, and executes the instructions according to dependencies. The conflict detection is based on the timestamp information and the device ID information of the initiating instruction in the semantic metadata. When multiple ends are detected simultaneously modifying the same target object ID, it is determined to be a conflict. The conflict resolution strategy is as follows: first, based on the dependency graph, filter out conflicting instructions without dependencies and automatically merge them; for conflicting instructions with dependencies, retain the latest version of the timestamp and mark the conflict status for subsequent processing by the user. The rendering results are dynamically adapted based on device parameters, including coordinate system transformation and symbol mapping. The coordinate system transformation is to calculate the coordinate scaling ratio based on different device DPIs, with the formula: actual coordinates = original coordinates × (device DPI / standard DPI). The symbol mapping is to map ISO standard symbols to local symbols supported by the device. The method reduces bandwidth consumption by transmitting only the modified instructions through incremental compression. It ensures that instructions are executed in the correct order through semantic serialization and dependency encoding, thereby reducing the synchronization conflict rate. It also dynamically adapts to the coordinate system and symbol library, improving multi-terminal compatibility and ensuring consistent display across multiple devices.

2. The method according to claim 1, characterized in that, The semantic metadata includes at least the operation type, target object ID, and operation parameters.

3. The method according to claim 1, characterized in that, The serialization format is a custom binary format, including at least: The operation type field is 4 digits and is used to identify different operation categories; The target object ID field, which is 32 bits, is used to uniquely identify a specific object in the PDF engineering drawing. The parameter length field is 8 bits and is used to indicate the byte length of subsequent parameter fields; The parameter field is of variable length and is used to store the specific parameter values ​​required for the operation.

4. A cross-platform synchronization system for PDF engineering drawings based on operation instruction serialization, based on the method of any one of claims 1-3, characterized in that, include: The instruction capture module is used to intercept and capture user operation instructions; The semantic extraction module is used to extract semantic metadata from the operation instructions; The serialization and encoding module is used to construct the operation instruction dependency graph and serialize the instructions into binary format; A compression transmission module is used to compress serialized instructions using differential encoding. The differential encoding retains only the instruction differences from the baseline version; The decompression and parsing module is used to receive and decompress the differentially compressed change instruction and restore the serialized instruction structure; The conflict handling module is used to detect conflicts based on device ID and timestamp, and to process command merging. The dependency execution module is used to execute instructions in an ordered manner according to the dependency graph; The device adaptation module is used to dynamically adjust the rendering output based on device parameters; The device adaptation module further includes: The coordinate system transformation submodule is used to calculate the coordinate scaling ratio based on the DPI of different devices; The symbol mapping submodule is used to map standard engineering symbols to device-supported local symbols.

5. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method of any one of claims 1-3.

Citation Information

Patent Citations

  • Component operation method and device, storage medium and electronic device

    CN118229843A

  • Voice interaction system and method based on artificial intelligence technology

    CN120472905A