Data interaction method, electronic equipment and storage medium
Through the collaboration between web pages, local listening programs and dynamic link libraries, data interaction between circuit board design software is realized, operation complexity problems are solved, and intuitive user interface and data processing capabilities are provided.
Patent Information
- Application Number
- CN202411237362.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-04
- Publication Date
- 2025-01-17
AI Technical Summary
Existing circuit board design software such as InPlan, OrCAD, Altium Designer, etc. have complex operations and high thresholds, making it difficult to interact with web pages, which limits the use of non-engineering design department personnel.
The web page responds to user instructions to generate operation requests and object data, and uses a local monitor to monitor and pass data to the dynamic link library. The dynamic link library instructs the setting application to operate, and returns the result to the web page to realize the web page and the setting application. data interaction.
It reduces the operation complexity of setting applications, realizes data interaction between web pages and setting applications, provides an intuitive user interface, and combines the data processing and analysis capabilities of setting applications.
Smart Images

Figure CN119322687A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a data interaction method, an electronic device and a storage medium. Background Art
[0002] With the development of the circuit board industry, there is an increasing demand for automation, and the operation methods are gradually moving towards automation. Among them, the quotation-related departments need to fine-tune the engineering material number parameters or designs, and then obtain the cost model based on the development of circuit board design and management software, and calculate the cost of the fine-tuned material number, such as InPlan software, OrCAD software, AltiumDesigner software, Zuken CR-8000 software, Mentor Graphics PADS software, etc.
[0003] However, the above software is professional software for the engineering design department, has a high threshold for use, and is subject to information security control, so it will not be open to personnel outside the engineering design department.
[0004] Therefore, it is necessary to propose a method for implementing data interaction between a web page and a setting application to reduce the operation complexity of the setting application. Summary of the invention
[0005] The main technical problem solved by the present application is to provide a data interaction method, an electronic device and a storage medium, which can solve the technical problem of complex application operation settings.
[0006] In order to solve the above technical problems, a technical solution adopted by the present application is: a data interaction method, the method comprising:
[0007] generating, in response to a user instruction via a web page, an operation request and object data for setting an application program;
[0008] In response to monitoring the operation request using a local monitoring program, transferring the object data to a dynamic link library;
[0009] Instructing the setting application to perform an operation through the dynamic link library to obtain an operation result;
[0010] Return the operation result to the web page.
[0011] Optionally, after the step of generating an operation request and object data for setting an application in response to a user instruction through a web page, and before the step of transmitting the object data to a dynamic link library in response to monitoring the operation request using a local monitoring program, the method further includes:
[0012] Triggering the local monitoring interface of the dynamic link library provided by the local monitoring program through the webpage to initiate the operation request to the local monitoring program;
[0013] In response to monitoring the operation request using the local monitoring program, the step of transferring the object data to the dynamic link library includes:
[0014] In response to monitoring the operation request using a local monitoring program, parsing the object data to obtain parsed data;
[0015] The parsed data is transferred to the dynamic link library.
[0016] Optionally, before the step of parsing the object data in response to monitoring the operation request using a local monitoring program to obtain the parsed data, the step further includes:
[0017] Creating a first instance through the local listening program, and obtaining a server address set up by the local listening interface;
[0018] The server address is added to the first instance so that the local listening program can listen to the operation request.
[0019] Optionally, in response to monitoring the operation request using a local monitoring program, parsing the object data to obtain the parsed data comprises:
[0020] In response to monitoring the operation request using the local monitoring program, creating a second instance through the local monitoring program, and obtaining a server address set up by the local monitoring interface;
[0021] adding the server address to the second instance to obtain the object data;
[0022] The object data is parsed to obtain the parsed data.
[0023] Optionally, the step of instructing the setting application to perform an operation through the dynamic link library to obtain an operation result includes:
[0024] Based on the parsed data, calling corresponding operation instructions through the dynamic link library;
[0025] The operation result is obtained by performing an operation based on the operation instruction through the setting application.
[0026] Optionally, the step of calling a corresponding operation instruction based on the parsed data includes:
[0027] Calling the executable file in the dynamic link library;
[0028] Modifying the data in the executable file according to the parsed data to obtain modified data;
[0029] The operation instruction is determined according to the modified data.
[0030] Optionally, the step of returning the operation result to the webpage includes:
[0031] Acquire the operation result through the local monitoring program;
[0032] The local monitoring interface is used to respond to the operation result so as to return the operation result to the webpage.
[0033] Optionally, in response to monitoring the operation request using a local monitoring program, the step of transferring the object data to a dynamic link library includes:
[0034] In response to monitoring the operation request using a local monitoring program, obtaining a target security code carried by the operation request;
[0035] When it is detected that the target security code is verified, the object data is transferred to the dynamic link library.
[0036] In order to solve the above technical problems, another technical solution adopted by the present application is: an electronic device, the electronic device comprising:
[0037] A memory for storing executable program codes;
[0038] The processor is used to call and run the executable program code from the memory, so that the electronic device executes the data interaction method as described in any one of the above.
[0039] To solve the above technical problems, another technical solution adopted in the present application is: a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed, the data interaction method as described in any one of the above items is implemented.
[0040] The beneficial effects of the embodiments of the present application are as follows: Different from the prior art, the embodiments of the present application provide a data interaction method, the method comprising: generating an operation request and object data of a setting application in response to a user instruction through a web page; transmitting the object data to a dynamic link library in response to monitoring the operation request using a local listening program; instructing the setting application to perform an operation through the dynamic link library to obtain an operation result; and returning the operation result to the web page. The operation request and object data of the setting application requested by the web page are obtained through the local listening program, and the object data is transmitted to the dynamic link library so that the dynamic link library can instruct the setting application to perform an operation, and then the operation result is returned to the web page, which effectively realizes the data interaction between the web page and the setting application and reduces the operation complexity of the setting application. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 It is a flowchart of the first embodiment of the data interaction method of the present application;
[0042] Figure 2 It is a flowchart of the second embodiment of the data interaction method of the present application;
[0043] Figure 3 It is a flowchart of the third embodiment of the data interaction method of the present application;
[0044] Figure 4 It is a flowchart of the fourth embodiment of the data interaction method of the present application;
[0045] Figure 5 It is a flowchart of the fifth embodiment of the data interaction method of the present application;
[0046] Figure 6 It is a data flow diagram of the data interaction method of the present application;
[0047] Figure 7 is an exemplary structural block diagram of an electronic device 700 for data interaction according to an embodiment of the present application;
[0048] Figure 8 It is an exemplary structural block diagram of a computer-readable storage medium 800 for data interaction according to an embodiment of the present application. DETAILED DESCRIPTION
[0049] The present application is described in detail below with reference to the accompanying drawings and implementation methods.
[0050] Technical terms involved in this application:
[0051] InPlan software is a pre-production engineering automation software used by circuit board factories. It can be used for data analysis and management software in engineering design, project management or manufacturing, and has data processing and analysis functions.
[0052] Altium Designer software is a widely used circuit board design software, mainly used for schematic and circuit board layout design. Its main functions are focused on design and simulation.
[0053] OrCAD, a circuit board design software from Cadence, is powerful.
[0054] Mentor Graphics PADS software is a circuit board design tool provided by Mentor Graphics, focusing on design and analysis.
[0055] KiCad software is an open source circuit board design tool.
[0056] Zuken CR-8000 software is a high-end circuit board design software used for complex circuit board and integrated circuit package design.
[0057] Dynamic link library (Interop.InPlanLib.dll), the dynamic link library of the InPlan software, the executable file for the InPlan program operation.
[0058] JavaScript Object Notation (JSON data) is a lightweight data exchange format that uses a text format that is completely independent of the programming language to store and represent data.
[0059] See also Figure 1 , Figure 1 It is a flowchart of the first embodiment of the data interaction method of the present application. It should be noted that if there is substantially the same result, the method of the present application is not based on Figure 1 The process sequence shown is limited. Figure 1 As shown, the method comprises the following steps:
[0060] S110, generating an operation request and object data for setting an application program in response to a user instruction via a web page;
[0061] The execution subject of the method of this embodiment can be a data interaction device, or an electronic device or a server. This embodiment takes a data interaction device as an example, and the device can be integrated in a terminal device such as a smart phone, a tablet computer, etc. with a data processing function.
[0062] The embodiment of the present application takes into account that a dynamic link library is a library file used to interact with circuit board design and management software, that is, to perform data interaction with a set application. However, the dynamic link library has good compatibility with local code and has limited direct support for some high-level or interpreted languages such as Java and PHP. Therefore, the present embodiment can create a local service program by using the development language supported by the dynamic link library, encapsulate the functions of the dynamic link library, and provide a local listening interface for high-level language calls supported by the web page.
[0063] Specifically, the setting application can be a program or software that cannot directly interact with the web page, such as InPlan software, OrCAD software, Altium Designer software, Zuken CR-8000 software, Mentor Graphics PADS software, etc. The operation request can be used for data transmission, resource request, interactive operation, for example, it can be an HTTP request. The content of the object data can include but is not limited to project ID, time range, design parameters, program version, etc., and the format of the object data can be JSON data. JSON data can be used as an intermediate data format for transmission between a web page and a local listening program when transmitting between the web page and the local listening program.
[0064] The user operates some functions of the setting application through the web page, such as entering query conditions, selecting design parameters or generating report buttons. When the user submits the user instruction, the web page can encapsulate the relevant information of the user instruction into an object data and a corresponding operation request. This object data can be serialized into a JSON string. Therefore, the web page uses a high-level or interpreted language to call the interface of the setting application in the local listening application through the operation request, thereby indirectly calling the function of the dynamic link library.
[0065] S120, in response to monitoring the operation request using the local monitoring program, transferring the object data to a dynamic link library;
[0066] Specifically, the local listening program can serve as an intermediate layer between the web page and the setting application, and can be used to continuously listen to the operation requests sent by the web page to obtain and parse the object data initiated by the web page. At the same time, the parsed data is further passed to the dynamic link library to instruct the setting application to perform the operation, and finally the operation results of the setting application are returned to the web page.
[0067] S130, instructing the setting application to perform an operation through the dynamic link library to obtain an operation result;
[0068] Specifically, the dynamic link library can be a bridge for the setting application to interact with the outside world. After receiving the object data transmitted by the local listening program, the dynamic link library can call the relevant function module according to the object data and instruct the setting application to perform corresponding operations, such as generating reports or querying data. After the operation is completed, the setting application will return the operation result.
[0069] S140, returning the operation result to the webpage.
[0070] Specifically, after receiving the operation result from the dynamic link library, the local listening program encapsulates the result into a format that can be processed by the web page, and returns it to the web page.
[0071] In addition, the local listener can format the operation results as JSON data and send it back to the web page. After receiving the JSON data, the web page parses it through JavaScript and displays it on the web page, such as updating a project progress chart or generating a report.
[0072] In this embodiment, the operation request and object data of the setting application requested by the web page are obtained through the local listening program, and the object data is passed to the dynamic link library, so that the dynamic link library can instruct the setting application to perform the operation, and then the operation result is returned to the web page. That is, based on the collaboration of the local listening program and the dynamic link library, the data processing and analysis capabilities of the setting application are combined with the web page to provide an intuitive user interface, which effectively realizes the data interaction between the web page and the setting application and reduces the operation complexity of the setting application.
[0073] See also Figure 2 , Figure 2 1 is a flow chart of the second embodiment of the data interaction method of the present application. In this embodiment, the method includes the following steps:
[0074] S201, creating a first instance through the local listening program, and obtaining a server address set up by the local listening interface;
[0075] It should be noted that S201 to S202 can be implemented before S230 (or S120). The present application takes the implementation of S201 to S202 before S210 as an example. Of course, it can also be implemented between S210 and S220, or between S220 and S230.
[0076] Specifically, the local monitoring interface can be a network interface provided by the local monitoring program to receive operation requests of the web page. The server address can be a server address set up by the local monitoring interface made by the dynamic link library for data exchange between the web page and the local monitoring program.
[0077] S202, adding the server address to the first instance, so that the local listening program can listen to the operation request.
[0078] Specifically, the first instance may be an instance created before the local listening program listens to the operation request. By configuring the previously acquired server address into the first instance, the first instance determines the listening target address and target port to obtain and process the operation request from the target address, and thus, after S202, the local listening program can repeatedly execute S210 to S260 (or S110 to S140) without repeatedly creating instances, thereby improving the data interaction efficiency between the web page and the set application.
[0079] S210, generating an operation request and object data for setting an application program in response to a user instruction via a web page;
[0080] The above step S110 may be described, and will not be described in detail here.
[0081] S220, triggering the local listening interface of the dynamic link library provided by the local listening program through the webpage to initiate the operation request to the local listening program;
[0082] Specifically, in order to effectively implement data interaction between web pages and local applications, so that operations on web pages can call local system resources or functions, web pages can include trigger mechanisms, such as button clicks, where users can trigger local listening programs running locally by clicking buttons on web pages. This local listening program can receive and process operation requests through the interface provided by the dynamic link library.
[0083] S230, in response to monitoring the operation request using the local monitoring program, parsing the object data to obtain parsed data;
[0084] Specifically, the local listening program is used to monitor operation requests in real time, ensuring that it can immediately respond to user operations on the set application through the web page and provide real-time feedback and processing; in order to convert high-level languages or interpreted data containing complex structures into data readable by local programs, the object data can be parsed so that the dynamic link library can use the parsed data to instruct the set application to perform corresponding operations.
[0085] S240, transferring the parsed data to the dynamic link library.
[0086] Specifically, the parsed data is passed to the dynamic link library, and the predefined functions in the dynamic link library can be directly used to process or operate the data to achieve functions such as further processing or storage of the data. The predefined functions can be functions or methods, which are not limited in this embodiment.
[0087] Therefore, based on the transfer capability of the local listening program, data interaction between the web page and the setting application is realized. On the basis of maintaining the convenience of web page operation, the setting application is triggered to perform corresponding data processing and operation, thereby realizing more complex and diversified functions.
[0088] S250, calling a corresponding operation instruction based on the parsed data through the dynamic link library;
[0089] Specifically, by using the defined functions in the dynamic link library to call the operation instructions, the accuracy and efficiency of the operation can be ensured, and the corresponding operation can be performed according to the specific situation, making the system more flexible and intelligent. For example, if the parsed data indicates that the database needs to be updated, then the corresponding operation instruction is the function that executes the database update.
[0090] S260, performing an operation based on the operation instruction through the setting application to obtain the operation result.
[0091] Specifically, by encapsulating the operation instructions in a dynamic link library to call the functional module, each module is independent of each other, so that the application can be set to perform different tasks according to different input conditions, achieving high cohesion and low coupling, making the system easier to maintain and expand; at the same time, different tasks can also be performed according to different input conditions.
[0092] Furthermore, S240 may include:
[0093] S241, calling the executable file in the dynamic link library;
[0094] Specifically, a dynamic link library can contain at least one executable code and data file that can be used by multiple different programs at the same time. The executable file can be pre-created and can perform specific tasks or process specific data, thereby avoiding repeated code writing and improving development efficiency and program stability.
[0095] S242, modifying the data in the executable file according to the parsed data to obtain modified data;
[0096] Specifically, in order to adapt to new requirements or changing conditions, the system can be dynamically adjusted and responded to in real time by dynamically modifying the data in the executable file based on previously obtained data. For example, it may be necessary to modify the configuration file, update the database record, or adjust the program parameters based on the user's input, so as to ensure the consistency and timeliness of the data.
[0097] S243: Determine the operation instruction according to the modified data.
[0098] Specifically, parsing and modifying data can dynamically respond to changes in user input or external conditions, and can prevent data inconsistency; at the same time, by calling dynamic link libraries and generating operation instructions, the efficiency of task processing and program control can be improved.
[0099] See also Figure 3 , Figure 3 1 is a flow chart of the third embodiment of the data interaction method of the present application. In this embodiment, the method includes the following steps:
[0100] S310, generating an operation request and object data for setting an application program in response to a user instruction via a web page;
[0101] The above step S110 may be described, and will not be described in detail here.
[0102] S320, triggering the local listening interface of the dynamic link library provided by the local listening program through the webpage to initiate the operation request to the local listening program;
[0103] The above step S220 may be described, and will not be repeated here.
[0104] S330, in response to monitoring the operation request by using the local monitoring program, creating a second instance by using the local monitoring program, and obtaining a server address set up by the local monitoring interface;
[0105] S340, adding the server address to the second instance to obtain the object data;
[0106] Specifically, the second embodiment can be an instance created after the local listening program listens to the operation request, which is used to independently process each operation request to avoid mutual influence between requests. The server address can be the server address set up by the local listening interface made by the dynamic link library, so that the web page and the local listening program can exchange data.
[0107] S350, parsing the object data to obtain the parsed data.
[0108] Specifically, after receiving the object data, the second instance may convert the original data into an operable format to extract key information in the object data to obtain parsed data.
[0109] S360: transferring the parsed data to the dynamic link library.
[0110] The above step S230 may be described, and will not be repeated here.
[0111] See also Figure 4 , Figure 41 is a flow chart of the fourth embodiment of the data interaction method of the present application. In this embodiment, the method includes the following steps:
[0112] S410, generating an operation request and object data for setting an application program in response to a user instruction via a web page;
[0113] The above step S110 may be described, and will not be described in detail here.
[0114] S420, in response to monitoring the operation request using the local monitoring program, obtaining a target security code carried by the operation request;
[0115] Specifically, the local listening program can wait for and obtain operation requests from the web page. Each operation request can carry a target security code. The target security code can be a security mechanism, which can be a token, password or other form of authentication information. It is an important identifier for verifying the legitimacy of the operation request and preventing unauthorized operations. The local listening program can extract this security code from the operation request for subsequent verification steps.
[0116] S430: When it is detected that the target security code is verified, the object data is transferred to the dynamic link library.
[0117] Specifically, the local listening program verifies the extracted target security code by matching the target security code with a pre-stored legal security code. If the match is successful, it means that the target security code verification is successful, and the local listening program passes the object data to the dynamic link library for further processing.
[0118] Object data can be used to describe the operations and related parameters that need to be set for the application. After the target security code is verified, it can be passed to the dynamic link library to ensure that the operations instructed by the user can be executed safely and correctly.
[0119] S440, instructing the setting application to perform an operation through the dynamic link library to obtain an operation result;
[0120] The above step S130 may be described, and will not be described in detail here.
[0121] S450, returning the operation result to the webpage.
[0122] The above step S140 may be described, and will not be described in detail here.
[0123] Of course, this embodiment can also be used with Figure 2 or Figure 3 The illustrated embodiments are combined into a new embodiment.
[0124] This embodiment can ensure the legitimacy of the operation request and prevent malicious requests or unauthorized operations by verifying the target security code carried by the operation request; after the security verification is passed, passing the object data to the dynamic link library can ensure that the legitimate requested data is processed and maintain the security and stability of data interaction.
[0125] See also Figure 5 , Figure 5 1 is a flow chart of the fifth embodiment of the data interaction method of the present application. In this embodiment, the method includes the following steps:
[0126] S510, generating an operation request and object data for setting an application program in response to a user instruction via a web page;
[0127] The above step S110 may be described, and will not be described in detail here.
[0128] S520, in response to monitoring the operation request using the local monitoring program, transferring the object data to a dynamic link library;
[0129] The above step S120 may be described, and will not be described in detail here.
[0130] S530, instructing the setting application to perform an operation through the dynamic link library to obtain an operation result;
[0131] The above step S130 may be described, and will not be described in detail here.
[0132] S540, obtaining the operation result through the local monitoring program;
[0133] Specifically, after the dynamic link library executes the operation and obtains the result, the listening program continues to serve as a bridge for data transmission, receives the operation result from the dynamic link library, and then feeds back the underlying operation result to the user interface.
[0134] S550: Utilize the local monitoring interface to respond to the operation result to return the operation result to the webpage.
[0135] Specifically, when the setting application completes the operation, the local listening interface can quickly respond and transmit the operation results, improving the response speed and processing efficiency; at the same time, the local listening interface is used to separate data transmission and operation logic, effectively realizing the modularization and maintenance management of the setting application.
[0136] Of course, this embodiment can also be combined with the second and / or third and / or fourth embodiment to form a new embodiment.
[0137] This embodiment transmits the operation results generated by the dynamic link library back to the web page through the local monitoring interface, ensuring that the user can see the operation results in a timely manner, completing the complete interaction process from user input to result feedback, ensuring efficient and stable operation of data interaction, and enhancing the scalability and maintainability of the set application.
[0138] See also Figure 6 , Figure 6 It is a data flow diagram of the data interaction method of the present application.
[0139] First, the webpage generates JSON data to be executed by the InPlan software, and calls the local listening interface to transmit the JSON data and the target security code to the local listening program through the submission method (POST method) or the sending method, wherein the JSON data may include the operation type and operation data to be executed by the InPlan software;
[0140] Then, the local listener creates an HttpListener instance: HttpListener listener = newHttpListener();
[0141] Then, the local listening program obtains the local address and creates a local interface service to add the local address; wherein the local address is the server address of the interface set up by the dynamic link library of the InPlan software, so that the local listening program can start listening and accept the operation request initiated by the web page;
[0142] Then, the local listening program obtains the request object and the response object, and identifies the target security code carried by the operation request; when it is detected that the target security code is verified, the JSON data is parsed so that the dynamic link library can obtain the operation type and operation data to be performed by the InPlan software;
[0143] Then, the dynamic link library calls the InPlan software application programming interface (InPlanAPI) based on the parsed data to perform InPlan data operations;
[0144] Then, the local monitoring program records the operation log and operation results of the InPlan software, and at the same time, can also record the results of the operation of the InPlan software;
[0145] Finally, the local monitoring program obtains the operation result, and uses the local monitoring interface to respond to the operation result executed by the InPlan software, so that the web page can obtain this operation result; further, the web page can also be displayed to the user based on the operation result responded by the local monitoring interface.
[0146] In this embodiment, the local monitoring interface is triggered by the web page, and the mode and data to be operated are transmitted to the local monitoring program. The local monitoring program uses the InPlan software dynamic link library file to call the InPlanAPI operation command, and then executes the InPlan software operation, and returns the operation result of the InPlan software to the web page through the HTTP request response. That is, by using the dynamic link library file of the InPlan software, an HTTP data local monitoring program that simulates the InPlan software operation is developed, which can effectively realize the data interaction between the web page and the set application and reduce the operation complexity of the set application.
[0147] See also Figure 7 , Figure 7 is an exemplary structural block diagram of an electronic device 700 for data interaction according to an embodiment of the present application. Figure 7 As shown in , the electronic device 700 of the present application may include a processor 701 and a memory 702, wherein the processor 701 and the memory 702 communicate with each other via a bus. The memory 702 stores program instructions for data interaction, and when the program instructions are executed by the processor 701, the method steps described in the above text in combination with the accompanying drawings are implemented: generating an operation request and object data of a setting application in response to a user instruction through a web page; transmitting the object data to a dynamic link library in response to monitoring the operation request using a local monitoring program; instructing the setting application to perform an operation through the dynamic link library to obtain an operation result; and returning the operation result to the web page.
[0148] Optionally, after the processor 701 executes the step of generating an operation request and object data for setting an application in response to a user instruction through a webpage, and before the step of transmitting the object data to a dynamic link library in response to monitoring the operation request using a local monitoring program, the process further includes:
[0149] Triggering the local monitoring interface of the dynamic link library provided by the local monitoring program through the webpage to initiate the operation request to the local monitoring program;
[0150] Optionally, the processor 701 executes the step of transmitting the object data to the dynamic link library in response to monitoring the operation request by using the local monitoring program, including:
[0151] In response to monitoring the operation request using a local monitoring program, parsing the object data to obtain parsed data;
[0152] The parsed data is transferred to the dynamic link library.
[0153] Before the step of parsing the object data in response to monitoring the operation request using the local monitoring program to obtain the parsed data, the method further includes:
[0154] Creating a first instance through the local listening program, and obtaining a server address set up by the local listening interface;
[0155] The server address is added to the first instance so that the local listening program can listen to the operation request.
[0156] Optionally, the processor 701 executes the step of parsing the object data in response to monitoring the operation request by using a local monitoring program to obtain the parsed data, including:
[0157] In response to monitoring the operation request using the local monitoring program, creating a second instance through the local monitoring program, and obtaining a server address set up by the local monitoring interface;
[0158] adding the server address to the second instance to obtain the object data;
[0159] The object data is parsed to obtain the parsed data.
[0160] Optionally, the processor 701 executes the step of instructing the setting application to perform an operation through the dynamic link library to obtain an operation result, including:
[0161] Based on the parsed data, calling corresponding operation instructions through the dynamic link library;
[0162] The operation result is obtained by performing an operation based on the operation instruction through the setting application.
[0163] Optionally, the processor 701 executes the step of calling a corresponding operation instruction based on the parsed data, including:
[0164] Calling the executable file in the dynamic link library;
[0165] Modifying the data in the executable file according to the parsed data to obtain modified data;
[0166] The operation instruction is determined according to the modified data.
[0167] Optionally, the processor 701 executes the step of returning the operation result to the webpage, including:
[0168] Acquire the operation result through the local monitoring program;
[0169] The local monitoring interface is used to respond to the operation result so as to return the operation result to the webpage.
[0170] Optionally, the processor 701 executes the step of transmitting the object data to the dynamic link library in response to monitoring the operation request by using the local monitoring program, including:
[0171] In response to monitoring the operation request using a local monitoring program, obtaining a target security code carried by the operation request;
[0172] When it is detected that the target security code is verified, the object data is transferred to the dynamic link library.
[0173] See also Figure 8 , Figure 8 800 for data interaction according to an embodiment of the present application. The computer-readable storage medium 800 stores a computer program 801, and when the computer program 801 is executed on a computer, the computer executes the above-mentioned related method steps to implement a data interaction method in the above-mentioned embodiment.
[0174] The above scheme obtains the operation request and object data of the setting application requested by the web page through the local listening program, and passes the object data to the dynamic link library, so that the dynamic link library can instruct the setting application to perform the operation, and then return the operation result to the web page. That is, based on the collaboration of the local listening program and the dynamic link library, the data processing and analysis capabilities of the setting application are combined with the web page to provide an intuitive user interface, which effectively realizes the data interaction between the web page and the setting application and reduces the operation complexity of the setting application.
[0175] In the several embodiments provided in the present application, it should be understood that the disclosed methods, electronic devices and storage media can be implemented in other ways. For example, the device implementation described above is only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0176] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0177] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0178] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) or a processor (processor) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program code.
[0179] The above description is only an implementation method of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly used in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A data interaction method, characterized in that: The method comprises: generating, in response to a user instruction via a web page, an operation request and object data for setting an application program; In response to monitoring the operation request using a local monitoring program, transferring the object data to a dynamic link library; Instructing the setting application to perform an operation through the dynamic link library to obtain an operation result; Return the operation result to the web page.
2. The method according to claim 1, characterized in that After the step of generating an operation request and object data for setting an application program in response to a user instruction through a web page, and before the step of transmitting the object data to a dynamic link library in response to monitoring the operation request using a local monitoring program, the method further includes: Triggering the local monitoring interface of the dynamic link library provided by the local monitoring program through the webpage to initiate the operation request to the local monitoring program; In response to monitoring the operation request using the local monitoring program, the step of transferring the object data to the dynamic link library comprises: In response to monitoring the operation request using a local monitoring program, parsing the object data to obtain parsed data; The parsed data is transferred to the dynamic link library.
3. The method according to claim 2, characterized in that Before the step of parsing the object data in response to monitoring the operation request using the local monitoring program to obtain the parsed data, the method further includes: Creating a first instance through the local listening program, and obtaining a server address set up by the local listening interface; The server address is added to the first instance so that the local listening program can listen to the operation request.
4. The method according to claim 2, characterized in that: The step of parsing the object data in response to monitoring the operation request using the local monitoring program to obtain the parsed data comprises: In response to monitoring the operation request using the local monitoring program, creating a second instance through the local monitoring program, and obtaining a server address set up by the local monitoring interface; adding the server address to the second instance to obtain the object data; The object data is parsed to obtain the parsed data.
5. The method according to claim 2, characterized in that: The step of instructing the setting application to perform an operation through the dynamic link library to obtain an operation result comprises: Based on the parsed data, calling corresponding operation instructions through the dynamic link library; The operation result is obtained by performing an operation based on the operation instruction through the setting application.
6. The method according to claim 5, characterized in that The step of calling the corresponding operation instruction based on the parsed data includes: Calling the executable file in the dynamic link library; Modifying the data in the executable file according to the parsed data to obtain modified data; The operation instruction is determined according to the modified data.
7. The method according to claim 2, characterized in that The step of returning the operation result to the webpage includes: Acquire the operation result through the local monitoring program; The local monitoring interface is used to respond to the operation result so as to return the operation result to the webpage.
8. The method according to claim 1, characterized in that: In response to monitoring the operation request using the local monitoring program, the step of transferring the object data to the dynamic link library includes: In response to monitoring the operation request using a local monitoring program, obtaining a target security code carried by the operation request; When it is detected that the target security code is verified, the object data is transferred to the dynamic link library.
9. An electronic device, characterized in that: The electronic device comprises: A memory for storing executable program codes; A processor, configured to call and run the executable program code from the memory, so that the electronic device executes the data interaction method as described in any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed, the data interaction method according to any one of claims 1 to 8 is implemented.