Data processing method and device for front-end and back-end separation

By building an interface middle-end service framework and adopting a protocol recognition engine with a type scripting language, the problems of poor scalability and security risks in traditional front-end data processing methods are solved, and efficient and secure data processing is achieved, which is suitable for modern web applications.

CN119449487BActive Publication Date: 2025-07-11KAIYUN LIANCHUANG (BEIJING) TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510026406.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-08
Publication Date
2025-07-11
Estimated Expiration
2045-01-08

AI Technical Summary

Technical Problem

The traditional front-end and back-end data processing methods have a tightly coupled architecture that leads to poor system scalability, high maintenance costs, lack of unified identity authentication and data format specifications, simple interface protocol identification and data communication, unfine-grained permission control, inflexible data format conversion, limited construction of interface middle-end service framework, and limited configurability of data processing processes.

Method used

Build an interface middle-end service framework, load protocol identification engine through a type script language, implement class attributes and class method definition instructions, integrate identity token checksum data formatting, establish a data communication link for identity identification matching and permission verification, and use network sockets for reliable data transmission and precise conversion.

Benefits of technology

It realizes unified interface management, ensures data security, improves the scalability and maintainability of the system, and provides efficient and secure data processing solutions for modern web applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119449487B_ABST
    Figure CN119449487B_ABST
Patent Text Reader

Abstract

The embodiments of this application provide a front-end and back-end separated data processing method and device. By constructing an interface middle platform service framework and implementing a protocol recognition engine using the TypeScript language, unified interface management is achieved. Innovatively designed class attribute and class method definition instructions, integrating identity token verification and data formatting functions. The system ensures data security through identity identification matching and permission verification, establishes a reliable data communication link using network sockets, and realizes precise conversion of front-end and back-end data through a data formatting unit. This method breaks through the limitations of traditional front-end and back-end architectures and provides an efficient and secure data processing solution for modern web applications.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing, and particularly to a data processing method and apparatus for front-end and back-end separation. Background Art

[0002] Traditional front-end and back-end data processing methods often adopt a tightly coupled architecture, resulting in poor system scalability and high maintenance costs. Existing technologies lack a unified specification in processing identity authentication and data format conversion, making it easy to have security risks and data inconsistency problems. The system is also relatively simple in terms of interface protocol identification and data communication, and it is difficult to adapt to complex business requirements.

[0003] At the same time, existing systems have obvious deficiencies in permission control and data formatting. Traditional methods usually adopt simple identity authentication mechanisms, lacking fine-grained permission management, and the data format conversion process lacks flexibility. The system is also relatively mechanical in data communication and response processing, and fails to make full use of the advantages of modern front-end technologies.

[0004] In addition, existing technologies also have limitations in the construction of the interface middleware service framework and protocol identification. Lacking unified type definitions and method encapsulation, the interface adaptation cost is relatively high, and the configurability of the data processing flow is limited. Solving these problems is of great significance for improving the performance and maintainability of front-end and back-end separation systems. Summary of the Invention

[0005] In view of the problems in the prior art, this application provides a data processing method and apparatus for front-end and back-end separation, which can break through the limitations of traditional front-end and back-end architectures and provide an efficient and secure data processing solution for modern web applications.

[0006] To solve at least one of the above problems, this application provides the following technical solutions:

[0007] In a first aspect, this application provides a data processing method for front-end and back-end separation, including:

[0008] Construct an interface middleware service framework, generate a protocol recognition engine by loading an application identifier list through a type scripting language, write class attribute definition instructions and class method definition instructions into the protocol recognition engine, write request parameter formats and response data formats into the class attribute definition instructions, write request interception rules and response processing rules into the class method definition instructions, write an identity token verification unit into the request interception rules, and write a data formatting unit into the response processing rules;

[0009] Receive the login authentication data sent by the user interface interaction program, extract the identity identification information from the login authentication data, match the target backend service with the identity identification information through the protocol recognition engine, send an identity authentication request to the target backend service based on the class method definition instruction, receive the authentication data returned by the target backend service, convert the authentication data into an identity verification code, and establish a data communication link based on the application identification list;

[0010] Monitor the data communication link to receive the design operation instruction, verify the operation permission according to the identity verification code, combine the identity identification information and the design operation instruction to generate a server data packet, establish a network socket connection to send the server data packet to the document database, receive the response data packet returned by the document database, pass the response data packet into the data formatting unit to be converted into an interface data structure, and send the interface data structure to the user interface interaction program through the data communication link.

[0011] Further, the construction of the interface middle platform service framework, loading the application identification list through the type script language to generate a protocol recognition engine, includes:

[0012] Call the type script language compiler to parse the preset data interface configuration file, extract the system identification, service address, authentication method, and interface protocol from the data interface configuration file, establish a mapping relationship between the system identification and the service address to generate an application identification list, and construct a system routing table based on the application identification list;

[0013] Read the interface protocol template library, select the protocol template matching the authentication method from the interface protocol template library, write the protocol template into the protocol recognition engine, configure the routing rules of the protocol recognition engine based on the system routing table, and write the routing rules into the protocol parser.

[0014] Further, writing the class attribute definition instruction and the class method definition instruction into the protocol recognition engine, writing the request parameter format and the response data format into the class attribute definition instruction, writing the request interception rule and the response processing rule into the class method definition instruction, writing the identity token verification unit into the request interception rule, and writing the data formatting unit into the response processing rule, includes:

[0015] Parse the interface description specification document to obtain the data structure template, extract the request parameter definition and response data definition from the data structure template, write the request parameter definition and the response data definition into the class attribute definition instruction, read the interface security configuration information to obtain the identity token format and data verification rules, construct a token verification unit based on the identity token format, write the token verification unit into the request interception rule, and write the request interception rule into the class method definition instruction;

[0016] Read the data type mapping table from the data conversion rule library, construct a data serialization module and a deserialization module based on the data type mapping table, combine the data serialization module and the deserialization module to generate a data formatting unit, write the data formatting unit into the response processing rule, write the response processing rule into the class method definition instruction, and write the class attribute definition instruction and the class method definition instruction into the protocol recognition engine.

[0017] Further, receiving the login authentication data sent by the user interface interaction program, extracting the identity identification information from the login authentication data, and matching the target backend service through the protocol recognition engine with the identity identification information includes:

[0018] Read the communication port buffer to obtain the authentication request data packet, parse the login authentication data from the authentication request data packet, parse the login authentication data according to the preset data structure specification, extract the user name, password hash value, and login timestamp in the login authentication data, and combine the user name and the password hash value to generate the identity identification information;

[0019] Pass the identity identification information into the protocol recognition engine, look up the system identifier matching the identity identification information based on the system routing table in the protocol recognition engine, obtain the service address corresponding to the system identifier, mark the service address as the target backend service, and establish a network connection with the target backend service.

[0020] Further, sending an identity authentication request to the target backend service based on the class method definition instruction, receiving the authentication data returned by the target backend service, converting the authentication data into an identity verification code, and establishing a data communication link based on the application identifier list includes:

[0021] Read the authentication request template from the class method definition instruction, fill the identity information into the authentication request template to generate an identity authentication request, perform format conversion on the identity authentication request through the data serialization module in the protocol recognition engine, send the converted identity authentication request to the target backend service, receive the authentication data returned by the target backend service, parse the authentication data through the data deserialization module in the protocol recognition engine, extract the token information in the authentication data, and calculate the identity verification code from the token information through a hashing algorithm;

[0022] Obtain the system identifier and service address of the target backend service from the application identifier list, create a communication session object based on the system identifier, write the service address and the identity verification code into the communication session object, establish a long connection based on the TCP protocol as the data communication link, and bind the data communication link to the communication session object.

[0023] Further, listen for design operation instructions received on the data communication link, verify the operation permissions according to the identity verification code, and combine the identity information and the design operation instructions to generate a server data packet, and establish a network socket connection to send the server data packet to the document database, including:

[0024] Start a communication link listener to obtain the status of the data communication link, read the operation request data stream from the data communication link, parse the operation request data stream according to a preset data frame format to extract the design operation instruction, obtain the identity verification code in the communication session object, pass the identity verification code into the permission verification module for operation permission verification, read the identity information in the communication session object, and encapsulate the identity information and the design operation instruction according to a preset data packet format to generate a server data packet;

[0025] Create a network socket object to set the data transmission buffer size, read the access address and port number of the document database from the configuration file, write the access address and the port number into the network socket object, establish a TCP connection with the document database through the network socket object, and write the server data packet into the data transmission buffer to send it to the document database.

[0026] Further, receive the response data packet returned by the document database, pass the response data packet into the data formatting unit to convert it into an interface data structure, and send the interface data structure to the user interface interaction program through the data communication link, including:

[0027] Read a data stream from the receive buffer of the network socket object, parse the data stream according to a preset data packet format to extract a response data packet, pass the response data packet into the data formatting unit, parse the data structure of the response data packet through the data deserialization module in the data formatting unit, convert the parsed data into an interface data structure based on a preset data mapping rule, and perform a data integrity check on the interface data structure;

[0028] Read the session identifier in the communication session object, combine the session identifier and the interface data structure to generate a transmission data packet, send the transmission data packet to the user interface interaction program through the data communication link, monitor the sending status of the transmission data packet, and record a data transmission log.

[0029] In a second aspect, the present application provides a front-end and back-end separated data processing device, including:

[0030] A middleware architecture building module, configured to build an interface middleware service framework, generate a protocol recognition engine by loading an application identifier list through a type script language, write class attribute definition instructions and class method definition instructions into the protocol recognition engine, write a request parameter format and a response data format into the class attribute definition instructions, write a request interception rule and a response processing rule into the class method definition instructions, write an identity token verification unit into the request interception rule, and write a data formatting unit into the response processing rule;

