Data transmission method and device, computer equipment and storage medium

By converting data into a string transmission format and using preset interceptors and middleware processing, the data loss problem caused by the accuracy limitation of JavaScript floating point numbers is solved, and efficient and easy-to-use data transmission effect is achieved, improving system compatibility and development efficiency.

CN119892811APending Publication Date: 2025-04-25SHENZHEN DIDATRAVEL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411853226.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-16
Publication Date
2025-04-25

AI Technical Summary

Technical Problem

In modern web development, due to the floating-point accuracy limitation of JavaScript's floating-point data during data transmission between the front-end and back-end, the accuracy loss of high-precision data during transmission and processing. Traditional methods have the limitations of high development complexity and low efficiency.

Method used

By converting the data to be transferred into a string transmission format, using preset interceptors and middleware for checksum processing, ensuring the accuracy of the data during the front and back end transmission process, including custom converters, deserialization and format conversion of response data, avoiding accuracy loss.

Benefits of technology

It realizes the correct transmission of high-precision data, simplifies processing logic, improves system compatibility and development efficiency, and ensures the accuracy and stability of data transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119892811A_ABST
    Figure CN119892811A_ABST
Patent Text Reader

Abstract

The invention relates to a data transmission method and device, computer equipment and a storage medium, and the method comprises the steps: obtaining front-end to-be-transmitted data, and obtaining a character string transmission format; converting the to-be-transmitted data into a to-be-transmitted character string format based on the character string transmission format, and generating a transmission request according to the to-be-transmitted character string format; sending the transmission request to a back end; a back-end preset interceptor intercepts the transmission request and verifies the to-be-transmitted character string format, and if the verification is passed, deserialization processing is carried out on the to-be-transmitted character string format to obtain deserialized data; responding to the deserialized data according to preset middleware to generate response data; converting the response data into a response character string format according to preset middleware; and returning the transmission response character string format to the front end. According to the data transmission method, the data transmission precision can be guaranteed, the system compatibility is improved, the development efficiency is improved, and the efficient and easy-to-use data transmission effect is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a data transmission method, device, computer equipment and storage medium. Background Art

[0002] In modern Web development, the front end needs to process a large amount of data information from different sources, including data entered by users, data obtained from the back end, and data calculated on the front end. In the data transmission process between the front end and the back end, when it comes to high-precision data transmission such as currency and scientific calculations, due to the floating point precision limitation of JavaScript, the data may lose precision during transmission and processing. Even a small loss of precision may cause significant economic losses. Traditional solutions often rely on the back end to perform precision correction, or use specific JavaScript libraries to process high-precision data, but these methods have their own limitations. Summary of the invention

[0003] The embodiments of the present application provide a data transmission method, apparatus, computer equipment and storage medium, which are intended to solve the problems of data accuracy loss during data transmission, high development cost and complexity of back-end processing of high-precision data, and low development efficiency, so as to ensure the accuracy of data transmission, improve system compatibility, improve development efficiency, and achieve efficient and easy-to-use data transmission effects.

[0004] In a first aspect, an embodiment of the present application provides a data processing method, which includes:

[0005] Get the data to be transmitted from the front end and the string transmission format;

[0006] Converting the data to be transmitted into a string format to be transmitted based on the string transmission format, and generating a transmission request according to the string format to be transmitted;

[0007] Sending the transmission request to a backend;

[0008] The preset interceptor of the backend intercepts the transmission request and verifies the format of the string to be transmitted. If the verification passes, the format of the string to be transmitted is deserialized to obtain deserialized data;

[0009] Respond to the deserialized data according to the preset middleware to generate response data;

[0010] Converting the response data into a response string format according to the preset middleware;

[0011] The transmission response string format is returned to the front end.

[0012] In a second aspect, an embodiment of the present application further provides a data transmission device, which includes a unit for executing the above method.

[0013] In a third aspect, an embodiment of the present application further provides a computer device, which includes a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the above method when executing the computer program.

