Front end and rear end separated data processing method and device

By building an interface middle platform service framework and integrating identity token checksum data formatting functions, the problems of poor scalability, security risks and data inconsistency in traditional front- and back-end data processing methods are solved, and efficient and secure data processing and unification are achieved. interface management.

CN119449487AActive Publication Date: 2025-02-14KAIYUN LIANCHUANG (BEIJING) TECH CO LTD

Patent Information

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

AI Technical Summary

Technical Problem

Traditional front-end and back-end data processing methods have poor system scalability, high maintenance costs, lack of unified specifications for identity authentication and data format conversion, security risks and data inconsistency, and insufficient permission control and data formatting.

Method used

By building an interface middle platform service framework, using a type script language to load the application identification list generation protocol identification engine to achieve unified interface management. Design class attributes and class method definition instructions, integrate identity token checksum data formatting functions, ensure data security through identity identification matching and permission verification, and establish a reliable data communication link using network sockets.

Benefits of technology

It realizes efficient and secure data processing, breaks through the limitations of traditional front- and back-end architectures, improves the performance and maintainability of the system, and provides a unified interface management and data processing solution for modern web applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119449487A_ABST
    Figure CN119449487A_ABST
Patent Text Reader

Abstract

According to the front-end and rear-end separated data processing method and device provided by the embodiment of the invention, the protocol recognition engine is realized by constructing the interface platform service framework and adopting the type script language, so that unified interface management is realized. Class attributes and class method definition instructions are innovatively designed, and identity token verification and data formatting functions are integrated. The system ensures data security through identity label matching and authority verification, establishes a reliable data communication link by using a network socket, and realizes accurate conversion of front-end and rear-end data through a data formatting unit. According to the method, the limitation of a traditional front-end and back-end framework is broken through, and an efficient and safe data processing solution is provided for modern web application.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing, and in particular to a method and device for data processing with 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 unified specifications when processing identity authentication and data format conversion, which is prone to security risks and data inconsistency. The system is also relatively simple in terms of interface protocol identification and data communication, making it difficult to adapt to complex business needs.

[0003] At the same time, the existing system has obvious deficiencies in authority control and data formatting. Traditional methods usually adopt simple authentication mechanisms, lack fine-grained authority management, and lack flexibility in the data format conversion process. The system is also relatively mechanical in data communication and response processing, and fails to fully utilize the advantages of modern front-end technology.

[0004] In addition, existing technologies also have limitations in the construction of the interface middle-end service framework and protocol identification. There is a lack of unified type definition and method encapsulation, the interface adaptation cost is high, and the configurability of the data processing flow is limited. Solving these problems is of great significance to improving the performance and maintainability of the front-end and back-end separation system. Summary of the invention

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

[0006] In order to solve at least one of the above problems, the present application provides the following technical solutions: In a first aspect, the present application provides a data processing method with front-end and back-end separation, comprising: Construct an interface middle platform service framework, load the application identification list through the type script language to generate a protocol identification engine, write the class attribute definition instruction and the class method definition instruction into the protocol identification 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; Receive login authentication data sent by the user interface interaction program, extract identity information from the login authentication data, match the identity 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 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; The data communication link is monitored to receive design operation instructions, the operation authority is verified according to the identity verification code, the identity identification information and the design operation instruction are combined to generate a server data packet, a network socket connection is established to send the server data packet to the document database, a response data packet returned by the document database is received, the response data packet is passed to the data formatting unit to be converted into an interface data structure, and the interface data structure is sent to the user interface interaction program via the data communication link.

[0007] Furthermore, the construction of the interface middle platform service framework, loading the application identification list through the type script language to generate a protocol identification engine, includes: Calling a typescript language compiler to parse a preset data interface configuration file, extracting a system identifier, a service address, an authentication method, and an interface protocol from the data interface configuration file, establishing a mapping relationship between the system identifier and the service address to generate an application identifier list, and constructing a system routing table based on the application identifier 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 a protocol identification engine, configure routing rules of the protocol identification engine based on the system routing table, and write the routing rules into a protocol parser.

[0008] Further, the step of writing the class attribute definition instruction and the class method definition instruction into the protocol identification 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 comprises: Parse the interface description specification document to obtain a data structure template, extract the request parameter definition and the 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, build 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; A data type mapping table is read from a data conversion rule library, a data serialization module and a deserialization module are constructed based on the data type mapping table, the data serialization module and the deserialization module are combined to generate a data formatting unit, the data formatting unit is written into a response processing rule, the response processing rule is written into a class method definition instruction, and the class attribute definition instruction and the class method definition instruction are written into the protocol identification engine.

[0009] Further, the receiving of login authentication data sent by the user interface interaction program, extracting identity information from the login authentication data, and matching the identity information with a target backend service through the protocol recognition engine includes: Read the communication port buffer to obtain an authentication request data packet, parse the authentication request data packet to obtain login authentication data, parse the login authentication data according to a 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 information; The identity information is passed into the protocol identification engine, and a system identifier matching the identity information is searched based on a system routing table in the protocol identification engine, a service address corresponding to the system identifier is obtained, the service address is marked as a target backend service, and a network connection with the target backend service is established.

[0010] Further, sending an identity authentication request to the target backend service based on the class method definition instruction, receiving 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 identification list include: Reading an authentication request template from the class method definition instruction, filling the identity identification information into the authentication request template to generate an identity authentication request, converting the format of the identity authentication request through the data serialization module in the protocol identification engine, sending the converted identity authentication request to the target backend service, receiving the authentication data returned by the target backend service, parsing the authentication data through the data deserialization module in the protocol identification engine, extracting the token information in the authentication data, and calculating the token information through a hash algorithm to obtain an identity verification code; The system identifier and service address of the target backend service are obtained from the application identifier list, a communication session object is created based on the system identifier, the service address and the identity verification code are written into the communication session object, a long connection based on the TCP protocol is established as a data communication link, and the data communication link is bound to the communication session object.

[0011] Further, the monitoring of the data communication link to receive the design operation instruction, verifying the operation authority according to the identity verification code, combining the identity identification information and the design operation instruction to generate a server data packet, establishing a network socket connection to send the server data packet to the document database, includes: Start the 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 to the authority verification module for operation authority 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; 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, write the server data packet into the data transmission buffer and send it to the document database.

