A General Middleware Method, Device, Equipment and Medium Supporting XFS4IoT Conversion

Through the general middleware method, the XFS4IoT request data is separated, structured analysis and interface command format conversion is solved, and the compatibility problem in the conversion of XFS4IoT to XFS3 is achieved, and efficient system performance and device compatibility are achieved.

CN119892946BActive Publication Date: 2025-06-24CLP FINANCIAL EQUIP SYST (SHENZHEN) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510361979.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-26
Publication Date
2025-06-24
Estimated Expiration
2045-03-26

AI Technical Summary

Technical Problem

There are compatibility issues with XFS4IoT's request conversion to XFS3, resulting in reduced system performance.

Method used

A general middleware method is provided to realize the request conversion from XFS4IoT to XFS3 by obtaining request data, separating data, structuring analysis, determining the input parameter format of interface commands and performing parameter conversion.

Benefits of technology

Avoid incompatibility issues, provides an intermediate layer for device support, allowing existing devices to communicate with applications that support XFS4 specifications without modification, and improves system performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119892946B_ABST
    Figure CN119892946B_ABST
Patent Text Reader

Abstract

The present invention relates to the fields of network protocols and financial technologies, and discloses a general middleware method, device, equipment and medium for supporting XFS4IoT conversion, including: obtaining request data and interface conditions, separating data in a preset format in the request data to obtain a separated data set; performing structured parsing on the separated data set to obtain structured data; determining the input parameter format of a preset interface command according to the interface conditions; and performing input parameter conversion on the structured data according to the input parameter format to obtain converted data. By converting the XFS4Iot specification protocol and the XFS3 specification protocol, a middle layer for device support is provided, enabling existing device SPs to communicate with applications supporting the XFS4 specification without modification, thus avoiding incompatibility problems.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the fields of network protocols and financial technologies, and particularly to a general middleware method, device, equipment and medium supporting XFS4IoT conversion. Background Art

[0002] XFS is the abbreviation of "eXtensions for Financial Services", which is a standardized interface developed by the American Bankers Association for connecting financial automation devices (such as ATMs and cash automation devices) and financial automation applications.

[0003] Among them, XFS4IoT is a new generation of XFS standard protocol developed according to the latest IoT technologies and communication protocols; compared with the XFS3 specification protocol, XFS4IoT has higher flexibility and interoperability, supports more device types and communication methods, but the XFS3 specification protocol has been widely applied in the field of financial automation devices, and it is necessary to convert the XFS4IoT protocol into the XFS3 specification protocol for communication.

[0004] Currently, there are certain differences and incompatibilities between XFS4IoT and XFS3 during the request conversion, and there are compatibility problems during the conversion, while reducing the system performance. Summary of the Invention

[0005] The present invention provides a general middleware method, device, equipment and medium supporting XFS4IoT conversion. By converting the XFS4Iot specification protocol and the XFS3 specification protocol, a middle layer for device support is provided, so as to realize communication between the existing device SP and the application supporting the XFS4 specification without modification, and avoid incompatibility problems.

[0006] In a first aspect, a general middleware method supporting XFS4IoT conversion is provided, including:

[0007] Obtain request data and interface conditions, and separate the data in a preset format in the request data to obtain a separated data set;

[0008] Perform structured parsing on the separated data set to obtain structured data;

[0009] Determine the input parameter format of a preset interface command according to the interface conditions;

[0010] Perform input parameter conversion on the structured data according to the input parameter format to obtain converted data.

[0011] In a second aspect, a general middleware device supporting XFS4IoT conversion is provided, including:

[0012] An acquisition module, configured to acquire request data and interface conditions;

[0013] A separation module, configured to separate data in a preset format in the request data to obtain a separated data set;

[0014] An analysis module, configured to perform structured analysis on the separated data set to obtain structured data;

[0015] A determination module, configured to determine the input parameter format of a preset interface command according to the interface conditions;

[0016] A conversion module, configured to perform input parameter conversion on the structured data according to the input parameter format to obtain converted data.

[0017] In a third aspect, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the above-mentioned general middleware method supporting XFS4IoT conversion are implemented.

[0018] In a fourth aspect, a computer-readable storage medium is provided. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned general middleware method supporting XFS4IoT conversion are implemented.

[0019] In the solutions implemented by the above-mentioned general middleware method, device, computer device, and storage medium supporting XFS4IoT conversion, by acquiring request data, the efficiency of data acquisition is improved. By extracting a separated data set in a preset format, it can be ensured that the extracted data conforms to the expected data format and requirements, avoiding processing errors caused by different data formats. By analyzing the separated data set and constructing structured data, it is more convenient to process and analyze the data, providing convenient conditions for the reuse of data. The structured data format is usually standardized, so it is convenient to share and interact data between different application programs, reducing the cost and complexity of data transmission. Constructing the correct input parameter format can avoid command execution failures or unexpected results caused by incorrect input parameters, ensuring the correctness and effectiveness of command execution. Constructing the input parameter format of the XFS3 command enables users to use the XFS3 command more conveniently, realizing the conversion from XFS4IoT to XFS3 requests, avoiding system incompatibility, providing an intermediate layer for device support, and enabling communication between existing device SPs and applications supporting the XFS4 specification without modification. Description of the Drawings