[0031] An identity authentication module, configured to receive login authentication data sent by a user interface interaction program, extract identity identification information from the login authentication data, match the identity identification information with a target back-end service through the protocol recognition engine, send an identity authentication request to the target back-end service based on the class method definition instructions, receive authentication data returned by the target back-end service, convert the authentication data into an identity verification code, and establish a data communication link based on the application identifier list;

[0032] A data transmission module, configured to listen for a design operation instruction on the data communication link, verify the operation permission according to the identity verification code, combine the identity identification information and the design operation instruction to generate a server data packet, establish a network socket connection to send the server data packet to a document database, receive a response data packet returned by the document database, pass the response data packet into the data formatting unit to be converted into an interface data structure, and send the interface data structure to the user interface interaction program through the data communication link.

[0033] In a third aspect, the present application provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, the steps of the front-end and back-end separation data processing method described above are implemented.

[0034] In a fourth aspect, the present application 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 front-end and back-end separation data processing method described above are implemented.

[0035] In a fifth aspect, the present application provides a computer program product, including a computer program / instructions. When the computer program / instructions are executed by a processor, the steps of the front-end and back-end separation data processing method described above are implemented.

[0036] As can be seen from the above technical solutions, the present application provides a front-end and back-end separation data processing method and device. By constructing an interface middle platform service framework and implementing a protocol recognition engine using a type scripting language, unified interface management is achieved. The class attribute and class method definition instructions are innovatively designed, and the identity token verification and data formatting functions are integrated. The system ensures data security through identity identification matching and permission verification, establishes a reliable data communication link using network sockets, and realizes accurate conversion of front-end and back-end data through a data formatting unit. This method breaks through the limitations of traditional front-end and back-end architectures and provides an efficient and secure data processing solution for modern web applications. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0038] Figure 1 is one of the flow diagrams of the front-end and back-end separation data processing method in the embodiments of the present application;

[0039] Figure 2 is another flow diagram of the front-end and back-end separation data processing method in the embodiments of the present application;

[0040] Figure 3 is yet another flow diagram of the front-end and back-end separation data processing method in the embodiments of the present application;

[0041] Figure 4 is still another flow diagram of the front-end and back-end separation data processing method in the embodiments of the present application;

[0042] Figure 5It is the fifth flowchart of the front - end and back - end separated data processing method in the embodiments of the present application;

[0043] Figure 6 It is the sixth flowchart of the front - end and back - end separated data processing method in the embodiments of the present application;

[0044] Figure 7 It is the seventh flowchart of the front - end and back - end separated data processing method in the embodiments of the present application;

[0045] Figure 8 It is the structural diagram of the front - end and back - end separated data processing device in the embodiments of the present application;

[0046] Figure 9 It is the structural schematic diagram of the electronic device in the embodiments of the present application.

[0047] Reference numerals:

[0048] Electronic device 9600, central processing unit 9100, memory 9140, communication module 9110, input unit 9120, audio processor 9130, display 9160, power supply 9170, buffer memory 9141, application / function storage unit 9142, data storage unit 9143, driver program storage unit 9144, antenna 9111, speaker 9131, microphone 9132. Detailed implementation manners

[0049] To make the objectives, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of them. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present application.

[0050] In the technical solutions of the present application, the acquisition, storage, use, processing, etc. of data all comply with the relevant regulations of national laws and regulations.

[0051] Considering the problems existing in the prior art, the present application provides a front - end and back - end separated data processing method and device. By constructing an interface middleware service framework and implementing a protocol recognition engine using a type - script language, unified interface management is achieved. Class attribute and class method definition instructions are innovatively designed, integrating identity token verification and data formatting functions. The system ensures data security through identity identification matching and permission verification, establishes a reliable data communication link using network sockets, and realizes accurate conversion of front - end and back - end data through a data formatting unit. This method breaks through the limitations of traditional front - end and back - end architectures and provides an efficient and secure data processing solution for modern web applications.

[0052] In order to break through the limitations of the traditional front-end and back-end architecture and provide an efficient and secure data processing solution for modern web applications, this application provides an embodiment of a front-end and back-end separation data processing method. Refer to Figure 1 , the front-end and back-end separation data processing method specifically includes the following content:

[0053] Step S101: Build an interface middleware service framework. Generate a protocol recognition engine by loading an application identification list through a type script language. Write class attribute definition instructions and class method definition instructions into the protocol recognition engine. Write the request parameter format and response data format into the class attribute definition instructions. Write the request interception rule and response processing rule into the class method definition instructions. Write an identity token verification unit into the request interception rule. Write a data formatting unit into the response processing rule;

[0054] Optionally, this embodiment provides a construction scheme for an interface middleware service framework based on TypeScript, which is mainly applied to the front-end and back-end data interaction scenarios of enterprise-level distributed systems. First, build a multi-layer architecture interface middleware service framework. Use hierarchical design to divide the interface service into a protocol layer, a business layer, and a data layer. The protocol layer is responsible for request parsing and response encapsulation. The business layer processes specific business logics. The data layer is responsible for data persistence and cache management. Manage the life cycle of each layer component through a dependency injection container to achieve loose coupling between components.

[0055] During the construction process of the protocol recognition engine, first load a predefined application identification list through the TypeScript compiler. The application identification list is stored in a hierarchical JSON structure. The top layer is the application domain, which contains multiple application nodes. Each application node contains basic information such as application ID, application name, version number, interface protocol type, etc., and at the same time contains an interface configuration node, which defines all interface information supported by this application. The compiler automatically generates a type definition file based on the interface protocol type through generic programming technology to ensure that type errors can be found at the compilation stage.

[0056] The class attribute definition process is implemented using the decorator pattern. First, define a set of decorator functions, including parameter decorators, method decorators, and class decorators. The parameter decorator is used to define the verification rules for request parameters, including data type verification, value range limitation, format verification, etc. Through the reflection mechanism, these verification rules are attached to the prototype chain of the class as metadata. The response data format is also defined through decorators, including status code mapping, data structure conversion rules, error code definition, etc.

[0057] The request parameter format definition adopts the chained validator pattern. For different types of parameters, corresponding validator chains are constructed. For example, for string-type parameters, validators such as non-null validation, length validation, and format validation can be added in sequence; for numeric-type parameters, range validation, precision validation, etc. can be added. The validators are connected in series through the responsibility chain pattern to form a complete validation process. The validation rules support custom extensions, and new validators can be dynamically added according to business requirements.

[0058] The response data format adopts a templated design. A set of basic response templates are defined, including success responses, error responses, paged responses, etc. Each template contains fixed data structure fields, such as status codes, messages, data bodies, etc. Through the composite pattern, customized response formats can be assembled according to different business scenarios. The response templates support nested structures and can handle complex data relationships.

[0059] The class method definition adopts the middleware chained processing pattern. Each interface method is wrapped in a middleware chain, and the middleware is executed in the predefined order. Standard middleware includes logging, performance monitoring, exception handling, etc. The middleware chain is implemented through an asynchronous iterator and supports asynchronous processing flows. Each middleware can access the request context to read and modify data.

[0060] The request interception rules implement a multi-layer filtering mechanism. First is the global filter, which processes common logics such as cross-origin requests, compression and decompression; then is the security filter, which performs identity authentication and permission verification; finally is the business filter, which executes specific business rule checks. The filters are configured through decorators and support precise matching according to conditions such as URL paths, request methods, client types, etc.

[0061] The identity token verification unit adopts a multi-factor authentication mechanism. First, it parses the Authorization header to obtain the token information, supporting two authentication methods: Bearer Token and Basic Auth. After the token is parsed, signature verification is performed, using asymmetric encryption to ensure data integrity. Then, the timeliness of the token is checked, including the issuance time and expiration time. Finally, the permission claims in the token payload are verified to ensure that the requester has sufficient access rights.

[0062] The data formatting unit adopts the adapter pattern and supports conversion between multiple data formats. The input adapter is responsible for converting request data in different formats into a unified internal format; the output adapter is responsible for converting the internal data format into the format expected by the client. The adapters are created through the factory pattern and automatically select the appropriate converter according to the Content-Type. Common data formats such as JSON, XML, and Protocol Buffers are supported.

[0063] Through a complete interface service framework, the development efficiency and maintainability of the front-end and back-end separation system are significantly improved in this embodiment. The type-safe interface definition reduces runtime errors, the decorator pattern simplifies the interface configuration process, and the middleware chain provides a flexible extension mechanism. In practical applications, this framework has successfully supported the interface service management of multiple large-scale distributed systems, effectively improving the stability and scalability of the systems.

[0064] Step S102: Receive the login authentication data sent by the user interface interaction program, extract the identity identification information from the login authentication data, match the target back-end service through the protocol recognition engine with the identity identification information, send an identity authentication request to the target back-end service based on the class method definition instruction, receive the authentication data returned by the target back-end service, convert the authentication data into an identity verification code, and establish a data communication link based on the application identification list;

[0065] Optionally, this embodiment provides a complete user authentication and communication link establishment mechanism, which is mainly applied to the identity authentication and secure communication scenarios of distributed systems. First, receive the login authentication data through the user interface interaction program, and this data is transmitted using an encrypted transmission protocol to ensure the security of the authentication process. The authentication data contains multi-dimensional information such as username, password hash value, login timestamp, device identifier, etc., and the sensitive information is ensured to be secure through multi-layer encryption.

[0066] The extraction process of the identity identification information adopts a step-by-step parsing strategy. First, decrypt the authentication data, use the asymmetric encryption algorithm RSA to decrypt the data to ensure the security of the transmission process. Then perform data integrity verification, verify whether the data has been tampered with through the checksum algorithm. Next, parse the data structure and extract the user identity-related fields, including user identifier, organization code, role information, etc. Finally, perform data normalization processing to unify the data format for subsequent processing.