[0012] Further, the receiving of the response data packet returned by the document database, transferring the response data packet to the data formatting unit to convert it into an interface data structure, and sending the interface data structure to the user interface interaction program through the data communication link includes: Reading a data stream from a receiving buffer of the network socket object, parsing the data stream according to a preset data packet format to extract a response data packet, transferring the response data packet to the data formatting unit, parsing a data structure of the response data packet through a data deserialization module in the data formatting unit, converting the parsed data into an interface data structure based on a preset data mapping rule, and performing a data integrity check 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.

[0013] In a second aspect, the present application provides a data processing device with front-end and back-end separation, comprising: A middle platform architecture building module is used to build an interface middle platform service framework, load an application identification list through a type script language to generate a protocol identification engine, write class attribute definition instructions and class method definition instructions into the protocol identification 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; An identity authentication module is used to receive login authentication data sent by the 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 instruction, 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; The data transmission module is used to monitor the data communication link to receive the design operation instruction, verify the operation authority 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 to 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.

[0014] In a third aspect, the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the data processing method with front-end and back-end separation when executing the program.

[0015] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the data processing method with front-end and back-end separation.

[0016] In a fifth aspect, the present application provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the steps of the data processing method with front-end and back-end separation.

[0017] It can be seen from the above technical solution that the present application provides a data processing method and device with separated front-end and back-end, which realizes unified interface management by constructing an interface middle-end service framework and using a type scripting language to implement a protocol identification engine. 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 matching and permission verification, uses network sockets to establish a reliable data communication link, 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

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

[0019] Figure 1 This is one of the flow charts of the data processing method with front-end and back-end separation in the embodiment of the present application; Figure 2 This is a second flow chart of the data processing method with front-end and back-end separation in an embodiment of the present application; Figure 3 This is a third flow chart of the data processing method with front-end and back-end separation in an embodiment of the present application; Figure 4 This is a fourth flow chart of the data processing method with front-end and back-end separation in an embodiment of the present application; Figure 5 This is a fifth flow chart of the data processing method with front-end and back-end separation in an embodiment of the present application; Figure 6 This is a sixth flow chart of the data processing method with front-end and back-end separation in an embodiment of the present application; Figure 7 This is the seventh flow chart of the data processing method with front-end and back-end separation in the embodiment of the present application; Figure 8 A structural diagram of a data processing device with front-end and back-end separation in an embodiment of the present application; Fig. 9 It is a schematic diagram of the structure of an electronic device in an embodiment of the present application.

[0020] Reference numerals: 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 DESCRIPTION

[0021] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0022] The acquisition, storage, use, and processing of data in the technical solution of this application comply with the relevant provisions of national laws and regulations.

[0023] Taking into account the problems existing in the prior art, the present application provides a data processing method and device with separated front-end and back-end, which realizes unified interface management by constructing an interface middle-end service framework and using a type scripting language to implement a protocol identification engine. 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 matching and permission verification, uses network sockets to establish a reliable data communication link, 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.

[0024] 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 data processing method with front-end and back-end separation. Figure 1 The data processing method with front-end and back-end separation specifically includes the following contents: Step S101: construct an interface middle platform service framework, load an application identification list through a type script language to generate a protocol identification engine, write a class attribute definition instruction and a class method definition instruction into the protocol identification engine, write a request parameter format and a response data format into the class attribute definition instruction, write a request interception rule and a response processing rule into the class method definition instruction, write an identity token verification unit into the request interception rule, and write a data formatting unit into the response processing rule; Optionally, this embodiment provides a TypeScript-based interface middle-end service framework construction solution, which is mainly used in the front-end and back-end data interaction scenarios of enterprise-level distributed systems. First, a multi-layer architecture interface middle-end service framework is constructed, and the interface service is divided into a protocol layer, a business layer, and a data layer using a layered design. The protocol layer is responsible for request parsing and response encapsulation, the business layer handles specific business logic, and the data layer is responsible for data persistence and cache management. The life cycle of components at each layer is managed by the dependency injection container to achieve loose coupling between components.

[0025] During the construction of the protocol identification engine, the predefined application identification list is first loaded through the TypeScript compiler. The application identification list is stored in a hierarchical JSON structure. The top level 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. It also contains an interface configuration node, which defines all interface information supported by the 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 during the compilation stage.

[0026] 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. Parameter decorators are used to define validation rules for request parameters, including data type verification, value range restrictions, format verification, etc. Through the reflection mechanism, these validation rules are attached to the prototype chain of the class as metadata. The response data format is also defined by decorators, including status code mapping, data structure conversion rules, error code definition, etc.

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

[0028] The response data format adopts a templated design. Define a set of basic response templates, including success response, error response, paging response, etc. Each template contains fixed data structure fields, such as status code, message, data body, etc. Through the combination mode, customized response formats can be assembled according to different business scenarios. Response templates support nested structures and can handle complex data relationships.

[0029] Class method definitions use a middleware chain processing mode. Each interface method is wrapped in a middleware chain, and the middleware is executed in a predefined order. Standard middleware includes logging, performance monitoring, exception handling, etc. The middleware chain is implemented through asynchronous iterators to support asynchronous processing. Each middleware can access the request context to read and modify data.

[0030] The request interception rules implement a multi-layer filtering mechanism. The first is the global filter, which handles common logic such as cross-domain requests, compression and decompression; then the security filter, which performs identity authentication and permission verification; and finally the business filter, which performs specific business rule checks. The filter is configured through decorators, and supports precise matching according to conditions such as URL path, request method, and client type.

[0031] The identity token verification unit uses a multi-factor authentication mechanism. First, the Authorization header is parsed to obtain the token information. Bearer Token and Basic Auth are supported. After the token is parsed, the signature is verified and asymmetric encryption is used to ensure data integrity. Then the timeliness of the token is checked, including the issuance time and expiration time. Finally, the permission statement in the token payload is verified to ensure that the requester has sufficient access rights.

[0032] The data formatting unit adopts the adapter mode and supports conversion between multiple data formats. The input adapter is responsible for converting request data of 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 adapter is created through the factory mode and automatically selects the appropriate converter according to the Content-Type. It supports common data formats such as JSON, XML, and Protocol Buffers.

[0033] This embodiment significantly improves the development efficiency and maintainability of the front-end and back-end separation system through a complete interface service framework. The type-safe interface definition reduces runtime errors, the decorator pattern simplifies the interface configuration process, and the middleware chain provides a flexible expansion mechanism. In actual applications, the framework has successfully supported the interface service management of multiple large distributed systems, effectively improving the stability and scalability of the system.