[0020] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, other accompanying drawings can be obtained based on these drawings without creative efforts.

[0021] Figure 1 It is a schematic diagram of an application environment of a general middleware method supporting XFS4IoT conversion in an embodiment of the present invention;

[0022] Figure 2 It is a schematic flowchart of a general middleware method supporting XFS4IoT conversion in an embodiment of the present invention;

[0023] Figure 3 It is a schematic structural diagram of a general middleware device supporting XFS4IoT conversion in an embodiment of the present invention;

[0024] Figure 4 It is a schematic structural diagram of a computer device in an embodiment of the present invention;

[0025] Figure 5 It is another schematic structural diagram of a computer device in an embodiment of the present invention. Detailed implementation manners

[0026] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts belong to the scope of protection of the present invention.

[0027] A general middleware method supporting XFS4IoT conversion provided by the embodiments of the present invention can be applied in, for example Figure 1In the application environment, the client communicates with the server through the network. The server can obtain request data and interface conditions, separate the data in the request data in a preset format to obtain a separated data set, perform structured parsing on the separated data set to obtain structured data, determine the input parameter format of a preset interface command according to the interface conditions, perform input parameter conversion on the structured data according to the input parameter format to obtain converted data, and then call the preset interface command to send the converted data to the target device. The target device performs response conversion and feeds back the conversion result to the client. The present invention provides a general middleware device supporting XFS4IoT conversion. For protocol conversion services, it first obtains request data and interface conditions, separates the data in the request data in a preset format to obtain a separated data set, performs structured parsing on the separated data set to obtain structured data, determines the input parameter format of a preset interface command according to the interface conditions, and performs input parameter conversion on the structured data according to the input parameter format to obtain converted data. It can provide an intermediate layer that supports devices and enables communication with applications supporting the XFS4 specification without the need to modify existing device SPs. Among them, the client can be, but is not limited to, various personal computers, laptop computers, smartphones, tablet computers, and portable wearable devices. The server can be implemented by an independent server or a server cluster composed of multiple servers. The present invention will be described in detail through specific embodiments below.

[0028] Please refer to Figure 2 as shown in Figure 2 which is a schematic flowchart of a general middleware method supporting XFS4IoT conversion provided by an embodiment of the present invention, and includes the following steps:

[0029] S1. Obtain request data and interface conditions, and separate the data in the request data in a preset format to obtain a separated data set.

[0030] In the embodiment of the present invention, the "obtain" refers to determining which data is used as request data according to business requirements, and at the same time obtaining the conditions set by the caller in the interface function when initiating a certain request. The "data separation" refers to extracting the data in the request data that meets specific format requirements.

[0031] Specifically, use the corresponding network framework, API, or library to obtain request data. For HTTP requests, the requests library in Python can be used to initiate network requests and obtain HTTP responses and request data. Subsequently, perform parsing operations on the request data. According to the type and data format of the request data, use the corresponding parsing tools or libraries to parse the request data, and extract the required data from the parsed request data according to the requirements of the preset format.

[0032] Specifically, the interface conditions can also be referred to as interface standards. In the present invention, it mainly refers to the XFS3 interface standard. The preset interface commands include XFS3 interface commands. XFS3 (Extended File System 3) is a file system and one of the commonly used file systems in the Linux operating system. It is the third major upgraded version of the XFS file system. The XFS3 interface standard is a set of software development interface standards for financial automation devices, which mainly defines APIs in aspects such as device management, transaction management, security management, and resource management. This standard provides a common software interface for communication between devices and applications, enabling developers to access and control various models and manufacturers of financial automation devices through the standard APIs.

[0033] Furthermore, the definition of the XFS3 interface standard includes contents such as the API name, function call, data types of parameters, order, etc. These definitions are not fixed but can be extended and modified to meet the requirements of new device types and functions.

[0034] In the embodiment of the present invention, the data separation of the data in the preset format in the request data to obtain a separated data set includes:

[0035] Parsing the request data to obtain parsed data;

[0036] Extracting the data in the parsed data that conforms to the preset format and aggregating the data in the preset format into a separated data set.

[0037] In the embodiment of the present invention, the parsing refers to splitting and extracting the request data according to the known data with a specific format and structure according to the predefined rules. The extraction refers to extracting the separated data set that conforms to the set format from the request data according to the previously set format. The aggregation refers to synthesizing the data in the preset format into a set.