[0067] The protocol recognition engine adopts a multi-level cache matching strategy. First, search for the service mapping relationship corresponding to the identity identification in the local cache to improve the matching efficiency of frequently used services. If the local cache misses, then access the distributed cache layer for searching. Finally, if no matching record is still found, search for the target back-end service in the service registry through the service discovery mechanism. The matching process supports fuzzy matching and weight matching to ensure the selection of the most suitable target service among multiple candidate services.

[0068] The construction of the identity authentication request adopts a templatized design. Based on the class method, the request template in the instruction is defined, and the identity identification information is filled into the template to generate a standardized authentication request data packet. The request contains necessary authentication information, such as security elements like timestamp, random number, signature, etc. Through the dynamic proxy mechanism, request header information is automatically added, including context data such as client version, device information, etc.

[0069] The authentication process of the target backend service implements a two-way authentication mechanism. First, the server verifies the identity credentials provided by the client, including username and password verification, token verification, etc. Then the client verifies the server's identity certificate to prevent phishing attacks. The authentication process supports multiple authentication methods, including password-based authentication, certificate authentication, biometric authentication, etc., and the appropriate authentication method can be selected according to the security level requirements.

[0070] The processing of authentication data adopts the responsibility chain pattern. First, the data format is verified to ensure that the response data conforms to the expected format. Then the authentication result is parsed to extract key data such as user permission information, session identifier, etc. Finally, an identity verification code is generated. Using a secure hashing algorithm, information such as user identity information, timestamp, and random factor is combined and calculated to obtain a unique verification code.

[0071] The establishment of the data communication link is based on the TCP long connection mechanism. First, the service connection parameters are obtained from the application identifier list, including service address, port number, protocol type, etc. Then a Socket connection pool is created, and multiple connection instances are established in advance to support connection multiplexing and load balancing. The connection status is maintained through the heartbeat mechanism, the validity of the connection is detected regularly, and the disconnected connection is processed in a timely manner.

[0072] The connection management adopts a state machine design, defining multiple states of the connection: initialization, authentication in progress, connected, disconnected, etc. The state transition is event-driven and supports asynchronous state migration. An automatic reconnection mechanism is implemented. When a connection disconnection is detected, an attempt is automatically made to re-establish the connection.

[0073] This embodiment effectively solves the problems of identity authentication and secure communication in distributed systems through a complete authentication process and a reliable communication mechanism. The multi-level cache service matching mechanism improves the service discovery efficiency, the two-way authentication ensures the credibility of the identities of both communication parties, and the connection pool mechanism provides stable communication guarantee. In practical applications, this solution has successfully supported user authentication and data interaction in multiple large-scale distributed systems, significantly enhancing the security and availability of the systems.

[0074] The technical solution of this embodiment shows significant advantages in enterprise-level applications. Especially in dealing with high-concurrency authentication requests and maintaining a large number of long connections, through reasonable resource scheduling and status management, the stable operation of the system is ensured. At the same time, the flexible authentication mechanism and scalable communication framework provide a good foundation for the subsequent upgrade and function expansion of the system.

[0075] Step S103: Listen for design operation instructions received by the data communication link, verify the operation permissions according to the identity verification code, combine the identity identification information and the design operation instructions to generate a server data packet, establish a network socket connection to send the server data packet to the document database, receive the response data packet returned by the document database, pass the response data packet into the data formatting unit to be converted into an interface data structure, and send the interface data structure to the user interface interaction program through the data communication link.

[0076] Optionally, this embodiment provides a complete data operation processing flow, which is mainly applied to the real-time collaboration scenario in a distributed design system. The data communication link listening adopts an event-driven mode and realizes efficient message processing through an asynchronous IO multiplexing mechanism. The listener maintains an event queue, sorts the received design operation instructions by priority, and ensures the priority processing of key operations.

[0077] The operation permission verification adopts a multi-dimensional verification mechanism. First, the user identity is verified through the identity verification code, and the verification code is generated by a time-sensitive hash algorithm, which includes information such as user identification, timestamp, and random salt value. Then, the permission check at the operation level is performed, and it is judged whether there is the permission to execute a specific design operation according to the user role and the resource access matrix. The permission control supports fine-grained configuration and can be accurate to specific design objects and operation types.

[0078] The processing of design operation instructions adopts the command pattern. Each operation instruction is encapsulated as an independent command object, which includes information such as operation type, target object, and parameter list. Multiple concurrent operations are managed through a command queue, and the sequential execution, parallel execution, and conditional execution of operations are supported. An operation rollback mechanism is implemented, and when the operation fails, it can automatically roll back to the previous state.

[0079] The generation of the server data packet adopts a hierarchical encapsulation strategy. First, the packet header is constructed, which includes control information such as protocol version, message type, and sequence number. Then, the business data layer is encapsulated, and the identity identification information and the design operation instructions are serialized into a binary format. Finally, a verification layer is added, and the data checksum is calculated through the CRC algorithm to ensure the integrity of data transmission.

[0080] The network socket connection pool adopts a dynamic scaling mechanism. According to the current concurrent request volume and system load, it dynamically adjusts the size of the connection pool. It implements a connection reuse strategy to avoid frequent connection establishment and disconnection operations. The connection pool supports failover. When a connection anomaly is detected, it automatically switches to a standby connection.

[0081] The access to the document database adopts an asynchronous operation mode. The data packet sending uses non-blocking IO to improve the system's concurrent processing ability. It implements request timeout control. When the response time exceeds the preset threshold, it triggers the timeout handling logic. It supports batch operation optimization, combining multiple related design operations for processing to reduce the number of database accesses.

[0082] The response data processing adopts a pipeline processing mode. First, it verifies the integrity of the data packet, checking whether the response data is complete and whether it has been tampered with. Then it parses the response status code and executes the corresponding processing logic according to different status codes. For a successful response, it extracts the core data for subsequent processing; for an error response, it generates a friendly error prompt message.

[0083] The data formatting process implements an intelligent type conversion mechanism. According to the data structure requirements of the target interface, it automatically performs data type conversion and format adjustment. It supports the conversion of complex data structures, such as nested objects, arrays, etc. It implements a data filtering function, which can screen and organize data fields according to interface requirements.

[0084] The generation of the interface data structure adopts a template engine mechanism. It predefines data templates for various interface components and selects the appropriate template according to different display requirements. It supports data binding configuration, which can flexibly set the mapping relationship between data fields and interface elements. It implements a data caching mechanism to locally cache frequently accessed data and improve the interface response speed.

[0085] Through the complete data processing flow, this embodiment effectively solves the real-time data interaction problem in the distributed design system. The event-driven message processing mechanism improves the system's response ability, the fine-grained permission control ensures operation security, and the asynchronous database access mode improves the system's concurrent performance. In practical applications, this solution has successfully supported multi-person collaborative design scenarios, significantly improving the design efficiency and user experience.

[0086] The technical solution of this embodiment is particularly suitable for collaborative work in large design projects. Through reasonable data processing mechanisms and optimization strategies, even in the case of complex design operations and a large number of concurrent accesses, it can maintain stable performance and reliable data consistency. At the same time, the flexible data conversion and display mechanism provides a unified data interaction basis for different types of design tools and interfaces.

[0087] As can be seen from the above description, the front-end and back-end separated data processing method provided by the embodiments of the present application can implement a unified interface management by constructing an interface middleware service framework and using a type script language to implement a protocol recognition engine. It innovatively designs class attribute and class method definition instructions, and integrates identity token verification and data formatting functions. The system ensures data security through identity identification matching and permission verification, establishes a reliable data communication link using network sockets, and realizes accurate conversion of front-end and back-end data through a data formatting unit. This method breaks through the limitations of traditional front-end and back-end architectures and provides an efficient and secure data processing solution for modern web applications.

[0088] In an embodiment of the front-end and back-end separated data processing method of the present application, referring to Figure 2 , it may specifically include the following content:

[0089] Step S201: Call a type script language compiler to parse a preset data interface configuration file, extract a system identifier, a service address, an authentication method, and an interface protocol from the data interface configuration file, establish a mapping relationship between the system identifier and the service address to generate an application identifier list, and construct a system routing table based on the application identifier list;

[0090] Step S202: Read an interface protocol template library, select a protocol template matching the authentication method from the interface protocol template library, write the protocol template into a protocol recognition engine, configure routing rules of the protocol recognition engine based on the system routing table, and write the routing rules into a protocol parser.

[0091] Optionally, this embodiment provides a data interface configuration parsing and routing management mechanism based on TypeScript, which is mainly applied to the service governance scenario of large distributed systems. First, a type script language compiler is used to load a preset data interface configuration file, and this configuration file adopts a hierarchical data structure and contains configuration information of multiple service nodes. Each service node includes core configuration items such as a system identifier (as a unique identifier), a service address (supporting multi-address load balancing), an authentication method (such as Basic Auth, OAuth2.0, JWT, etc.), and an interface protocol (such as REST, GraphQL, gRPC, etc.).

[0092] The configuration file parsing process adopts a recursive descent parsing strategy. First, lexical analysis is performed to convert the configuration file content into a token stream. Then, syntactic analysis is performed to construct an abstract syntax tree to represent the hierarchical structure of the configuration. During the syntactic analysis process, type checking is performed to ensure the type correctness of the configuration items. For complex configuration items, variable references and macro substitutions are supported to improve the reusability of the configuration.

[0093] The mapping relationship between system identifiers and service addresses adopts a multi-level mapping structure. The first layer is the mapping at the system level, which maps system identifiers to corresponding service clusters; the second layer is the mapping at the cluster level, which maps service clusters to specific service nodes; the third layer is the mapping at the node level, which contains the detailed configuration information of the nodes. The mapping process supports dynamic updates. When the service nodes change, the mapping relationship can be updated in real time.

