Software parameterized web service invocation method, system and medium based on reverse polling and local computation

By employing reverse polling and local computation, parametric modeling of CAD software can be performed locally, solving the problems of high licensing fees, high operating costs, data security risks, and poor user experience in existing technologies. This provides an efficient and secure solution for calling CAD software web services.

CN122372545APending Publication Date: 2026-07-10
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Filing Date
2026-03-30
Publication Date
2026-07-10

AI Technical Summary

Technical Problem

Existing technical solutions for providing CAD software capabilities as Web services suffer from problems such as high licensing fees, high operating costs, high data transmission latency, poor user experience, and data security risks. They are difficult to achieve secure, reliable, and efficient automated parametric modeling without requiring the local computer to have a static public IP address or complex network configuration.

Method used

The method adopts a software parameterized Web service call method based on reverse polling and local computing. It starts through a local modeling node and registers with the central service layer to obtain CAD software type and version information, actively extracts modeling tasks, parses and executes parametric modeling, generates model files and uploads them to the central service layer, thus avoiding cloud deployment and using local computing resources for modeling.

Benefits of technology

Significantly reduce deployment and operation costs, mitigate data security risks, fully utilize local high-performance computing resources, support multiple CAD software, improve user experience and system reliability, and adapt to changes in the network environment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122372545A_ABST
    Figure CN122372545A_ABST
Patent Text Reader

Abstract

This application provides a method, system, and medium for calling a software parameterized Web service based on reverse polling and local computation. The method includes: starting a local modeling node and registering it with the central service layer; obtaining the CAD software type and version information supported by the format; receiving parameterized modeling task requests; storing them in a task queue; and initializing the task status to be in the queue; extracting tasks to be processed at preset time intervals; parsing the modeling parameters of the tasks to be processed; calling the corresponding CAD software to perform parameterized modeling; generating model files and engineering drawing files; and uploading them to the file storage area specified by the central service layer; and updating the task status to result upload and completion. This application significantly reduces deployment and operating costs, avoids data security risks, eliminates the need to deploy CAD software on a cloud server, processes core modeling data on a local computer without uploading it to the cloud, and completely solves the data security risks of existing cloud deployment solutions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer-aided design (CAD) software and network service integration technology, and more specifically, to a software parameterized Web service invocation method, system, and medium based on reverse polling and local computation. Background Technology

[0002] With the deepening of digital transformation in the manufacturing industry, enterprises are increasingly demanding automated parametric generation of 3D CAD models. Traditional CAD software operation relies on manual interaction, which is inefficient and cannot meet the needs of large-scale, rapid-response business scenarios. Providing the parametric modeling capabilities of CAD software to external users through web services has become an important research direction in the fields of industrial internet and intelligent manufacturing.

[0003] However, existing technical solutions have many shortcomings in the process of providing web services for CAD software capabilities:

[0004] Existing technical solution 1: Cloud deployment solution;

[0005] Deploying large-scale CAD software such as SolidWorks and NX directly on cloud servers and calling them via Web API has the following drawbacks: (1) Cloud software licensing fees are extremely expensive, and many CAD vendors charge high licensing fees for cloud deployment; (2) Cloud graphics rendering and geometric calculations consume huge computing resources, resulting in high operating costs; (3) Data transmission latency for complex models and large assemblies is high, leading to a poor user experience; (4) Uploading core enterprise design data to the cloud poses a data security risk.

[0006] Existing technical solution two: Static IP direct connection solution;

[0007] An attempt was made to deploy CAD software locally and expose its interface for remote access via a web service. This approach has the following drawbacks: (1) It requires the local computer or network device to have a static public IP address, which is difficult for most enterprises and individual users to obtain; (2) It requires complex and unstable intranet penetration configuration, such as using tools like ngrok and frp, which has a high configuration threshold and makes it difficult to guarantee network quality; (3) It is difficult to implement in an enterprise firewall environment, requiring the IT department to open specific ports, which is a cumbersome process; (4) Exposing the CAD software service port to the public network poses a serious security risk and makes it vulnerable to network attacks.

[0008] Existing technical solution three: message queue push solution;

[0009] The message queue mode that actively pushes tasks from the server to the client is adopted. This scheme has the following drawbacks: (1) It has strict requirements on the network environment of the client. The client must be located on a publicly accessible address or configured with a message receiving port; (2) It cannot adapt to common situations where the client's IP changes dynamically, such as DHCP address allocation and mobile office scenarios; (3) It is difficult to achieve reliable message push in network environments behind strict NAT or firewalls; (4) It requires the deployment and maintenance of an independent message queue middleware, which increases the complexity of the system.

