Data processing method and device, computer equipment, storage medium and computer program product

By using bridging components to transform and parse task processing requests and results in cross-system platform development, the problem of balancing cross-system platform development efficiency and core business logic execution performance is solved, achieving efficient development and performance improvement.

CN121722497APending Publication Date: 2026-03-24SUZHOU ZONGWEI AUTOMATION CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-21
Publication Date
2026-03-24

AI Technical Summary

Technical Problem

In existing technologies, it is difficult to balance cross-system platform development efficiency with the execution performance of core business logic, resulting in problems of low development efficiency and insufficient performance.

Method used

The bridging component transforms the initial task processing request into a target task processing request that conforms to the second programming language, and uses the bridging component to parse the task processing results, thus achieving a balance between cross-system platform development efficiency and core business execution performance.

Benefits of technology

It has achieved high efficiency in cross-system platform development and improved the performance of core business execution, thereby increasing the efficiency of task processing on the controlled device side.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121722497A_ABST
    Figure CN121722497A_ABST
Patent Text Reader

Abstract

The invention relates to a data processing method and device, computer equipment, a storage medium and a computer program product. The method comprises the steps of receiving a target task based on a first application, and determining an initial task processing request corresponding to the target task; converting the initial task processing request into a target task processing request conforming to a second programming language based on a parameter conversion relationship between the first programming language and the second programming language in a bridging component; sending the target task processing request to a controlled device end to instruct the controlled device end to process the target task processing request based on a second application, and returning an initial task processing result; and based on a parameter conversion relationship between a first programming language and a second programming language in the bridging component, analyzing the initial task processing result to obtain a processing result of the target task. By adopting the method, the cross-system platform development efficiency and the core service execution performance can be considered.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a data processing method, apparatus, computer equipment, storage medium, and computer program product. Background Technology

[0002] Host computer software is a crucial component in industrial control, automation equipment, and smart hardware. Among related technologies, C / C++ / Qt is used as the development language, which can meet the real-time control needs of industrial equipment. However, it requires manual adaptation of user interfaces for multiple system platforms, resulting in extensive code writing, low development efficiency, and long iteration cycles. Another related technology uses a pure UI high-efficiency framework, relying on component reuse and one-click cross-platform adaptation to improve efficiency and quickly develop user interfaces for multiple system platforms. However, tasks such as underlying big data parsing, just-in-time compilation, and garbage collection cause screen lag and insufficient performance. Therefore, related technologies face the challenge of balancing "cross-system platform development efficiency" with "core business logic execution performance." Summary of the Invention

[0003] Therefore, it is necessary to provide a data processing method, apparatus, computer equipment, computer-readable storage medium, and computer program product that can achieve both cross-system platform development efficiency and core business execution performance in response to the above-mentioned technical problems.

[0004] Firstly, this application provides a data processing method. The method includes:

[0005] Based on the first application, a target task is received, and an initial task processing request corresponding to the target task is determined; wherein, the first application is developed based on a first programming language;

[0006] Based on the parameter conversion relationship between the first and second programming languages ​​in the bridging component, the initial task processing request is converted into a target task processing request that conforms to the second programming language;

[0007] The target task processing request is sent to the controlled device to instruct the controlled device to process the target task processing request based on the second application and return the initial task processing result; wherein, the second application is developed based on the second programming language;

[0008] Based on the parameter conversion relationship between the first and second programming languages ​​in the bridging component, the initial task processing result is parsed to obtain the target task processing result.

[0009] In one embodiment, before converting the initial task processing request into a target task processing request conforming to the second programming language based on the parameter conversion relationship between the first and second programming languages ​​in the bridging component, the method further includes:

[0010] Obtain the second interface parameter information of the function interface of the second programming language running on the controlled device;

[0011] Based on the information mapping relationship between the second programming language and the intermediate programming language, the second interface parameter information is converted into intermediate interface parameter information of the function interface of the intermediate programming language; based on the intermediate interface parameter information, the bridging adapter code file is determined.

[0012] Based on the information mapping relationship between the intermediate programming language and the first programming language running on the host computer, the intermediate interface parameter information in the bridging adapter code file is converted into the first interface parameter information of the function interface of the first programming language; based on the first interface parameter information, the calling encapsulation code file is determined.

[0013] Based on the call encapsulation code file, the bridging component is determined.

[0014] In one embodiment, the step of parsing the initial task processing result based on the parameter conversion relationship between the first and second programming languages ​​in the bridging component to obtain the processing result of the target task includes:

[0015] If the initial task processing result is a processing error, information in a standard data structure is returned; wherein, the information in the standard data structure includes an error identifier and a corresponding error description;

[0016] Information from the standard data structure is received based on the exception message channel in the bridging component;

[0017] If the initial task is processed normally, the processing result of the initial task is parsed based on the parameter conversion relationship between the first and second programming languages ​​in the bridging component, and the processing result of the target task is obtained.

[0018] In one embodiment, receiving information from the standard data structure based on the exception message channel in the bridging component includes:

[0019] Based on the exception message channel in the bridging component, information of the standard data structure is received; the information of the standard data structure also includes a target pointer; wherein, the target pointer has memory ownership, and the memory ownership is transferred from the string pointer to the target pointer, and the memory ownership of the string pointer is automatically generated when the string is created;

[0020] Upon parsing the error identifier and corresponding error description, the ownership of the target pointer is restored to a string pointer based on the memory release function in the bridging component, so as to release the memory on the controlled device side corresponding to the string pointer.

[0021] In one embodiment, sending the target task processing request to the controlled device includes:

[0022] When the target task processing request corresponds to a first processing type, the target task processing request and the synchronization task instruction are sent to the controlled device; wherein, the first processing type includes at least one of parameter verification and status query;

[0023] When the target task processing request corresponds to the second processing type, the target task processing request and the asynchronous task instruction are sent to the controlled device to instruct the controlled device to execute the target task processing request based on an independent thread pool.

[0024] In one embodiment, sending the target task processing request to the controlled device includes:

[0025] The target task processing request is sent to the standard communication interface of the controlled device; wherein, the standard communication interface corresponds to an enumeration type data format, and the enumeration type data format includes at least one of device identifier, parameter type, and time information;

