Data communication method and system based on simple object access protocol

By using differential files to replace complete files and compressed response messages in SOAP communication, the problem of low SOAP transmission efficiency is solved, data transmission efficiency is improved and conflicts are handled, and it is suitable for real-time data exchange.

CN119211224APending Publication Date: 2024-12-27北京力控元通科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411375972.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-29
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

SOAP is less efficient in real-time data exchange for gateways and industrial software applications, resulting in delay problems.

Method used

The template file is generated during the first communication and sent to the server. Only the differential file is sent in subsequent communication. The server processes and generates a response message, and compresses and transmits it when necessary to process conflict information to generate a new differential file. .

Benefits of technology

Reduces the amount of data transmission, improves data communication efficiency, reduces delay, enhances data transmission speed in real-time environments, and can quickly and effectively handle conflicts.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119211224A_ABST
    Figure CN119211224A_ABST
Patent Text Reader

Abstract

The invention discloses a data communication method and system based on a simple object access protocol, and relates to the field of communication, and the method comprises the steps: for first communication, generating a template file (a complete simple object access request) through a client, and sending the template file to a server; after the server side receives the template file, the template file is stored and processed, and a corresponding response message is generated and sent to the client side; for the nth communication, generating a simple object access request of the nth communication through the client, determining a differential file according to the simple object access request of the nth communication and the template file, and sending the differential file to the server; and after receiving the differential file, the server determines a simple object access request of the nth communication according to the template file and the differential file, processes the simple object access request of the nth communication, generates a corresponding response message and sends the response message to the client. According to the invention, the efficiency of data communication based on the simple object access protocol is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communications, and in particular to a data communication method and system based on a simple object access protocol. Background Art

[0002] In the gateway environment and industrial software application scenarios, in two independent operating environments, it is necessary to obtain the data point information of the gateway and display it in the industrial software database in real time. At this time, it is necessary to use the Simple Object Access Protocol (SOAP) program in a distributed environment to exchange data. Since SOAP uses the Extensible Markup Language (XML) format to define the message structure, it can communicate between different operating systems and programming languages, that is, SOAP has high cross-platform and cross-language properties. In addition, SOAP also supports a variety of security mechanisms such as digital signatures and encryption to ensure the security of transmission. However, since the SOAP message format is relatively lengthy and requires the use of an additional protocol layer, its transmission efficiency is low, which will cause delays in the real-time data exchange between the gateway and industrial software applications. Summary of the invention

[0003] The purpose of this application is to provide a data communication method and system based on Simple Object Access Protocol, which can improve the efficiency of data communication based on SOAP.

[0004] To achieve the above objectives, this application provides the following solutions:

[0005] In a first aspect, the present application provides a data communication method based on a simple object access protocol, comprising:

[0006] For the first communication: a template file is generated by the client, and the template file is sent to the server; the template file is a simple object access request for the first communication;

[0007] After receiving the template file, the server stores and processes the template file, generates a corresponding response message and sends it to the client;

[0008] For the nth communication: a simple object access request for the nth communication is generated by the client, and a differential file is determined according to the simple object access request for the nth communication and the template file, and the differential file is sent to the server; n>1;

[0009] After receiving the differential file, the server determines the simple object access request of the nth communication according to the template file and the differential file, processes the simple object access request of the nth communication, generates a corresponding response message and sends it to the client.

[0010] Optionally, the simple object access request includes data or operations that the client requests to obtain from the server.

[0011] Optionally, the differential file is the difference between the simple object access request of the nth communication and the template file.

[0012] Optionally, the process in which the server generates a corresponding response message and sends it to the client specifically includes: the server generates a corresponding response message, compresses the response message and sends it to the client; the client decompresses the compressed response message after receiving it.

[0013] Optionally, the data communication method based on the simple object access protocol also includes: when there is a conflict in the simple object access requests received by the server from multiple clients, conflict information is generated, and a new differential file is generated based on the conflict information and the differential files of each client, and the new differential file is sent to the corresponding multiple clients.

[0014] In a second aspect, the present application provides a data communication system based on a simple object access protocol, including a client and a server;