[0094] The generation of the application identifier list adopts a tree structure design. The root node of the tree represents the entire application system, the intermediate nodes represent different service domains, and the leaf nodes represent specific service instances. Through the tree structure, the hierarchical relationship and dependency relationship between services can be clearly represented. The list generation process includes service dependency analysis to ensure that services are started and initialized in the correct order.

[0095] The construction of the system routing table adopts the prefix tree (Trie tree) data structure. The URL path of the service is decomposed into path segments to construct a path prefix tree, which supports efficient routing matching. The routing table includes two parts: static routing and dynamic routing. Static routing is used to handle fixed service paths, and dynamic routing supports wildcards and path parameters. Routing rules support priority settings to ensure that the most specific rules are matched first.

[0096] The design of the interface protocol template library adopts the component-based concept. Each authentication method corresponds to a set of basic templates, which include standard components such as authentication processes, data formats, and error handling. The templates support inheritance and composition, and specific templates for specific scenarios can be created by extending the basic templates. The template library implements a version management mechanism to support the upgrade and rollback of templates.

[0097] The selection process of protocol templates adopts a decision tree algorithm. According to the characteristics of multiple dimensions such as authentication methods, security levels, and performance requirements, decision rules for template selection are constructed. The decision process supports fuzzy matching. When there is no completely matching template, the closest alternative is selected. The selection results are cached to improve the selection efficiency in similar scenarios.

[0098] The configuration of the protocol recognition engine adopts a pipeline processing mode. Multiple processing components are connected in series through the configuration pipeline, including request parsing, parameter verification, protocol conversion, etc. Each component is pluggable, supporting dynamic adjustment of the processing flow according to requirements. The engine configuration supports hot updates and can update the configuration without shutting down the system.

[0099] The writing of routing rules adopts an atomic operation mechanism. First, the new routing rules are written into the temporary storage area to verify the correctness of the rules. Then, through an atomic switching operation, the new rules are applied to the production environment. If problems are found, it supports a quick rollback to the previous rule version.

[0100] Through a complete configuration parsing and routing management mechanism, this embodiment effectively solves the service governance problem in a distributed system. The application identifier list in a tree structure provides a clear service view, the routing table of the prefix tree realizes efficient request distribution, and the componentized protocol template supports flexible protocol adaptation. In practical applications, this solution significantly improves the maintainability and scalability of the system and provides reliable technical support for the governance of the microservices architecture.

[0101] These improvements enable the development team to more conveniently manage and maintain complex microservices systems. Especially in the scenario where the number of services grows rapidly, through automated configuration management and intelligent routing distribution, the operation and maintenance costs are significantly reduced and the reliability of the system is improved.

[0102] In an embodiment of the data processing method with front-end and back-end separation in this application, refer to Figure 3 , and it may specifically include the following content:

[0103] Step S301: Parse the interface description specification document to obtain the data structure template, extract the request parameter definition and response data definition from the data structure template, write the request parameter definition and the response data definition into the class attribute definition instruction, read the interface security configuration information to obtain the identity token format and data verification rules, construct a token verification unit based on the identity token format, write the token verification unit into the request interception rule, and write the request interception rule into the class method definition instruction;

[0104] Step S302: Read the data type mapping table from the data conversion rule library, construct a data serialization module and a deserialization module based on the data type mapping table, combine the data serialization module and the deserialization module to generate a data formatting unit, write the data formatting unit into the response processing rule, write the response processing rule into the class method definition instruction, and write the class attribute definition instruction and the class method definition instruction into the protocol recognition engine.

[0105] Optionally, this embodiment provides a data processing and security verification mechanism based on the interface description specification, which is mainly applied to the interface management and data exchange scenarios of enterprise-level distributed systems. First, parse the interface description specification document, and convert the document in a specification format such as OpenAPI (Swagger) into an internal data structure by combining lexical analysis and syntactic analysis. The parsing process supports multi-version specifications and can be compatible with different versions of interface description formats.

[0106] The extraction of data structure templates adopts a recursive traversal strategy. For complex data structures, all field definitions are traversed through a depth-first search algorithm, including basic data types, composite types, enumeration types, etc. For each field, attribute information such as its name, type, whether it is required, default value, value range, etc. is extracted. At the same time, the dependency relationships between fields are processed to construct a complete data structure dependency graph.

[0107] The processing of request parameter definitions adopts a hierarchical verification mechanism. For parameters in different positions such as URL parameters, request headers, and request bodies, verification rule sets are established separately. The verification rules include multiple levels such as type checking, length limit, format verification, and business rules. Through the decorator pattern, these verification rules are attached to class attributes in the form of metadata to achieve declarative parameter verification.

[0108] The implementation of response data definitions adopts a templated design. A series of response data templates are predefined, including common scenarios such as successful responses, error responses, and paged responses. Each template contains standard fields such as status codes, messages, and data bodies, and also supports the flexible addition of extended fields. Through the composite pattern, customized response structures can be assembled according to different business requirements.

[0109] The processing of interface security configurations adopts a multi-layer security architecture. First, the identity token format is parsed, supporting multiple token standards such as JWT and OAuth2.0. The token format definition includes configuration items such as header structure, payload fields, and signature algorithms. The data verification rules include security policies such as request frequency limits, IP whitelists, and signature verification.

[0110] The construction of the token verification unit adopts the chain of responsibility pattern. The verification process is divided into multiple links: token parsing, format verification, signature verification, expiration check, permission verification, etc. Each link is independently encapsulated and concatenated into a complete verification process through the chain of responsibility. Support for dynamic adjustment of verification rules, and verification links can be added or removed according to security requirements.

[0111] The implementation of request interception rules adopts an AOP-based interception mechanism. Through aspect-oriented programming, interception logic is inserted before and after the invocation of interface methods. The interceptor supports three entry points: pre-processing, post-processing, and exception handling. The interception rules are configured through annotations to achieve flexible request control.

[0112] The processing of data type mapping adopts a two-way mapping mechanism. A complete type mapping table is constructed, supporting mutual conversion between basic types, composite types, and custom types. The mapping rules include configuration items such as type conversion functions, default value processing, and special value processing. Type converters are created through the factory pattern to ensure the scalability of type conversion.

[0113] The implementation of the data serialization module adopts the strategy pattern. According to different data formats (such as JSON, XML, Protocol Buffers, etc.), the corresponding serialization strategy is selected. The serialization process supports functions such as deep copying, circular reference detection, and special character escaping. The frequently used serialization templates are optimized through a caching mechanism.

[0114] The design of the deserialization module adopts the validator pattern. Data validity verification is performed during the data conversion process, including format checking, type matching, value range verification, etc. Support for registering custom validators, and specific validation rules can be added according to business requirements. An error handling mechanism is implemented, which can accurately locate and report conversion exceptions.

[0115] In this embodiment, through a complete interface processing mechanism, the problems of interface management and data exchange in enterprise-level systems are effectively solved. The hierarchical verification mechanism ensures the correctness and security of data. The flexible type conversion supports diverse data format requirements. The chain-of-responsibility token verification provides reliable security guarantees. In practical applications, this solution significantly improves the maintainability of interfaces and the security of the system, providing a reliable interface management foundation for enterprise-level applications.

[0116] These improvements enable the development team to more efficiently manage and maintain complex interface systems. Especially in scenarios where a large number of heterogeneous system integrations are involved, through unified interface specifications and flexible data conversion mechanisms, the efficiency and reliability of system integration are significantly improved.

[0117] In an embodiment of the front-end and back-end separated data processing method of this application, refer to Figure 4 , it can also specifically include the following content:

[0118] Step S401: Read the authentication request data packet from the communication port buffer, parse the login authentication data from the authentication request data packet, parse the login authentication data according to the preset data structure specification, extract the user name, password hash value, and login timestamp in the login authentication data, and combine the user name and the password hash value to generate identity identification information;

[0119] Step S402: Pass the identity identification information into the protocol recognition engine, search for the system identification that matches the identity identification information based on the system routing table in the protocol recognition engine, obtain the service address corresponding to the system identification, mark the service address as the target back-end service, and establish a network connection with the target back-end service.

[0120] Optionally, this embodiment provides a secure and reliable user authentication and service routing mechanism, which is mainly applied to the authentication and service access scenarios of distributed systems. First, the communication port buffer is monitored through the asynchronous IO mechanism, and the zero-copy technology is used to efficiently read the authentication request data packet. The buffer management adopts the circular buffer design, and the efficient access of data is realized through the movement of the read and write pointers, avoiding frequent memory allocation and release operations.

[0121] The parsing of the authentication request data packet adopts a hierarchical parsing strategy. First, the integrity check of the data packet is performed, and the CRC32 algorithm is used to verify whether the data packet is tampered with during the transmission process. Then, the data packet header is parsed to extract control information such as the protocol version number and data length. Finally, it enters the data body parsing stage, and the state machine mode is used to parse the login authentication data field by field. The parsing process supports breakpoint resumption, and can correctly assemble when the data packet fragments arrive.

[0122] The parsing of the login authentication data is based on the preset data structure specification and adopts the binary protocol format. The data structure specification defines the order, type, and length of the fields, and supports optional fields and variable-length fields. The parser first reads the field type identifier, then determines the field length according to the type identifier, and finally extracts the field value. For string-type fields, multiple character encoding formats are supported.

[0123] Strict security measures are adopted for the processing of the user name and password. The password hash value is generated using the Argon2 algorithm, which has the characteristics of resisting GPU attacks and ASIC attacks. Random salt values and work factors are added during the hashing process to increase the difficulty of brute-force cracking. The timestamp uses millisecond-level precision to prevent replay attacks and control the session validity period.

[0124] The generation of the identity identification information adopts a composite key design. The user name is normalized by removing special characters and extra spaces. Then, the normalized user name and password hash value are combined in a specific format to generate a unique identity identification. The identification generation process takes into account case sensitivity and character set compatibility.