[0038] Specifically, according to the required functions and requirements, define the preset format of the request data. The preset format should include information such as data structure and valid data types. The data formats include JSON, XML, CSV, etc. For example, a preset format may include field information such as data name, data type, and data length. Subsequently, use appropriate tools or libraries to parse the request data. After parsing, a set of parsed data will be obtained. Perform necessary verification on the parsed data to confirm the correctness and validity of the parsed data. For example, check whether the data type of the parsed data meets the requirements in the preset format.

[0039] Specifically, according to a preset format, data that meets the requirements of the preset format is extracted from the parsed data. The parsed data is traversed, and each piece of data is checked one by one to see if it meets the requirements of the preset format; if it does, it is stored in a container for the extracted data, and if it does not, the data is skipped; subsequent processing is performed on the extracted data, such as storing it in a database, performing data analysis, or outputting it to a file, etc.

[0040] In the embodiments of the present invention, setting the data format can improve the readability and maintainability of the data, reduce the risk of data processing errors, avoid processing errors caused by different formats, and at the same time facilitate subsequent processing and analysis, such as operations like data mining and artificial intelligence; quickly extracting and converting the data format from the request data reduces the processing time and cost, confirms the correctness and validity of the data, and avoids situations of data anomalies or errors; extracting data that meets the preset format from the parsed data can confirm the correctness and validity of the data, avoid situations of data anomalies or errors, perform necessary processing and analysis on the data, and improve the utilization rate and value of the data.

[0041] In the embodiments of the present invention, by obtaining the request data, the required data can be quickly obtained, improving the efficiency of data acquisition. By extracting the separated data set in the preset format, it can be ensured that the extracted data meets the expected data format and requirements, avoiding processing errors caused by different data formats, ensuring the correctness and reliability of data processing, and by extracting the separated data set in the preset format, useless data can be quickly filtered out, saving the time and cost of data processing and improving the data processing efficiency.

[0042] S2. Perform a structured parsing on the separated data set to obtain structured data.

[0043] In the embodiments of the present invention, the structured parsing refers to converting unstructured data into organic data.

[0044] Specifically, when performing a structured parsing on the separated data set, the structured data in the obtained structured data usually refers to the hierarchical structure of the data or the nested objects in the data structure; for example, when parsing an XML document, the parser will parse the tags, attributes, and text content in the document into multiple nodes according to the hierarchical structure, and each node corresponds to an element in the document, which contains information such as the name of the element, attributes, nested sub-elements, and text content. Therefore, these nodes belong to a type of structured data, and the sub-elements, attributes, etc. contained in the nodes can also be regarded as belonging to a type of structured data.

[0045] In the embodiments of the present invention, the performing a structured parsing on the separated data set to obtain structured data includes:

[0046] Perform array parsing on the separated data set to obtain an array of the separated data set;

[0047] Convert the array into structured data.

[0048] In the embodiments of the present invention, the array parsing refers to the process of extracting the required information and attributes from the separated data set and storing them in the form of an array, and the conversion refers to converting the data from the array representation form into the structured data representation form.

[0049] Specifically, according to the characteristics of the separated data set, determine the data structure of the array and the meaning and relationship of each element. For example, in a set of order data, attributes such as order number, date, customer, product, etc. can be stored as different elements of the array. According to the requirements, select an appropriate data format, such as JSON, CSV, etc., for data interaction and sharing between different systems and applications. Construct data objects through programs or manually, and convert the array into structured data according to the predetermined data structure and format. For example, when converting the array into JSON format, a JSON formatting library or function can be used to correspond each element of the array with its attribute name to generate the corresponding JSON object.

[0050] In the embodiments of the present invention, by converting the array into data with an internal structure, the relationship and attributes between each element of the data can be understood more clearly, thereby improving the readability and comprehensibility of the data; converting the array into structured data can enable the data to be interacted and shared between different systems and applications, which plays an important role in web applications and distributed systems; at the same time, by converting the array into structured data, the data can be stored in a database for management, facilitating data access and operation. In addition, according to business needs, database technologies can be used to perform operations such as data cleaning, deduplication, statistics, and query, providing better data services.

[0051] In the embodiments of the present invention, structured data usually has a certain hierarchical structure, which can more clearly reflect the relationship and attributes between data. By parsing the separated data set and constructing structured data, it is more convenient to process and analyze the data. Structured data can generally be stored and managed using a database, and operations such as data query, statistics, sorting, and update can be conveniently performed, which provides convenient conditions for the reuse of data. The structured data format is usually standardized, so it is convenient to share and interact data between different application programs, reducing the cost and complexity of data transmission.

[0052] S3. Determine the input parameter format of the preset interface command according to the interface conditions.

[0053] In the embodiments of the present invention, when determining to use a preset interface command, input parameters need to be specified in a certain format, including a command name, options, parameters, etc., to ensure the correct execution of the command.