[0034] Step S102: receiving login authentication data sent by the user interface interaction program, extracting identity information from the login authentication data, matching the identity information with the target backend service through the protocol recognition engine, sending an identity authentication request to the target backend service based on the class method definition instruction, receiving 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 identification list; Optionally, this embodiment provides a complete user authentication and communication link establishment mechanism, which is mainly used in identity authentication and secure communication scenarios of distributed systems. First, the login authentication data is received through the user interface interaction program, and the 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 user name, password hash value, login timestamp, device identification, etc., and the security of sensitive information is ensured through multi-layer encryption.

[0035] The extraction process of identity information adopts a step-by-step parsing strategy. First, the authentication data is decrypted using the asymmetric encryption algorithm RSA to ensure the security of the transmission process. Then, the data integrity check is performed to verify whether the data has been tampered with through the checksum algorithm. Then the data structure is parsed to extract user identity-related fields, including user identifier, organization code, role information, etc. Finally, the data is normalized and the data format is unified for subsequent processing.

[0036] The protocol identification engine adopts a multi-level cache matching strategy. First, the service mapping relationship corresponding to the identity identifier is searched in the local cache to improve the matching efficiency of common services. If the local cache does not hit, the distributed cache layer is accessed for search. Finally, if no matching record is found, the target backend service is searched in the service registry through the service discovery mechanism. The matching process supports fuzzy matching and weight matching to ensure that the most suitable target service is selected from multiple candidate services.

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

[0038] 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. You can choose the appropriate authentication method according to the security level requirements.

[0039] The authentication data is processed in a chain of responsibility mode. 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 and session identifier. Finally, an identity verification code is generated. A secure hash algorithm is used to combine user identity information, timestamp, random factors and other information to calculate a unique verification code.

[0040] The establishment of data communication links is based on the TCP long connection mechanism. First, obtain the service connection parameters from the application identification list, including the service address, port number, protocol type, etc. Then create a Socket connection pool and pre-establish multiple connection instances to support connection reuse and load balancing. Maintain the connection status through the heartbeat mechanism, regularly check the validity of the connection, and handle disconnected connections in a timely manner.

[0041] The connection management adopts a state machine design, which defines multiple connection states: initialization, authenticating, connected, disconnected, etc. The state transition is event-driven and supports asynchronous state migration. An automatic reconnection mechanism is implemented, and when a disconnection is detected, it automatically attempts to reestablish the connection.

[0042] This embodiment effectively solves the identity authentication and secure communication problems in distributed systems through a complete authentication process and a reliable communication mechanism. The multi-level cache service matching mechanism improves the efficiency of service discovery, two-way authentication ensures the identity of both parties in communication, 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 distributed systems, significantly improving the security and availability of the system.

[0043] The technical solution of this embodiment shows significant advantages in enterprise-level applications, especially in processing high-concurrency authentication requests and maintaining a large number of long connections. Through reasonable resource scheduling and state management, the stable operation of the system is guaranteed. At the same time, the flexible authentication mechanism and scalable communication framework provide a good foundation for subsequent upgrades and functional expansions of the system.

[0044] Step S103: 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 instruction to generate a server data packet, establish a network socket connection to send the server data packet to the document database, receive a response data packet returned by the document database, pass the response data packet to 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.

[0045] Optionally, this embodiment provides a complete data operation processing flow, which is mainly used in real-time collaborative scenarios in distributed design systems. The data communication link monitoring adopts an event-driven mode and realizes efficient message processing through an asynchronous IO multiplexing mechanism. The listener maintains an event queue to prioritize the received design operation instructions to ensure priority processing of key operations.

[0046] Operation permission verification uses a multi-dimensional verification mechanism. First, user identity verification is performed through an identity verification code. The verification code is generated using a time-sensitive hash algorithm and contains information such as user ID, timestamp, and random salt value. Then, an operation-level permission check is performed to determine whether the user has the permission to perform a specific design operation based on the user role and resource access matrix. Permission control supports fine-grained configuration, which can be accurate to specific design objects and operation types.

[0047] The design of the operation instruction processing adopts the command mode. Each operation instruction is encapsulated as an independent command object, which contains information such as operation type, target object, parameter list, etc. Multiple concurrent operations are managed through command queues, supporting sequential execution, parallel execution, and conditional execution of operations. An operation rollback mechanism is implemented, which can automatically roll back to the previous state when the operation fails.

[0048] The generation of server data packets adopts a layered encapsulation strategy. First, the data packet header is constructed, which contains control information such as protocol version, message type, and sequence number. Then the business data layer is encapsulated to serialize the identity information and design operation instructions into binary format. Finally, a checksum layer is added to calculate the data checksum through the CRC algorithm to ensure the integrity of data transmission.

[0049] The network socket connection pool uses a dynamic scaling mechanism. The size of the connection pool is dynamically adjusted according to the current concurrent request volume and system load. A connection reuse strategy is implemented to avoid frequent connection establishment and disconnection operations. The connection pool supports failover and automatically switches to a backup connection when a connection anomaly is detected.

[0050] The document database access adopts asynchronous operation mode. Data packet sending uses non-blocking IO to improve the concurrent processing capability of the system. Request timeout control is implemented, and the timeout processing logic is triggered when the response time exceeds the preset threshold. Batch operation optimization is supported, and multiple related design operations are merged and processed to reduce the number of database accesses.

[0051] The response data processing adopts pipeline processing mode. First, the data packet integrity verification is performed to check whether the response data is complete and whether it has been tampered with. Then the response status code is parsed and the corresponding processing logic is executed according to different status codes. For successful responses, the core data is extracted for subsequent processing; for error responses, friendly error prompt information is generated.

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

[0053] The generation of interface data structure adopts template engine mechanism. Data templates of various interface components are predefined, and appropriate templates can be selected according to different display requirements. Data binding configuration is supported, and the mapping relationship between data fields and interface elements can be flexibly set. Data caching mechanism is implemented to locally cache frequently accessed data to improve interface response speed.

[0054] This embodiment effectively solves the problem of real-time data interaction in distributed design systems through a complete data processing flow. The event-driven message processing mechanism improves the system's responsiveness, fine-grained permission control ensures operational security, and the asynchronous database access mode improves the system's concurrency performance. In actual applications, this solution has successfully supported multi-person collaborative design scenarios, significantly improving design efficiency and user experience.

[0055] The technical solution of this embodiment is particularly suitable for collaborative work in large-scale design projects. Through reasonable data processing mechanisms and optimization strategies, stable performance and reliable data consistency can be maintained even in complex design operations and a large number of concurrent accesses. At the same time, flexible data conversion and display mechanisms provide a unified data interaction foundation for different types of design tools and interfaces.