[0026] The step of instructing the controlled device to process the target task processing request based on the second application includes:

[0027] The controlled device is instructed to determine a target controlled device that matches the target task processing request based on the standard communication interface, and to process the target task processing request based on the second application on the target controlled device.

[0028] Secondly, this application also provides a data processing apparatus, the apparatus comprising:

[0029] A receiving module is configured to receive a target task based on a first application and determine an initial task processing request corresponding to the target task; wherein the first application is developed based on a first programming language.

[0030] The conversion module is used to convert the initial task processing request into a target task processing request that conforms to the second programming language based on the parameter conversion relationship between the first programming language and the second programming language in the bridging component.

[0031] The sending module is used to send the target task processing request to the controlled device, so as to instruct the controlled device to process the target task processing request based on the second application and return the initial task processing result; wherein, the second application is developed based on the second programming language;

[0032] The parsing module is used to parse the initial task processing result based on the parameter conversion relationship between the first programming language and the second programming language in the bridging component, and obtain the processing result of the target task.

[0033] In one embodiment, the apparatus further includes a generation module, the generation module being configured to:

[0034] Obtain the second interface parameter information of the function interface of the second programming language running on the controlled device;

[0035] Based on the information mapping relationship between the second programming language and the intermediate programming language, the second interface parameter information is converted into intermediate interface parameter information of the function interface of the intermediate programming language; based on the intermediate interface parameter information, the bridging adapter code file is determined.

[0036] Based on the information mapping relationship between the intermediate programming language and the first programming language running on the host computer, the intermediate interface parameter information in the bridging adapter code file is converted into the first interface parameter information of the function interface of the first programming language; based on the first interface parameter information, the calling encapsulation code file is determined.

[0037] Based on the call encapsulation code file, the bridging component is determined.

[0038] In one embodiment, the parsing module is further configured to:

[0039] If the initial task processing result is a processing error, information in a standard data structure is returned; wherein, the information in the standard data structure includes an error identifier and a corresponding error description;

[0040] Information from the standard data structure is received based on the exception message channel in the bridging component;

[0041] If the initial task is processed normally, the processing result of the initial task is parsed based on the parameter conversion relationship between the first and second programming languages ​​in the bridging component, and the processing result of the target task is obtained.

[0042] In one embodiment, the parsing module is further configured to:

[0043] Based on the exception message channel in the bridging component, information of the standard data structure is received; the information of the standard data structure also includes a target pointer; wherein, the memory ownership pointer is the transfer of memory ownership of the string pointer to the target pointer, and the memory ownership of the string pointer is automatically generated when the string is created;

[0044] Upon parsing the error identifier and corresponding error description, the ownership of the target pointer is restored to a string pointer based on the memory release function in the bridging component, so as to release the memory on the controlled device side corresponding to the string pointer.

[0045] In one embodiment, the sending module is further configured to:

[0046] When the target task processing request corresponds to a first processing type, the target task processing request and the synchronization task instruction are sent to the controlled device; wherein, the first processing type includes at least one of parameter verification and status query;

[0047] When the target task processing request corresponds to the second processing type, the target task processing request and the asynchronous task instruction are sent to the controlled device to instruct the controlled device to execute the target task processing request based on an independent thread pool.

[0048] In one embodiment, the sending module is further configured to:

[0049] The target task processing request is sent to the standard communication interface of the controlled device; wherein, the standard communication interface corresponds to an enumeration type data format, and the enumeration type data format includes at least one of device identifier, parameter type, and time information;

[0050] The step of instructing the controlled device to process the target task processing request based on the second application includes:

[0051] The controlled device is instructed to determine a target controlled device that matches the target task processing request based on the standard communication interface, and to process the target task processing request based on the second application on the target controlled device.

[0052] Thirdly, this application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement an embodiment of the method described in any one of the embodiments of this disclosure.

[0053] Fourthly, this application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, implements an embodiment of the method described in any one of the embodiments of this disclosure.

[0054] Fifthly, this application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, implements an embodiment of the method described in any one of the embodiments of this disclosure.

[0055] The aforementioned data processing method, apparatus, computer equipment, storage medium, and computer program product convert an initial task processing request into a target task processing request conforming to a second programming language by setting a bridging component. Based on the parameter conversion relationship between the first and second programming languages ​​in the bridging component, the initial task processing result is parsed to obtain the processing result of the target task. Therefore, the first application does not need to focus on the programming language of the controlled device during development, and can be developed using the first programming language, which is adept at cross-platform user interface development, which is conducive to the efficient development of the first application on different platform systems of the host computer. On the other hand, the controlled device can also use the second programming language, which is adept at real-time processing or multi-threaded processing, improving the task processing efficiency of the controlled device. Therefore, this application takes into account both cross-system platform development efficiency and core business execution performance. Attached Figure Description

[0056] Figure 1 This is a diagram illustrating the application environment of a data processing method in one embodiment.

[0057] Figure 2 This is a flowchart illustrating a data processing method in one embodiment;

[0058] Figure 3 This is a flowchart illustrating a data processing method in one embodiment;

[0059] Figure 4 This is a flowchart illustrating a data processing method in one embodiment;

[0060] Figure 5 This is a flowchart illustrating the data processing method in another embodiment;

[0061] Figure 6 This is a schematic diagram of the architecture of a data processing method in one embodiment;

[0062] Figure 7 This is a schematic diagram of the architecture of a data processing method in one embodiment;

[0063] Figure 8 This is a schematic diagram of the architecture of a data processing method in one embodiment;

[0064] Figure 9 This is a schematic diagram of the architecture of a data processing method in one embodiment;

[0065] Figure 10 This is a structural block diagram of a data processing device in one embodiment;

[0066] Figure 11 This is an internal structural diagram of a computer device in one embodiment;