[0010] In summary, existing technologies have failed to adequately address the following core technical challenges: how to achieve automated parametric modeling of various CAD software via Web services without requiring a static public IP address on the local computer, without complex network configurations, and while maximizing the utilization of local high-performance computing resources. Summary of the Invention

[0011] The purpose of this application is to provide a software parameterized Web service invocation method, system, and medium based on reverse polling and local computation. By performing parameterized modeling, deployment and operation costs are significantly reduced, data security risks are avoided, and there is no need to deploy CAD software on a cloud server. Core modeling data is processed on a local computer without uploading to the cloud, thus completely solving the data security risks of existing cloud deployment solutions.

[0012] This application also provides a software parameterized Web service invocation method based on reverse polling and local computation, including:

[0013] The local modeling node starts up and registers with the central service layer, obtains the CAD software types and version information supported by the format, and submits a parametric modeling task request to the central service layer based on the HTTP REST API interface;

[0014] Receive the parameterized modeling task request, store it in the task queue, and initialize the task status to the queue.

[0015] The local modeling node actively retrieves tasks to be processed from the central service layer via the gRPC protocol at preset time intervals.

[0016] The modeling parameters of the task to be processed are parsed, and the corresponding CAD software is called to perform parametric modeling. The task status is updated sequentially to parameter parsing, environment preparation, modeling execution, assembly, engineering drawing generation, and format export, generating model files and engineering drawing files.

[0017] The local modeling node uploads the generated model files and engineering drawing files to the file storage area specified by the central service layer, and the task status is updated to result upload and completion.

[0018] Optionally, in the software parameterized Web service invocation method based on reverse polling and local computation described in the embodiments of this application, the startup of the local modeling node and its registration with the central service layer further includes:

[0019] Obtain the hardware configuration parameters of the local computer;

[0020] Based on the analysis of the hardware configuration parameters under the preset conditions of the modeling task, the hardware configuration parameters under the preset conditions are compared with the hardware configuration parameters of the local computer to generate a matching degree.

[0021] If the matching degree is greater than or equal to the set matching degree threshold, the modeling task will be assigned to the local computer.

[0022] If the matching degree is less than the set matching degree threshold, the modeling task will be reassigned or the local computer will be reassigned.

[0023] Optionally, in the software parameterized Web service invocation method based on reverse polling and local computation described in the embodiments of this application, the parameterized modeling process further includes:

[0024] Obtain modeling status information;

[0025] The modeling state information is compared with the set standard state information to obtain the state deviation rate;

[0026] Determine whether the state deviation rate is greater than or equal to the set state deviation rate threshold;

[0027] If the deviation rate is greater than or equal to the set threshold, the modeling process is determined to be abnormal, the task status is set to failure, and an error message is generated.

[0028] Set the pending task status to failed and reassign it to another available local modeling node for execution;

[0029] If the deviation rate is less than the set threshold, parametric modeling will continue until the modeling is successful.

[0030] Optionally, in the software parameterization Web service invocation method based on reverse polling and local computation described in the embodiments of this application, before the local modeling node calls the CAD software adapter to perform parameterized modeling, it further includes:

[0031] Obtain the parsed modeling parameters and perform a validity check on the parsed modeling parameters;

[0032] If the verification passes, the CAD software process will be started to perform the modeling operation;

[0033] If the verification fails, the parameter error message will be reported directly and the task will be marked as failed.

[0034] Optionally, in the software parameterized Web service call method based on reverse polling and local computation described in the embodiments of this application, when the local modeling node uploads model files and engineering drawing files, it adopts a segmented upload method. During the upload process, the upload progress is fed back to the central service layer in real time. If the upload is interrupted, it will continue to upload from the breakpoint after reconnection.

[0035] Optionally, in the software parameterized Web service invocation method based on reverse polling and local computation described in the embodiments of this application, after the local modeling node extracts the task to be processed, it further includes:

[0036] Analyze whether there are any ongoing modeling tasks on the local modeling node;

[0037] If there are currently modeling tasks in progress, report your own load status to the central service layer;

[0038] Analyze load rate based on its own load status;

[0039] If the load rate is greater than or equal to the load rate threshold, then the assignment of new modeling tasks will be paused.

[0040] If the load rate is less than the threshold, new modeling tasks will be assigned.

[0041] Secondly, embodiments of this application provide a software parameterized Web service invocation system based on reverse polling and local computation. The system includes a memory and a processor. The memory includes a program for a software parameterized Web service invocation method based on reverse polling and local computation. When the program for the software parameterized Web service invocation method based on reverse polling and local computation is executed by the processor, it implements the following steps:

[0042] The local modeling node starts up and registers with the central service layer, obtains the CAD software types and version information supported by the format, and submits a parametric modeling task request to the central service layer based on the HTTP REST API interface;

[0043] Receive the parameterized modeling task request, store it in the task queue, and initialize the task status to the queue.

[0044] The local modeling node actively retrieves tasks to be processed from the central service layer via the gRPC protocol at preset time intervals.

[0045] The modeling parameters of the task to be processed are parsed, and the corresponding CAD software is called to perform parametric modeling. The task status is updated sequentially to parameter parsing, environment preparation, modeling execution, assembly, engineering drawing generation, and format export, generating model files and engineering drawing files.

[0046] The local modeling node uploads the generated model files and engineering drawing files to the file storage area specified by the central service layer, and the task status is updated to result upload and completion.

[0047] Optionally, in the software parameterized Web service invocation system based on reverse polling and local computation described in this application embodiment, the startup of the local modeling node and its registration with the central service layer further includes:

[0048] Obtain the hardware configuration parameters of the local computer;

[0049] Based on the analysis of the hardware configuration parameters under the preset conditions of the modeling task, the hardware configuration parameters under the preset conditions are compared with the hardware configuration parameters of the local computer to generate a matching degree.

[0050] If the matching degree is greater than or equal to the set matching degree threshold, the modeling task will be assigned to the local computer.

[0051] If the matching degree is less than the set matching degree threshold, the modeling task will be reassigned or the local computer will be reassigned.

[0052] Optionally, in the software parameterized Web service invocation system based on reverse polling and local computation described in the embodiments of this application, the parameterized modeling process further includes:

[0053] Obtain modeling status information;

[0054] The modeling state information is compared with the set standard state information to obtain the state deviation rate;

[0055] Determine whether the state deviation rate is greater than or equal to the set state deviation rate threshold;

[0056] If the deviation rate is greater than or equal to the set threshold, the modeling process is determined to be abnormal, the task status is set to failure, and an error message is generated.

[0057] Set the pending task status to failed and reassign it to another available local modeling node for execution;

[0058] If the deviation rate is less than the set threshold, parametric modeling will continue until the modeling is successful.

[0059] Thirdly, embodiments of this application also provide a computer-readable storage medium, which includes a software parameterized Web service invocation method program based on reverse polling and local computation. When the software parameterized Web service invocation method program based on reverse polling and local computation is executed by a processor, it implements the steps of the software parameterized Web service invocation method based on reverse polling and local computation as described in any of the preceding claims.

[0060] As can be seen from the above, the software parameterization Web service invocation method, system, and medium provided in this application embodiment based on reverse polling and local computation starts through a local modeling node and registers with the central service layer to obtain the CAD software type and version information supported by the format, receives parameterization modeling task requests, stores them in a task queue, and initializes the task status to be in the queue; extracts tasks to be processed at preset time intervals; parses the modeling parameters of the tasks to be processed, calls the corresponding CAD software to perform parameterization modeling, generates model files and engineering drawing files, and uploads them to the file storage area specified by the central service layer, and updates the task status to result upload and completion; this application significantly reduces deployment and operating costs, avoids data security risks, eliminates the need to deploy CAD software on a cloud server, processes core modeling data on a local computer without uploading to the cloud, and completely solves the data security risks of existing cloud deployment solutions. Attached Figure Description

[0061] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0062] Figure 1 A flowchart illustrating the software parameterized Web service invocation method based on reverse polling and local computation provided in this application embodiment;

[0063] Figure 2 A data flow sequence diagram of the task from submission to completion for the software parameterized Web service invocation method based on reverse polling and local computation provided in the embodiments of this application;

[0064] Figure 3 A workflow logic diagram of the local modeling node for the software parameterized Web service invocation method based on reverse polling and local computation provided in the embodiments of this application;

[0065] Figure 4 A task state transition diagram for a software parameterized Web service invocation method based on reverse polling and local computation provided in an embodiment of this application;

[0066] Figure 5 The overall architecture diagram of the software parameterized Web service invocation system based on reverse polling and local computation provided in the embodiments of this application;

[0067] Figure 6 This is a class diagram of the CAD software adaptation layer for a software parameterized Web service calling system based on reverse polling and local computation, provided in an embodiment of this application. Detailed Implementation

[0068] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. The components of the embodiments of this application described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely represents selected embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.

[0069] It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. Furthermore, in the description of this application, the terms "first," "second," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0070] Please refer to Figures 1-2 As shown, this software parameterized Web service invocation method based on reverse polling and local computation is used in a terminal device. This software parameterized Web service invocation method based on reverse polling and local computation includes the following steps:

[0071] S101, the local modeling node starts and registers with the central service layer, obtains the CAD software types and version information supported by the format, and submits a parametric modeling task request to the central service layer based on the HTTP REST API interface;

[0072] S102, Receive the parametric modeling task request, store it in the task queue, and initialize the task status to the queue;

[0073] S103, the local modeling node actively retrieves tasks to be processed from the central service layer via the gRPC protocol at preset time intervals;

[0074] S104: Parse the modeling parameters of the task to be processed, call the corresponding CAD software to perform parametric modeling, and update the task status in sequence to parameter parsing, environment preparation, modeling execution, assembly, engineering drawing generation, and format export, generating model files and engineering drawing files.

[0075] S105, the local modeling node uploads the generated model file and engineering drawing file to the file storage area specified by the central service layer, and the task status is updated to result upload and completion.

[0076] It should be noted that when a local modeling node starts up, it registers its own information with the central service layer, including node identifier, CAD software type and version, computing power parameters, and sends heartbeat information periodically.

[0077] According to an embodiment of the present invention, the local modeling node is started and registers with the central service layer, and the process further includes:

[0078] Obtain the hardware configuration parameters of the local computer;

[0079] Based on the analysis of the hardware configuration parameters under the preset conditions of the modeling task, the hardware configuration parameters under the preset conditions are compared with the hardware configuration parameters of the local computer to generate a matching degree.

[0080] If the matching degree is greater than or equal to the set matching degree threshold, the modeling task will be assigned to the local computer.

[0081] If the matching degree is less than the set matching degree threshold, the modeling task will be reassigned or the local computer will be reassigned.

[0082] like Figures 3-4 As shown, where, Figure 3 The workflow logic diagram for local modeling nodes shows the complete process of retrieving tasks through reverse polling, parsing parameters, calling CAD software APIs, and uploading results. Figure 4 A task state transition diagram is provided, showing the complete state sequence and transition conditions of the task from Queued to Completed. According to an embodiment of the present invention, the parametric modeling process further includes:

[0083] Obtain modeling status information, compare the modeling status information with the set standard status information, and obtain the status deviation rate;

[0084] Determine whether the state deviation rate is greater than or equal to the set state deviation rate threshold;

[0085] If the deviation rate is greater than or equal to the set threshold, the modeling process is determined to be abnormal, the task status is set to failure, and an error message is generated.

[0086] Set the pending task status to failed and reassign it to another available local modeling node for execution;

[0087] If the deviation rate is less than the set threshold, parametric modeling will continue until the modeling is successful.

[0088] According to an embodiment of the present invention, before the local modeling node calls the CAD software adapter to perform parametric modeling, it further includes:

[0089] Obtain the parsed modeling parameters and perform a validity check on the parsed modeling parameters;

[0090] If the verification passes, the CAD software process will be started to perform the modeling operation;

[0091] If the verification fails, the parameter error message will be reported directly and the task will be marked as failed.

[0092] According to an embodiment of the present invention, when the local modeling node uploads model files and engineering drawing files, it adopts a segmented upload method. During the upload process, the upload progress is fed back to the central service layer in real time. If the upload is interrupted, it will continue to upload from the point of interruption after reconnection.

[0093] According to an embodiment of the present invention, the local modeling node extracts the task to be processed, and then the process further includes:

[0094] Analyze whether there are any ongoing modeling tasks on the local modeling node;

[0095] If there are currently modeling tasks in progress, report your own load status to the central service layer;

[0096] Analyze load rate based on its own load status;

[0097] If the load rate is greater than or equal to the load rate threshold, then the assignment of new modeling tasks will be paused.

[0098] If the load rate is less than the threshold, new modeling tasks will be assigned.

[0099] Figure 5 This is a system architecture block diagram of the present invention, illustrating the composition relationship between the central service layer and multiple local modeling nodes, as well as the communication protocol between them. Secondly, embodiments of this application provide a software parameterized Web service invocation system based on reverse polling and local computation. The system includes a memory and a processor. The memory includes a program for a software parameterized Web service invocation method based on reverse polling and local computation. When the program for the software parameterized Web service invocation method based on reverse polling and local computation is executed by the processor, it implements the following steps:

[0100] The local modeling node starts up and registers with the central service layer, obtains the CAD software types and version information supported by the format, and submits a parametric modeling task request to the central service layer based on the HTTP REST API interface;

[0101] Receive parametric modeling task requests, store them in the task queue, and initialize the task status to the queue.

[0102] Local modeling nodes actively retrieve tasks to be processed from the central service layer via the gRPC protocol at preset time intervals.

[0103] The modeling parameters of the task to be processed are parsed, and the corresponding CAD software is called to perform parametric modeling. The task status is updated sequentially to parameter parsing, environment preparation, modeling execution, assembly, engineering drawing generation, and format export, generating model files and engineering drawing files.