[0056] From the above description, it can be seen that the front-end and back-end separated data processing method provided in the embodiment of the present application can realize unified interface management by building an interface middle-end service framework and implementing a protocol identification engine using a type scripting language. 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 matching and permission verification, uses network sockets to establish a reliable data communication link, 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.

[0057] In one embodiment of the data processing method with front-end and back-end separation of the present application, see Figure 2 , and can also include the following: Step S201: calling a type script language compiler to parse a preset data interface configuration file, extracting a system identifier, a service address, an authentication method, and an interface protocol from the data interface configuration file, establishing a mapping relationship between the system identifier and the service address to generate an application identifier list, and constructing a system routing table based on the application identifier list; Step S202: read the 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 identification engine, configure the routing rules of the protocol identification engine based on the system routing table, and write the routing rules into a protocol parser.

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

[0059] 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, syntax analysis is performed to build an abstract syntax tree to represent the hierarchical structure of the configuration. During the syntax analysis process, type checking is used to ensure the type correctness of the configuration items. For complex configuration items, variable references and macro replacement are supported to improve the reusability of the configuration.

[0060] The mapping relationship between system identifier and service address adopts a multi-level mapping structure. The first level is the system dimension mapping, which maps the system identifier to the corresponding service cluster; the second level is the cluster dimension mapping, which maps the service cluster to the specific service node; the third level is the node dimension mapping, which contains the detailed configuration information of the node. The mapping process supports dynamic updates. When the service node changes, the mapping relationship can be updated in real time.

[0061] The generation of the application identification list adopts a tree structure design. The root node of the tree represents the entire application system, the middle node represents different service domains, and the leaf node represents a specific service instance. The tree structure can clearly represent the hierarchical relationship and dependency relationship between services. The list generation process includes service dependency analysis to ensure that services are started and initialized in the correct order.

[0062] The system routing table is constructed using a prefix tree (Trie tree) data structure. The URL path of the service is decomposed into path segments, and a path prefix tree is constructed to support efficient routing matching. The routing table contains two parts: static routing and dynamic routing. Static routing is used to process 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.

[0063] The design of the interface protocol template library adopts the componentization concept. Each authentication method corresponds to a set of basic templates, including standard components such as authentication process, data format, and error handling. Templates support inheritance and combination, and special templates for specific scenarios can be created by extending basic templates. The template library implements a version management mechanism and supports template upgrades and rollbacks.

[0064] The selection process of the protocol template uses a decision tree algorithm. Based on the characteristics of multiple dimensions such as authentication method, security level, and performance requirements, the 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 will be cached to improve the selection efficiency in similar scenarios.

[0065] The configuration of the protocol identification engine adopts pipeline processing mode. Multiple processing components are connected in series through pipeline configuration, including request parsing, parameter verification, protocol conversion, etc. Each component is pluggable and supports dynamic adjustment of the processing flow according to demand. The engine configuration supports hot update, and the configuration can be updated without stopping the machine.

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

[0067] This embodiment effectively solves the service governance problem in distributed systems through a complete configuration parsing and routing management mechanism. The tree-structured application identification list provides a clear service view, the prefix tree routing table implements 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 microservice architecture.

[0068] These improvements enable development teams to more easily manage and maintain complex microservice systems, especially in scenarios where the number of services is growing rapidly. Through automated configuration management and intelligent routing distribution, operation and maintenance costs are significantly reduced and system reliability is improved.

[0069] In one embodiment of the data processing method with front-end and back-end separation of the present application, see Figure 3 , and can also include the following: Step S301: Parse the interface description specification document to obtain a data structure template, extract the request parameter definition and the 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, build 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; 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 a response processing rule, write the response processing rule into a class method definition instruction, and write the class attribute definition instruction and the class method definition instruction into the protocol identification engine.

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

[0071] The data structure template is extracted using a recursive traversal strategy. For complex data structures, all field definitions are traversed using a depth-first search algorithm, including basic data types, composite types, enumeration types, etc. For each field, its name, type, whether it is required, default value, value range, and other attribute information are extracted. At the same time, the dependencies between fields are processed to build a complete data structure dependency graph.

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

[0073] The implementation of response data definition adopts template design. A series of response data templates are predefined, including common scenarios such as successful response, error response, and paging response. Each template contains standard fields such as status code, message, and data body, and supports flexible addition of extended fields. Through the combination mode, customized response structures can be assembled according to different business needs.

[0074] The processing of interface security configuration 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 field, signature algorithm, etc. Data verification rules include security policies such as request frequency limit, IP whitelist, signature verification, etc.

[0075] The token verification unit is constructed using the responsibility chain model. The verification process is divided into multiple links: token parsing, format verification, signature verification, expiration check, permission verification, etc. Each link is encapsulated independently and connected in series through the responsibility chain to form a complete verification process. It supports dynamic adjustment of verification rules and can add or remove verification links according to security requirements.

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

[0077] The data type mapping process uses a two-way mapping mechanism. A complete type mapping table is built to support 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 mode to ensure the scalability of type conversion.

[0078] The data serialization module is implemented using the strategy mode. According to different data formats (such as JSON, XML, Protocol Buffers, etc.), select the corresponding serialization strategy. The serialization process supports deep copy, circular reference detection, special character escape and other functions. The frequently used serialization templates are optimized through the cache mechanism.

[0079] The deserialization module is designed with a validator pattern. Data validity is verified during the data conversion process, including format checking, type matching, value domain verification, etc. It supports the registration of custom validators, and specific validation rules can be added according to business needs. An error handling mechanism is implemented to accurately locate and report conversion exceptions.

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

[0081] These improvements enable development teams to manage and maintain complex interface systems more efficiently, especially when dealing with the integration of a large number of heterogeneous systems. The unified interface specifications and flexible data conversion mechanisms significantly improve the efficiency and reliability of system integration.

[0082] In one embodiment of the data processing method with front-end and back-end separation of the present application, see Figure 4, and can also include the following: Step S401: reading the communication port buffer to obtain an authentication request data packet, parsing the authentication request data packet to obtain login authentication data, parsing the login authentication data according to a preset data structure specification, extracting the user name, password hash value and login timestamp from the login authentication data, and combining the user name and the password hash value to generate identity information; Step S402: The identity information is passed into the protocol identification engine, and a system identifier matching the identity information is searched based on the system routing table in the protocol identification engine, and a service address corresponding to the system identifier is obtained, and the service address is marked as a target backend service, and a network connection with the target backend service is established.

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