[0054] Specifically, the preset interface can be set to XFS3. XFS3 (Extended File System 3) is a file system and one of the commonly used file systems in the Linux operating system. It is the third major upgrade version of the XFS file system. When determining the input parameter format of the XFS3 command, factors such as the device type and performance used, the version and specifications of XFS3 need to be considered. This is because XFS3 file systems with different versions and specifications may vary in the command input parameter format, and at the same time, the device type and performance used will also affect the input parameter format.

[0055] In detail, for example, if a high-performance hard disk device is used for XFS3 formatting, then parameters such as a higher file system block size, inodes, and the root directory of the file system may need to be specified to ensure the best disk performance. If the hardware configuration of the site or the version specifications of XFS3 are relatively low, then more basic command parameters may need to be used for operation.

[0056] In the embodiments of the present invention, determining the input parameter format of the preset interface command according to the interface conditions includes:

[0057] Determining the command operation target and execution conditions of the preset interface command according to the interface conditions;

[0058] Identifying the input parameter data types of the preset interface command;

[0059] Constructing the input parameter format according to the command operation target, execution conditions, and input parameter data types.

[0060] In the embodiments of the present invention, "determining" refers to determining the specific operations to be performed using the XFS3 command and ensuring the conditions that need to be met when performing these operations. "Identifying" refers to identifying the correct input parameter data types to ensure the correct execution of the command and the validity of the input parameters. The process of identifying the input parameter data types is what "identifying" refers to. "Constructing" refers to when using the XFS3 command, the correct input parameter format needs to be constructed to ensure the correct execution and validity of the command.

[0061] Specifically, interface conditions are a collection of specifications and standard documents used to describe the communication and interaction methods between different systems, applications, or devices. Interface standards usually define data formats, transmission protocols, security, data storage, and transmission methods, etc., to ensure that different systems, devices, or applications can interact correctly with each other; in the XFS3 specification, each XFS3 command has its own specific command operation target and execution conditions; different command operation targets and execution conditions have different requirements. Users need to carefully consult the relevant documents before using XFS3 commands to understand their operation targets and execution conditions, and ensure compliance with these execution conditions. For example, for the ls command in the XFS3 command, its operation target is to display the detailed information of files and directories in the specified directory, and the execution conditions require ensuring that the user has the permission to view the files and directories in this directory, and at the same time, this directory should exist and be a legal XFS3 file system.

[0062] Specifically, when identifying the data types of input parameters, factors such as the device type and performance used, as well as the XFS3 version and specification used, need to be considered. For example, when formatting XFS3 using a high-performance hard disk device, it may be necessary to specify parameters such as a higher file system block size. These parameters need to be selected and set according to the device type and performance used to ensure the best disk performance. In the input parameters of XFS3 commands, common data types include strings, integers, floating-point numbers, boolean values, etc.; for different data types, corresponding input formats and input parameters need to be selected. For example, for string-type input parameters, the string needs to be enclosed in double quotes or single quotes. For integer-type parameters, it is necessary to ensure that the input parameter conforms to the integer type format. For boolean-type parameters, it is necessary to ensure that the input is true or false.

[0063] Specifically, constructing the input parameter format requires selecting corresponding parameters according to the operation purpose and execution conditions of the XFS3 command, and ensuring that the selected parameters meet the requirements of the input parameter data type. For example, when using the mkdir command in the XFS3 command to create a new directory, the name of the directory and the path where the created directory is located need to be specified, and these parameters must meet the requirements of the input parameter of the string type; in addition, when constructing the input parameter format, attention also needs to be paid to the order and format of the command parameters. The parameters of the XFS3 command generally appear in the form of "option + parameter value". The option can be a single character or a combination of multiple characters, and the parameter value needs to be selected and input according to the input parameter data type. For example, when using the cp command in the XFS3 command to copy a file, the paths of the source file and the target file need to be specified, and these paths must meet the requirements of the input parameter of the string type, and need to be input in the following form: cp / path / to / source_file / path / to / target_file.

[0064] In the embodiment of the present invention, the specification of XFS3 determines the command operation target and execution conditions of the XFS3 command, which can reduce the invalid operations during the command execution process, improve the command execution efficiency. Constructing the input parameter format of the XFS3 command can enable users to use the XFS3 command more conveniently, simplify the command operation process, reduce the operation difficulty of users, and correctly constructing the input parameter format of the XFS3 command can make the command code more readable and maintainable, facilitating the maintenance and modification of the command code in the later stage.

[0065] In the embodiment of the present invention, constructing the correct input parameter format can avoid the command execution failure or unexpected results caused by incorrect input parameters, ensure the correctness and effectiveness of the command execution. Constructing the input parameter format of the XFS3 command can enable users to use the XFS3 command more conveniently, reduce the use difficulty of the command, and constructing the correct input parameter format can ensure that the input parameters of the XFS3 command meet the XFS3 specification and meet the requirements of software engineering.