[0125] The query process of the protocol recognition engine adopts a multi-level caching strategy. First, the routing information corresponding to the identity identification is searched in the local cache, and the LRU algorithm is used to manage the cache capacity. If the local cache misses, the distributed cache cluster is queried, and the cache cluster uses consistent hashing to realize the dynamic scaling of nodes. Finally, if no matching record is still found, the persistent storage is accessed to query the complete routing information.

[0126] The search of the system routing table adopts the prefix tree (Trie) data structure, which supports efficient prefix matching and fuzzy matching. The routing table contains matching rules in multiple dimensions, including user roles, organizational structures, access permissions, etc. The search process supports the weight policy and can select the optimal service node according to the load situation. When a service node is found to be unavailable, it supports automatic switching to the standby node.

[0127] The selection of the target backend service adopts the intelligent load balancing algorithm. First, filter out the unhealthy service nodes, and then calculate the weight scores according to the load metrics of the service nodes (such as CPU usage, memory occupancy, request queue length, etc.). Finally, use the weighted round-robin algorithm to select the appropriate service node. The load balancing policy supports dynamic adjustment and can optimize the selection decision according to the real-time monitoring data.

[0128] The establishment of the network connection adopts the connection pool technology. The connection pool pre-creates a certain number of connection instances to avoid the overhead caused by frequent creation and destruction of connections. The connection management uses the token bucket algorithm to control the number of concurrent connections and prevent connection leakage and resource exhaustion. A connection health check mechanism is implemented to periodically detect the connection status and actively close the idle connections.

[0129] Through the complete authentication and routing mechanisms, this embodiment effectively solves the problems of identity authentication and service access in the distributed system. The routing query of the multi-level cache improves the service location efficiency, the intelligent load balancing ensures the reasonable utilization of system resources, and the connection pool mechanism provides a stable network communication guarantee. In practical applications, this solution has successfully supported the user authentication and service routing of large-scale distributed systems, significantly improving the security, reliability, and performance of the system.

[0130] The technical solution of this embodiment shows obvious advantages in dealing with high-concurrency access and large-scale user authentication scenarios. Through reasonable resource scheduling and optimization strategies, it ensures the stability and response speed of the authentication service. At the same time, the flexible routing mechanism and load balancing policy provide reliable technical support for the horizontal expansion of the system.

[0131] In an embodiment of the front-end and back-end separation data processing method of this application, see Figure 5 , it can also specifically include the following content:

[0132] Step S501: Read the authentication request template from the class method definition instruction, fill the identity information into the authentication request template to generate an identity authentication request, perform format conversion on the identity authentication request through the data serialization module in the protocol recognition engine, send the converted identity authentication request to the target backend service, receive the authentication data returned by the target backend service, parse the authentication data through the data deserialization module in the protocol recognition engine, extract the token information in the authentication data, and calculate the identity verification code from the token information through a hashing algorithm;

[0133] Step S502: Obtain the system identifier and service address of the target backend service from the application identifier list, create a communication session object based on the system identifier, write the service address and the identity verification code into the communication session object, establish a long connection based on the TCP protocol as the data communication link, and bind the data communication link to the communication session object.

[0134] Optionally, this embodiment provides a complete identity authentication and session management mechanism, which is mainly applied to the user authentication and long connection communication scenarios of a distributed system. First, read the authentication request template from the class method definition instruction. The template is defined in an extensible JSON Schema format and contains necessary authentication fields and optional extension fields. The template supports parameter placeholders to facilitate dynamic filling of identity information.

[0135] The generation of the identity authentication request adopts a template engine mechanism. By parsing the template file, extracting parameter placeholders, and filling the identity information into the corresponding positions according to predefined mapping rules. The filling process supports data type conversion and formatting processing to ensure that the generated request conforms to the interface specification. For complex authentication scenarios, conditional filling and default value processing are supported.

[0136] The data serialization module adopts the adapter pattern and supports multiple serialization formats. According to the protocol requirements of the target service, select an appropriate serialization strategy, such as JSON, Protocol Buffers, MessagePack, etc. The serialization process includes steps such as field filtering, type conversion, and encoding processing. It realizes serialization performance optimization and uses an object pool mechanism to reuse serializer instances.

[0137] The sending of the authentication request adopts an asynchronous communication mode. Use NIO to implement non-blocking network IO to improve concurrent processing capabilities. An request retry mechanism is implemented. When a network exception occurs, retry according to the backoff strategy. Through request timeout control and circuit breaker mechanism, prevent system resource exhaustion.

[0138] The reception of authentication data adopts an event-driven mode. By registering a callback handler, the server response is processed asynchronously. The response processing supports segmented reception and can correctly handle authentication responses with large amounts of data. A response data verification mechanism is implemented to ensure data integrity and validity.

[0139] The data deserialization module implements intelligent type inference. According to the format characteristics of the response data, an appropriate deserialization strategy is automatically selected. The processing process supports custom type converters and can handle special data formats. A deserialization error recovery mechanism is implemented to gracefully handle data with format exceptions.

[0140] The extraction of token information adopts a multi-level parsing strategy. First, the format legality of the authentication data is verified, then the authentication status code is parsed, and the subsequent processing logic is determined based on the status code. For a successful authentication response, the token information is extracted and its format is verified. Token parsing supports multiple token formats such as JWT, OAuth Token, etc.

[0141] The generation of the identity verification code adopts a secure hash algorithm. SHA-256 is selected as the basic hash algorithm, and a unique verification code is generated by combining a random salt value and a timestamp. The hash calculation process adopts multiple rounds of iteration to increase the security of the verification code. A verification code caching mechanism is implemented to improve performance in scenarios with frequent access.

[0142] The creation of the communication session object adopts the factory pattern. A specific type of session object is created based on the system identifier, and the session object encapsulates attributes such as connection status, authentication information, and timeout time. Session lifecycle management is implemented, supporting session timeout and automatic cleaning.

[0143] The establishment of the TCP long connection adopts a two-way authentication mechanism. First, the identity verification code provided by the client is verified, and then the server certificate is verified. The connection establishment process supports SSL / TLS encryption to ensure communication security. A heartbeat detection mechanism is implemented to maintain the validity of the connection.

[0144] The binding of the data communication link adopts the observer pattern. Connection events, data events, and exception events are mapped to corresponding processors. Link status monitoring is implemented, and through metric collection and statistical analysis, abnormal situations can be detected in a timely manner. Dynamic switching of the link is supported, and when a performance decline is detected, it automatically switches to a backup link.

[0145] This embodiment effectively solves the problems of user authentication and long - connection communication in a distributed system through a complete identity authentication and session management mechanism. The asynchronous communication mode improves the system's concurrency ability, the multi - level parsing strategy ensures the reliability of data processing, and the two - way authentication mechanism guarantees the communication security. In practical applications, this solution has successfully supported the identity authentication and long - connection maintenance of large - scale distributed systems, significantly improving the availability and stability of the system.

[0146] The technical solution of this embodiment is particularly suitable for application scenarios that require long - term connections. Through reasonable resource management and optimization strategies, reliable communication quality can be maintained even under unstable network conditions. At the same time, the flexible session management mechanism provides reliable technical support for the horizontal expansion of the system.

[0147] In an embodiment of the front - end and back - end separation data processing method of this application, see Figure 6 , it may specifically include the following content:

[0148] Step S601: Start a communication link listener to obtain the data communication link status, read the operation request data stream from the data communication link, parse the operation request data stream according to a preset data frame format to extract the design operation instruction, obtain the identity verification code in the communication session object, pass the identity verification code into the permission verification module for operation permission verification, read the identity identification information in the communication session object, and encapsulate the identity identification information and the design operation instruction according to a preset data packet format to generate a server data packet;

[0149] Step S602: Create a network socket object, set the data transmission buffer size, read the access address and port number of the document database from the configuration file, write the access address and the port number into the network socket object, establish a TCP connection with the document database through the network socket object, and write the server data packet into the data transmission buffer and send it to the document database.

[0150] Optionally, this embodiment provides a complete authentication request processing and communication session management mechanism, which is mainly applied to user authentication and data interaction scenarios in a distributed design system. First, read the authentication request template from the class method definition instruction. The template uses an extensible JSON structure, including necessary authentication fields and optional extension fields. The template supports parameter placeholders, which is convenient for dynamically filling in identity identification information.

[0151] The generation process of the authentication request adopts a template engine mechanism. First, preprocess the identity identification information, including operations such as character escaping and format normalization. Then, accurately fill the identity identification information into the corresponding placeholder positions through the template parser. The generation process supports conditional rendering and can selectively fill certain fields according to different authentication scenarios.

[0152] Data serialization adopts a multi-format adaptation strategy. According to the data formats supported by the target backend service, select an appropriate serialization scheme, such as JSON, Protocol Buffers, MessagePack, etc. The serialization process includes schema validation to ensure that the generated data conforms to the predefined data structure. For complex objects, a circular reference detection and processing mechanism is implemented.

[0153] The parsing of authentication data adopts a pipeline processing mode. First, perform data integrity verification to check whether the data packet is complete and whether it has been tampered with. Then, convert the data into an internal object structure through the deserialization module. The parsing process supports version compatibility and can handle different versions of authentication response formats.

[0154] The extraction of token information adopts a multi-layer parsing strategy. First, parse the authentication status code to determine whether the authentication is successful. Then, extract the token information from the successful response, including access tokens, refresh tokens, expiration times, etc. Token parsing supports multiple formats, such as JWT, OAuth2.0 tokens, etc.

[0155] The generation of the identity verification code adopts a secure hash algorithm. Select the SHA-256 algorithm to perform a hash calculation on the token information to ensure the uniqueness and irreversibility of the verification code. The time stamp and random salt value are added to the hash process to increase the security of the verification code. A verification code caching mechanism is implemented to avoid frequent calculations.