[0014] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, wherein the storage medium stores a computer program, and the computer program can implement the above method when executed by a processor.

[0015] The embodiments of the present application provide a data transmission method, apparatus, computer equipment and storage medium. The embodiments of the present application convert the data to be transmitted into a string transmission format for transmission, thereby ensuring that high-precision values ​​can be correctly transmitted and processed during the front-end and back-end data interaction process, avoiding the problem of precision loss when processing large numerical data during data transmission, simplifying the processing logic during data transmission, improving development efficiency, and improving the compatibility and stability of the system. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0017] 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 or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0018] One or more embodiments are exemplarily described by pictures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and unless otherwise stated, the figures in the drawings do not constitute proportional limitations.

[0019] Figure 1 A flowchart of a data transmission method provided in an embodiment of the present application;

[0020] Figure 2 A schematic diagram of the process of abnormal information processing provided in an embodiment of the present application;

[0021] Figure 3 A schematic diagram of the structure of a data transmission device provided in an embodiment of the present application;

[0022] Figure 4A schematic diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0023] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are 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 making creative work are within the scope of protection of this application.

[0024] The disclosure below provides many different embodiments or examples to realize the different structures of the present application. In order to simplify the disclosure of the present application, the parts and settings of specific examples are described below. Of course, they are only examples, and the purpose is not to limit the present application. In addition, the present application can repeat reference numbers and / or letters in different examples. This repetition is for the purpose of simplification and clarity, and does not itself indicate the relationship between the various embodiments and / or settings discussed.

[0025] It should be understood that when used in this specification and the appended claims, the terms "include" and "comprises" indicate the presence of described features, integers, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.

[0026] It should also be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.

[0027] It should be further understood that the term “and / or” used in the specification and appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0028] As used in this specification and the appended claims, the term "if" may be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrases "if it is determined" or "if [described condition or event] is detected" may be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]," depending on the context.

[0029] Figure 1A data transmission method provided in an embodiment of the present application includes:

[0030] Step S100, obtaining the data to be transmitted from the front end and obtaining the string transmission format.

[0031] The data to be transmitted may be data captured on the front-end page, especially some high-precision data, including but not limited to: financial data, such as stock prices, exchange rate data, transaction amounts; scientific computing data, such as physical simulation computing data, chemical analysis data, engineering computing data; medical data, such as physiological parameters, medical imaging data. The string transmission format may be a custom data transmission format. In some specific embodiments, the front end obtains the data to be transmitted from user input, forms or other data sources, the data to be transmitted may be a long data type, and the string transmission format may be a custom string format, for example, the string transmission format is "someLong":{"$int64":"999999999999"} in JSON format, indicating that the value of the "someLong" field is 9999999999999, that is, "someLong":{"$i nt64":"999999999999"} is used to represent a 64-bit integer.

[0032] Step S110 : converting the data to be transmitted into a string format to be transmitted based on the string transmission format, and generating a transmission request according to the string format to be transmitted.

[0033] Among them, the string format to be transmitted can be data in a string format for data transmission. The conversion of the data to be transmitted into the string format to be transmitted can be achieved through a custom converter, which can be used to convert one data format or type into another data format or type to meet the data exchange requirements between different systems or components. The transmission request can be a request generated by the front end when the front end and the back end interact with each other, and the data is transmitted to the back end. The transmission request can be an HTTP request or a specifically generated request file. Optionally, the data type definition of the long field can be converted into stringing according to the configuration, so that stringing can be used to circulate in the entire data transmission program, thereby avoiding the problem of precision loss. In some specific embodiments, a custom converter can be used to convert the data to be transmitted into the string format to be transmitted according to the string transmission format "someLong":{"$i nt64":"999999999999"}, for example, using a custom serializer or an existing serialization library (such as JSON.stringify), and then generate an HTTP request. The HTTP request includes a request method: such as GET, POST, PUT, DELETE, etc., the target URI of the request, the HTTP version, a request header (such as Content-Type) and the string format to be transmitted (i.e., the request body).