[0104] The local modeling node uploads the generated model files and engineering drawing files to the file storage area specified by the central service layer, and the task status is updated to result upload and completion.

[0105] According to an embodiment of the present invention, the local modeling node is started and registers with the central service layer, and the process further includes:

[0106] Obtain the hardware configuration parameters of the local computer;

[0107] Based on the analysis of the hardware configuration parameters under the preset conditions of the modeling task, the hardware configuration parameters under the preset conditions are compared with the hardware configuration parameters of the local computer to generate a matching degree.

[0108] If the matching degree is greater than or equal to the set matching degree threshold, the modeling task will be assigned to the local computer.

[0109] If the matching degree is less than the set matching degree threshold, the modeling task will be reassigned or the local computer will be reassigned.

[0110] According to an embodiment of the present invention, the parametric modeling process further includes:

[0111] Obtain modeling status information;

[0112] The modeling state information is compared with the set standard state information to obtain the state deviation rate;

[0113] Determine whether the state deviation rate is greater than or equal to the set state deviation rate threshold;

[0114] If the deviation rate is greater than or equal to the set threshold, the modeling process is determined to be abnormal, the task status is set to failure, and an error message is generated.

[0115] Set the pending task status to failed and reassign it to another available local modeling node for execution;

[0116] If the deviation rate is less than the set threshold, parametric modeling will continue until the modeling is successful.

[0117] It should be noted that the Web service invocation system includes the following components:

[0118] (1) Core API Server: Deployed in the cloud or on an enterprise server, it adopts a Domain-Driven Design (DDD) layered architecture and includes an application layer, a domain layer, and an infrastructure layer. This layer provides an HTTP REST API interface for business systems to call externally and a gRPC service interface for communication between local modeling nodes internally. The core API server integrates service registration and discovery components (such as Nacos) to realize dynamic registration, health checks, and load balancing of modeling nodes.

[0119] (2) Local Modeling Node: Deployed on the local computer with the CAD software installed, running as a background service or console application. Each modeling node corresponds to a CAD software installation instance and is responsible for interacting with the API of the local CAD software to execute parametric modeling tasks. When the modeling node starts, it registers with the central service layer and actively pulls tasks to be processed using a reverse polling mode.

[0120] (3) Reverse polling communication mechanism: Local modeling nodes actively initiate task retrieval requests to the central service layer via the gRPC protocol at configurable time intervals (e.g., 1-10 seconds). This mechanism completely overturns the traditional server-side push mode, with the client actively initiating all network connections, completely avoiding the problem of the client needing a static IP or an open inbound port. The gRPC protocol is based on HTTP / 2, supports long connection reuse and efficient binary serialization, ensuring communication efficiency.

[0121] (4) Phased Task Status Management: The system defines a complete task lifecycle status sequence: Queued → Parsing → Preparing → Modeling → Assembling → Drawing → Exporting → Uploading → Completed. The status of each phase is synchronized to the central service layer in real time, supporting real-time display of modeling progress on the front end.

[0122] (5) CAD software adaptation layer: such as Figure 6 As shown, Figure 6A layered class diagram for CAD software adapters is provided, illustrating the inheritance relationship between the unified abstract interface and the adapters for various CAD software. The system employs the adapter design pattern, defining a unified abstract interface for CAD operations, including core operations such as creating parts, adding features, setting parameters, generating assemblies, and exporting formats. For different CAD software (SolidWorks, SolidEdge, NX, Creo, AutoCAD, CATIA, Inventor, etc.), corresponding adapter classes are implemented, encapsulating the API calling methods specific to each CAD software, achieving 'develop once, support multiple software'.

[0123] (6) Result Return and Storage Mechanism: After the modeling task is completed, the local node uploads the generated model files (such as SLDPRT, STEP, IGES, DWG, etc.) and engineering drawing files (such as PDF, DXF, etc.) to the file storage service specified by the central service layer. The central service layer updates the task status to complete and feeds back the results to the caller through callback notification or polling query.

[0124] Compared with the prior art, the present invention has the following significant advantages:

[0125] (1) Significantly reduced costs: There is no need to deploy CAD software on cloud servers, saving expensive cloud computing resources and software cloud license fees. Make full use of the company's existing CAD software licenses and local high-performance workstation resources.

[0126] (2) Simplified deployment and enhanced security: Local modeling nodes do not require static public IP addresses or complex network configurations. All network connections are initiated proactively from the internal network, avoiding the security risks of exposing CAD software ports on the external network. It complies with the enterprise's network security policy and does not require the IT department to open inbound ports.