[0066] S4. Perform input parameter conversion on the structured data according to the input parameter format to obtain conversion data.

[0067] In the embodiment of the present invention, the input parameter conversion refers to parsing and converting the command parameters input by the user according to the defined input parameter format, generating the corresponding parameter values, and passing them into the corresponding commands for execution.

[0068] Specifically, the command parameters input by the user are parsed and converted according to certain rules to provide the correct parameter values for the execution of the program, avoiding command execution failure or error results caused by incorrect command parameters or type mismatches.

[0069] In the embodiment of the present invention, the parameter conversion of the structured data according to the input parameter format to obtain conversion data includes:

[0070] Defining the data type of the structured data according to the input parameter format to obtain the data type of the structured data;

[0071] Converting the structured data into input parameters conforming to the preset interface command according to the data type of the structured data;

[0072] Taking the input parameters conforming to the preset interface command as the conversion data.

[0073] In the embodiment of the present invention, the data type definition refers to defining the corresponding data type for the parameters of each command, the conversion refers to converting each field in the structured data into an input parameter format conforming to the XFS3 command specification for executing the corresponding command, and the taking refers to taking the converted input parameters as the conversion data.

[0074] Specifically, the data type is a standard used to define data storage or process data in a program. By defining the corresponding data type for each command parameter, correct operation and effective processing of the input parameters can be ensured, and errors caused by data type mismatches can be avoided.

[0075] In detail, the data type refers to the data type name, defining the name of the data type, such as "integer type", "character type", "boolean type", defining the number of bytes occupied by the data type, such as an integer number usually occupies 4 bytes, defining the minimum and maximum values allowed for the data type, or the specific valid value range, such as the value range of an unsigned integer is 0 to 4294967295, and defining the arrangement form of the data type in memory, such as a string variable can be arranged according to ASCII code or Unicode code.

[0076] Furthermore, perform parameter conversion on the structured data, convert it into a format conforming to the command line parameters, according to the data types of each field in the structured data, convert it into an input parameter format conforming to the XFS3 command, perform corresponding conversions on the fields according to different data types, such as converting an integer type to a string type, and converting a date type to a timestamp, etc., fill each converted field in order onto the corresponding command parameter value, generate a complete command line parameter format conforming to the XFS3 command, and pass the generated command line parameter format to the XFS3 command interpreter or runtime environment to execute relevant operations.

[0077] Specifically, when calling the XFS3 API and after the input parameters are organized, the entire instruction request conversion is completed by calling the interface commands of XFS3. According to the requirements of the XFS3 interface, the input parameters required for organizing the commands are determined, including device type, logical device name, command code, various option parameters, etc. The corresponding interface commands in the XFS3 API are called as needed, and the prepared parameters are passed to this command for processing. After receiving the request, the XFS3 API will convert the request into a command stream that conforms to the device or component, and pass the command stream to the corresponding device or component for processing. When converting the command stream, the XFS3 API will convert the input parameters into an appropriate data format and package them into a binary data stream for transmission to the device or component. After receiving the command stream, the device or component will execute the corresponding command operations according to the requirements of the XFS3 interface standard and return the execution results.

[0078] In an embodiment of the present invention, the converting the structured data into input parameters that conform to a preset interface command according to the data type of the structured data includes:

[0079] Determining the data format required by the preset interface command;

[0080] Parsing the structured data according to the data type of the structured data to obtain the parsed structured data;

[0081] Converting the parsed structured data into input parameters that conform to the preset interface command according to the data format required by the preset interface command.

[0082] In an embodiment of the present invention, the determination refers to the definition of requirements such as the XFS3 command format specification, input parameter type, and value range. The parsing refers to analyzing and processing each field in the structured data one by one according to the definition of its data type to achieve operations such as data decomposition, combination, and conversion. The conversion refers to converting the parsed data into parameters that meet the requirements according to the specified format.

[0083] Specifically, there are three aspects to "determine" in the data format required by the XFS3 command: the determination of the XFS3 command format specification, the determination of the input parameter types, and the determination of the input parameter value ranges. The determination of the XFS3 command format specification means that each XFS3 command has its own independent command format specification, including definitions in aspects such as command names, command options, and command parameters. Determining the command format specification can ensure that the input commands can be correctly recognized and interpreted. The determination of the input parameter types means that each input parameter of the XFS3 command has its corresponding data type requirements, such as string, integer, date type, etc. The determination of the input parameter value ranges means that in addition to the data type definitions, each input parameter also has restrictions on its value ranges. For example, the value range of an integer is from 0 to 2,147,483,647, ensuring that the input parameters are within the given ranges.