[0034] Step S120, sending the transmission request to the back end.

[0035] Optionally, you can use a browser (for example, through form submission), a command line tool (such as curl or wget), an HTTP library in a programming language (such as JavaScript's fetch API or XMLHttpRequest), or use an API testing tool such as Postman to send the HTTP transmission request to the backend for processing.

[0036] Step S130: a preset interceptor at the back end intercepts the transmission request and verifies the format of the string to be transmitted. If the verification passes, the format of the string to be transmitted is deserialized to obtain deserialized data.

[0037] Among them, the preset interceptor can be a front-end request interceptor, which is used to process the transmission request before the front end sends it to the back end. For example, the preset interceptor can be an axios request interceptor. Deserialized data can be data obtained by serializing and inversely processing the string format to be transmitted. Optionally, the back end uses a preset interceptor to verify whether the request body (i.e., the string format to be transmitted) in the transmission request meets the expected string transmission format requirements (i.e., the string transmission format). If it meets the requirements, the next step is processed. If it does not meet the requirements, the string format to be transmitted is intercepted to ensure the consistency of data transmission between the front and back ends, and prevent data corruption or malicious attacks. When the verification passes, a custom deserializer or an existing deserialization library (such as JSON.parse) can be used to deserialize the data transmission format (such as JSON) in the request body into a data type that the back end can recognize, such as converting a string to a long type, and obtaining deserialized data.

[0038] Step S140, responding to the deserialized data according to the preset middleware to generate response data.

[0039] Among them, the preset middleware is a pre-set function used in the request processing pipeline, which can access the request object (req), the response object (res) and the next middleware function (next) in the pipeline. The response string format is a digital transmission format consistent with the string transmission format. Optionally, the preset middleware can be added at the program entry of the JavaScript backend (especially Node.js application). The response data can be the data generated by the middleware in response to the data transmitted by the front end according to business needs. In some specific embodiments, the preset middleware can be used to process the deserialized data, and the corresponding operations such as database query, data calculation, etc. can be performed at the back end according to specific business needs, thereby generating corresponding response data.

[0040] Step S150: convert the response data into a response string format according to the preset middleware.

[0041] Optionally, to ensure consistency and accuracy of data transmission between the front-end and back-end, the response data should also be formatted accordingly when the back-end transmits data to the front-end, and the response data should be converted into an appropriate format (such as JSON). For example, the response data can be converted into the "someLong" format to obtain the response string format, thereby ensuring that high-precision values ​​can be correctly transmitted and processed, thereby avoiding the problem of precision loss caused by data type conversion.

[0042] Step S160, sending the transmission response string format back to the front end.

[0043] Optionally, after the backend responds, the transmission response string format can be sent back to the frontend, and the frontend can receive the response string format and perform corresponding data processing and display.

[0044] The above data transmission method can ensure the accuracy of data transmission, improve system compatibility, improve development efficiency, and achieve efficient and easy-to-use data transmission effect.

[0045] In some specific embodiments of the present application, after the preset interceptor at the back end intercepts the transmission request and performs verification, it also includes:

[0046] If the verification fails, an error response is returned to the front end.

[0047] Among them, the error response is a special response returned by the server or system to the front end when the transmission request cannot be successfully transmitted to the back end. The error response contains information about the cause of the error, the error type, and how to solve the error. Optionally, if the preset interceptor fails to verify the format of the string to be transmitted in the transmission request, that is, the format of the string to be transmitted does not meet the string transmission format requirements, it means that the data is damaged or maliciously attacked. At this time, an error response can be generated and include error information.

[0048] In some specific embodiments of the present application, the data transmission method further includes:

[0049] The front end reads the response string format and converts the response string format into display data.

[0050] In some specific embodiments, the front end receives a response (e.g., an HTTP response) and can read the data in the response body (i.e., the corresponding string format). If the response data is in JSON format, JSON.parse can be used to convert it into a JavaScript object or data structure to obtain display data.

[0051] Update the front-end display content according to the response data.

[0052] Optionally, the received display data may be processed using front-end logic and displayed to the user for review, such as updating page content, displaying prompt information, etc.

[0053] In some specific embodiments of the present application, before generating a transmission request according to the format of the data to be transmitted, the method further includes:

[0054] Encrypt the request string and generate a data encryption identifier.

[0055] Among them, the data encryption identifier can be a mark or symbol generated after encrypting the request string using an encryption algorithm, which is used to indicate that the request string data has been encrypted. The data encryption identifier can be used to verify the integrity of the data later. In some specific embodiments, after the front end converts the data into a request string, it is not transmitted directly, but the data is first encrypted to protect the confidentiality of the data and prevent unauthorized access and leakage. For example, a symmetric encryption algorithm (such as AES) or an asymmetric encryption algorithm (such as RSA) can be used to encrypt the data to generate a unique digital encryption identifier.

[0056] Perform a sign operation on the encrypted request string to generate a digital signature.

[0057] The digital signature is a specific data string obtained by encrypting the request string using a custom private key. Optionally, the private key can be used to sign the summary of the encrypted request string to generate a digital signature. The digital signature can ensure the authenticity and integrity of the request string and prevent the request string from being tampered with during data transmission.

[0058] Generate a transmission request based on the data encryption identifier, digital signature and format of the data to be transmitted.

[0059] Specifically, to generate an HTTP request, the data encryption identifier and digital signature of the request string can be used together as the body part of the HTTP request. At the same time, the appropriate Content-Type and other necessary metadata can be set in the request header, and the HTTPS protocol can be used to transmit the request string, thereby generating an HTTP transmission request and sending it to the backend for processing.

[0060] In some specific embodiments of the present invention, after converting the data to be transmitted into the string format to be transmitted based on the string transmission format, the method further includes:

[0061] Determine whether the format of the string to be transmitted meets the preset packaging conditions.

[0062] Among them, the preset packaging conditions can be specific requirements for processing data into files that are preset. In some specific embodiments, when the data to be transmitted is a large data set, binary data, unstructured data, or data that needs to be stored and archived for a long time, these data cannot be sent directly through the body part of the HTTP request (for example, due to the size limit of the HTTP request or the network bandwidth limit), or generating an HTTP request will cause data corruption or format problems, or it is more appropriate to save these data to be transmitted as files and transmit them through a file transfer protocol (such as FTP, SFTP, HTTP multi-part form data upload, etc.), so it can be determined first whether the data in the string format to be transmitted meets the preset packaging conditions. If it does, the step of packaging the data into a file is entered; if it does not, an HTTP request can be directly generated and sent to the back end.

[0063] If the format of the string to be transmitted meets the preset packaging condition, the format of the string to be transmitted is processed into a request file to be transmitted.

[0064] The request file to be transmitted is a file format obtained by packaging the string format to be transmitted through a dedicated packaging tool. Optionally, if the string format to be transmitted meets the preset packaging conditions, the string format to be transmitted can be packaged into a file for data transmission to ensure the integrity and accuracy of the data. Specifically, the B l ob object and the FileSaver.js library can be used to package the string format to be transmitted into a request file to obtain the request file to be transmitted.

[0065] Send the request file to be transferred to the backend.

[0066] Optionally, the packaged request file to be transferred can be sent to the backend for data transmission. By packaging the data into a file format for transmission, data accuracy loss can be prevented while ensuring data integrity, format correctness and reliability, thereby improving development efficiency.

[0067] In some specific embodiments of the present application, Figure 2 As shown, the data transmission method also includes:

[0068] Step S200, obtaining abnormal information during data transmission.

[0069] Among them, the exception information can be the error information encountered during the data transmission process between the front-end and back-end, and the exception information includes but is not limited to the exception type, exception message, time and location (such as file name, line number) of the exception. In some specific embodiments, the exception handling logic can be added to the front-end and the back-end respectively, such as using a try-catch statement block to capture possible exceptions. When an exception occurs during the data transmission process, the catch statement block can capture the exception and perform corresponding processing (such as retry, rollback, etc.).

[0070] Step S210, classify and process the abnormal information. If the abnormal information is irrecoverable information, proceed to step S220.

[0071] Step S220, returning error information to the front end.

[0072] The unrecoverable information may be abnormal information of unrecoverable data transmission, such as data format error, backend service abnormality, etc. In some specific embodiments, after the abnormal information is captured, it can be classified and processed according to the type and nature of the abnormal information. For unrecoverable abnormalities (such as data format error, backend service abnormality, request abnormality, system resource abnormality, etc.), the corresponding error information should be returned to the front end, and the user should be prompted to perform corresponding processing to improve the reliability and stability of data transmission.

[0073] In some specific embodiments of the present application, Figure 2 As shown, after the abnormal information is classified and processed, it also includes:

[0074] If the abnormal information is recoverable information, go to step S230.

[0075] Step S230, retry the recoverable information until the retry stop condition is triggered, then stop the retry operation and enter step S220, that is, enter the step of returning error information to the front end.

[0076] Among them, recoverable information can be abnormal information such as network timeout, connection interruption, etc. that can restore data transmission. The retry operation is an operation in which the system attempts to retransmit data. The retry stop condition can be a specific requirement for stopping the retry operation set in advance, such as an upper limit on the number of retries, a retry interval limit, an unrecoverable error, etc. In some specific embodiments, if the abnormal information is a network timeout, the system can automatically perform error handling at this time, for example, data transmission can be retried, and a loop structure (such as a while loop) can be used to implement the retry operation. In order to avoid resource waste and performance problems caused by infinite retries, a reasonable upper limit on the number of retries can be set as a retry stop condition. If the number of retries has reached the upper limit, the retry operation needs to be stopped to ensure that the retry operation does not loop indefinitely, thereby avoiding resource waste and performance degradation.

[0077] Optionally, if the retry operation has triggered the retry stop condition, it can be confirmed that the exception information cannot be resolved through automatic processing by the system, and the exception information can be returned to the front end as an error message, and the user is prompted to perform corresponding processing.

[0078] See also Figure 3 , Figure 3 is a schematic block diagram of a data transmission device provided in an embodiment of the present application. Corresponding to the above data transmission method, the present application also provides a data transmission device. The data transmission device includes a unit for executing the above data transmission method, and the data transmission device can be configured in a desktop computer, a tablet computer, a laptop computer, and other terminals. Specifically, the data transmission device includes:

[0079] The acquisition unit 300 is used to acquire the data to be transmitted by the front end and acquire the transmission format of the character string;

[0080] A first conversion unit 310, configured to convert the data to be transmitted into a string format to be transmitted based on the string transmission format, and generate a transmission request according to the string format to be transmitted;

[0081] The sending unit 320 is used to send the transmission request to the back end;

[0082] Verification unit 330, used for a preset interceptor at the back end to intercept the transmission request and verify the format of the string to be transmitted. If the verification passes, the format of the string to be transmitted is deserialized to obtain deserialized data;

[0083] The response unit 340 is used to respond to the deserialized data according to the preset middleware and generate response data;

[0084] The second conversion unit 350 is used to convert the response data into a response string format according to a preset middleware;

[0085] The feedback unit 360 is used to transmit the transmission response character string format back to the front end.

[0086] like Figure 4 As shown, the embodiment of the present application provides a computer device, including a processor 111, a communication interface 112, a memory 113 and a communication bus 114, wherein the processor 111, the communication interface 112, and the memory 113 communicate with each other through the communication bus 114.

[0087] Memory 113, used for storing computer programs;

[0088] In one embodiment of the present application, the processor 111 is used to implement the data transmission method provided by any one of the aforementioned method embodiments when executing the program stored in the memory 113.

[0089] It is understood by those skilled in the art that all or part of the processes in the method for implementing the above embodiment can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a storage medium, which is a computer-readable storage medium. The computer program is executed by at least one processor in the computer system to implement the process steps of the embodiment of the above method.

[0090] Therefore, an embodiment of the present application further provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the data transmission method provided in any of the aforementioned method embodiments are implemented.

[0091] The storage medium is a physical, non-transient storage medium, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a magnetic disk, or an optical disk, etc., which can store program codes. The computer-readable storage medium can be non-volatile or volatile.

[0092] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0093] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of each unit is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed.