[0156] The creation of the communication session object adopts a factory pattern. Select an appropriate session type according to the system identifier and create the corresponding session instance. The session object contains basic attributes such as session ID, creation time, and last access time, as well as business attributes such as service address and identity verification code.

[0157] The establishment of long connections adopts TCP connection pool technology. The connection pool pre-creates a certain number of TCP connections, and controls the number of concurrent connections through the token bucket algorithm. A connection reuse mechanism is implemented to avoid frequent establishment and disconnection of connections. The connection pool supports dynamic expansion and contraction, and adjusts the number of connections according to the business load.

[0158] The binding of the data communication link adopts an event-driven mode. Monitor the connection status through event listeners, including events such as connection establishment, data transmission, and connection disconnection. An automatic reconnection mechanism is implemented. When a connection disconnection is detected, the reconnection process is automatically triggered.

[0159] The communication link listener adopts a multi-threaded model. An independent working thread is allocated for each active connection, and thread resources are managed through a thread pool. A priority queue is implemented to ensure that important operation requests are processed first. The listener supports flow control to prevent a single connection from occupying too many resources.

[0160] The parsing of operation requests adopts a frame synchronization mechanism. The preset data frame format defines control fields such as the frame header, frame length, and checksum to ensure the correct parsing of the data stream. It supports the handling of sticky packets and fragmented packets and can correctly process TCP streaming data.

[0161] The permission verification adopts a multi-dimensional verification strategy. First, the validity of the identity verification code is verified, and then the operation permission matrix is checked to determine whether the user has the permission to perform specific operations. The permission verification supports inheritance and delegation, allowing for flexible permission management.

[0162] The configuration of network sockets adopts a parameter optimization strategy. According to the characteristics of data transmission, appropriate buffer sizes, timeout times, keep-alive parameters, etc. are set. The traffic shaping function is implemented to avoid the impact of burst traffic on the system.

[0163] In this embodiment, through a complete authentication processing and session management mechanism, the problems of user authentication and data interaction in a distributed design system are effectively solved. The support for multi-format serialization provides good interoperability, the secure verification mechanism ensures the legality of operations, and the connection pool technology provides stable communication guarantees. In practical applications, this solution significantly improves the availability and security of the system.

[0164] These improvements enable the design system to better support multi-user collaborative work, especially in scenarios involving complex design tasks and a large number of concurrent operations. Through optimized communication mechanisms and permission control, the stable operation of the system and data security are ensured.

[0165] In an embodiment of the front-end and back-end separation data processing method of this application, refer to Figure 7 , and it may specifically include the following content:

[0166] Step S701: Read the data stream from the receive buffer of the network socket object, parse the data stream according to the preset data packet format to extract the response data packet, pass the response data packet into the data formatting unit, parse the data structure of the response data packet through the data deserialization module in the data formatting unit, convert the parsed data into an interface data structure based on the preset data mapping rules, and perform data integrity verification on the interface data structure;

[0167] Step S702: Read the session identifier in the communication session object, combine the session identifier and the interface data structure to generate a transmission data packet, send the transmission data packet to the user interface interaction program through the data communication link, monitor the sending status of the transmission data packet, and record the data transmission log.

[0168] Optionally, this embodiment provides an efficient data processing and interface interaction mechanism, which is mainly applied to the data display and user interaction scenarios of a distributed system. First, asynchronous reception of data is achieved through a network socket object, and a double-buffer design is adopted to ensure the smooth reception of high-speed data streams. The reception buffer adopts a circular buffer structure, and efficient access to data is achieved through the movement of read and write pointers.

[0169] The data stream parsing adopts a state machine mode. The predefined data packet format defines key components such as a header identifier, a length field, a data field, and a checksum. The parser gradually extracts each field through state transitions and supports the fragmentation and recombination of data packets. When an incomplete data packet is encountered, the parser will maintain the current state and wait for subsequent data to arrive.

[0170] The processing of response data packets adopts a pipeline processing mode. First, the integrity verification of the data packet is performed to check whether the header and the checksum match. Then, the data packet is passed into the data formatting unit, which is responsible for the normalization processing of the data. The formatting process supports the conversion of multiple data formats, such as JSON, XML, binary, etc.

[0171] The data deserialization module adopts a template method pattern. Based on a predefined data structure template, the binary data stream is converted into a structured object. The deserialization process includes type checking and value range verification to ensure the type safety of the data. For complex data structures, recursive parsing and circular reference processing are supported.

[0172] The implementation of the data mapping rule adopts a strategy pattern. The predefined mapping rule defines the conversion method from the source data structure to the interface data structure. The mapping process supports operations such as field renaming, type conversion, value conversion, etc. For special data types, such as date and time, currency amount, etc., special converters are implemented.

[0173] The construction of the interface data structure adopts a builder pattern. According to the requirements of different interface components, the corresponding data structure is dynamically constructed. The data structure includes configuration information such as attribute definitions, verification rules, display formats, etc. The construction process supports preprocessing and postprocessing of data, such as data formatting, default value filling, etc.

[0174] Data integrity verification adopts a multi - layer verification mechanism. First, structural integrity verification is carried out to check whether necessary fields exist. Then, data validity verification is performed, including type matching, value range, business rules, etc. The verification process supports custom verification rules and can extend the verification logic according to specific requirements.

[0175] Session management adopts a token mechanism. The communication session object maintains the session identifier and related status information, and realizes the associated tracking of requests through the session identifier. Session management supports timeout handling and status recovery to ensure the reliability of long - term operation.

[0176] The generation of transmission data packets adopts the composite pattern. The session identifier and the interface data structure are assembled into transmission data packets according to a predefined format. The data packet contains control information such as version number, timestamp, sequence number, etc., and supports the ordered transmission and re - transmission processing of data packets.

[0177] The management of the data communication link adopts the observer pattern. The data transmission status is monitored through event listeners, including events such as sending start, sending completion, and sending failure. An automatic retry mechanism is implemented. When a transmission failure is detected, a retry is performed according to the back - off strategy.

[0178] The monitoring of the transmission status adopts the real - time statistics mode. Metrics such as the sending time, size, and success rate of data packets are recorded, and real - time transmission performance metrics are calculated through a sliding window. The monitoring data supports aggregation analysis and can generate performance reports and trend charts.

[0179] Log recording adopts an asynchronous writing mechanism. A log buffer is used to temporarily store log entries, and they are batch - written to persistent storage through an independent writing thread. The log content includes information such as timestamp, operation type, data size, and transmission status. The log rotation and archiving functions are implemented to prevent the log file from being too large.

[0180] This embodiment effectively solves the problems of data display and user interaction in a distributed system through a complete data processing and interface interaction mechanism. Multi - layer data verification ensures data reliability, a flexible mapping mechanism supports diverse interface requirements, and a perfect monitoring mechanism provides the visualization ability of system operation. In practical applications, this solution significantly improves the system's interaction experience and operation and maintenance efficiency.

[0181] These improvements enable the system to better support complex business scenarios, especially in scenarios involving the display of a large amount of real - time data and user interaction. Through optimized data processing and transmission mechanisms, the fluency of interface response and the accuracy of data display are ensured.

[0182] In order to break through the limitations of the traditional front-end and back-end architecture and provide an efficient and secure data processing solution for modern web applications, this application provides an embodiment of a front-end and back-end separated data processing device for implementing all or part of the content of the data processing method for separating the front-end and back-end. See Figure 8 The front-end and back-end separated data processing device specifically includes the following content:

[0183] The middleware architecture building module 10 is used to build an interface middleware service framework, generate a protocol recognition engine by loading an application identification list through a type script language, write class attribute definition instructions and class method definition instructions into the protocol recognition engine, write request parameter formats and response data formats into the class attribute definition instructions, write request interception rules and response processing rules into the class method definition instructions, write an identity token verification unit into the request interception rules, and write a data formatting unit into the response processing rules;

[0184] The identity authentication module 20 is used to receive login authentication data sent by a user interface interaction program, extract identity identification information from the login authentication data, match the identity identification information with a target back-end service through the protocol recognition engine, send an identity authentication request to the target back-end service based on the class method definition instructions, receive authentication data returned by the target back-end service, convert the authentication data into an identity verification code, and establish a data communication link based on the application identification list;

[0185] The data transmission module 30 is used to monitor the data communication link to receive design operation instructions, verify operation permissions according to the identity verification code, combine the identity identification information and the design operation instructions to generate a server data packet, establish a network socket connection to send the server data packet to a document database, receive a response data packet returned by the document database, pass the response data packet into the data formatting unit to be converted into an interface data structure, and send the interface data structure to the user interface interaction program through the data communication link.

[0186] As can be seen from the above description, the front-end and back-end separated data processing device provided by the embodiment of this application can implement unified interface management by building an interface middleware service framework and using a type script language to implement a protocol recognition engine. Class attribute and class method definition instructions are innovatively designed, and the functions of identity token verification and data formatting are integrated. The system ensures data security through identity identification matching and permission verification, establishes a reliable data communication link using network sockets, and realizes accurate conversion of front-end and back-end data through a data formatting unit. This method breaks through the limitations of the traditional front-end and back-end architecture and provides an efficient and secure data processing solution for modern web applications.

[0187] At the hardware level, in order to break through the limitations of the traditional front-end and back-end architectures and provide an efficient and secure data processing solution for modern web applications, this application provides an embodiment of an electronic device for implementing all or part of the content in the data processing method for separating the front-end and back-end. The electronic device specifically includes the following:

[0188] A processor, a memory, a communications interface, and a bus; wherein, the processor, the memory, and the communications interface complete communication with each other through the bus; the communications interface is used to implement information transmission between the data processing device for separating the front-end and back-end and related devices such as the core business system, the user terminal, and the relevant database, etc. The logic controller can be a desktop computer, a tablet computer, a mobile terminal, etc., and this embodiment is not limited thereto. In this embodiment, the logic controller can be implemented with reference to the embodiments of the data processing method for separating the front-end and back-end and the embodiments of the data processing device for separating the front-end and back-end, and the content thereof is incorporated herein, and the repeated parts will not be elaborated again.