[0084] Furthermore, analyze the data types and field definitions of the structured data. According to the definition of the structured data and the data types of each field, conduct preliminary type analysis and identification, parse the values of each field in the structured data, and perform corresponding conversions according to their data types. Combine the various fields in the structured data in a certain order to generate new structured data or transform it into other forms of data to meet specific program requirements.

[0085] Furthermore, according to the data format required by the XFS3 command, perform operations such as type conversion and parameter combination on the parsed data to generate command-line parameters that meet the requirements. Use the converted command-line parameters as input and pass them to the XFS3 command interpreter or runtime environment to execute the command operations.

[0086] In the embodiments of the present invention, the parsing of the structured data according to the data type of the structured data to obtain the parsed structured data includes:

[0087] Determine the data format of the structured data;

[0088] Extract the fields of the structured data;

[0089] Parse each field one by one according to the data format and data type of the structured data to obtain the parsed fields corresponding to the fields;

[0090] Generate the parsed structured data according to the parsed fields.

[0091] In the embodiments of the present invention, the determination refers to the definition of requirements such as the XFS3 command format specification, input parameter types, and value ranges. The extraction refers to extracting fields from structured data. The parsing refers to the process of parsing, identifying, and processing each field in the structured data one by one according to its data type and value range. The combination generation refers to combining the parsed fields into a set of data.

[0092] Specifically, for different structured data, it is necessary to determine its data format definition, which includes the names, types, sizes, value ranges, and other attributes of each field. Determine the data type of each data element in the structured data, such as character type, integer type, floating-point type, date type, etc. Determine the input and output format specifications of the structured data, including specifications in aspects such as data storage methods, data encoding methods, and data exchange protocols. For existing structured data, it is necessary to perform data format verification and normalization processing.

[0093] Furthermore, during the data format verification and normalization processing, the specific operations are to verify whether the type of the input data conforms to the XFS3 standard requirements, such as whether it is an integer, string, binary data, etc. Verify whether the value range of the input data conforms to the XFS3 standard requirements, such as certain commands specifying the minimum and maximum values of input parameters. Verify whether the length of the input data conforms to the XFS3 standard requirements, such as certain commands specifying the length limit of input parameters. Convert the input data into a suitable format for processing, such as converting a string to binary data or hexadecimal data. Perform normalization processing on the input data, such as removing spaces, removing illegal characters, converting case, etc. Set default values or null values for missing necessary information. Through the above operations, it can be ensured that the format of the input data conforms to the requirements of the XFS3 interface standard, so that the XFS3 command can be correctly executed.

[0094] Furthermore, according to the data format of the data and the information of the parsed fields, determine the parsed data structure, including information such as data type, field name, and field value range. Perform data format conversion and verification on each field. Based on the data type and value range contained in the field information, perform format conversion and verification on the data one by one to ensure the correctness and accuracy of the data. According to the determined parsed data structure, combine all the parsed fields into structured data in their order. At the same time, during the process of combining data, it is necessary to clean and integrate the data, remove duplicate and incorrect data, and retain correct and valid data.

[0095] In the embodiments of the present invention, by converting the data format and recombining the input structured data according to the requirements of the XFS3 command, the efficiency and accuracy of data operations can be greatly improved; by parsing and verifying each field of the structured data, the accuracy and validity of the data can be ensured. These parsed data can be accurately transmitted and processed, reducing incorrect operations and analysis results caused by data errors; by parsing and converting the structured data into the input parameter format that conforms to the XFS3 command, the availability and readability of the data can be improved, and these data can be easily recognized and processed by the XFS3 command, ensuring the stability and reliability of the system; by parsing and recombining the structured data, data operations and maintenance can be made more simplified and efficient, and these parsed data can be easily analyzed, processed, and managed, greatly improving the work efficiency.

[0096] In the examples of the present invention, by performing input parameter conversion on the structured data and generating data that conforms to the input parameter format, the time and space occupation of data transmission can be reduced, and the efficiency and speed of data transfer can be improved; through the input parameter conversion, the generated data conforms to the specification requirements of the input parameter format and can be easily recognized and processed by the receiving system or application program. This helps to ensure the normal operation and stability of the system; and it can reduce incorrect operations and results caused by the data format not meeting the requirements. This can improve the reliability and robustness of the system, avoiding system failures and losses caused by incorrect data formats; it can make the data processing results clearer and more readable, thus facilitating personnel to perform data analysis and decision-making.

[0097] It can be seen that in the above solution, for the protocol conversion service, first obtain the request data and interface conditions, separate the data in the preset format in the request data to obtain a separated data set; perform structured parsing on the separated data set to obtain structured data; determine the input parameter format of the preset interface command according to the interface conditions; perform input parameter conversion on the structured data according to the input parameter format to obtain converted data; it can provide an intermediate layer that supports the device, enabling the existing device SP to communicate with the application that supports the XFS4 specification without modification, avoiding compatibility problems.