[0094] The steps in the method of the embodiment of the present application can be adjusted in order, combined and deleted according to actual needs. The units in the device of the embodiment of the present application can be combined, divided and deleted according to actual needs. In addition, the functional units in the various embodiments of the present application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0095] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, terminal, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application.

[0096] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0097] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

[0098] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.

Claims

1. A data transmission method, characterized in that: The method comprises: Get the data to be transmitted from the front end and the string transmission format; Converting the data to be transmitted into a string format to be transmitted based on the string transmission format, and generating a transmission request according to the string format to be transmitted; Sending the transmission request to a backend; The preset interceptor of the backend intercepts the transmission request and verifies the format of the string to be transmitted. If the verification passes, the format of the string to be transmitted is deserialized to obtain deserialized data; Respond to the deserialized data according to the preset middleware to generate response data; Converting the response data into a response string format according to the preset middleware; The transmission response string format is returned to the front end.

2. The method according to claim 1, characterized in that After the preset interceptor at the back end intercepts the transmission request and performs verification, the method further includes: If the verification fails, an error response is returned to the front end.

3. The method according to claim 1, characterized in that The method further comprises: The front end reads the response string format and converts the response string format into display data; The display content of the front end is updated according to the display data.

4. The method according to claim 1, characterized in that: Before generating a transmission request according to the format of the data to be transmitted, the method further includes: Performing encryption operation on the request character string to generate a data encryption identifier; Performing a signing operation on the encrypted request string to generate a digital signature; The transmission request is generated based on the data encryption identifier, the digital signature and the format of the data to be transmitted.