[0189] It can be understood that the user terminal can include a smart phone, a tablet electronic device, a network set-top box, a portable computer, a desktop computer, a personal digital assistant (PDA), a vehicle-mounted device, a smart wearable device, etc. Among them, the smart wearable device can include smart glasses, a smart watch, a smart bracelet, etc.

[0190] In practical applications, part of the data processing method for separating the front-end and back-end can be executed on the electronic device side as described above, or all operations can be completed in the client device. Specifically, it can be selected according to the processing capacity of the client device and the limitations of the user usage scenario, etc. This application does not make a limitation in this regard. If all operations are completed in the client device, the client device may further include a processor.

[0191] The above-mentioned client device can have a communication module (i.e., a communication unit), and can be communicatively connected to a remote server to implement data transmission with the server. The server can include a server on the task scheduling center side, and in other implementation scenarios, it can also include a server on the intermediate platform, such as a server on a third-party server platform communicatively linked to the task scheduling center server. The server can include a single computer device, or can include a server cluster composed of multiple servers, or a server structure of a distributed device.

[0192] Figure 9 It is a schematic block diagram of the system composition of the electronic device 9600 according to the embodiment of this application. As Figure 9As shown, the electronic device 9600 may include a central processing unit 9100 and a memory 9140; the memory 9140 is coupled to the central processing unit 9100. It should be noted that the Figure 9 is exemplary; other types of structures may also be used to supplement or replace this structure to implement telecommunication functions or other functions.

[0193] In one embodiment, the function of the front-end and back-end separation data processing method may be integrated into the central processing unit 9100. Among them, the central processing unit 9100 may be configured to perform the following controls:

[0194] Step S101: Build an interface middle platform service framework, generate a protocol recognition engine by loading an application identification list through a type script language, write class attribute definition instructions and class method definition instructions into the protocol recognition engine, write request parameter formats and response data formats into the class attribute definition instructions, write request interception rules and response processing rules into the class method definition instructions, write an identity token verification unit into the request interception rules, and write a data formatting unit into the response processing rules;

[0195] Step S102: Receive the login authentication data sent by the user interface interaction program, extract the identity identification information from the login authentication data, match the target back-end service with the identity identification information through the protocol recognition engine, send an identity authentication request to the target back-end service based on the class method definition instructions, receive the authentication data returned by the target back-end service, convert the authentication data into an identity verification code, and establish a data communication link based on the application identification list;

[0196] Step S103: Listen for design operation instructions received on the data communication link, verify the operation permissions according to the identity verification code, combine the identity identification information and the design operation instructions to generate a server data packet, establish a network socket connection to send the server data packet to the document database, receive the response data packet returned by the document database, pass the response data packet into the data formatting unit to be converted into an interface data structure, and send the interface data structure to the user interface interaction program through the data communication link.

[0197] As can be seen from the above description, the electronic device provided by the embodiments of the present application realizes unified interface management by constructing an interface middleware service framework and implementing a protocol recognition engine using a type script language. It innovatively designs class attribute and class method definition instructions and integrates identity token verification and data formatting functions. The system ensures data security through identity identification matching and permission verification, establishes a reliable data communication link using network sockets, and achieves precise conversion of front-end and back-end data through a data formatting unit. This method breaks through the limitations of traditional front-end and back-end architectures and provides an efficient and secure data processing solution for modern web applications.

[0198] In another embodiment, the front-end and back-end separated data processing device can be configured separately from the central processing unit 9100. For example, the front-end and back-end separated data processing device can be configured as a chip connected to the central processing unit 9100, and the functions of the front-end and back-end separated data processing method are realized through the control of the central processing unit.

[0199] As Figure 9 shown, the electronic device 9600 may further include: a communication module 9110, an input unit 9120, an audio processor 9130, a display 9160, and a power supply 9170. It should be noted that the electronic device 9600 does not necessarily have to include Figure 9 all the components shown in Figure 9 ; in addition, the electronic device 9600 may further include

[0200] components not shown in Figure 9 ; reference may be made to the prior art.

[0200] As Figure 9 shown, the central processing unit 9100, sometimes also referred to as a controller or operation control, may include a microprocessor or other processor device and / or logic device. The central processing unit 9100 receives inputs and controls the operations of the various components of the electronic device 9600.

[0201] Among them, the memory 9140, for example, may be one or more of a buffer, a flash memory, a hard drive, a removable medium, a volatile memory, a non-volatile memory, or other suitable devices. It can store the above information related to failures, and can also store programs for executing relevant information. And the central processing unit 9100 can execute the program stored in the memory 9140 to achieve information storage or processing, etc.

[0202] The input unit 9120 provides inputs to the central processing unit 9100. The input unit 9120 is, for example, a key or a touch input device. The power supply 9170 is used to supply power to the electronic device 9600. The display 9160 is used for displaying display objects such as images and texts. The display may be, for example, an LCD display, but is not limited thereto.

[0203] The memory 9140 can be a solid-state memory, such as, for example, a read-only memory (ROM), a random access memory (RAM), a SIM card, etc. It can also be a memory that stores information even when power is off, can be selectively erased and has more data stored. Examples of such a memory are sometimes referred to as EPROMs, etc. The memory 9140 can also be some other type of device. The memory 9140 includes a buffer memory 9141 (sometimes referred to as a buffer). The memory 9140 can include an application / function storage section 9142 for storing application programs and function programs or the processes for operating the electronic device 9600 by the central processing unit 9100.

[0204] The memory 9140 can also include a data storage section 9143 for storing data, such as contacts, digital data, pictures, sounds, and / or any other data used by the electronic device. The driver storage section 9144 of the memory 9140 can include various drivers of the electronic device for communication functions and / or for performing other functions of the electronic device (such as a messaging application, an address book application, etc.).

[0205] The communication module 9110 is a transmitter / receiver that transmits and receives signals via the antenna 9111. The communication module 9110 (transmitter / receiver) is coupled to the central processing unit 9100 to provide input signals and receive output signals, which can be the same as in the case of a conventional mobile communication terminal.

[0206] Based on different communication technologies, multiple communication modules 9110 can be provided in the same electronic device, such as a cellular network module, a Bluetooth module, and / or a wireless local area network module, etc. The communication module 9110 (transmitter / receiver) is also coupled to the speaker 9131 and the microphone 9132 via the audio processor 9130 to provide an audio output via the speaker 9131 and receive an audio input from the microphone 9132, thereby implementing normal telecommunication functions. The audio processor 9130 can include any suitable buffer, decoder, amplifier, etc. Additionally, the audio processor 9130 is also coupled to the central processing unit 9100, so that it is possible to record on the device via the microphone 9132 and play the sounds stored on the device via the speaker 9131.

[0207] Embodiments of the present application also provide a computer-readable storage medium capable of implementing all steps of the front-end and back-end separation data processing method where the execution entity in the above embodiments is a server or a client. A computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, all steps of the front-end and back-end separation data processing method where the execution entity in the above embodiments is a server or a client are implemented. For example, when the processor executes the computer program, the following steps are implemented:

[0208] Step S101: Build an interface middle platform service framework, generate a protocol recognition engine by loading an application identifier list through a type script language, write class attribute definition instructions and class method definition instructions into the protocol recognition engine, write a request parameter format and a response data format into the class attribute definition instructions, write a request interception rule and a response processing rule into the class method definition instructions, write an identity token verification unit into the request interception rule, and write a data formatting unit into the response processing rule;

[0209] Step S102: Receive login authentication data sent by a user interface interaction program, extract identity identification information from the login authentication data, match the identity identification information with a target back-end service through the protocol recognition engine, send an identity authentication request to the target back-end service based on the class method definition instructions, receive authentication data returned by the target back-end service, convert the authentication data into an identity verification code, and establish a data communication link based on the application identifier list;

[0210] Step S103: Listen for a design operation instruction received on the data communication link, verify the operation permission according to the identity verification code, combine the identity identification information and the design operation instruction to generate a server data packet, establish a network socket connection to send the server data packet to a document database, receive a response data packet returned by the document database, pass the response data packet into the data formatting unit to be converted into an interface data structure, and send the interface data structure to the user interface interaction program through the data communication link.

[0211] As can be seen from the above description, the computer-readable storage medium provided by the embodiments of the present application realizes unified interface management by building an interface middle platform service framework and implementing a protocol recognition engine using a type script language. Class attribute and class method definition instructions are innovatively designed, integrating the functions of identity token verification and data formatting. The system ensures data security through identity identification matching and permission verification, establishes a reliable data communication link using a network socket, and realizes accurate conversion of front-end and back-end data through a data formatting unit. This method breaks through the limitations of traditional front-end and back-end architectures and provides an efficient and secure data processing solution for modern web applications.

[0212] An embodiment of the present application also provides a computer program product that can implement all steps of the front-end and back-end separation data processing method in which the execution subject in the above embodiment is a server or a client. When the computer program / instructions are executed by a processor, the steps of the front-end and back-end separation data processing method are implemented. For example, the computer program / instructions implement the following steps:

[0213] Step S101: Build an interface middleware service framework, generate a protocol recognition engine by loading an application identification list through a type script language, write class attribute definition instructions and class method definition instructions into the protocol recognition engine, write a request parameter format and a response data format into the class attribute definition instructions, write a request interception rule and a response processing rule into the class method definition instructions, write an identity token verification unit into the request interception rule, and write a data formatting unit into the response processing rule;