[0127] (3) Maximize the use of local computing resources: Make full use of the idle computing power of high-performance computers within the enterprise or on an individual's local machine for 3D modeling and rendering calculations to form distributed modeling capabilities. GPU-accelerated rendering, large memory complex assembly and other capabilities can be directly utilized locally without the need for network transmission.

[0128] (4) Flexible and reliable fault tolerance: The reverse polling mechanism is not sensitive to momentary interruptions in the client's network environment or dynamic changes in IP addresses, and automatically resumes operation after the connection is restored. It supports load balancing and failover of multiple modeling nodes, and a single point of failure does not affect the overall service availability.

[0129] (5) Multi-CAD software support: Through the adapter design pattern, it can be flexibly extended to support various mainstream CAD software. Enterprises can deploy them in a mixed manner according to their own software assets, without vendor lock-in.

[0130] (6) Refined progress tracking: The phased task status management mechanism makes the task execution progress transparent and visible, supports real-time display on the front end, improves user experience, and facilitates problem investigation and performance optimization.

[0131] In one specific embodiment of the present invention, in an enterprise application scenario, the system is deployed as follows:

[0132] The central service layer is implemented using a Java microservice architecture, deployed on Alibaba Cloud or an enterprise private cloud server, configured with 4 cores and 8GB of memory. The central service layer adopts a DDD layered architecture design: the application layer handles HTTP request transformation, the domain layer implements core business logic, and the infrastructure layer provides gRPC services and file storage integration. Service registration and discovery uses Nacos components to achieve dynamic registration and health checks of modeling nodes.

[0133] The local modeling node is developed as a C# console application and can run as a background service on Windows systems. A mechanical design company deployed the modeling node on five engineering workstations in its design department: three with SolidWorks 2023 installed, one with Siemens NX 2306 installed, and one with PTC Creo 9.0 installed. These workstations are configured with Intel i7 processors, 32GB of RAM, and NVIDIA Quadro graphics cards, providing powerful 3D modeling capabilities.

[0134] The following uses a parametric design of a flange as an example to explain the complete business process in detail:

[0135] Step 1: Task Submission. The user inputs the flange design parameters through the enterprise web front-end system: outer diameter DN=200mm, inner diameter d=150mm, number of bolt holes n=8, bolt hole diameter=22mm, flange thickness=25mm, sealing surface type=RF raised face. After clicking the "Generate Model" button, the front-end POSTs the parameters in JSON format to the / api / tasks / modeling interface of the central service layer.

[0136] Step Two: Task Enqueueing. After receiving the request, the central service layer generates a unique task ID (e.g., TASK-20241220-001) and stores the task information in an in-memory task queue (using a database-less design to improve performance), initially setting the state to Queued. Simultaneously, the task ID is returned to the frontend, which can then use it to poll and query the progress.

[0137] Step 3: Task Retrieval. A SolidWorks modeling node deployed in an engineer's office calls the PullTask ​​method of the central service layer via gRPC every 3 seconds to query pending tasks. The central service layer selects this node to handle the flange task based on a load balancing strategy (e.g., minimum number of tasks preferred), distributes the task details, and updates the task status to Parsing (parameter parsing).

[0138] Step 4: Local Modeling. After parsing the task parameters, the modeling node calls the SolidWorks API through the SolidWorks adapter to perform the following operations: (a) Update the status to Preparing, start the SolidWorks process, and load the flange template file; (b) Update the status to Modeling, call the API to set dimensional parameters such as outer diameter and inner diameter, and drive feature reconstruction; (c) Update the status to Assembling, generate assemblies for scenarios requiring assembly; (d) Update the status to Drawing, call the engineering drawing template to generate standardized drawings; (e) Update the status to Exporting, save the model as STEP format and the drawings as PDF format.

[0139] Step 5: Result Upload. After modeling is complete, the status updates to Uploading. The modeling node uploads the generated flag_DN200.STEP and flag_DN200.PDF files to the central service layer's file receiving interface via HTTP POST. Upon successful upload, the task status updates to Completed.

[0140] Step Six: Result Notification. After receiving the result file, the central service layer updates the task record and stores the file download link. Once the frontend checks the task completion status via polling, it displays a download button, which users can click to obtain the STEP model file and PDF drawings.

[0141] Example of a CAD software adapter:

[0142] The system employs the adapter design pattern to support multiple CAD software programs. First, a unified abstract interface, ICADAdapter, is defined, containing the following core methods:

[0143] Initialize() - Initializes the CAD software environment;

[0144] OpenTemplate(string templatePath) - Opens the template file;

[0145] SetParameters(Dictionary parameters) - Sets parameterized dimensions;