[0084] The parsing of the authentication request data packet adopts a layered parsing strategy. First, the integrity of the data packet is checked, and the CRC32 algorithm is used to verify whether the data packet has been tampered with during transmission. Then the data packet header is parsed to extract control information such as the protocol version number and data length. Finally, the data body parsing stage is entered, and the login authentication data is parsed field by field using the state machine mode. The parsing process supports breakpoint continuation, and can be correctly assembled when the data packet fragments arrive.

[0085] The parsing of login authentication data is based on the preset data structure specification and uses a 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 based on the type identifier, and finally extracts the field value. For string type fields, multiple character encoding formats are supported.

[0086] Strict security measures are used to process usernames and passwords. Password hashes are generated using the Argon2 algorithm, which is resistant to GPU and ASIC attacks. Random salt values ​​and work factors are added to the hashing process to increase the difficulty of brute force cracking. Timestamps are millisecond-level precision to prevent replay attacks and control session validity periods.

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

[0088] The query process of the protocol identification engine adopts a multi-level cache strategy. First, the routing information corresponding to the identity identifier is searched in the local cache, and the LRU algorithm is used to manage the cache capacity. If the local cache does not hit, the distributed cache cluster is queried. The cache cluster uses consistent hashing to achieve dynamic expansion and contraction of nodes. Finally, if no matching record is found, the persistent storage is accessed to query the complete routing information.

[0089] The system routing table search uses a 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 rights, etc. The search process supports weighted strategies, and the optimal service node can be selected based on the load. When a service node is found to be unavailable, it supports automatic switching to a backup node.

[0090] The target backend service is selected using an intelligent load balancing algorithm. First, unhealthy service nodes are filtered out, and then weight scores are calculated based on the load indicators of the service nodes (such as CPU usage, memory usage, request queue length, etc.). Finally, a weighted round-robin algorithm is used to select the appropriate service node. The load balancing strategy supports dynamic adjustment, and can optimize the selection decision based on real-time monitoring data.

[0091] The network connection is established using connection pool technology. The connection pool creates a certain number of connection instances in advance to avoid the overhead caused by frequent creation and destruction of connections. Connection management uses a token bucket algorithm to control the number of concurrent connections to prevent connection leakage and resource exhaustion. A connection health check mechanism is implemented to regularly check the connection status and actively close idle connections.

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

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

[0094] In one embodiment of the data processing method with front-end and back-end separation of the present application, see Figure 5 , and can also include the following: Step S501: reading an authentication request template from the class method definition instruction, filling the identity identification information into the authentication request template to generate an authentication request, converting the format of the authentication request through the data serialization module in the protocol identification engine, sending the converted authentication request to the target backend service, receiving the authentication data returned by the target backend service, parsing the authentication data through the data deserialization module in the protocol identification engine, extracting the token information in the authentication data, and calculating the token information through a hash algorithm to obtain an identity verification code; 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 a data communication link, and bind the data communication link to the communication session object.

[0095] Optionally, this embodiment provides a complete identity authentication and session management mechanism, which is mainly used in user authentication and long connection communication scenarios of distributed systems. First, read the authentication request template from the class method definition instruction. The template is defined in the 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.

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

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

[0098] The authentication request is sent in asynchronous communication mode. NIO is used to implement non-blocking network IO to improve concurrent processing capabilities. A request retry mechanism is implemented. When a network anomaly occurs, retries are performed according to the backoff strategy. Request timeout control and fuse mechanism are used to prevent system resource exhaustion.

[0099] The reception of authentication data adopts event-driven mode. By registering callback processors, the server response is processed asynchronously. Response processing supports fragmented reception and can correctly handle large amounts of authentication responses. A verification mechanism for response data is implemented to ensure data integrity and validity.

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

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

[0102] The identity verification code is generated using a secure hash algorithm. SHA-256 is selected as the basic hash algorithm, and a unique verification code is generated in combination with a random salt value and a timestamp. The hash calculation process uses multiple rounds of iterations to increase the security of the verification code. A verification code cache mechanism is implemented to improve performance in frequent access scenarios.

[0103] The factory mode is used to create communication session objects. A specific type of session object is created based on the system identifier. The session object encapsulates properties such as connection status, authentication information, and timeout. Session lifecycle management is implemented, and session timeout and automatic cleanup are supported.

[0104] The establishment of 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.

[0105] The binding of data communication links adopts the observer mode. Connection events, data events, and abnormal events are mapped to the corresponding processors. Link status monitoring is implemented, and abnormal situations are discovered in a timely manner through indicator collection and statistical analysis. Dynamic switching of links is supported, and automatic switching to backup links is performed when performance degradation is detected.

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

[0107] The technical solution of this embodiment is particularly suitable for application scenarios that require long-term connection. 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.

[0108] In one embodiment of the data processing method with front-end and back-end separation of the present application, see Figure 6 , and can also include the following: Step S601: Start the 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 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 to the authority verification module for operation authority 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; Step S602: 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, write the server data packet into the data transmission buffer and send it to the document database.

[0109] Optionally, this embodiment provides a complete authentication request processing and communication session management mechanism, which is mainly used in user authentication and data interaction scenarios in distributed design systems. First, the authentication request template is read from the class method definition instruction. The template uses an extensible JSON structure and contains necessary authentication fields and optional extension fields. The template supports parameter placeholders to facilitate dynamic filling of identity information.

[0110] The authentication request generation process uses a template engine mechanism. First, the identity information is preprocessed, including character escape, format normalization and other operations. Then the identity information is accurately filled into the corresponding placeholder position through the template parser. The generation process supports conditional rendering, and certain fields can be selectively filled according to different authentication scenarios.

[0111] Data serialization adopts a multi-format adaptation strategy. According to the data format supported by the target backend service, select the appropriate serialization scheme, such as JSON, Protocol Buffers, MessagePack, etc. The serialization process includes architecture 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.

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

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

[0114] The identity verification code is generated using a secure hash algorithm. The SHA-256 algorithm is used to hash the token information to ensure the uniqueness and irreversibility of the verification code. Timestamps and random salt values ​​are added to the hash process to increase the security of the verification code. A verification code cache mechanism is implemented to avoid frequent calculations.

[0115] The factory mode is used to create the communication session object. According to the system identifier, the appropriate session type is selected and the corresponding session instance is created. The session object contains basic attributes such as session ID, creation time, last access time, as well as business attributes such as service address and identity verification code.

[0116] The establishment of long connections uses TCP connection pool technology. The connection pool creates a certain number of TCP connections in advance 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.