[0098] It should be understood that the magnitudes of the sequence numbers of the steps in the above embodiments do not mean the order of execution is prior or subsequent, and the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.

[0099] In one embodiment, a general middleware device that supports XFS4IoT conversion is provided. This general middleware device that supports XFS4IoT conversion corresponds one-to-one with the general middleware method that supports XFS4IoT conversion in the above embodiment. AsFigure 3 As shown in Figure 3 , a general middleware device supporting XFS4IoT conversion includes an acquisition module 101, a separation module 102, an analysis module 103, a determination module 104, and a conversion module 105. The detailed descriptions of each functional module are as follows:

[0100] The acquisition module 101 is used to acquire request data and interface conditions;

[0101] The separation module 102 is used to separate the data in the preset format in the request data to obtain a separated data set;

[0102] The analysis module 103 is used to perform structured analysis on the separated data set to obtain structured data;

[0103] The determination module 104 is used to determine the input parameter format of the preset interface command according to the interface conditions;

[0104] The conversion module 105 is used to perform input parameter conversion on the structured data according to the input parameter format to obtain converted data.

[0105] In an embodiment, when the separation module 102 separates the data in the preset format in the request data to obtain a separated data set, it is used for:

[0106] Analyze the request data to obtain analyzed data;

[0107] Extract the data in the analyzed data that conforms to the preset format, and collect the data in the preset format into a separated data set.

[0108] In an embodiment, when the analysis module 103 performs structured analysis on the separated data set to obtain structured data, it is used for:

[0109] Perform array analysis on the separated data set to obtain an array of the separated data set;

[0110] Convert the array into structured data.

[0111] In an embodiment, when the determination module 104 determines the input parameter format of the preset interface command according to the interface conditions, it is used for:

[0112] Determine the command operation target and execution conditions of the preset interface command according to the interface conditions;

[0113] Identify the input parameter data type of the preset interface command;

[0114] Construct the input parameter format according to the command operation target, execution conditions, and input parameter data type.

[0115] In one embodiment, when the conversion module 105 performs parameter conversion on the structured data according to the input parameter format to obtain conversion data, it is used for:

[0116] Define the data type of the structured data according to the input parameter format to obtain the data type of the structured data;

[0117] Convert the structured data into input parameters that conform to the preset interface command according to the data type of the structured data;

[0118] Use the input parameters that conform to the preset interface command as the conversion data.

[0119] When converting the structured data into input parameters that conform to the preset interface command according to the data type of the structured data, it is used for:

[0120] Determine the data format required by the preset interface command;

[0121] Parse the structured data according to the data type of the structured data to obtain the parsed structured data;

[0122] Convert the parsed structured data into input parameters that conform to the preset interface command according to the data format required by the preset interface command.

[0123] When parsing the structured data according to the data type of the structured data to obtain the parsed structured data, it is used for:

[0124] Determine the data format of the structured data;

[0125] Extract the fields of the structured data;

[0126] Parse each field one by one according to the data format and data type of the structured data to obtain the parsed fields corresponding to the fields;

[0127] Generate the parsed structured data according to the parsed fields.

[0128] The present invention provides a general middleware device supporting XFS4IoT conversion. For the protocol conversion service, first obtain the request data and interface conditions, separate the data in the preset format in the request data to obtain a separated data set; perform structured parsing on the separated data set to obtain structured data; determine the input parameter format of the preset interface command according to the interface conditions; perform parameter conversion on the structured data according to the input parameter format to obtain conversion data, which can provide an intermediate layer for device support and realize communication between the existing device SP and an application supporting the XFS4 specification without modification.

[0129] For the specific limitations of a general middleware device supporting XFS4IoT conversion, reference may be made to the limitations of a general middleware method supporting XFS4IoT conversion in the foregoing text, which will not be elaborated herein. Each module in the above-mentioned general middleware device supporting XFS4IoT conversion can be implemented in whole or in part by software, hardware, and their combination. The above-mentioned modules can be embedded in the processor of the computer device in hardware form or be independent of it, or be stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to each of the above modules.

[0130] In one embodiment, a computer device is provided. The computer device can be a server, and its internal structure diagram can be as Figure 4 shown. The computer device includes a processor, a memory, a network interface, and a database connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile and / or volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external client through a network connection. When the computer program is executed by the processor, it realizes the functions or steps on the server side of a general middleware method supporting XFS4IoT conversion.

[0131] In one embodiment, a computer device is provided. The computer device can be a client, and its internal structure diagram can be as Figure 5 shown. The computer device includes a processor, a memory, a network interface, a display screen, and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external server through a network connection. When the computer program is executed by the processor, it realizes the functions or steps on the client side of a general middleware method supporting XFS4IoT conversion.

[0132] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the following steps are implemented:

[0133] Call external enterprise information using pre-acquired instructions to obtain call information;