[0146] Rebuild() - Rebuilds the model;

[0147] ExportModel(string format, string path) - Exports the model file;

[0148] GenerateDrawing(string templatePath) - Generates the engineering drawing;

[0149] Dispose() - Releases resources and closes the software.

[0150] For SolidWorks, implement the SolidWorksAdapter class to call the SolidWorks API (SldWorks.Application) via the COM interface. For Siemens NX, implement the NXAdapter class to call NX functions via the NXOpen API. For PTC Creo, implement the CreoAdapter class to interact via the Pro / TOOLKIT or J-Link API. When adding support for new CAD software, only the corresponding adapter class needs to be implemented; no modification to the core logic is required.

[0151] The system is designed with a robust fault tolerance mechanism. When a modeling node loses network connection or its local CAD software crashes, the node stops reporting heartbeats, and the central service layer marks it as offline after the health check timeout period (e.g., 30 seconds). If a task being executed on that node is not completed within the maximum execution time (e.g., 10 minutes), the central service layer automatically resets the task status to Queued and assigns it to another online node for re-execution.

[0152] Once the disconnected node network is restored, the node re-registers with the central service layer and begins fetching tasks, automatically regaining its operational capabilities. The reverse polling design ensures that changes in node IP addresses and momentary network outages do not affect system operation, demonstrating excellent network adaptability and fault tolerance.

[0153] A third aspect of the present invention provides a computer-readable storage medium including a software parameterized Web service invocation method program based on reverse polling and local computation. When the software parameterized Web service invocation method program based on reverse polling and local computation is executed by a processor, it implements the steps of the software parameterized Web service invocation method based on reverse polling and local computation as described in any of the above claims.

[0154] This invention discloses a method, system, and medium for calling a software parameterized Web service based on reverse polling and local computation. It starts with a local modeling node and registers with the central service layer to obtain information on supported CAD software types and versions. It receives parameterized modeling task requests, stores them in a task queue, and initializes the task status to be in the queue. Tasks to be processed are extracted at preset time intervals. The modeling parameters of the tasks to be processed are parsed, and the corresponding CAD software is called to perform parameterized modeling, generating model files and engineering drawing files, which are then uploaded to the file storage area designated by the central service layer. The task status is updated to result upload and completion. This application significantly reduces deployment and operating costs, avoids data security risks, eliminates the need to deploy CAD software on a cloud server, and processes core modeling data on a local computer without uploading to the cloud, thus completely solving the data security risks of existing cloud deployment solutions.

[0155] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods, such as: multiple units or components can be combined, or integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the various components shown or discussed can be through some interfaces, and the indirect coupling or communication connection between devices or units can be electrical, mechanical, or other forms.

[0156] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units. They may be located in one place or distributed across multiple network units. Some or all of the units may be selected to achieve the purpose of this embodiment according to actual needs.

[0157] In addition, in the various embodiments of the present invention, each functional unit can be integrated into one processing unit, or each unit can be a separate unit, or two or more units can be integrated into one unit; the integrated unit can be implemented in hardware or in the form of hardware plus software functional units.

[0158] Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a readable storage medium. When the program is executed, it performs the steps of the above method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0159] Alternatively, if the integrated units of the present invention are implemented as software functional modules and sold or used as independent products, they can also be stored in a readable storage medium. Based on this understanding, the technical solutions of the embodiments of the present invention, or the parts that contribute to the prior art, can be embodied in the form of a software product. This 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 methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, ROM, RAM, magnetic disks, or optical disks.

Claims

1. A software parameterized Web service invocation method based on reverse polling and local computation, characterized in that, include: The local modeling node starts up and registers with the central service layer, obtains the CAD software types and version information supported by the format, and submits a parametric modeling task request to the central service layer based on the HTTP REST API interface; Receive the parameterized modeling task request, store it in the task queue, and initialize the task status to the queue. The local modeling node actively retrieves tasks to be processed from the central service layer via the gRPC protocol at preset time intervals. The modeling parameters of the task to be processed are parsed, and the corresponding CAD software is called to perform parametric modeling. The task status is updated sequentially to parameter parsing, environment preparation, modeling execution, assembly, engineering drawing generation, and format export, generating model files and engineering drawing files. The local modeling node uploads the generated model files and engineering drawing files to the file storage area specified by the central service layer, and the task status is updated to result upload and completion.