[0067] Figure 12 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0068] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0069] The data processing method provided in this application embodiment can be applied to, for example... Figure 1 In the application environment shown, the host computer 104 communicates with the controlled device 102 via a communication interface. A first application is installed on the host computer 104. The host computer 104 receives a target task, determines the initial task processing request corresponding to the target task, and, based on the parameter conversion relationship between the first and second programming languages ​​in the bridging component, converts the initial task processing request into a target task processing request conforming to the second programming language. The target task processing request is then sent to the controlled device 102. The controlled device 102 processes the target task processing request based on the second application and returns the initial task processing result. The host computer 104, based on the parameter conversion relationship between the first and second programming languages ​​in the bridging component, parses the initial task processing result to obtain the processing result of the target task. The host computer is a computer capable of issuing specific operation instructions, typically referring to a regular computer, industrial control computer, or touchscreen. It is located above the entire control system hierarchy. The controlled device can be an embedded device such as a microcontroller, PLC, or single-chip microcomputer, which directly connects to and controls field sensors, motors, switches, etc. Communication interfaces can include serial ports, Ethernet ports, and USB interfaces.

[0070] In one embodiment, such as Figure 2 As shown, a data processing method is provided, which can be applied to... Figure 1 Taking the host computer terminal 104 as an example, the explanation includes the following steps:

[0071] Step S201: Based on the first application, receive the target task and determine the initial task processing request corresponding to the target task; wherein, the first application is developed based on the first programming language.

[0072] The first programming language can include languages ​​that excel at efficient cross-platform development, such as Flutter. Optionally, the first programming language can also be C++, Python, etc. The target task can be a task performed on a host computer, such as querying temperature or setting a pressure alarm threshold. It is understood that the initial task processing request generated for the target task is generated by the first application; therefore, the input parameters of the function interfaces in the initial task processing request conform to the syntax of the first coding language.

[0073] Step S203: Based on the parameter conversion relationship between the first programming language and the second programming language in the bridging component, the initial task processing request is converted into a target task processing request that conforms to the second programming language.

[0074] In this embodiment of the disclosure, the bridging component, or bridging layer, is used to encapsulate the input parameters and exception messages of the function interface of the second programming language into a function interface that conforms to the call of the first programming language. This includes parameter conversion relationships between the first and second programming languages, such as conversion relationships for input parameter types and conversion relationships for processing result exceptions. Furthermore, it converts the input parameters in the initial task processing request into a target task processing request that conforms to the syntax format of the second programming language.

[0075] Step S205: Send the target task processing request to the controlled device to instruct the controlled device to process the target task processing request based on the second application and return the initial task processing result; wherein, the second application is developed based on the second programming language.

[0076] The second programming language can be a high-performance programming language for task processing, such as Rust. In this embodiment, a second application developed based on the second programming language is installed on the controlled device. Since the target task processing request conforms to the syntax of the second programming language, the controlled device can directly process the target task processing request to obtain an initial processing result.

[0077] Step S207: Based on the parameter conversion relationship between the first programming language and the second programming language in the bridging component, the initial task processing result is parsed to obtain the processing result of the target task.

[0078] In this embodiment of the disclosure, the parameter type of the initial task processing result conforms to the syntax format of the second programming language. Based on the parameter conversion relationship between the first and second programming languages ​​in the bridging component, the initial task processing result is converted into the processing result of the target task that conforms to the syntax format of the first programming language.

[0079] In the aforementioned data processing method, an initial task processing request is converted into a target task processing request conforming to a second programming language by setting a bridging component. Based on the parameter conversion relationship between the first and second programming languages ​​in the bridging component, the initial task processing result is parsed to obtain the processing result of the target task. Therefore, the first application does not need to focus on the programming language of the controlled device during development, and can be developed using the first programming language, which is adept at cross-platform user interface development, facilitating efficient development of the first application on different platform systems of the host computer. On the other hand, the controlled device can also use the second programming language, which is adept at real-time processing or multi-threaded processing, improving the efficiency of task processing on the controlled device. Therefore, this application balances cross-system platform development efficiency and core business execution performance.

[0080] In one embodiment, before converting the initial task processing request into a target task processing request conforming to the second programming language based on the parameter conversion relationship between the first and second programming languages ​​in the bridging component, the method further includes:

[0081] Step S301: Obtain the second interface parameter information of the function interface of the second programming language running on the controlled device.

[0082] The second interface parameter information may include function name, input parameter type, return value type, and exception type.

[0083] In one exemplary embodiment, for example, the function interface of the second programming language is a function interface for querying temperature and a function interface for setting a temperature alarm threshold. The exception type can be a hardware communication error, a data read error (with error details), an invalid threshold, etc. For example, taking the query temperature function interface as an example, the function of the query temperature function can be: read the real-time temperature of the port device and return the result. That is, if the query is successful, it returns the temperature value; if the query fails, it returns the error type. Another exemplary embodiment is a function interface for setting a temperature alarm threshold and returning the result. That is, if the setting is successful, it returns success; if the setting fails, it returns the error type.

[0084] Step S303: Based on the information mapping relationship between the second programming language and the intermediate programming language, the second interface parameter information is converted into intermediate interface parameter information of the function interface of the intermediate programming language; based on the intermediate interface parameter information, the bridging adapter code file is determined.

[0085] In one exemplary embodiment, the second programming language may be Rust, the intermediate programming language may be C, and the intermediate interface may be an FFI interface. The bridging adapter code may include intermediate interface encapsulation, exception criterion conversion, memory release, and data type adaptation.

[0086] Specifically, for the exception standard conversion part, a structure format compatible with the intermediate programming language can be defined, containing error codes and corresponding error messages, where the error messages are presented as strings. For example, 0 indicates no error, 1 indicates device not connected, 2 indicates read failure, and 3 indicates invalid threshold. Optionally, the structures can be arranged according to the memory layout of the intermediate programming language to ensure that the first programming language can parse them correctly. In an exemplary embodiment, the information mapping relationship between the second programming language and the intermediate programming language can be implemented through a conversion function. For example: code:1, msg: CString:new("Device not connected").unwrap().into_raw(), / / convert to C string, code:2, msg: CString:new(msg).unwrap().into_raw(), code:3, msg: CString: new(format!) / / Invalid threshold {}, requires 30-80.