[0134] Parse the call information through a preset parsing engine, encapsulate the parsing result, and obtain encapsulated data;

[0135] Obtain enterprise internal information, verify the encapsulated data and the enterprise internal information according to a preset verification standard, and obtain a verification result.

[0136] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:

[0137] Obtain request data and interface conditions, separate data in a preset format in the request data, and obtain a separated data set;

[0138] Perform structured parsing on the separated data set to obtain structured data;

[0139] Determine the input parameter format of a preset interface command according to the interface conditions;

[0140] Perform input parameter conversion on the structured data according to the input parameter format to obtain converted data.

[0141] It should be noted that for the functions or steps that the above computer-readable storage medium or computer device can implement, reference can be made to the relevant descriptions on the server side and the client side in the foregoing method embodiments. To avoid repetition, they will not be described one by one here.

[0142] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, storage, database, or other medium used in the embodiments provided in the present application can include non-volatile and / or volatile memories. Non-volatile memories can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memories can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and Rambus dynamic RAM (RDRAM), etc.

[0143] Those skilled in the art can clearly understand that for the convenience and brevity of description, only the above division of each functional unit and module is used as an example. In actual applications, the above functions can be allocated to different functional units and modules according to needs, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the functions described above.

[0144] The above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments or perform equivalent replacements for some of the technical features. These modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention and should all be included in the protection scope of the present invention. It should be noted that if non-company software tools or components appear in the embodiments of the present application, they are only used for illustrative introduction and do not represent actual use.

Claims

1. A general middleware method supporting XFS4IoT conversion, characterized in that: include: Obtain request data generated based on the XFS4IoT protocol specification and interface conditions of the XFS3 protocol specification, split and extract data with a known preset format and structure in the request data to obtain parsed data, extract data that conforms to a preset data structure and a preset data type from the parsed data, store the data that conforms to the preset data structure and the preset data type in a preset data container, and obtain an unstructured separated data set; Extracting preset type information and attributes from the separated data set and storing them in array form to obtain an array of the separated data set, and converting the array into structured data; Determine a command operation target and an execution condition of a preset interface command corresponding to the XFS3 protocol specification according to the interface condition, identify an input parameter data type of the preset interface command, and construct an input parameter format according to the command operation target, the execution condition, and the input parameter data type; The structured data is converted according to the input parameter format to obtain converted data.

2. The general middleware method supporting XFS4IoT conversion according to claim 1, characterized in that: The step of performing input parameter conversion on the structured data according to the input parameter format to obtain converted data includes: Defining the data type of the structured data according to the input parameter format to obtain the data type of the structured data; Converting the structured data into input parameters that conform to a preset interface command according to the data type of the structured data; The input parameters that conform to the preset interface command are used as conversion data.

3. The general middleware method supporting XFS4IoT conversion as claimed in claim 2, characterized in that: The step of converting the structured data into input parameters that conform to a preset interface command according to the data type of the structured data includes: Determine the data format required by the preset interface command; Parsing the structured data according to the data type of the structured data to obtain parsed structured data; The parsed structured data is converted into input parameters that conform to the preset interface command according to the data format required by the preset interface command.

4. The general middleware method supporting XFS4IoT conversion as claimed in claim 3, characterized in that: The parsing of the structured data according to the data type of the structured data to obtain the parsed structured data includes: Determining a data format of the structured data; Extracting fields of the structured data; Parsing the fields one by one according to the data format and data type of the structured data to obtain parsed fields corresponding to the fields; The parsed structured data is generated according to the parsed field combination.

5. A general middleware device supporting XFS4IoT conversion, characterized in that: include: An acquisition module is used to obtain request data generated based on the XFS4IoT protocol specification and interface conditions of the XFS3 protocol specification; A separation module is used to split and extract data with a known preset format and structure in the request data to obtain parsed data, extract data that conforms to a preset data structure and a preset data type from the parsed data, store the data that conforms to the preset data structure and the preset data type in a preset data container, and obtain an unstructured separated data set; A parsing module, used for extracting preset type information and attributes from the separated data set and storing them in an array form, obtaining an array of the separated data set, and converting the array into structured data; a determination module, configured to determine a command operation target and an execution condition of a preset interface command corresponding to the XFS3 protocol specification according to the interface condition, identify an input parameter data type of the preset interface command, and construct an input parameter format according to the command operation target, the execution condition and the input parameter data type; The conversion module is used to perform input parameter conversion on the structured data according to the input parameter format to obtain converted data.

6. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the general middleware method supporting XFS4IoT conversion as described in any one of claims 1 to 4 are implemented.

7. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the general middleware method supporting XFS4IoT conversion as claimed in any one of claims 1 to 4 are implemented.

Citation Information

Patent Citations

  • Data format conversion method, device and equipment and readable storage medium

    CN108664665A