[0015] The client is used to generate a template file in the first communication and send the template file to the server, generate a simple object access request for the nth communication in the nth communication, determine a differential file according to the simple object access request for the nth communication and the template file, and send the differential file to the server; the template file is the simple object access request for the first communication; n>1;

[0016] The server is used to store and process the template file after receiving it, generate a corresponding response message and send it to the client, and after receiving the differential file, determine the simple object access request of the nth communication based on the template file and the differential file, process the simple object access request of the nth communication, generate a corresponding response message and send it to the client.

[0017] Optionally, the simple object access request includes data or operations that the client requests to obtain from the server.

[0018] Optionally, the differential file is the difference between the simple object access request of the nth communication and the template file.

[0019] Optionally, the server is further used to compress the response message and send it to the client; the client is further used to decompress the compressed response message after receiving it.

[0020] Optionally, the server is further configured to generate conflict information when there is a conflict in the simple object access requests received from multiple clients, generate a new differential file based on the conflict information and the differential files of each client, and send the new differential file to the corresponding multiple clients. According to the specific embodiments provided by the present application, the present application discloses the following technical effects:

[0021] The present application provides a data communication method and system based on the Simple Object Access Protocol. The client only sends a complete SOAP request to the server during the first communication. In the subsequent communication process, it is only necessary to generate a differential file and send the differential file to the server, thereby reducing the amount of data transmission, making the data size exchanged between the client and the server smaller, and thus improving the efficiency of data communication. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0023] Figure 1 A flowchart of a data communication method based on a simple object access protocol provided in one embodiment of the present application;

[0024] Figure 2 A schematic diagram of a data communication process based on SOAP provided in an embodiment of the present application;

[0025] Figure 3 This is a framework diagram of the SOAP data service cycle. DETAILED DESCRIPTION

[0026] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0027] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.

[0028] Based on the previous SOAP communication, this application proposes a method for data communication between the client and the server, which can greatly improve the communication efficiency.

[0029] First, let's introduce the specific components of the SOAP request:

[0030] (1) Envelope element: The outermost container, similar to the envelope of an email, is used to wrap the entire SOAP message content and give the message a clear structure. The Envelope element is the root element of the SOAP message. Specifically, an XML document can be defined as a SOAP message.

[0031] (2) Header element: can contain application-specific information about the SOAP message (such as authentication, payment, etc.). If the Header element exists, it must be the first child element of the Envelope element.

[0032] (3) Body element: A required part of the Envelope element that can contain the actual SOAP message intended to be transmitted to the final endpoint of the message. The direct child elements of the Body element can be qualified namespaces.

[0033] (4) Fault element: used to store error and status information of SOAP messages. If a Fault element is provided, it must be a child element of the Body element. A Fault element can only appear once in a SOAP message. The child elements of the SOAP Fault element are shown in Table 1.

[0034] Table 1 Fault element has sub-elements

[0035] Child Elements describe <faultcode> < / faultcode> Code for identifying faults <faultstring> < / faultstring> Human-readable description of the fault <faultactor> < / faultactor> Information about who caused the failure <detail> < / detail> Holds application-specific error messages involving the Body element

[0036] HTTP Binding communicates over TCP / IP. A Hypertext Transfer Protocol (HTTP) client uses the Transmission Control Protocol (TCP) to connect to an HTTP server. After the connection is established, the client can send HTTP request messages to the server.

[0037] In an exemplary embodiment, Figure 1 and Figure 2 As shown, a data communication method based on a simple object access protocol is provided, comprising the following steps 101 to 104. Among them:

[0038] Step 101, for the first communication: generate a template file through the client, and send the template file to the server. The template file is a simple object access request for the first communication.

[0039] The simple object access request includes data or operations that the client requests to obtain from the server.

[0040] Step 102: After receiving the template file, the server stores and processes the template file, generates a corresponding response message and sends it to the client.

[0041] In the first communication, a complete SOAP request is sent by the client, which can be used as a template file for the server. In subsequent communications, the server uses the request as a reference file. The client generates a SOAP request based on the template file and sends it to the server. The response message includes the query result or the result of the operation.