[0117] The binding of data communication links adopts event-driven mode. The connection status is monitored through event listeners, including connection establishment, data transmission, connection disconnection and other events. An automatic reconnection mechanism is implemented, and when a connection disconnection is detected, the reconnection process is automatically triggered.

[0118] The communication link listener adopts a multi-threaded model. An independent worker thread is allocated to 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.

[0119] The parsing of operation requests adopts the frame synchronization mechanism. The preset data frame format defines the control fields such as frame header, frame length, checksum, etc. to ensure the correct parsing of data streams. It supports packet sticking and packet splitting, and can correctly process TCP streaming data.

[0120] 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 a specific operation. Permission verification supports inheritance and delegation, allowing flexible permission management.

[0121] The configuration of network sockets adopts parameter optimization strategy. According to the characteristics of data transmission, appropriate buffer size, timeout time, keep-alive parameters, etc. are set. Traffic shaping function is implemented to avoid the impact of sudden traffic on the system.

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

[0123] These improvements enable the design system to better support multi-user collaboration, especially when dealing with 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.

[0124] In one embodiment of the data processing method with front-end and back-end separation of the present application, see Figure 7 , and can also include the following: Step S701: reading a data stream from a receiving buffer of the network socket object, parsing the data stream according to a preset data packet format to extract a response data packet, transferring the response data packet to the data formatting unit, parsing the data structure of the response data packet through a data deserialization module in the data formatting unit, converting the parsed data into an interface data structure based on a preset data mapping rule, and performing a data integrity check on the interface data structure; 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 a data transmission log.

[0125] Optionally, this embodiment provides an efficient data processing and interface interaction mechanism, which is mainly used in data display and user interaction scenarios of distributed systems. First, asynchronous data reception is realized through the network socket object, and a double buffer design is adopted to ensure the smooth reception of high-speed data streams. The receiving buffer adopts a ring buffer structure, and efficient data access is realized by moving the read and write pointers.

[0126] Data stream parsing uses a state machine mode. The preset data packet format defines key components such as the header identifier, length field, data field, and checksum. The parser gradually extracts each field through state transitions and supports fragmentation and reassembly of data packets. When encountering an incomplete data packet, the parser will maintain the current state and wait for subsequent data to arrive.

[0127] The response data packet is processed in pipeline mode. First, the integrity of the data packet is verified to check whether the header and checksum match. Then the data packet is passed to the data formatting unit, which is responsible for the normalization of the data. The formatting process supports the conversion of multiple data formats, such as JSON, XML, binary, etc.

[0128] The data deserialization module adopts the template method mode. Based on the 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.

[0129] The data mapping rules are implemented using the strategy pattern. The preset mapping rules define the conversion method from the source data structure to the interface data structure. The mapping process supports operations such as field renaming, type conversion, and value conversion. For special data types, such as date and time, currency amount, etc., special converters are implemented.

[0130] The interface data structure is constructed using the builder mode. According to different interface component requirements, the corresponding data structure is dynamically constructed. The data structure contains configuration information such as attribute definition, validation rules, and display format. The construction process supports data pre-processing and post-processing, such as data formatting, default value filling, etc.

[0131] Data integrity verification uses a multi-layer verification mechanism. First, structural integrity verification is performed 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 the verification logic can be expanded according to specific needs.

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

[0133] The generation of transmission data packets adopts the combination mode. The session identifier and interface data structure are assembled into transmission data packets according to the predefined format. The data packets contain control information such as version number, timestamp, sequence number, etc., and support the orderly transmission and retransmission processing of data packets.

[0134] The management of data communication links adopts the observer mode. 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, retries are performed according to the backoff strategy.

[0135] The transmission status monitoring adopts real-time statistical mode. It records the transmission time, size, success rate and other indicators of the data packet, and calculates the real-time transmission performance indicators through the sliding window. The monitoring data supports aggregate analysis and can generate performance reports and trend charts.

[0136] Log records use an asynchronous write mechanism. Log entries are temporarily stored in the log buffer and written to persistent storage in batches through independent write threads. Log content includes timestamp, operation type, data size, transmission status and other information. Log rotation and archiving functions are implemented to prevent log files from becoming too large.

[0137] This embodiment effectively solves the data display and user interaction problems in distributed systems 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 complete monitoring mechanism provides visualization capabilities for system operation. In actual applications, this solution significantly improves the system's interactive experience and operation and maintenance efficiency.

[0138] These improvements enable the system to better support complex business scenarios, especially when dealing with large amounts of real-time data display and user interaction. Through optimized data processing and transmission mechanisms, the smoothness of interface response and the accuracy of data display are ensured.

[0139] 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, the present 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 front-end and back-end separated data processing method, see Figure 8 The data processing device with front-end and back-end separation specifically includes the following contents: The middle platform architecture building module 10 is used to build an interface middle platform service framework, load the application identification list through the type script language to generate a protocol identification engine, write the class attribute definition instruction and the class method definition instruction into the protocol identification 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 20 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 identification list; The data transmission module 30 is used to monitor the data communication link to receive the 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 to 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.

[0140] From the above description, it can be seen that the data processing device with separated front-end and back-end provided in the embodiment of the present application can realize unified interface management by constructing an interface middle-end service framework and implementing a protocol identification engine using a type scripting language. 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 matching and permission verification, uses network sockets to establish a reliable data communication link, 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.

[0141] From the hardware level, 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, the present application provides an embodiment of an electronic device for implementing all or part of the content of the front-end and back-end separated data processing method, and the electronic device specifically includes the following content: Processor, memory, communication interface and bus; wherein the processor, memory and communication interface communicate with each other through the bus; the communication interface is used to realize information transmission between the data processing device with front-end and back-end separation and the core business system, user terminal and related database and other related devices; the logic controller can be a desktop computer, a tablet computer and a mobile terminal, etc., but the present embodiment is not limited thereto. In the present embodiment, the logic controller can be implemented with reference to the embodiment of the data processing method with front-end and back-end separation in the embodiment, and the embodiment of the data processing device with front-end and back-end separation, and the contents thereof are incorporated herein, and the repeated parts are not repeated.

[0142] It is understandable that the user terminal may 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 may include smart glasses, a smart watch, a smart bracelet, etc.

[0143] In practical applications, part of the data processing method with front-end and back-end separation can be executed on the electronic device side as described above, or all operations can be completed in the client device. The selection can be made based on the processing capability of the client device and the limitations of the user's usage scenario. This application does not limit this. If all operations are completed in the client device, the client device may also include a processor.