[0214] Step S102: Receive login authentication data sent by a user interface interaction program, extract identity identification information from the login authentication data, match the identity identification information to a target back-end service through the protocol recognition engine, send an identity authentication request to the target back-end service based on the class method definition instructions, receive authentication data returned by the target back-end service, convert the authentication data into an identity verification code, and establish a data communication link based on the application identification list;

[0215] Step S103: Listen to the data communication link to receive a design operation instruction, verify the operation permission according to the identity verification code, combine the identity identification information and the design operation instruction to generate a server data packet, establish a network socket connection to send the server data packet to a document database, receive a response data packet returned by the document database, pass the response data packet into the data formatting unit to be converted into an interface data structure, and send the interface data structure to the user interface interaction program through the data communication link.

[0216] As can be seen from the above description, the computer program product provided by the embodiment of the present application realizes unified interface management by building an interface middleware service framework and adopting a type script language to implement a protocol recognition engine. It innovatively designs class attribute and class method definition instructions and integrates identity token verification and data formatting functions. The system ensures data security through identity identification matching and permission verification, establishes a reliable data communication link using network sockets, and realizes accurate conversion of front-end and back-end data through a data formatting unit. This method breaks through the limitations of traditional front-end and back-end architectures and provides an efficient and secure data processing solution for modern web applications.

[0217] Those skilled in the art should understand that the embodiments of the present invention can be provided as a method, an apparatus, or a computer program product. Therefore, the present invention can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0218] The present invention is described with reference to the flowcharts and / or block diagrams of methods, devices (apparatuses), and computer program products according to the embodiments of the present invention. It should be understood that each flow and / or block in the flowchart and / or block diagram, as well as the combination of flows and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, such that the instructions executed by the processor of the computer or other programmable data processing devices produce a device for implementing the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.

[0219] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, such that the instructions stored in the computer-readable memory produce a manufactured article including an instruction device that implements the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.

[0220] These computer program instructions can also be loaded onto a computer or other programmable data processing device, such that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process, so that the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.

[0221] Specific embodiments are applied in the present invention to elaborate on the principles and implementation manners of the present invention. The descriptions of the above embodiments are only used to help understand the method of the present invention and its core idea; at the same time, for those of ordinary skill in the art, according to the idea of the present invention, there will be changes in the specific implementation manners and application scopes. In summary, the content of this specification should not be construed as a limitation to the present invention.

Claims

1. A data processing method with front-end and back-end separation, characterized in that, The method includes: Construct an interface middle platform service framework, generate a protocol recognition engine by loading an application identification list through a type script language, write class attribute definition instructions and class method definition instructions into the protocol recognition engine, write request parameter formats and response data formats into the class attribute definition instructions, write request interception rules and response processing rules into the class method definition instructions, write an identity token verification unit into the request interception rules, and write a data formatting unit into the response processing rules; Receive login authentication data sent by a user interface interaction program, extract identity identification information from the login authentication data, match the identity identification information with a target backend service through the protocol recognition engine, send an identity authentication request to the target backend service based on the class method definition instructions, receive authentication data returned by the target backend service, convert the authentication data into an identity verification code, and establish a data communication link based on the application identification list; Monitor the data communication link to receive design operation instructions, verify operation permissions according to the identity verification code, combine the identity identification information and the design operation instructions to generate a server data packet, establish a network socket connection to send the server data packet to a document database, receive a response data packet returned by the document database, pass the response data packet into the data formatting unit to be converted into an interface data structure, and send the interface data structure to the user interface interaction program through the data communication link.

2. The front-end and back-end separated data processing method according to claim 1, wherein The constructing of the interface middle platform service framework and generating the protocol recognition engine by loading the application identification list through the type script language includes: Call a type script language compiler to parse a preset data interface configuration file, extract a system identification, a service address, an authentication method, and an interface protocol from the data interface configuration file, establish a mapping relationship between the system identification and the service address to generate an application identification list, and construct a system routing table based on the application identification list; Read an interface protocol template library, select a protocol template matching the authentication method from the interface protocol template library, write the protocol template into the protocol recognition engine, configure routing rules of the protocol recognition engine based on the system routing table, and write the routing rules into a protocol parser.

3. The front-end and back-end separated data processing method according to claim 1, characterized in that The writing of the class attribute definition instructions and the class method definition instructions into the protocol recognition engine, the writing of the request parameter formats and the response data formats into the class attribute definition instructions, the writing of the request interception rules and the response processing rules into the class method definition instructions, the writing of the identity token verification unit into the request interception rules, and the writing of the data formatting unit into the response processing rules includes: Parse an interface description specification document to obtain a data structure template, extract request parameter definitions and response data definitions from the data structure template, write the request parameter definitions and the response data definitions into the class attribute definition instructions, read interface security configuration information to obtain an identity token format and data verification rules, construct a token verification unit based on the identity token format, write the token verification unit into the request interception rules, and write the request interception rules into the class method definition instructions; Read the data type mapping table from the data conversion rule library, construct a data serialization module and a deserialization module based on the data type mapping table, combine the data serialization module and the deserialization module to generate a data formatting unit, write the data formatting unit into the response processing rule, write the response processing rule into the class method definition instruction, and write the class attribute definition instruction and the class method definition instruction into the protocol recognition engine.

4. The data processing method with front-end and back-end separation according to claim 1, wherein Receiving the login authentication data sent by the user interface interaction program, extracting the identity identification information from the login authentication data, and matching the identity identification information with the target backend service through the protocol recognition engine, including: Read the authentication request data packet from the communication port buffer, parse the login authentication data from the authentication request data packet, parse the login authentication data according to the preset data structure specification, extract the user name, password hash value and login timestamp in the login authentication data, and combine the user name and the password hash value to generate the identity identification information; Pass the identity identification information into the protocol recognition engine, find the system identification matching the identity identification information based on the system routing table in the protocol recognition engine, obtain the service address corresponding to the system identification, mark the service address as the target backend service, and establish a network connection with the target backend service.

5. The front-end and back-end separated data processing method according to claim 1, characterized in that, Sending an identity authentication request to the target backend service based on the class method definition instruction, receiving the authentication data returned by the target backend service, and converting the authentication data into an identity verification code, and establishing a data communication link based on the application identification list, including: Read the authentication request template from the class method definition instruction, fill the identity identification information into the authentication request template to generate an identity authentication request, perform format conversion on the identity authentication request through the data serialization module in the protocol recognition engine, send the converted identity authentication request to the target backend service, receive the authentication data returned by the target backend service, parse the authentication data through the data deserialization module in the protocol recognition engine, extract the token information in the authentication data, and calculate the identity verification code by using the hash algorithm for the token information; Obtain the system identification and service address of the target backend service from the application identification list, create a communication session object based on the system identification, write the service address and the identity verification code into the communication session object, establish a long connection based on the TCP protocol as the data communication link, and bind the data communication link to the communication session object.

6. The front-end and back-end separated data processing method according to claim 5, characterized in that, Listening to the data communication link to receive the design operation instruction, verifying the operation permission according to the identity verification code, combining the identity identification information and the design operation instruction to generate a server data packet, and establishing a network socket connection to send the server data packet to the document database, including: Start the communication link listener to obtain the status of the data communication link, read the operation request data stream from the data communication link, parse the operation request data stream according to the preset data frame format to extract the design operation instruction, obtain the identity verification code in the communication session object, pass the identity verification code into the permission verification module for operation permission verification, read the identity identification information in the communication session object, and encapsulate the identity identification information and the design operation instruction according to the preset data packet format to generate a server data packet; Create a network socket object to set the data transmission buffer size, read the access address and port number of the document database from the configuration file, write the access address and the port number into the network socket object, establish a TCP connection with the document database through the network socket object, and write the server data packet into the data transmission buffer and send it to the document database.

7. The front-end and back-end separated data processing method according to claim 6, wherein Receiving the response data packet returned by the document database, passing the response data packet into the data formatting unit to be converted into an interface data structure, and sending the interface data structure to the user interface interaction program through the data communication link, including: Read the data stream from the receive buffer of the network socket object, parse the data stream according to the preset data packet format to extract the response data packet, pass the response data packet into the data formatting unit, parse the data structure of the response data packet through the data deserialization module in the data formatting unit, convert the parsed data into an interface data structure based on the preset data mapping rules, and perform data integrity verification on the interface data structure; Read the session identifier in the communication session object, combine the session identifier and the interface data structure to generate a transmission data packet, send the transmission data packet to the user interface interaction program through the data communication link, monitor the sending status of the transmission data packet, and record the data transmission log.

8. A data processing device with front-end and back-end separation, characterized in that, The device includes: The middle platform architecture building module is used to build an interface middle platform service framework, generate a protocol recognition engine by loading the application identifier list through the type script language, write the class attribute definition instruction and the class method definition instruction into the protocol recognition engine, write the request parameter format and the response data format into the class attribute definition instruction, write the request interception rule and the response processing rule into the class method definition instruction, write the identity token verification unit into the request interception rule, and write the data formatting unit into the response processing rule; The identity authentication module is used to receive the login authentication data sent by the user interface interaction program, extract the identity identification information from the login authentication data, match the identity identification information with the target backend service through the protocol recognition engine, send an identity authentication request to the target backend service based on the class method definition instruction, receive the authentication data returned by the target backend service, convert the authentication data into an identity verification code, and establish a data communication link based on the application identifier list; The data transmission module is used to monitor the data communication link to receive design operation instructions, verify the operation authority according to the identity verification code, combine the identity identification information and the design operation instructions to generate a server data packet, establish a network socket connection to send the server data packet to the document database, receive the response data packet returned by the document database, pass the response data packet into the data formatting unit to be converted into an interface data structure, and send the interface data structure to the user interface interaction program through the data communication link.

9. An electronic device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the front-end and back-end separated data processing method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the front-end and back-end separated data processing method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Method and system for simulation detection of automated malicious code

    CN108363922A

  • Data processing method and system and related equipment

    CN113220772A