[0042] In order to further improve communication efficiency, the server compresses the response message and sends it to the client. Since the message has been compressed, the time and bandwidth required for transmission are reduced, thereby reducing the volume of data and improving network transmission efficiency. After receiving the compressed response message, the client decompresses it and restores it to the original SOAP response format. The decompressed SOAP response message is processed by the client, the required data or results are extracted, and further operations are performed.

[0043] Step 103, for the nth communication: generate a simple object access request for the nth communication through the client, determine a differential file according to the simple object access request for the nth communication and the template file, and send the differential file to the server; n>1.

[0044] Specifically, the differential file is the difference between the simple object access request of the nth communication and the template file.

[0045] If there is a differential file between the client and the server, the client can generate a differential file to record the changed part of the request to reduce the amount of data transmitted. The generation of a differential file usually involves comparing two sets of data (such as the previous request and the current request) and only recording the differences. Specifically, a difference calculation can be used, which can be a text comparison or a binary comparison.

[0046] Step 104: After receiving the difference file, the server determines the simple object access request of the nth communication according to the template file and the difference file, processes the simple object access request of the nth communication, generates a corresponding response message and sends it to the client. The response message may contain a large amount of data.

[0047] The differential file is formed by comparing the template file with the SOAP request response file to form a differential message, that is, differential encoding. The client generates the differential file and transmits it to the server. The server can then compare the local template file to restore the request message, thereby improving data transmission efficiency.

[0048] In order to further improve communication efficiency, the server compresses the response message and sends it to the client. Since the message has been compressed, the time and bandwidth required for transmission are reduced, thereby reducing the volume of data and improving network transmission efficiency. After receiving the compressed response message, the client decompresses it and restores it to the original SOAP response format. The decompressed SOAP response message is processed by the client, the required data or results are extracted, and further operations are performed.

[0049] In a specific example, a client and a server perform data transmission via a network.

[0050] Furthermore, the data communication method based on the simple object access protocol also includes:

[0051] Step 105: When there is a conflict among the simple object access requests received by the server from multiple clients, conflict information is generated, and a new differential file is generated according to the conflict information and the differential files of each client, and the new differential file is sent to the corresponding multiple clients.

[0052] In a specific example, if multiple clients write to the same data at the same time, data conflicts will occur. In this case, the response will contain information about the conflicting part, and a new differential file will be generated by comparing the differential files in the request and returned to the client along with the response.

[0053] If the server sends a differential file to the client, the client needs to combine the differential file with the template file to restore the complete data. At this time, it is up to the user to handle the conflict and resend the SOAP request. If further operation or processing is required, the client may generate a new SOAP request and restart the processing flow.

[0054] This application improves the original SOAP transmission message format by optimizing the shortcomings of low transmission efficiency caused by the lengthy transmission format, improves the speed of data transmission in a real-time usage environment, and adds a conflict return mechanism in the server's response, which can quickly and effectively handle conflicts.

[0055] Based on the same inventive concept, the embodiment of the present application also provides a data communication system based on the simple object access protocol for implementing the data communication method based on the simple object access protocol mentioned above. In an exemplary embodiment, Figure 3 As shown, a data communication system based on the simple object access protocol is provided, including a client and a server.

[0056] In a specific example, both the client and the server are computer devices. The server is a server.

[0057] The client is used to generate a template file during the first communication and send the template file to the server. During the nth communication, the client generates a simple object access request for the nth communication, determines a differential file based on the simple object access request for the nth communication and the template file, and sends the differential file to the server; the template file is the simple object access request for the first communication; n>1.

[0058] The simple object access request includes data or operations that the client requests to obtain from the server. The differential file is the difference between the simple object access request of the nth communication and the template file.

[0059] The server is used to store and process the template file after receiving it, generate a corresponding response message and send it to the client, and after receiving the differential file, determine the simple object access request of the nth communication based on the template file and the differential file, process the simple object access request of the nth communication, generate a corresponding response message and send it to the client.

[0060] Furthermore, the server is further configured to compress the response message and then send it to the client. The client is further configured to decompress the compressed response message after receiving it.