[0144] The client device may have a communication module (i.e., a communication unit) that can communicate with a remote server to achieve data transmission with the server. The server may include a server on the task scheduling center side, and other implementation scenarios may also include a server on an intermediate platform, such as a server on a third-party server platform that has a communication link with the task scheduling center server. The server may include a single computer device, or a server cluster consisting of multiple servers, or a server structure of a distributed device.

[0145] Fig. 9 FIG. 9 is a schematic block diagram of the system structure of the electronic device 9600 according to an embodiment of the present application. Fig. 9 As shown, the electronic device 9600 may include a central processor 9100 and a memory 9140; the memory 9140 is coupled to the central processor 9100. It is worth noting that Fig. 9 is exemplary; other types of structures may also be used to supplement or replace this structure to implement telecommunication functions or other functions.

[0146] In one embodiment, the data processing method function with front-end and back-end separation can be integrated into the central processing unit 9100. The central processing unit 9100 can be configured to perform the following control: Step S101: construct an interface middle platform service framework, load an application identification list through a type script language to generate a protocol identification engine, write a class attribute definition instruction and a class method definition instruction into the protocol identification engine, write a request parameter format and a response data format into the class attribute definition instruction, write a request interception rule and a response processing rule into the class method definition instruction, write an identity token verification unit into the request interception rule, and write a data formatting unit into the response processing rule; Step S102: receiving login authentication data sent by the user interface interaction program, extracting identity information from the login authentication data, matching the identity information with the target backend service through the protocol recognition engine, sending an identity authentication request to the target backend service based on the class method definition instruction, receiving 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 identification list; Step S103: 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 instruction to generate a server data packet, establish a network socket connection to send the server data packet to the document database, receive a response data packet returned by the document database, pass the response data packet to 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.

[0147] From the above description, it can be seen that the electronic device provided in the embodiment of the present application realizes unified interface management by constructing an interface middle platform service framework and using a type script language to implement a protocol identification engine. 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 matching and permission verification, uses network sockets to establish a reliable data communication link, 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.

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

[0149] like Fig. 9 As shown, the electronic device 9600 may also include: a communication module 9110, an input unit 9120, an audio processor 9130, a display 9160, and a power supply 9170. It is worth noting that the electronic device 9600 does not necessarily have to include Fig. 9 In addition, the electronic device 9600 may also include Fig. 9 For components not shown, reference may be made to the prior art.

[0150] like Fig. 9 As shown, the central processing unit 9100 is sometimes also referred to as a controller or an operation control, and may include a microprocessor or other processor device and / or logic device. The central processing unit 9100 receives input and controls the operation of various components of the electronic device 9600.

[0151] The memory 9140 may be, for example, one or more of a cache, a flash memory, a hard drive, a removable medium, a volatile memory, a non-volatile memory or other suitable devices. The above-mentioned information related to the failure may be stored, and a program for executing the relevant information may also be stored. The CPU 9100 may execute the program stored in the memory 9140 to implement information storage or processing, etc.

[0152] The input unit 9120 provides input 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 provide power to the electronic device 9600. The display 9160 is used to display display objects such as images and texts. The display may be, for example, an LCD display, but is not limited thereto.

[0153] The memory 9140 may be a solid-state memory, such as a read-only memory (ROM), a random access memory (RAM), a SIM card, etc. It may also be a memory that saves information even when the power is off, can be selectively erased, and is provided with more data, examples of which are sometimes referred to as EPROMs, etc. The memory 9140 may also be some other type of device. The memory 9140 includes a buffer memory 9141 (sometimes referred to as a buffer). The memory 9140 may include an application / function storage unit 9142, which is used to store application programs and function programs or processes for executing the operation of the electronic device 9600 through the central processor 9100.

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

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

[0156] Based on different communication technologies, multiple communication modules 9110 may be provided in the same electronic device, such as a cellular network module, a Bluetooth module and / or a wireless LAN module. The communication module 9110 (transmitter / receiver) is also coupled to a speaker 9131 and a microphone 9132 via an audio processor 9130 to provide an audio output via the speaker 9131 and receive an audio input from the microphone 9132, thereby realizing a common telecommunication function. The audio processor 9130 may include any suitable buffer, decoder, amplifier, etc. In addition, the audio processor 9130 is also coupled to the central processor 9100, so that recording can be performed on the local machine through the microphone 9132, and the sound stored on the local machine can be played through the speaker 9131.

[0157] The embodiments of the present application also provide a computer-readable storage medium capable of implementing all steps of the data processing method with front-end and back-end separation in the above-mentioned embodiment, where the execution subject is a server or a client. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, all steps of the data processing method with front-end and back-end separation in the above-mentioned embodiment are implemented. For example, when the processor executes the computer program, the following steps are implemented: Step S101: construct an interface middle platform service framework, load an application identification list through a type script language to generate a protocol identification engine, write a class attribute definition instruction and a class method definition instruction into the protocol identification engine, write a request parameter format and a response data format into the class attribute definition instruction, write a request interception rule and a response processing rule into the class method definition instruction, write an identity token verification unit into the request interception rule, and write a data formatting unit into the response processing rule; Step S102: receiving login authentication data sent by the user interface interaction program, extracting identity information from the login authentication data, matching the identity information with the target backend service through the protocol recognition engine, sending an identity authentication request to the target backend service based on the class method definition instruction, receiving 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 identification list; Step S103: 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 instruction to generate a server data packet, establish a network socket connection to send the server data packet to the document database, receive a response data packet returned by the document database, pass the response data packet to 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.

[0158] From the above description, it can be seen that the computer-readable storage medium provided in the embodiment of the present application realizes unified interface management by constructing an interface middle-end service framework and implementing a protocol identification engine using a type scripting language. The class attribute and class method definition instructions are innovatively designed, and identity token verification and data formatting functions are integrated. The system ensures data security through identity matching and permission verification, uses network sockets to establish a reliable data communication link, 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.

[0159] The embodiments of the present application also provide a computer program product capable of implementing all steps of the data processing method with front-end and back-end separation in the above embodiments, where the execution subject is a server or a client. When the computer program / instruction is executed by a processor, the steps of the data processing method with front-end and back-end separation are implemented. For example, the computer program / instruction implements the following steps: Step S101: construct an interface middle platform service framework, load an application identification list through a type script language to generate a protocol identification engine, write a class attribute definition instruction and a class method definition instruction into the protocol identification engine, write a request parameter format and a response data format into the class attribute definition instruction, write a request interception rule and a response processing rule into the class method definition instruction, write an identity token verification unit into the request interception rule, and write a data formatting unit into the response processing rule; Step S102: receiving login authentication data sent by the user interface interaction program, extracting identity information from the login authentication data, matching the identity information with the target backend service through the protocol recognition engine, sending an identity authentication request to the target backend service based on the class method definition instruction, receiving 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 identification list; Step S103: 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 instruction to generate a server data packet, establish a network socket connection to send the server data packet to the document database, receive a response data packet returned by the document database, pass the response data packet to 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.