[0087] For example, for the intermediate interface encapsulation part, the compiler can be prevented from obfuscating function names to ensure that the first programming language can find the function. For example, it can be compiled according to the calling convention of the intermediate programming language (such as C) to ensure cross-language compatibility. For example, take the function to query temperature as an example: port: c_uint, / / Input parameter: C-compatible unsigned integer (corresponding to Rust u32) out_temp: *mut c_float, / / Output parameter: temperature value (pointer, used to return the result) out_error: *mutDeviceTempCError, / / Output parameter: error message (pointer, returned exception). As another example, take the function to set the temperature alarm threshold as an example: let result=device_temp:set_temp_alarm_threshold(port as u32, threshold as u32); match result {Ok(_) => true, Err(err) => {let c_err =DeviceTempCError:from(err).

[0088] For example, regarding the memory release section, since the intermediate programming language string is allocated on the controlled device side, the release function can be called by the host computer to reclaim the memory. Specifically, for example: `pub extern "C" fn rust_free_device_error(err: *mutDeviceTempCError){unsafe{if!err.is_null(){ / / Reclaim the memory of the C string containing the error message let=CStr:from_ptr((*err).msg);std:ptr:drop_in_place(err); / / Release the memory of the error structure`

[0089] Step S305: Based on the information mapping relationship between the intermediate programming language and the first programming language running on the host computer, the intermediate interface parameter information in the bridging adapter code file is converted into the first interface parameter information of the function interface of the first programming language; based on the first interface parameter information, the encapsulation code file to be called is determined.

[0090] In one exemplary embodiment, the first programming language may be Flutter, and the calling encapsulation code may be Dart code. The calling encapsulation code includes the conversion between the parameter types of the intermediate language and the parameter types of the first programming language, binding of intermediate interface library functions, encapsulation of business calls, handling of intermediate interfaces to hidden pointers, parsing exceptions into the syntax format of the first programming language, synchronous and asynchronous calling strategies, etc.

[0091] For example, regarding the parameter type conversion section, the parameter types in the intermediate programming language structure are converted to parameter types conforming to the first programming language, such as Dart's unsigned integer type. The intermediate programming language string pointer `c_char*` is converted to a Dart string pointer `@Pointer`. <utf8>(). Converts intermediate language error messages into readable Dart exception messages using the external Pointer. <utf8>msg.

[0092] For example, regarding the function binding part of the intermediate interface library, such as binding a query temperature function in the second programming language, the content includes the function signature, input parameters, and other information of the intermediate programming language, as well as the function signature, input parameters, and other information of the first programming language. A mapping relationship is established between the three function interfaces.

[0093] For example, regarding the encapsulation of business calls and synchronous / asynchronous call strategies, such as for a function to query temperature, firstly, memory corresponding to the first programming language is allocated to receive the temperature value and error information returned by the second programming language. An intermediate interface is then called; if successful, the temperature value is returned; if it fails, an exception alert message conforming to the first programming language is returned. For setting temperature alarm thresholds, firstly, a sub-thread is started to avoid blocking the user interface thread corresponding to the first programming language. The sub-thread then calls the function interface of the second programming language, etc.

[0094] Step S307: Based on the call encapsulation code file, determine the bridging component.

[0095] In this embodiment of the disclosure, the details of cross-programming languages ​​are completely hidden by calling the encapsulated code. Developers can use it as if calling a local function, for example: final temp = DeviceTempService.getCurrentTemp(1), without having to worry about intermediate interfaces, pointers and memory management.

[0096] In the above embodiments, by obtaining the first interface parameter information of the function interface of the first programming language running on the controlled device, and based on the information mapping relationship between the first programming language and the intermediate programming language, the first interface parameter information is converted into intermediate interface parameter information of the function interface of the intermediate programming language; based on the intermediate interface parameter information, bridging adaptation code is determined. Based on the information mapping relationship between the intermediate programming language and the second programming language running on the host computer, the intermediate interface parameter information is converted into second interface parameter information of the function interface of the second programming language; based on the second interface parameter information, call encapsulation code is determined. This allows for the automatic generation of call encapsulation code in the bridging component. Therefore, when a new device using a second programming language is connected, there is no need to manually develop call encapsulation code, greatly improving the development efficiency of cross-language systems.

[0097] In one embodiment, the step of parsing the initial task processing result based on the parameter conversion relationship between the first and second programming languages ​​in the bridging component to obtain the processing result of the target task includes:

[0098] Step S401: If the initial task processing result is a processing error, return information of a standard data structure; wherein, the information of the standard data structure includes an error identifier and a corresponding error description.

[0099] The processing errors in the initial task processing results can include processing errors on the controlled device side. Error types can include: hardware connection failure, such as serial port port not existing or TCP connection timeout; data frame verification error, such as Modbus data CRC check mismatch; communication interruption, such as industrial bus suddenly disconnecting.

[0100] In one exemplary embodiment, the hardware communication module on the controlled device side can capture low-level I / O errors (such as std:io:Error) and custom protocol parsing errors (such as ProtocolError:CrcMismatch) using the match syntax. In one exemplary embodiment, error information is stored using a standardized data structure, where the information in the standardized data structure includes an error identifier and a corresponding error description. For example: Hardware Error{code:1001, msg:"Serial port COM3 connection failed"}), avoiding cluttered original error information.

[0101] In an exemplary embodiment, error types may also include computationally intensive task exceptions, such as data format errors (e.g., the input Rust device parameters are invalid values), algorithm execution timeouts (e.g., machine learning prediction tasks exceed the preset time), and memory allocation failures (e.g., insufficient memory when processing very large datasets). The corresponding processing strategies may include: (1) Pre-verification interception: Before task execution, the controlled device verifies the legality of the input data (e.g., parameter range, data type) and throws out data format errors in advance to avoid invalid calculations. (2) Timeout control: Set a timeout mechanism for time-consuming tasks (e.g., using tokio:time:timeout), throw an algorithm execution timeout after the timeout, and terminate the occupied thread resources. (3) Memory safety fallback: Utilize the Rust ownership mechanism to automatically trigger an OutOfMemory error when memory allocation fails, and release the allocated resources through the Drop trait to avoid memory leaks.

[0102] Step S403: Receive information from the standard data structure based on the exception message channel in the bridging component.

[0103] A message channel is a logical pathway used to asynchronously transmit messages between different applications, services, or components. Common message channels include RabbitMQ, Apache Kafka, and Apache RocketMQ. In an exemplary embodiment, information about the standard data structure is received based on an exception message channel in the bridging component.

[0104] Below, this application provides a specific embodiment to improve the process of steps S401 to S403.

[0105] The first step is to define and capture exceptions on the controlled device side. For example, the controlled device side defines custom exceptions related to business operations, such as: `HardwareDisconnected`, / / Device not connected (no additional information); `DataReadFailed(String)`, / / Data read failed (with specific reason); `ThresholdInvalid(u32)`, / / Invalid threshold (with error threshold). These exceptions are captured and returned in the core logic, for example, to verify the validity of the port; if invalid, an exception is returned, along with specific port information. The exception description includes business semantics and additional information, providing sufficient debugging details for subsequent pass-through.

[0106] The second step involves the bridging component handling exception propagation. Specifically, the bridging component converts errors from the controlled device into a standard data structure in the intermediate language, where the structure encapsulates both the error code and the error description. For example, `pub structDeviceTempC Error{code:c_uint, / / Error code: used by the Flutter side to quickly determine the exception type msg:*mutc_char, / / Error message: C string, conveying a detailed description}`. This combination of "error code + string" allows the host computer to quickly determine the exception type (using the error code) and obtain detailed information (using the string).

[0107] The third step involves exception parsing and consumption on the host computer. The Flutter side converts C-compatible exceptions to native Dart exceptions for processing by the UI layer. Example: / / 1. Dart side binds a C exception structure class DeviceTempError extends Struct{@Uint32() external int code; / / corresponds to the c_uint error code on the Rust side; @Pointer <utf8>() external Pointer <utf8>msg; / / Corresponds to c_char* error messages on the Rust side; / / 2. Convert to a Dart-readable string; String get message=>msg.toDartString();}; / / 3. Parse and throw a Dart exception in the business call; static double getCurrentTemp(int port){final tempPtr=calloc <float>();final errorPtr=calloc <devicetemperror>(); try {finalsuccess=_getTempFunc(port, tempPtr, errorPtr); if (!success) {final error=errorPtr.ref; / / 4. Throw a Dart exception: containing error code and details; throw Exception('[Temperature query failed] code ${error.code}: ${error.message}').

[0108] Finally, after the host computer detects an anomaly, it can perform differentiated processing according to the error code (e.g., error code 1 displays a "Check equipment wiring" pop-up window, and error code 3 displays a "Enter 30-80℃ threshold" prompt), while retaining detailed information for debugging purposes.

[0109] In addition, this application also proposes error and exception handling strategies for the bridging component and for the host computer.

[0110] The error handling strategy for the bridging component includes type conversion exceptions and communication mode exceptions. Specifically, for type conversion exceptions, the first and second programming languages ​​may have type mismatches during data interaction (e.g., the first programming language transmits a string but the second programming language needs to receive an integer); or the data length exceeds limits (e.g., the length of an array transmitted by the first programming language exceeds the preset limit of the second programming language). The handling strategies are: ① Automatic verification: The bridging layer type conversion module automatically verifies the data types and lengths of both ends (based on the interface definition during code generation) before data transmission; if a mismatch occurs, the connection is directly blocked. ② User-friendly conversion prompts: The underlying type mismatch error is converted into an error type recognizable by the first programming language, and specific information is added (e.g., if a u32 type integer is to be transmitted, it is actually a string), rather than exposing the original type error of the second programming language. ③ Interruption of transmission: This type of exception does not enter the core logic layer; the request is terminated directly at the bridging layer to avoid unnecessary resource consumption.

[0111] For the error and exception handling strategy of the host computer, the types of error and exception can include business logic exceptions, controlled device exceptions, and front-end manifestations of bridging component exceptions, such as hardware connection failure, data format error, and synchronous call timeout. The corresponding handling strategies include: (1) Friendly feedback: Trigger corresponding UI interaction according to the error type, such as a pop-up window prompting to check the device wiring and port configuration when the hardware connection fails, and a red prompt text is displayed next to the input box when the data format is incorrect. (2) Hierarchical handling: Critical errors (such as communication interruption) trigger global alarms (such as continuous display of the red notification bar at the top), while non-critical errors (such as parameter query timeout) only display a brief prompt. (3) Log recording: Store the exception details (including error code, occurrence time, and device information) locally or upload them to the backend for developers to troubleshoot (such as recording through the flutter_logs plugin, without exposing it to ordinary users).

[0112] Error types can also include: UI rendering problems caused by core logic exceptions, such as chart rendering crashes due to empty data returned by the second programming language, or the UI still attempting to update its state after an asynchronous task is canceled. Handling strategies: 1. Data fallback: Before receiving data from the second programming language, check its validity. If it's empty, display the default interface (e.g., a "no data" prompt), avoiding null pointer exceptions. 2. State management protection: Manage UI state using ValueNotifier or Bloc from the first programming language. Freeze state updates when an exception occurs (e.g., mark the task as canceled and ignore subsequent data callbacks). 3. Local capture: Wrap critical UI rendering code (e.g., chart drawing, list refreshing) in try-catch blocks. After catching the exception, only refresh the affected area, preventing the entire page from crashing.

[0113] Step S405: If the processing result of the initial task is normal, based on the parameter conversion relationship between the first programming language and the second programming language in the bridging component, the processing result of the initial task is parsed to obtain the processing result of the target task.

[0114] In the above embodiments, if the initial task processing result is a processing error, information from a standard data structure is returned; wherein, the information from the standard data structure includes an error identifier and a corresponding error description. The information from the standard data structure is received based on the exception message channel in the bridging component. This ensures that critical debugging information is not lost and improves the accuracy of data transmission. Furthermore, this application also provides error and exception handling strategies for the bridging component and for the host computer. The aforementioned full-link coverage, standardized conversion, and layered response mechanism significantly reduces the runtime error rate. The controlled device layer is responsible for accurate capture and standardized encapsulation, ensuring the integrity and uniformity of exception information. The bridging layer is responsible for secure conversion and interception of invalid exceptions, avoiding the risk of cross-language transmission. The host computer is responsible for user-friendly feedback and logging, balancing user experience and troubleshooting needs, ultimately ensuring the stability of the host computer in industrial control, smart hardware, and other scenarios.

[0115] In one embodiment, receiving information from the standard data structure based on the exception message channel in the bridging component includes:

[0116] Based on the exception message channel in the bridging component, information of the standard data structure is received; the information of the standard data structure also includes a target pointer; wherein, the target pointer has memory ownership, and the memory ownership is transferred from the string pointer to the target pointer, and the memory ownership of the string pointer is automatically generated when the string is created.

[0117] Upon parsing the error identifier and corresponding error description, the ownership of the target pointer is restored to a string pointer based on the memory release function in the bridging component, so as to release the memory on the controlled device side corresponding to the string pointer.

[0118] In the specific implementation process, the controlled device generates string information, which can be encapsulated in a standard data structure, such as "Device not connected". The controlled device generates the string based on a second programming language and allocates memory. Ownership of the string pointer is transferred to the target pointer, which is then encapsulated in a standard data structure and passed to the host computer. For example, when the controlled device needs to convert exception information (such as "Device not connected") into a C string and pass it to the host computer, the code is as follows: / / Controlled device bridge layer: Generate C string let c_msg=CString:new("Device not connected").unwrap(); / / 1. Allocate memory: CString holds ownership of the string let msg_ptr=c_msg.into_raw(); / / 2. Transfer ownership: Transfer ownership of the CString's memory to the "target pointer" / / 3. Pass the pointer: Store msg_ptr in the DeviceTempCError structure and pass it to the host computer. Key point: CString is a safe type for the controlled device, and memory is automatically managed during creation; after calling into_raw(), the controlled device no longer tracks this memory (ownership is transferred to the pointer), avoiding accidental release by the controlled device leading to the host computer using a dangling pointer.

[0119] In an exemplary embodiment, after parsing the error identifier and corresponding error description, the host computer restores the ownership of the target pointer to a string pointer based on the memory release function in the bridging component, thereby releasing the memory of the controlled device corresponding to the string pointer. For example, after use by the host computer: triggering the controlled device to release the memory, after receiving the C string pointer, the host computer needs to call the release function provided by the controlled device to reclaim the memory, for example: `let_recovered_msg=CStr:from_ptr((*err).msg).to_owned(); / / 3. Automatic release: _recovered_msg leaves the scope, and the memory is automatically released by Rust; std:ptr:drop_in_place(err); / / Release the memory of the DeviceTempCError structure. / / Host computer: Call the release function (ensure execution in the finally block) _freeErrorFunc(errorPtr); / / Call the release function of the controlled device to trigger memory reclamation.`

[0120] In one exemplary embodiment, if the host computer does not call the release function, the controlled device will not automatically release the memory because ownership has been transferred. In this architecture, the host computer ensures that memory reclamation on the controlled device will be triggered regardless of whether an exception occurs by forcibly calling the release function. To prevent dangling pointers: if the controlled device releases the memory in advance, the host computer will crash when accessing the pointer again. The ownership mechanism of the controlled device does not allow access after release: after the ownership transfer function transfers ownership, the controlled device can no longer access the memory through the string pointer, thus avoiding accidental release.

[0121] In the above embodiments, by using the release function on the controlled device side and the forced call on the host computer side, it is ensured that the ownership of the memory ultimately returns to the controlled device side, and the controlled device side automatically releases the memory according to the ownership rules, thus avoiding the problem of easy omissions in manual memory release in traditional cross-language calls.

[0122] In one embodiment, sending the target task processing request to the controlled device includes:

[0123] When the target task processing request corresponds to a first processing type, the target task processing request and the synchronization task instruction are sent to the controlled device; wherein, the first processing type includes at least one of parameter verification and status query;

[0124] When the target task processing request corresponds to the second processing type, the target task processing request and the asynchronous task instruction are sent to the controlled device to instruct the controlled device to execute the target task processing request based on an independent thread pool.

[0125] In the specific implementation process, refer to Figure 5 As shown, the first processing type corresponds to relatively short-duration operations, such as parameter validation and status queries. The second processing type corresponds to relatively long-duration operations, such as big data processing and hardware communication. The Flutter side (host computer) triggers a call to the target task. When the target task processing request corresponds to the first processing type, the Flutter side initiates a synchronous call. The zongwei_ui bridge layer (bridge component) forwards the target task processing request to the Rust side (controlled device). The Rust side executes the target task and returns the result. The bridge layer converts the result type, the Flutter side receives the result, and updates the user interface display. Correspondingly, when the target task processing request corresponds to the first processing type, the Flutter side initiates an asynchronous call. The bridge layer creates an asynchronous task. The Rust side executes the target task in an independent thread pool, providing real-time feedback on task progress. The Rust side completes the target task and returns the result. The bridge layer converts the result type, the Flutter side receives the result, and updates the user interface display or triggers subsequent logic.

[0126] The above embodiments create a separate thread resource pool for time-consuming tasks in the core logic layer of the controlled device, such as big data parsing, hardware protocol handshake, and complex algorithm calculation. This thread pool is independent of the UI thread on the host computer, such as a single Dart thread, and also independent of other lightweight task threads on the controlled device. It is specifically used to handle computationally intensive or I / O-intensive tasks that are time-consuming and resource-intensive. The core purpose is to avoid blocking the UI, improve task concurrency efficiency, and ensure the real-time performance of the host computer.

[0127] In one embodiment, sending the target task processing request to the controlled device includes:

[0128] The target task processing request is sent to the standard communication interface of the controlled device; wherein, the standard communication interface corresponds to an enumeration type data format, and the enumeration type data format includes at least one of device identifier, parameter type, and time information.

[0129] The step of instructing the controlled device to process the target task processing request based on the second application includes:

[0130] The controlled device is instructed to determine a target controlled device that matches the target task processing request based on the standard communication interface, and to process the target task processing request based on the second application on the target controlled device.

[0131] In traditional architectures, interfaces and protocols are strongly bound. For example, Modbus temperature sensors use modbus_read_temp(), and custom protocol pressure sensors use custom_read_pressure(). Upper-layer calls need to be aware of the underlying protocol, and adding a new protocol requires extensive code modifications. In the specific implementation process of this disclosure embodiment, (1) a standardized data format independent of the protocol is defined, such as an enumeration type data format. This standardized data format covers at least one of device identifier, parameter type, and time information. For example: pub enum DeviceData{Temp{device_id: String, value: f32,timestamp: u64}, / / temperature Pressure{device_id: String, value: f64, timestamp: u64}, / / pressure Vibration{device_id: String,value:u32,timestamp:u64}, / / vibration (adding an enumeration item is sufficient when adding a new device). (2) Standardized communication interface is uniformly encapsulated. Regardless of whether the underlying protocol is Modbus, CAN or a custom protocol, the protocol parsing layer encapsulates the parsed data into DeviceData enumeration instances. For example, Modbus temperature data parsing: / / Modbus protocol parsing layer (outputs a unified data model) pub fn parse_modbus_data(raw_data:Vec <u8>,device_id:String)->Result<DeviceData,ParseError> {let temp_value=parse_temp_from_modbus(raw_data)?; / / Protocol-specific parsing logic; Ok(DeviceData:Temp{device_id,value: temp_value, timestamp: chrono:Utc:now().timestamp() as u64,})}。 (3) Unified upper-layer call: The bridging component and the host computer only need to process the enumeration type, without needing to care about which protocol the data comes from. When adding a new device (such as a vibration sensor), only the enumeration type needs to be added in the protocol parsing layer. The encapsulation logic of the vibration sensor requires zero modification to the upper-layer code.

[0132] Furthermore, the embodiments disclosed herein can also implement a dynamic protocol registration mechanism and dynamically expand new protocols.

[0133] In the dynamic protocol registration mechanism, in the traditional architecture, the protocol parsing logic is statically compiled and bound to the host computer code. If a new protocol (such as a customer-defined industrial protocol) needs to be supported, the entire host computer software needs to be recompiled, and it cannot be dynamically extended. The methods that cannot be disclosed in the embodiments include: (1) Defining a protocol parsing interface to input raw data and output enumerated type data. (2) Dynamically registering protocol parsers: Maintaining a global mapping table of "protocol type → parser" in the unified communication interface layer, supporting dynamic registration of new parsers at runtime (such as loading through configuration files or plugins). The protocol registrar in the unified communication interface layer dynamically selects the parser according to the device protocol type. (3) Dynamically extending new protocols: When adding a custom protocol, there is no need to modify the host computer main program. It is only necessary to implement the mapping from raw data to enumerated type data and register it through the configuration file (such as adding {"type":"custom_v1","lib_path": "libcustom_parser.so"} in protocol_config.json). The parser is automatically loaded when the host computer starts, realizing "zero compilation extension".

[0134] In addition, to address the hardware interaction requirements of the host computer, the hardware communication capabilities are encapsulated and converted on the controlled device side. (See reference for details.) Figure 6 As shown. System stability and real-time performance are improved through "exception handling, performance optimization, and thread management." (See reference for details.) Figure 7 As shown. Standardized bridging is achieved through three steps: "interface definition - code generation - communication adaptation". See reference for details. Figure 8 As shown in the diagram. Layered design achieves "separation of responsibilities," with each layer developing independently yet collaborating. The architecture flowchart is shown below; for reference, see the content. Figure 9 As shown.

[0135] In the above embodiments, compared to traditional technologies where different controlled devices, such as temperature sensors and pressure sensors, have independent communication interfaces (e.g., temperature sensors use read_temp(), and pressure sensors use read_pressure()), adding a new device requires modification of the upper-level logic, this disclosure, through a unified communication interface and data conversion of enumerated types, enables rapid expansion of different controlled devices without modifying the host computer code, greatly improving the system's scalability.

[0136] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0137] Based on the same inventive concept, this application also provides a data processing apparatus for implementing the data processing method described above. The solution provided by this apparatus is similar to the implementation scheme described in the above method; therefore, the specific limitations in one or more data processing apparatus embodiments provided below can be found in the limitations of the data processing method described above, and will not be repeated here.

[0138] In one embodiment, a data processing apparatus 1000 is provided, the apparatus comprising:

[0139] The receiving module 1001 is configured to receive a target task based on a first application and determine an initial task processing request corresponding to the target task; wherein the first application is developed based on a first programming language.

[0140] The conversion module 1003 is used to convert the initial task processing request into a target task processing request that conforms to the second programming language based on the parameter conversion relationship between the first programming language and the second programming language in the bridging component.

[0141] The sending module 1005 is used to send the target task processing request to the controlled device to instruct the controlled device to process the target task processing request based on the second application and return the initial task processing result; wherein, the second application is developed based on the second programming language;

[0142] The parsing module 1007 is used to parse the initial task processing result based on the parameter conversion relationship between the first programming language and the second programming language in the bridging component, and obtain the processing result of the target task.

[0143] In one embodiment, the apparatus further includes a generation module, the generation module being configured to:

[0144] Obtain the second interface parameter information of the function interface of the second programming language running on the controlled device;

[0145] Based on the information mapping relationship between the second programming language and the intermediate programming language, the second interface parameter information is converted into intermediate interface parameter information of the function interface of the intermediate programming language; based on the intermediate interface parameter information, the bridging adapter code file is determined.

[0146] Based on the information mapping relationship between the intermediate programming language and the first programming language running on the host computer, the intermediate interface parameter information in the bridging adapter code file is converted into the first interface parameter information of the function interface of the first programming language; based on the first interface parameter information, the calling encapsulation code file is determined.

[0147] Based on the call encapsulation code file, the bridging component is determined.

[0148] In one embodiment, the parsing module is further configured to:

[0149] If the initial task processing result is a processing error, information in a standard data structure is returned; wherein, the information in the standard data structure includes an error identifier and a corresponding error description;

[0150] Information from the standard data structure is received based on the exception message channel in the bridging component;

[0151] If the initial task is processed normally, the processing result of the initial task is parsed based on the parameter conversion relationship between the first and second programming languages ​​in the bridging component, and the processing result of the target task is obtained.

[0152] In one embodiment, the parsing module is further configured to:

[0153] Based on the exception message channel in the bridging component, information of the standard data structure is received; the information of the standard data structure also includes a target pointer; wherein, the target pointer has memory ownership, and the memory ownership is transferred from the string pointer to the target pointer, and the memory ownership of the string pointer is automatically generated when the string is created;

[0154] Upon parsing the error identifier and corresponding error description, the ownership of the target pointer is restored to a string pointer based on the memory release function in the bridging component, so as to release the memory on the controlled device side corresponding to the string pointer.

[0155] In one embodiment, the sending module is further configured to:

[0156] When the target task processing request corresponds to a first processing type, the target task processing request and the synchronization task instruction are sent to the controlled device; wherein, the first processing type includes at least one of parameter verification and status query;

[0157] When the target task processing request corresponds to the second processing type, the target task processing request and the asynchronous task instruction are sent to the controlled device to instruct the controlled device to execute the target task processing request based on an independent thread pool.

[0158] In one embodiment, the sending module is further configured to:

[0159] The target task processing request is sent to the standard communication interface of the controlled device; wherein, the standard communication interface corresponds to an enumeration type data format, and the enumeration type data format includes at least one of device identifier, parameter type, and time information;

[0160] The step of instructing the controlled device to process the target task processing request based on the second application includes:

[0161] The controlled device is instructed to determine a target controlled device that matches the target task processing request based on the standard communication interface, and to process the target task processing request based on the second application on the target controlled device.

[0162] Each module in the aforementioned data processing device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the operations corresponding to each module.

[0163] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 11 As shown, this computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores data for data processing. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network connection. When the computer program is executed by the processor, it implements a data processing method.

[0164] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 12 As shown, the computer device includes a processor, memory, input / output interfaces, a communication interface, a display unit, and an input device. The processor, memory, and input / output interfaces are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The input / output interfaces are used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When the computer program is executed by the processor, it implements a data processing method. The display unit of the computer device is used to form a visually visible image. It can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.

[0165] Those skilled in the art will understand that Figure 12 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0166] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.

[0167] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, etc., and are not limited to these.

[0168] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0169] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims. < / devicetemperror> < / float>

Claims

1. A data processing method, characterized in that, Applied to the host computer, the method includes: Based on the first application, a target task is received, and an initial task processing request corresponding to the target task is determined; wherein, the first application is developed based on a first programming language; Based on the parameter conversion relationship between the first and second programming languages ​​in the bridging component, the initial task processing request is converted into a target task processing request that conforms to the second programming language; The target task processing request is sent to the controlled device to instruct the controlled device to process the target task processing request based on the second application and return the initial task processing result; wherein, the second application is developed based on the second programming language; Based on the parameter conversion relationship between the first and second programming languages ​​in the bridging component, the initial task processing result is parsed to obtain the target task processing result.

2. The method according to claim 1, characterized in that, Before converting the initial task processing request into a target task processing request conforming to the second programming language based on the parameter conversion relationship between the first and second programming languages ​​in the bridging component, the following steps are also included: Obtain the second interface parameter information of the function interface of the second programming language running on the controlled device; Based on the information mapping relationship between the second programming language and the intermediate programming language, the second interface parameter information is converted into intermediate interface parameter information of the function interface of the intermediate programming language; based on the intermediate interface parameter information, the bridging adapter code file is determined. Based on the information mapping relationship between the intermediate programming language and the first programming language running on the host computer, the intermediate interface parameter information in the bridging adapter code file is converted into the first interface parameter information of the function interface of the first programming language; based on the first interface parameter information, the calling encapsulation code file is determined. Based on the call encapsulation code file, the bridging component is determined.

3. The method according to claim 1, characterized in that, The process of parsing the initial task processing result based on the parameter conversion relationship between the first and second programming languages ​​in the bridging component to obtain the processing result of the target task includes: If the initial task processing result is a processing error, information in a standard data structure is returned; wherein, the information in the standard data structure includes an error identifier and a corresponding error description; Information from the standard data structure is received based on the exception message channel in the bridging component; If the initial task is processed normally, the processing result of the initial task is parsed based on the parameter conversion relationship between the first and second programming languages ​​in the bridging component, and the processing result of the target task is obtained.

4. The method according to claim 3, characterized in that, The exception message channel based on the bridging component receives information from the standard data structure, including: Based on the exception message channel in the bridging component, information of the standard data structure is received; the information of the standard data structure also includes a target pointer; wherein, the target pointer has memory ownership, and the memory ownership is transferred from the string pointer to the target pointer, and the memory ownership of the string pointer is automatically generated when the string is created; Upon parsing the error identifier and corresponding error description, the ownership of the target pointer is restored to a string pointer based on the memory release function in the bridging component, so as to release the memory on the controlled device side corresponding to the string pointer.

5. The method according to claim 1, characterized in that, Sending the target task processing request to the controlled device includes: When the target task processing request corresponds to a first processing type, the target task processing request and the synchronization task instruction are sent to the controlled device; wherein, the first processing type includes at least one of parameter verification and status query; When the target task processing request corresponds to the second processing type, the target task processing request and the asynchronous task instruction are sent to the controlled device to instruct the controlled device to execute the target task processing request based on an independent thread pool.

6. The method according to claim 1, characterized in that, Sending the target task processing request to the controlled device includes: The target task processing request is sent to the standard communication interface of the controlled device; wherein, the standard communication interface corresponds to an enumeration type data format, and the enumeration type data format includes at least one of device identifier, parameter type, and time information; The step of instructing the controlled device to process the target task processing request based on the second application includes: The controlled device is instructed to determine a target controlled device that matches the target task processing request based on the standard communication interface, and to process the target task processing request based on the second application on the target controlled device.

7. A data processing apparatus, characterized in that, The device includes: A receiving module is configured to receive a target task based on a first application and determine an initial task processing request corresponding to the target task; wherein the first application is developed based on a first programming language. The conversion module is used to convert the initial task processing request into a target task processing request that conforms to the second programming language based on the parameter conversion relationship between the first programming language and the second programming language in the bridging component. The sending module is used to send the target task processing request to the controlled device, so as to instruct the controlled device to process the target task processing request based on the second application and return the initial task processing result; wherein, the second application is developed based on the second programming language; The parsing module is used to parse the initial task processing result based on the parameter conversion relationship between the first programming language and the second programming language in the bridging component, and obtain the processing result of the target task.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.

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

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.