[0061] The server is also used to generate conflict information when receiving conflicting simple object access requests from multiple clients, generate a new differential file based on the conflict information and the differential files of each client, and send the new differential file to the corresponding multiple clients.

[0062] This application serializes data into a format (usually binary) through the client (server) and then compresses it to reduce the space required for storage or transmission. The client (server) response is used to exchange data in the network. The main purpose of the SOAP response is to provide an answer or result to the SOAP request. The client (server) converts the data structure or object state into a format that can be stored or transmitted.

[0063] In summary, this application changes the original SOAP data transmission from direct data transmission each time to the first transmission of complete data, and then only transmits differential files, reducing the amount of data transmission. At the same time, a conflict return mechanism is added to the response of the server, which can quickly and effectively handle conflicts. This makes the data size exchanged between the client and the server smaller and the transmission efficiency higher.

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

[0065] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed 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 the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM may be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).

[0066] The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. The non-relational database may include a distributed database based on blockchain, etc., but is not limited thereto. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but is not limited thereto.

[0067] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0068] This article uses specific examples to illustrate the principles and implementation methods of this application. The description of the above embodiments is only used to help understand the method and core ideas of this application. At the same time, for those skilled in the art, according to the ideas of this application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting this application.

Claims

1. A data communication method based on simple object access protocol, characterized in that: The data communication method based on the simple object access protocol includes: For the first communication: a template file is generated by the client, and the template file is sent to the server; the template file is a simple object access request for the first communication; After receiving the template file, the server stores and processes the template file, generates a corresponding response message and sends it to the client; For the nth communication: a simple object access request for the nth communication is generated by the client, and a differential file is determined according to the simple object access request for the nth communication and the template file, and the differential file is sent to the server; n>1; After receiving the differential file, the server determines the simple object access request of the nth communication according to the template file and the differential file, processes the simple object access request of the nth communication, generates a corresponding response message and sends it to the client.

2. The data communication method based on simple object access protocol according to claim 1, characterized in that: The simple object access request includes data or operations that the client requests to obtain from the server.

3. The data communication method based on simple object access protocol according to claim 1, characterized in that: The differential file is the difference between the simple object access request of the nth communication and the template file.

4. The data communication method based on simple object access protocol according to claim 1, characterized in that: The process of the server generating a corresponding response message and sending it to the client specifically includes: The server generates a corresponding response message, compresses the response message and sends it to the client; the client decompresses the compressed response message after receiving it.

5. The data communication method based on simple object access protocol according to claim 1, characterized in that: The data communication method based on the simple object access protocol also includes: When there is a conflict among the simple object access requests from multiple clients received by the server, conflict information is generated, and a new differential file is generated according to the conflict information and the differential files of each client, and the new differential file is sent to the corresponding multiple clients.

6. A data communication system based on simple object access protocol, characterized in that: The data communication system based on the simple object access protocol includes a client and a server; The client is used to generate a template file in the first communication and send the template file to the server, generate a simple object access request for the nth communication in the nth communication, determine a differential file according to the simple object access request for the nth communication and the template file, and send the differential file to the server; the template file is the simple object access request for the first communication; n>1; The server is used to store and process the template file after receiving it, generate a corresponding response message and send it to the client, and after receiving the differential file, determine the simple object access request of the nth communication based on the template file and the differential file, process the simple object access request of the nth communication, generate a corresponding response message and send it to the client.

7. The data communication system based on simple object access protocol according to claim 6, characterized in that: The simple object access request includes data or operations that the client requests to obtain from the server.

8. The data communication system based on simple object access protocol according to claim 6, characterized in that: The differential file is the difference between the simple object access request of the nth communication and the template file.

9. The data communication system based on simple object access protocol according to claim 6, characterized in that: The server is further configured to compress the response message and then send it to the client; the client is further configured to decompress the compressed response message after receiving it.

10. The data communication system based on simple object access protocol according to claim 6, characterized in that: The server is also used to generate conflict information when there is a conflict in the simple object access requests received from multiple clients, generate a new differential file based on the conflict information and the differential files of each client, and send the new differential file to the corresponding multiple clients.