[0160] As can be seen from the above description, the computer program product provided in the embodiment of the present application realizes unified interface management by constructing an interface middle-end service framework and implementing a protocol identification engine using a type scripting language. The class attribute and class method definition instructions are innovatively designed, and identity token verification and data formatting functions are integrated. The system ensures data security through identity matching and permission verification, uses network sockets to establish a reliable data communication link, 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.

[0161] It should be understood by those skilled in the art that embodiments of the present invention may be provided as methods, devices, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention may 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.) containing computer-usable program code.

[0162] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (apparatus), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes 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 a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0163] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0164] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0165] The present invention uses specific embodiments to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. A data processing method with front-end and back-end separation, characterized in that: The method comprises: Construct an interface middle platform service framework, load the application identification list through the type script language to generate a protocol identification engine, write the class attribute definition instruction and the class method definition instruction into the protocol identification 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; Receive login authentication data sent by the user interface interaction program, extract identity information from the login authentication data, match the identity 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 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; The data communication link is monitored to receive design operation instructions, the operation authority is verified according to the identity verification code, the identity identification information and the design operation instruction are combined to generate a server data packet, a network socket connection is established to send the server data packet to the document database, a response data packet returned by the document database is received, the response data packet is passed to the data formatting unit to be converted into an interface data structure, and the interface data structure is sent to the user interface interaction program via the data communication link.

2. The data processing method with front-end and back-end separation according to claim 1 is characterized in that: The construction of the interface middle platform service framework, loading the application identification list through the type script language to generate a protocol identification engine, includes: Calling a typescript language compiler to parse a preset data interface configuration file, extracting a system identifier, a service address, an authentication method, and an interface protocol from the data interface configuration file, establishing a mapping relationship between the system identifier and the service address to generate an application identifier list, and constructing a system routing table based on the application identifier 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 a protocol identification engine, configure routing rules of the protocol identification engine based on the system routing table, and write the routing rules into a protocol parser.

3. The data processing method with front-end and back-end separation according to claim 1 is characterized in that: The step of writing the class attribute definition instruction and the class method definition instruction into the protocol identification 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 comprises: Parse the interface description specification document to obtain a data structure template, extract the request parameter definition and the 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, build 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; A data type mapping table is read from a data conversion rule library, a data serialization module and a deserialization module are constructed based on the data type mapping table, the data serialization module and the deserialization module are combined to generate a data formatting unit, the data formatting unit is written into a response processing rule, the response processing rule is written into a class method definition instruction, and the class attribute definition instruction and the class method definition instruction are written into the protocol identification engine.

4. The data processing method with front-end and back-end separation according to claim 1 is characterized in that: The receiving of login authentication data sent by the user interface interaction program, extracting identity information from the login authentication data, and matching the identity information with a target backend service through the protocol recognition engine includes: Read the communication port buffer to obtain an authentication request data packet, parse the authentication request data packet to obtain login authentication data, parse the login authentication data according to a 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 information; The identity information is passed into the protocol identification engine, and a system identifier matching the identity information is searched based on a system routing table in the protocol identification engine, a service address corresponding to the system identifier is obtained, the service address is marked as a target backend service, and a network connection with the target backend service is established.

5. The data processing method with front-end and back-end separation according to claim 1 is characterized in that: The step of sending an identity authentication request to the target backend service based on the class method definition instruction, receiving 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 identification list includes: Reading an authentication request template from the class method definition instruction, filling the identity identification information into the authentication request template to generate an identity authentication request, converting the format of the identity authentication request through the data serialization module in the protocol identification engine, sending the converted identity authentication request to the target backend service, receiving the authentication data returned by the target backend service, parsing the authentication data through the data deserialization module in the protocol identification engine, extracting the token information in the authentication data, and calculating the token information through a hash algorithm to obtain an identity verification code; The system identifier and service address of the target backend service are obtained from the application identifier list, a communication session object is created based on the system identifier, the service address and the identity verification code are written into the communication session object, a long connection based on the TCP protocol is established as a data communication link, and the data communication link is bound to the communication session object.

6. The data processing method with front-end and back-end separation according to claim 1 is characterized in that: The monitoring of the data communication link to receive the design operation instruction, verifying the operation authority 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 includes: Start the 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 to the authority verification module for operation authority 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; 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, write the server data packet into the data transmission buffer and send it to the document database.

7. The data processing method with front-end and back-end separation according to claim 1 is characterized in that: The receiving of the response data packet returned by the document database, transferring the response data packet into the data formatting unit to convert it into an interface data structure, and sending the interface data structure to the user interface interaction program through the data communication link includes: Reading a data stream from a receiving buffer of the network socket object, parsing the data stream according to a preset data packet format to extract a response data packet, transferring the response data packet to the data formatting unit, parsing a data structure of the response data packet through a data deserialization module in the data formatting unit, converting the parsed data into an interface data structure based on a preset data mapping rule, and performing a data integrity check 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 comprises: A middle platform architecture building module is used to build an interface middle platform service framework, load an application identification list through a type script language to generate a protocol identification engine, write class attribute definition instructions and class method definition instructions into the protocol identification 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; An identity authentication module is used to receive login authentication data sent by the 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 instruction, 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; The data transmission module is used to monitor the data communication link to receive the design operation instruction, verify the operation authority 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 to 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.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps of the data processing method with front-end and back-end separation described in any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the data processing method with front-end and back-end separation described in any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Method and system for simulation detection of automated malicious code

    CN108363922A

  • Data processing method and system and related equipment

    CN113220772A

  • Service verification method, electronic device and storage medium

    CN115883119A

  • Access token conversion

    WO2023076711A1

Cited By

  • Industrial control scene-oriented equipment state management method and system

    CN121143156A

  • A device state management method and system for an industrial control scene

    CN121143156B

  • Semiconductor intelligent manufacturing-oriented AI-driven context-aware long connection test method and system

    CN122395090A

  • AI-driven context-aware long connection test method and system for semiconductor intelligent manufacturing

    CN122395090B