Universal middleware method and device supporting XFS4IoT conversion, equipment and medium
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 protocol conversion and system performance improvement is achieved.
Patent Information
- Application Number
- CN202510361979.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-26
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2045-03-26
AI Technical Summary
There are compatibility issues with XFS4IoT's request conversion to XFS3, resulting in reduced system performance.
A general middleware method is provided to realize the protocol conversion of XFS4IoT to XFS3 by obtaining request data, separating data, structuring analysis, determining the input parameter format of interface commands and performing parameter conversion.
Avoid incompatibility issues, provide an intermediate layer for device support, so that existing devices can communicate with applications that support XFS4 specifications without modification, and improve system performance.
Smart Images

Figure CN119892946A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of network protocols and financial technology, and in particular 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 equipment (such as ATMs and cash automation equipment) and financial automation applications.
[0003] Among them, XFS4IoT is a new generation of XFS standard protocol developed based on the latest IoT technology and communication protocols; compared with the XFS3 specification protocol, XFS4IoT has higher flexibility and interoperability, and supports more device types and communication methods, but the XFS3 specification protocol has been widely used in the field of financial automation equipment, and the XFS4IoT protocol needs to be converted into the XFS3 specification protocol for communication.
[0004] Currently, there are certain differences and incompatibilities between XFS4IoT and XFS3 when converting requests. There are compatibility issues during the conversion, which reduces system performance. Summary of the invention
[0005] The present invention provides a general middleware method, apparatus, device and medium supporting XFS4IoT conversion. By converting the XFS4Iot specification protocol and the XFS3 specification protocol, an intermediate layer supporting the device is provided, so that the existing device SP can communicate with the application supporting the XFS4 specification without modification, thus avoiding incompatibility problems.
[0006] In a first aspect, a general middleware method for supporting XFS4IoT conversion is provided, including: Acquire request data and interface conditions, and perform data separation on data in a preset format in the request data to obtain a separated data set; Performing structured analysis on the separated data set to obtain structured data; Determine the input parameter format of the preset interface command according to the interface condition; The structured data is converted according to the input parameter format to obtain converted data.
[0007] In a second aspect, a general middleware device supporting XFS4IoT conversion is provided, including: Acquisition module, used to obtain request data and interface conditions; A separation module, used for separating the data in a preset format in the request data to obtain a separated data set; A parsing module, used for performing structured parsing on the separated data set to obtain structured data; A determination module, used to determine the input parameter format of the preset interface command according to the interface condition; The conversion module is used to perform input parameter conversion on the structured data according to the input parameter format to obtain converted data.
[0008] 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, wherein the processor implements the steps of the above-mentioned general middleware method supporting XFS4IoT conversion when executing the computer program.
[0009] In a fourth aspect, a computer-readable storage medium is provided, which stores a computer program. When the computer program is executed by a processor, the steps of the above-mentioned general middleware method supporting XFS4IoT conversion are implemented.
[0010] In the scheme implemented by the above-mentioned general middleware method, device, computer equipment and storage medium supporting XFS4IoT conversion, the efficiency of data acquisition is improved by obtaining request data, and by extracting separated data sets in a 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. By parsing the separated data sets and constructing structured data, the data can be processed and analyzed more conveniently, providing convenient conditions for data reuse. The structured data format is usually standardized, so it is convenient to share and interact data between different applications, reducing the cost and complexity of data transmission. Constructing the correct input parameter format can avoid input parameter errors that lead to command execution failure or unexpected results, ensuring the correctness and effectiveness of command execution. Constructing the input parameter format of the XFS3 command can make it easier for users to use the XFS3 command, realize XFS4IoT to XFS3 request conversion, avoid system incompatibility, provide an intermediate layer of device support, and realize that the existing device SP does not need to be modified to communicate with applications that support the XFS4 specification. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in 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 ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.
[0012] Figure 1 It is a schematic diagram of an application environment of a general middleware method supporting XFS4IoT conversion in one embodiment of the present invention; Figure 2 It is a flow chart of a general middleware method supporting XFS4IoT conversion in one embodiment of the present invention; Figure 3 It is a structural schematic diagram of a universal middleware device supporting XFS4IoT conversion in one embodiment of the present invention; Figure 4 is a structural schematic diagram of a computer device in one embodiment of the present invention; Figure 5 It is another structural schematic diagram of a computer device in one embodiment of the present invention. DETAILED DESCRIPTION
[0013] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0014] The embodiment of the present invention provides a general middleware method supporting XFS4IoT conversion, which can be applied in 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 preset format in the request data to obtain a separated data set; perform structured analysis 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 conversion data, and then call the preset interface command to send the conversion data to the target device, the target device performs response conversion, and feeds the conversion result back to the client. The present invention provides a general middleware device supporting XFS4IoT conversion. For the protocol conversion service, the request data and interface conditions are first obtained, and the data in the preset format in the request data is separated to obtain a separated data set; perform structured analysis 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 conversion data. It can provide an intermediate layer for device support, so that the existing device SP can communicate with the application supporting the XFS4 specification without modification. The client may be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, and portable wearable devices. The server may be implemented by an independent server or a server cluster consisting of multiple servers. The present invention is described in detail below through specific embodiments.
[0015] See also Figure 2 As shown, Figure 2 A flowchart of a general middleware method supporting XFS4IoT conversion provided by an embodiment of the present invention includes the following steps: S1. Obtain request data and interface conditions, and perform data separation on data in a preset format in the request data to obtain a separated data set.
[0016] In an embodiment of the present invention, the acquisition refers to which data is used as request data according to business needs, and at the same time, the conditions set by the caller in the interface function when initiating a request are obtained. The data separation refers to extracting data in the request data that meets a specific format requirement.
[0017] In detail, use the corresponding network framework, API or library to obtain the request data; for HTTP requests, you can use the requests library in Python to initiate a network request and obtain the HTTP response and request data; then parse the request data, and use the corresponding parsing tool or library to parse the request data according to the type and data format of the request data, and extract the required data from the parsed request data according to the requirements of the preset format.
[0018] Specifically, the interface condition can also be called an interface standard, which mainly refers to the XFS3 interface standard in the present invention. 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 upgrade version of the XFS file system. The XFS3 interface standard is a set of software development interface standards for financial automation equipment, 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, allowing developers to access and control financial automation equipment of various models and manufacturers through standard APIs.
[0019] Furthermore, the definition of the XFS3 interface standard includes aspects such as API name, function call, parameter data type, order, etc. These definitions are not fixed, but can be expanded and modified to meet the needs of new device types and functions.
[0020] In the embodiment of the present invention, the step of separating the data in the preset format in the request data to obtain a separated data set includes: Parsing the request data to obtain parsed data; Extract data that conforms to a preset format from the parsed data, and aggregate the data in the preset format into a separate data set.
[0021] In an embodiment of the present invention, the parsing refers to splitting and extracting the request data according to known data with a specific format and structure according to pre-defined rules, the extraction refers to extracting separate data sets that conform to the set format from the request data according to a previously set format, and the aggregation refers to synthesizing the data in the preset format into a set.
[0022] 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 type. The data format includes JSON, XML, CSV and other formats. For example, a preset format may include field information such as data name, data type, and data length. Then use appropriate tools or libraries to parse the request data. After the parsing is completed, a set of parsed data will be obtained. The parsed data will be checked as necessary 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.
[0023] Specifically, according to the preset format, data that meets the preset format requirements are extracted from the parsed data. The parsed data are traversed and checked one by one to see if they meet the preset format requirements; if they meet the requirements, they are stored in the container of the extracted data; if they do not meet the requirements, the data is skipped; the extracted data is subsequently processed, such as storing it in a database, performing data analysis, or outputting it to a file.
[0024] 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 facilitate subsequent processing and analysis, such as data mining, artificial intelligence and other operations; quickly extract and convert the data format for request data analysis, reduce processing time and cost, confirm the correctness and validity of the data, and avoid data anomalies or errors; extracting and parsing data that conforms to a preset format can confirm the correctness and validity of the data, avoid data anomalies or errors, perform necessary processing and analysis on the data, and improve the utilization and value of the data.
[0025] In the embodiment of the present invention, by obtaining the request data, the required data can be quickly obtained, and the efficiency of data acquisition can be improved. By extracting the separated data sets in a 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, and ensuring the correctness and reliability of data processing. In addition, by extracting the separated data sets in a preset format, useless data can be quickly filtered out, saving data processing time and cost, and improving data processing efficiency.
[0026] S2. Performing structured analysis on the separated data set to obtain structured data.
[0027] In the embodiment of the present invention, the structured analysis refers to converting unstructured data into structured data.
[0028] Specifically, when a separated data set is structured and parsed, 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. Each node corresponds to an element in the document, and they contain the element's name, attributes, nested sub-elements, text content, etc. Therefore, these nodes belong to a kind of structured data, and the sub-elements, attributes, etc. contained in the nodes can also be regarded as belonging to a kind of structured data.
[0029] In the embodiment of the present invention, the performing structured analysis on the separated data set to obtain structured data includes: Performing array parsing on the separated data set to obtain an array of the separated data set; Convert the array into structured data.
[0030] In the embodiment of the present invention, the array parsing refers to the process of extracting required information and attributes from the separated data sets and storing them in the form of arrays, and the conversion refers to converting data in the form of arrays into structured data.
[0031] Specifically, the data structure of the array and the meaning and relationship of each element are determined according to the characteristics of the separated data set. For example, in a set of order data, the order number, date, customer, product and other attributes can be stored as different elements of the array. According to the needs, the appropriate data format, such as JSON, CSV, etc., is selected to facilitate data interaction and sharing between different systems and applications. The array is converted into structured data according to the predetermined data structure and format by program or manual construction of data objects; for example, when converting an array into JSON format, a JSON formatting library or function can be used to correspond each element of the array to its attribute name to generate a corresponding JSON object.
[0032] In the embodiment of the present invention, by converting the array into data with internal structure, the relationship and attributes between the elements of the data can be more clearly understood, thereby improving the readability and comprehensibility of the data; by converting the array into structured data, the data can be interacted and shared between different systems and applications, which plays an important role in network applications and distributed systems; at the same time, by converting the array into structured data, the data can be stored in the database for management, which facilitates data access and operation. In addition, according to business needs, database technology can be used to perform data cleaning, deduplication, statistics, query and other operations to provide better data services.
[0033] 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 and separating data sets and constructing structured data, data can be processed and analyzed more conveniently. Structured data can generally be stored and managed using a database, and data query, statistics, sorting, updating and other operations can be conveniently performed, which provides convenient conditions for data reuse. The structured data format is usually standardized, so data can be easily shared and interacted between different applications, reducing the cost and complexity of data transmission.
[0034] S3. Determine the input parameter format of the preset interface command according to the interface condition.
[0035] In the embodiment of the present invention, when determining to use the preset interface command, it is necessary to specify input parameters in a certain format, including command name, options, parameters, etc., to ensure correct execution of the command.
[0036] 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 specification of XFS3, etc. need to be considered. This is because XFS3 file systems of different versions and specifications may differ in the command input parameter format, and the device type and performance used will also affect the input parameter format.
[0037] For example, if you use a high-performance hard disk device to format XFS3, you may need to specify a higher file system block size and inode, file system root directory and other parameters to ensure the best disk performance. If the site's hardware configuration or XFS3 version specifications are lower, you may need to use more basic command parameters for operation.
[0038] In the embodiment of the present invention, the step of determining the input parameter format of the preset interface command according to the interface condition includes: Determine the command operation target and execution condition of the preset interface command according to the interface condition; Identify the input parameter data type of the preset interface command; The input parameter format is constructed according to the command operation target, execution condition and input parameter data type.
[0039] In the embodiment of the present invention, the determination refers to determining the specific operations to be performed using the XFS3 command, and it is necessary to ensure the conditions that need to be met when performing these operations. The identification refers to identifying the correct input parameter data type in order to ensure the correctness of command execution and the validity of input parameters. The process of identifying the input parameter data type is what "identification" refers to. The construction refers to the need to construct the correct input parameter format to ensure the correctness and validity of command execution when using the XFS3 command.
[0040] Specifically, interface conditions are a collection of specifications and standard documents that 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 with each other correctly; 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 read the relevant documents before using XFS3 commands to understand their operation targets and execution conditions, and ensure that these execution conditions are met. For example, for the ls command in the XFS3 command, its operation target is to display detailed information about the files and directories under the specified directory, and the execution condition needs to ensure that the user has the permission to view the files and directories under the directory, and the directory should also exist and be a legal XFS3 file system.
[0041] Specifically, when identifying the data type of the input parameter, 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 using a high-performance hard disk device for XFS3 formatting, 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 optimal disk performance. In the input parameters of the XFS3 command, common data types include strings, integers, floating-point numbers, Boolean values, etc.; for different data types, the corresponding input format and input parameters need to be selected. For example, for string type input parameters, double quotes or single quotes need to be used to enclose the string. For integer type parameters, it is necessary to ensure that the input parameters conform to the integer type format. For Boolean type parameters, it is necessary to ensure that the input is true or false.
[0042] In detail, when constructing the input parameter format, it is necessary to select the corresponding parameters according to the operation purpose and execution conditions of the XFS3 command, and ensure 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, it is necessary to specify the name of the directory and the path where the created directory is located. These parameters must meet the requirements of the string type input parameter; in addition, when constructing the input parameter format, it is also necessary to pay attention 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 entered according to the input parameter data type. For example, when using the cp command in the XFS3 command to copy a file, it is necessary to specify the paths of the source file and the target file. These paths must meet the requirements of the string type input parameter and need to be entered in the following form: cp / path / to / source_file / path / to / target_file.
[0043] In the embodiment of the present invention, the XFS3 specification determines the command operation target and execution conditions of the XFS3 command, which can reduce invalid operations in the command execution process and improve the command execution efficiency. The input parameter format of the XFS3 command is constructed so that users can use the XFS3 command more conveniently, simplify the command operation process, and reduce the user's operation difficulty. Correctly constructing the input parameter format of the XFS3 command can make the command code more readable and maintainable, which is convenient for the later maintenance and modification of the command code.
[0044] In the embodiment of the present invention, constructing a correct input parameter format can avoid command execution failure or unexpected results caused by input parameter errors, ensure the correctness and effectiveness of command execution, construct the input parameter format of the XFS3 command can make it more convenient for users to use the XFS3 command and reduce the difficulty of using the command, and constructing a correct input parameter format can ensure that the input parameters of the XFS3 command comply with the XFS3 specification and meet the requirements of software engineering.
[0045] S4. Perform input parameter conversion on the structured data according to the input parameter format to obtain converted data.
[0046] 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 corresponding parameter values, and passing them into the corresponding command for execution.
[0047] Specifically, the command parameters input by the user are parsed and converted according to certain rules to provide correct parameter values for program execution, avoiding command execution failure or erroneous results due to problems such as command parameter errors or type mismatches.
[0048] In the embodiment of the present invention, 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.
[0049] In an embodiment of the present invention, the data type definition refers to defining the corresponding data type for the parameter of each command, the conversion refers to converting each field in the structured data into an input parameter format that complies with the XFS3 command specification according to the definition of its data type, for executing the corresponding command, and the acting refers to using the converted input parameter as conversion data.
[0050] Specifically, a data type is a standard used to define data storage or data processing in a program. By defining a corresponding data type for each command parameter, you can ensure the correct operation and effective processing of the input parameters and avoid errors caused by data type mismatch.
[0051] In detail, data type refers to the name of the data type, which defines the name of the data type, such as "integer", "character", and "Boolean", defines the number of bytes occupied by the data type, such as an integer usually occupies 4 bytes, defines the minimum and maximum values allowed by the data type, or the specific valid value range, such as the value range of an unsigned integer is 0~4294967295, and defines the arrangement of the data type in the memory, such as a string variable can be arranged according to ASCII code or Unicode code.
[0052] Furthermore, the structured data is converted into an input parameter format that complies with the command line parameters. According to the data type of each field in the structured data, it is converted into an input parameter format that complies with the XFS3 command. The fields are converted accordingly according to different data types, such as integer to string, date to timestamp, etc. Each converted field is filled into the corresponding command parameter value in sequence to generate a complete command line parameter format that complies with the XFS3 command. The generated command line parameter format is passed to the XFS3 command interpreter or runtime environment to perform related operations.
[0053] Specifically, when calling the XFS3 API, after the input parameters are organized, the entire instruction request conversion is completed by calling the XFS3 interface command. The input parameters required for the command are organized according to the XFS3 interface requirements, including the device type, logical device name, command code, various option parameters, etc. The corresponding interface command in the XFS3 API is called as needed, and the prepared parameters are passed to the 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 a suitable 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 operation according to the requirements of the XFS3 interface standard and return the execution result.
[0054] In the 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: 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.
[0055] In the embodiment of the present invention, the determination refers to the definition of the XFS3 command format specification, input parameter type and value range and other requirements; 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 data decomposition, combination, conversion and other operations; the conversion refers to converting the parsed data into parameters that meet the requirements according to the specified format.
[0056] Specifically, there are three aspects of "determination" in determining the data format required by the XFS3 command, namely, determination of the XFS3 command format specification, determination of the input parameter type, and determination of the input parameter value range; determination of the XFS3 command format specification means that each XFS3 command has its own independent command format specification, including definitions of command name, command options, command parameters, etc. Determining the command format specification can ensure that the input command can be correctly identified and interpreted; determination of the input parameter type means that each XFS3 command input parameter has its corresponding data type requirements, such as string, integer, date, etc.; determination of the input parameter value range means that in addition to the definition of the data type, each input parameter also has its value range restrictions, such as the value range of an integer is 0 to 2147483647, ensuring that the input parameter is within a given range.
[0057] Furthermore, the data type and field definition of the structured data are analyzed, and preliminary type analysis and identification are performed based on the definition of the structured data and the data type of each field. The value of each field in the structured data is parsed, and corresponding conversions are performed based on its data type. The various fields in the structured data are combined in a certain order to generate new structured data or transform it into other forms of data to meet specific program requirements.
[0058] Furthermore, according to the data format required by the XFS3 command, the parsed data is subjected to type conversion, parameter combination and other operations to generate command line parameters that meet the requirements, and the converted command line parameters are passed as input to the XFS3 command interpreter or runtime environment to execute the command operation.
[0059] In the embodiment of the present invention, parsing 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.
[0060] 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 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, and the combination generation refers to combining the parsed fields into a group of data.
[0061] Specifically, for different structured data, it is necessary to determine its data format definition, which includes the name, type, size, value range 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 for data storage methods, data encoding methods, data exchange protocols, etc. For existing structured data, data format verification and normalization are required.
[0062] Furthermore, when verifying and normalizing the data format, the specific operations are to verify whether the type of the input data meets the requirements of the XFS3 standard, such as whether it is an integer, a string, binary data, etc., to verify whether the value range of the input data meets the requirements of the XFS3 standard, such as some commands specify the minimum and maximum values of the input parameters, to verify whether the length of the input data meets the requirements of the XFS3 standard, such as some commands specify the length limit of the input parameters, to convert the input data into a format suitable for processing, such as converting a string into binary data or hexadecimal data, to normalize the input data, such as removing spaces, removing illegal characters, converting case, etc., to set default values or empty values for missing necessary information; the above operations can ensure that the format of the input data meets the requirements of the XFS3 interface standard, so that the XFS3 command can be executed correctly.
[0063] Furthermore, according to the data format of the data and the information of the parsed fields, the parsed data structure is determined, including information such as data type, field name, and field value range, and data format conversion and verification are performed on each field. According to the data type and value range contained in the field information, the data is format converted and verified one by one to ensure the correctness and accuracy of the data. According to the determined parsed data structure, all the parsed fields are combined into structured data in their order. At the same time, in the process of combining data, the data needs to be cleaned and integrated to remove duplicate and erroneous data and retain correct and valid data.
[0064] In the embodiment of the present invention, by converting and recombining the input structured data according to the requirements of the XFS3 command, the efficiency and accuracy of data operation can be greatly improved; by parsing and verifying each field of the structured data, the accuracy and validity of the data can be ensured. The parsed data can be accurately transmitted and processed, reducing erroneous 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 the 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 operation and maintenance can be simplified and efficient, and the parsed data can be easily analyzed, processed and managed, so that the work efficiency is greatly improved.
[0065] In the examples of the present invention, by performing input parameter conversion on structured data and generating data that conforms to the input parameter format, the time and space occupied by data transmission can be reduced, and the efficiency and speed of data transmission can be improved; through 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. This helps to ensure the normal operation and stability of the system; and can reduce erroneous operations and results caused by data formats that do not meet the requirements. This can improve the reliability and robustness of the system, avoid system failures and losses caused by incorrect data formats; and make data processing results clearer and more readable, thereby facilitating personnel to perform data analysis and decision-making.
[0066] It can be seen that in the above scheme, for the protocol conversion service, the request data and interface conditions are first obtained, and the data in the preset format in the request data is separated to obtain a separated data set; the separated data set is structured and parsed to obtain structured data; the input parameter format of the preset interface command is determined according to the interface conditions; the structured data is converted into input parameters according to the input parameter format to obtain conversion data; an intermediate layer for device support can be provided to enable the existing device SP to communicate with applications that support the XFS4 specification without the need for modification, thereby avoiding incompatibility issues.
[0067] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.
[0068] In one embodiment, a general middleware device supporting XFS4IoT conversion is provided, and the general middleware device supporting XFS4IoT conversion corresponds one-to-one with the general middleware method supporting XFS4IoT conversion in the above embodiment. Figure 3 As shown, the general middleware device supporting XFS4IoT conversion includes an acquisition module 101, a separation module 102, a parsing module 103, a determination module 104, and a conversion module 105. The functional modules are described in detail as follows: Acquisition module 101, used to obtain request data and interface conditions; A separation module 102, configured to separate data in a preset format in the request data to obtain a separated data set; The parsing module 103 is used to perform structured parsing on the separated data set to obtain structured data; A determination module 104, configured to determine an input parameter format of a preset interface command according to the interface condition; 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.
[0069] In one embodiment, the separation module 102 performs data separation on the data in the preset format in the request data to obtain a separated data set, which is used to: Parsing the request data to obtain parsed data; Extract data that conforms to a preset format from the parsed data, and aggregate the data in the preset format into a separate data set.
[0070] In one embodiment, the parsing module 103 performs structured parsing on the separated data set to obtain structured data for: Performing array parsing on the separated data set to obtain an array of the separated data set; Convert the array into structured data.
[0071] In one embodiment, the determination module 104 determines the input parameter format of the preset interface command according to the interface condition, for: Determine the command operation target and execution condition of the preset interface command according to the interface condition; Identify the input parameter data type of the preset interface command; The input parameter format is constructed according to the command operation target, execution condition and input parameter data type.
[0072] In one embodiment, when the conversion module 105 performs input parameter conversion on the structured data according to the input parameter format to obtain the converted data, it is used to: 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.
[0073] When converting the structured data into input parameters that conform to a preset interface command according to the data type of the structured data, it is used to: 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.
[0074] When the structured data is parsed according to the data type of the structured data to obtain the parsed structured data, it is used to: 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.
[0075] The present invention provides a universal middleware device supporting XFS4IoT conversion. For the protocol conversion service, the device first obtains request data and interface conditions, performs data separation on the data in a preset format in the request data to obtain a separated data set; performs structured analysis on the separated data set to obtain structured data; determines the input parameter format of the preset interface command according to the interface conditions; performs input parameter conversion on the structured data according to the input parameter format to obtain conversion data. The device can provide an intermediate layer for device support, so that the existing device SP can communicate with the application supporting the XFS4 specification without the need for modification.
[0076] For the specific definition of a general middleware device supporting XFS4IoT conversion, please refer to the definition of a general middleware method supporting XFS4IoT conversion in the above text, which will not be repeated here. Each module in the above-mentioned general middleware device supporting XFS4IoT conversion can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0077] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 4 As shown. The computer device includes a processor, a memory, a network interface and a database connected via 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 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 implements the functions or steps on the server side of a general middleware method that supports XFS4IoT conversion.
[0078] In one embodiment, a computer device is provided. The computer device may be a client, and its internal structure diagram may be as follows: Figure 5 As shown. The computer device includes a processor, a memory, a network interface, a display screen and an input device connected via 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 via a network connection. When the computer program is executed by the processor, it implements the functions or steps on the client side of a general middleware method that supports XFS4IoT conversion.
[0079] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program: Using pre-acquired instructions to call external information of the enterprise, and obtain calling information; The call information is parsed by a preset parsing engine, and the parsing result is encapsulated to obtain encapsulated data; The internal information of the enterprise is obtained, and the packaged data and the internal information of the enterprise are verified according to a preset verification standard to obtain a verification result.
[0080] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented: Acquire request data and interface conditions, and perform data separation on data in a preset format in the request data to obtain a separated data set; Performing structured analysis on the separated data set to obtain structured data; Determine the input parameter format of the preset interface command according to the interface condition; The structured data is converted according to the input parameter format to obtain converted data.
[0081] It should be noted that the above functions or steps that can be implemented by the computer-readable storage medium or computer device can refer to the relevant descriptions on the server side and the client side in the aforementioned method embodiment. To avoid repetition, they will not be described one by one here.
[0082] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program, and 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-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0083] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0084] The above-described embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them; although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some of the technical features therein by equivalents; and these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention, and should be included in the protection scope of the present invention. It should be noted that if software tools or components other than those of the company appear in the embodiments of this application, they are only used for example introduction and do not represent actual use.
Claims
1. A general middleware method supporting XFS4IoT conversion, characterized in that: include: Acquire request data and interface conditions, and perform data separation on data in a preset format in the request data to obtain a separated data set; Performing structured analysis on the separated data set to obtain structured data; Determine the input parameter format of the preset interface command according to the interface condition; 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 separating the data in the preset format in the request data to obtain a separated data set includes: Parsing the request data to obtain parsed data; Extract data that conforms to a preset format from the parsed data, and aggregate the data in the preset format into a separate data set.
3. The general middleware method supporting XFS4IoT conversion according to claim 1, characterized in that: The performing structured parsing on the separated data set to obtain structured data includes: Performing array parsing on the separated data set to obtain an array of the separated data set; Convert the array into structured data.
4. The general middleware method supporting XFS4IoT conversion as claimed in claim 3, characterized in that: The step of determining the input parameter format of the preset interface command according to the interface condition comprises: Determine the command operation target and execution condition of the preset interface command according to the interface condition; Identify the input parameter data type of the preset interface command; The input parameter format is constructed according to the command operation target, execution condition and input parameter data type.
5. 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.
6. The general middleware method supporting XFS4IoT conversion according to claim 5, 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.
7. The general middleware method supporting XFS4IoT conversion according to claim 6, 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.
8. A general middleware device supporting XFS4IoT conversion, characterized in that: include: Acquisition module, used to obtain request data and interface conditions; A separation module, used for separating the data in a preset format in the request data to obtain a separated data set; A parsing module, used for performing structured parsing on the separated data set to obtain structured data; A determination module, used to determine the input parameter format of the preset interface command according to the interface condition; The conversion module is used to perform input parameter conversion on the structured data according to the input parameter format to obtain converted data.
9. 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 7 are implemented.
10. 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 7 are implemented.
Citation Information
Patent Citations
Data format conversion method, device and equipment and readable storage medium
CN108664665A
XFS-based printing data format intelligent conversion method and terminal
CN115639973A
Method for encapsulating Android service function by using JavaScript
CN117420985A
Data conversion method and device, electronic equipment and storage medium
CN118444907A
System and method for providing financial services terminals with a document driven interface
US20020032655A1