2. The software parameterized Web service invocation method based on reverse polling and local computation according to claim 1, characterized in that, The local modeling node starts up and registers with the central service layer, and also includes: Obtain the hardware configuration parameters of the local computer; Based on the analysis of the hardware configuration parameters under the preset conditions of the modeling task, the hardware configuration parameters under the preset conditions are compared with the hardware configuration parameters of the local computer to generate a matching degree. If the matching degree is greater than or equal to the set matching degree threshold, the modeling task will be assigned to the local computer. If the matching degree is less than the set matching degree threshold, the modeling task will be reassigned or the local computer will be reassigned.

3. The software parameterized Web service invocation method based on reverse polling and local computation according to claim 2, characterized in that, The parametric modeling process also includes: Obtain modeling status information; The modeling state information is compared with the set standard state information to obtain the state deviation rate; Determine whether the state deviation rate is greater than or equal to the set state deviation rate threshold; If the deviation rate is greater than or equal to the set threshold, the modeling process is determined to be abnormal, the task status is set to failure, and an error message is generated. Set the pending task status to failed and reassign it to another available local modeling node for execution; If the deviation rate is less than the set threshold, parametric modeling will continue until the modeling is successful.

4. The software parameterized Web service invocation method based on reverse polling and local computation according to claim 3, characterized in that, Before the local modeling node calls the CAD software adapter to perform parametric modeling, it also includes: Obtain the parsed modeling parameters and perform a validity check on the parsed modeling parameters; If the verification passes, the CAD software process will be started to perform the modeling operation; If the verification fails, the parameter error message will be reported directly and the task will be marked as failed.

5. The software parameterized Web service invocation method based on reverse polling and local computation according to claim 4, characterized in that, When uploading model files and engineering drawing files to the local modeling node, a segmented upload method is adopted. During the upload process, the upload progress is fed back to the central service layer in real time. If the upload is interrupted, it will continue to upload from the point of interruption after reconnection.

6. The software parameterized Web service invocation method based on reverse polling and local computation according to claim 5, characterized in that, The local modeling node extracts the tasks to be processed, and then includes: Analyze whether there are any ongoing modeling tasks on the local modeling node; If there are currently modeling tasks in progress, report your own load status to the central service layer; Analyze load rate based on its own load status; If the load rate is greater than or equal to the load rate threshold, then the assignment of new modeling tasks will be paused. If the load rate is less than the threshold, new modeling tasks will be assigned.

7. A software parameterized Web service invocation system based on reverse polling and local computation, characterized in that, The system includes a memory and a processor. The memory contains a program for a software parameterized Web service invocation method based on reverse polling and local computation. When the program for the software parameterized Web service invocation method based on reverse polling and local computation is executed by the processor, it performs the following steps: The local modeling node starts up and registers with the central service layer, obtains the CAD software types and version information supported by the format, and submits a parametric modeling task request to the central service layer based on the HTTP REST API interface; Receive the parameterized modeling task request, store it in the task queue, and initialize the task status to the queue. The local modeling node actively retrieves tasks to be processed from the central service layer via the gRPC protocol at preset time intervals. The modeling parameters of the task to be processed are parsed, and the corresponding CAD software is called to perform parametric modeling. The task status is updated sequentially to parameter parsing, environment preparation, modeling execution, assembly, engineering drawing generation, and format export, generating model files and engineering drawing files. The local modeling node uploads the generated model files and engineering drawing files to the file storage area specified by the central service layer, and the task status is updated to result upload and completion.

8. The software parameterized Web service invocation system based on reverse polling and local computation according to claim 7, characterized in that, The local modeling node starts up and registers with the central service layer, and also includes: Obtain the hardware configuration parameters of the local computer; Based on the analysis of the hardware configuration parameters under the preset conditions of the modeling task, the hardware configuration parameters under the preset conditions are compared with the hardware configuration parameters of the local computer to generate a matching degree. If the matching degree is greater than or equal to the set matching degree threshold, the modeling task will be assigned to the local computer. If the matching degree is less than the set matching degree threshold, the modeling task will be reassigned or the local computer will be reassigned.

9. The software parameterized Web service invocation system based on reverse polling and local computation according to claim 8, characterized in that, The parametric modeling process also includes: Obtain modeling status information; The modeling state information is compared with the set standard state information to obtain the state deviation rate; Determine whether the state deviation rate is greater than or equal to the set state deviation rate threshold; If the deviation rate is greater than or equal to the set threshold, the modeling process is determined to be abnormal, the task status is set to failure, and an error message is generated. Set the pending task status to failed and reassign it to another available local modeling node for execution; If the deviation rate is less than the set threshold, parametric modeling will continue until the modeling is successful.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a software parameterized Web service invocation method program based on reverse polling and local computation. When the software parameterized Web service invocation method program based on reverse polling and local computation is executed by a processor, it implements the steps of the software parameterized Web service invocation method based on reverse polling and local computation as described in any one of claims 1 to 6.