5. The method according to claim 1, characterized in that After converting the data to be transmitted into a string format to be transmitted based on the string transmission format, the method further includes: Determine whether the format of the string to be transmitted meets the preset packaging conditions; If the format of the string to be transmitted meets the preset packaging condition, processing the format of the string to be transmitted into a request file to be transmitted; The request file to be transmitted is sent to the back end.

6. The method according to claim 1, characterized in that The method further comprises: Obtain abnormal information during data transmission; The abnormal information is classified and processed, and if the abnormal information is irrecoverable information, error information is returned to the front end.

7. The method according to claim 6, characterized in that After the abnormal information is classified and processed, the method further includes: If the abnormal information is recoverable information, a retry operation is performed on the recoverable information until a retry stop condition is triggered, and then the retry operation is stopped; Enter the step of returning error information to the front end.

8. A data transmission device, characterized in that: The device comprises a unit for executing the method according to any one of claims 1 to 7, wherein the device comprises: The acquisition unit is used to acquire the data to be transmitted by the front end and the string transmission format; A first conversion unit, configured to convert the data to be transmitted into a string format to be transmitted based on the string transmission format, and generate a transmission request according to the string format to be transmitted; A sending unit, used for sending the transmission request to a back end; A verification unit, which is used for a preset interceptor of the backend to intercept the transmission request and verify the format of the string to be transmitted. If the verification passes, the format of the string to be transmitted is deserialized to obtain deserialized data; A response unit, used to respond to the deserialized data according to a preset middleware and generate response data; A second conversion unit, configured to convert the response data into a response character string format according to the preset middleware; A feedback unit is used to return the transmission response character string format to the front end.

9. A computer device, characterized in that: The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the method according to any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 can be implemented.