Data processing method and device
By listening to configuration library update events and generating encrypted packets to the update object, the problems of low efficiency and unsatisfactory multi-system configuration management are solved, and efficient and secure configuration updates and data exchange are achieved.
Patent Information
- Application Number
- CN202310752494.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-25
- Publication Date
- 2024-12-27
AI Technical Summary
The existing multi-system configuration management methods are inefficient and unsatisfactory, resulting in inconsistent data format, large network transmission bandwidth, and excessive server resources, affecting the operation of the business system.
By monitoring the configuration library update event, the updated configuration data is captured, the identification code is extracted, the TCP connection is obtained, the encrypted packet is generated based on the serialization protocol and encryption processing rules, and the configuration is transmitted to the update object for configuration updates, and the data is improved by using the TCP long connection. The security and efficiency of exchange.
It realizes the timeliness and security of configuration updates, reduces the network bandwidth usage of data exchange, improves the efficiency and reliability of multi-system configuration management, and avoids waste of server resources.
Smart Images

Figure CN119211010A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a data processing method and device. Background Art
[0002] At present, the application of multi-system configuration management is very common, providing users with synchronous configuration solutions for complex business systems, which can greatly reduce the operation and maintenance costs of complex business systems.
[0003] In the process of implementing the present invention, the inventors found that there are at least the following problems in the prior art:
[0004] While users enjoy the convenient multi-system configuration synchronization function, the problems of poor configuration management effect and low efficiency are common. A small part of the existing technology uses multiple configuration management systems to provide data synchronization services for multiple business subsystems respectively, so it is difficult to avoid the problem of inconsistent data formats, which may even affect the operation of the overall business system in serious cases. In most of the existing technology processing, only one configuration management system is set up for all business subsystems, but each business subsystem is required to actively initiate short-chain and polling data requests, so as to make corresponding updates through the corresponding return values of the database. This processing logic overly complicates the data exchange process and generates too many invalid requests to occupy server resources. In addition, this part of the existing technology generally uses XML messages or JSON messages with unsatisfactory compression rates, resulting in large bandwidth occupation during network transmission. Summary of the invention
[0005] In view of this, an embodiment of the present invention provides a data processing method and device, which can solve the technical problems of low efficiency and unsatisfactory reliability of the existing multi-system configuration management method.
[0006] To achieve the above-mentioned purpose, according to one aspect of an embodiment of the present invention, a data processing method is provided, comprising: in response to monitoring a configuration library update event, capturing updated configuration data as target data; extracting an identification code from the target data, querying an update object associated with the identification code, and obtaining a TCP connection corresponding to the update object; based on a preset serialization protocol, performing format conversion processing on the target data to obtain a corresponding first serialized array, and generating a first encrypted message based on the first serialized array according to preset encryption processing rules; transmitting the first encrypted message to the update object through the TCP connection to perform corresponding configuration updates on the update object.
[0007] Optionally, before acquiring the TCP connection corresponding to the update object, the method further includes:
[0008] Based on a preset network application framework, a TCP connection with the update object is established using a socket;
[0009] In response to determining that the TCP connection is successfully established, a heartbeat packet is periodically sent through the TCP connection to maintain the TCP connection.
[0010] Optionally, based on a preset network application framework, after establishing a TCP connection with the update object using a socket, the following steps are included:
[0011] In response to receiving an initialization request to update an object;
[0012] Parsing the initialization request to obtain a corresponding identification code;
[0013] Associating an identification code with the update object;
[0014] Selecting configuration data matching the identification code in the configuration library as initialization data;
[0015] According to the preset serialization protocol, the initialization data is processed into a corresponding second serialization array, and according to the preset encryption processing rule, a second encrypted message is generated based on the second serialization array;
[0016] The second encrypted message is transmitted to the update object through the TCP connection to initialize the corresponding configuration of the update object.
[0017] Optionally include:
[0018] Based on the preset serialization protocol, determine the corresponding deserialization processing;
[0019] Determine the corresponding decryption process based on the preset encryption process rules;
[0020] The deserialization process and the decryption process are integrated into the TCP connection port of the update object to restore the received first encrypted message or the second encrypted message.
[0021] Optionally, the target data is format converted, including:
[0022] Based on the syntax of the serialization protocol, encapsulate the target data and generate a corresponding serialization protocol file;
[0023] Compile the serialization protocol file into a script file;
[0024] The serialization function included in the serialization protocol is called to process the script file.
[0025] Optionally, generating a first encrypted message based on the first serialized array includes:
[0026] Based on the encryption processing rule, query the type identifier and length identifier that match the first serialized array;
[0027] Get the preset placeholder;
[0028] Based on the encryption processing rule, determine a corresponding splicing order to correspondingly splice the type identifier, the length identifier, the placeholder, and the first serialized array;
[0029] A first encrypted message is obtained.
[0030] Optionally include:
[0031] The preset serialization protocol is the Protocol Buffer protocol.
[0032] In addition, the present invention also provides a data processing device, including a capture module, which is used to capture the updated configuration data as target data in response to monitoring a configuration library update event; a connection module, which is used to extract an identification code from the target data, query the update object associated with the identification code, and obtain a TCP connection corresponding to the update object; a processing module, which is used to perform format conversion processing on the target data based on a preset serialization protocol to obtain a corresponding first serialized array, and generate a first encrypted message based on the first serialized array according to preset encryption processing rules; an update module, which is used to transmit the first encrypted message to the update object through the TCP connection to perform corresponding configuration updates on the update object.
[0033] An embodiment of the above invention has the following advantages or beneficial effects: the present invention achieves the technical purpose of real-time monitoring of the configuration library and real-time acquisition of the updated data by capturing the updated configuration data as the target data in response to monitoring the configuration library update event, thereby ensuring the timeliness of the configuration update processing of the present invention, and the captured target data also serves as data support for subsequent remote configuration update processing; and the present invention achieves the technical purpose of determining the update object and the transmission channel of the update data by extracting the identification code from the target data, querying the update object associated with the identification code, and obtaining the TCP connection corresponding to the update object, so as to correctly and directional send the configuration management message in the subsequent Lays the foundation; at the same time, the present invention performs format conversion processing on the target data based on a preset serialization protocol to obtain a corresponding first serialization array, and generates a first encrypted message based on the first serialization array according to a preset encryption processing rule, thereby completing the processing process of compressing and encrypting the data obtained from the configuration library, while reducing the bandwidth occupied by data exchange, enhancing the security of data exchange, and comprehensively improving the data exchange performance of the present invention; in addition, the present invention transmits the first encrypted message to the update object through the TCP connection to perform corresponding configuration updates on the update object, and utilizes the highly reliable TCP long connection to transmit encrypted messages, thereby efficiently completing the transmission of configuration update data.
[0034] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with the specific implementation manner. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.
[0036] Figure 1 is a schematic diagram of the main flow of the data processing method according to the first embodiment of the present invention;
[0037] Figure 2 is a schematic diagram of the overall system architecture of the second embodiment of the present invention;
[0038] Figure 3 is a schematic diagram of an overall response mechanism of a second embodiment of the present invention;
[0039] Figure 4 is a schematic diagram of the main steps of data encapsulation processing in an embodiment of the present invention;
[0040] Figure 5 is a schematic diagram of the main flow of a data processing method according to a third embodiment of the present invention;
[0041] Figure 6is a schematic diagram of the main flow of a data processing method according to a fourth embodiment of the present invention;
[0042] Figure 7 is a schematic diagram of main modules of a data processing device according to a first embodiment of the present invention;
[0043] Figure 8 is an exemplary system architecture diagram to which embodiments of the present invention may be applied;
[0044] Fig. 9 It is a schematic diagram of the structure of a computer system of a terminal device or a server suitable for implementing an embodiment of the present invention. DETAILED DESCRIPTION
[0045] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted in the following description.
[0046] Figure 1 is a schematic diagram of the main flow of the data processing method according to the first embodiment of the present invention. Figure 1 As shown, the data processing method includes:
[0047] Step S101, in response to monitoring a configuration library update event, capturing updated configuration data as target data.
[0048] In an embodiment, the present invention realizes the initiative and timeliness of synchronous configuration updates of multiple systems by immediately grabbing the corresponding update data after listening to the configuration library update event, thereby actively initiating the configuration update for the corresponding business system based on the update data, and largely avoiding the shortcomings of the existing technical means that the process is complicated and wastes a lot of server resources, that is: the business system needs to actively initiate a Hypertext Transfer Protocol (HTTP) short chain polling of the update request to the configuration library, and when and only when the configuration library successfully receives the update request and there happens to be a corresponding update event, the corresponding update data is grabbed and returned to the business system. Therefore, after the processing of this step, computing resources are effectively saved, the configuration update process is simplified, and the efficiency of configuration management of multiple systems is improved; on the other hand, the configuration library storing the configuration file and the processing end that synchronizes the configuration file to the update object are loosely coupled through distributed services, which can effectively compensate for the risk of setting the configuration management system as a single point of the network in the prior art, thereby increasing the availability of the configuration management method of the present invention.
[0049] In a further embodiment, a scheduled task can be set to monitor the configuration library at a scheduled time. When a configuration library update event is monitored in a corresponding time period, the updated configuration data is immediately captured to serve as the data basis for the subsequent configuration synchronization update of the corresponding business system. In a further embodiment, the operation and maintenance processing end of the sub-business system (i.e., the update object) can be set to perform corresponding configuration data update processing, generate an updated configuration file, and send it to the configuration library; when the configuration library receives the updated configuration file, the scheduled task triggers the configuration library update event, thereby starting the subsequent configuration synchronization update processing of this processing end. For example, Figure 2 and Figure 3 As shown in the figure, the scheduled task (WORK) in the figure plays the role of monitoring the database regularly and judging whether an update event occurs; when it is determined that there is updated configuration data in the database, the SOA end (i.e., the service-oriented architecture processing end) in the figure is notified, so that the SOA end directly accesses, stores or reads the configuration data from the database (such as Figure 3 As shown, it can also be through WORK to capture update data and transmit it to the SOA end), and after preprocessing, it is sent to the SDK end (that is, the software development kit installed in the third-party application, which is used to realize the remote connection interface with the SOA end, and enable the corresponding third-party application to update the configuration based on the received configuration data without restarting); thereby correspondingly updating the third-party application (APP) installed with the SDK; in addition, the "configuration management end 1-Man end" in the figure corresponds to the global unique operation and maintenance system of the database, which is used to perform a large amount of configuration data initialization and update processing through the SOA end; in addition, the "configuration management end 2-Client end" in the figure corresponds to the third-party application (that is, the above-mentioned APP), which is used to access and query configuration data in the database for the third-party application through the SOA end, and may also perform a small amount of configuration data update processing, that is, write data through the SOA end. Step S102, extract the identification code from the target data, query the update object associated with the identification code, and obtain the TCP connection corresponding to the update object.
[0050] In an embodiment, a configuration library can store multiple sets of configuration data corresponding to multiple sub-business systems, wherein each set of configuration data can be understood as multiple sets of configuration data corresponding to all attribute items of a certain sub-business system; in the configuration library: the configuration data of different sub-business systems correspond to different group codes, and the configuration data of the same group code but different items are distinguished by different keys; therefore, through the combination of the group code and the key, the configuration data of the specified item of the uniquely corresponding specified sub-business system can be queried in the configuration library, and the combination of the group code and the key is the above-mentioned identification code, and the above-mentioned update object is the corresponding sub-business system. By integrating the configuration data management of multiple business systems into a configuration library, the high consistency of configuration management of multiple systems can be effectively guaranteed, and the situation in which the total system operation fails due to the non-uniform format of the sub-system configuration data in some existing technologies can be avoided. In a further embodiment, when obtaining the target data, the source information corresponding to the target data can also be extracted at the same time, and encapsulated and transmitted together with the target data, so that when the third-party application updated based on the target data fails to run, the data can be effectively traced and checked.
[0051] In an embodiment, the captured target data is parsed to determine the update object to be updated corresponding to the target data, that is, the sub-business system, and the TCP connection channel connecting the processing end and the update object end is extracted from the connection pool, thereby realizing the process of determining the processing object and the message transmission channel, thereby paving the way for the subsequent directional transmission of the processed configuration update data.
[0052] In some embodiments, in order to determine that the acquired TCP connection has not timed out and can be put into use immediately, before acquiring the TCP connection corresponding to the update object, a TCP connection with the update object can be established using a socket based on a preset network application framework; in response to determining that the TCP connection is successfully established, a heartbeat packet is periodically sent through the TCP connection to maintain the TCP connection. After this step is processed, after determining that the TCP connection is successfully established, that is, after the three-way handshake response is correct, the established TCP connection is periodically used to send a heartbeat packet to the update object (that is, the sub-business system end to be updated), so that it can be immediately detected within a short time when the TCP connection is disconnected, and the TCP connection corresponding to the same port can be re-established, thereby achieving the purpose of effectively maintaining the TCP connection, so as to improve the efficiency of transmitting updated configuration data as a whole.
[0053] In a further embodiment, the network application framework can be a Netty framework (a JAVA open source framework provided by JBOSS) and a Mina framework (an open source network communication application framework provided by Apache); wherein, based on the Netty framework, a TCP connection between the processing end and the corresponding update object end can be quickly established, and the corresponding network overhead can be further reduced by using the multiplexing principle, and while realizing multiple TCP connections corresponding to multiple update object ports concurrently, the reliability of each TCP long connection (i.e., a TCP connection maintained by a heartbeat packet) can be ensured.
[0054] In some implementations, in order to distinguish between the subsystem configuration data update phase and the configuration data initialization phase, thereby avoiding the confusion of repeated processing or omitted processing in the listening configuration library operation and the transmission configuration update data operation when initializing multiple configuration data of the subsystem, it is possible to establish a TCP connection with the update object using a socket based on a preset network application framework, and then respond to receiving an initialization request for the update object; parse the initialization request to obtain a corresponding identification code; associate the identification code with the update object; select configuration data matching the identification code in the configuration library as initialization data; process the initialization data into a corresponding second serialized array according to the preset serialization protocol, and generate a second encrypted message based on the second serialized array according to the preset encryption processing rules; and transmit the second encrypted message to the update object through the TCP connection to perform corresponding configuration initialization on the update object. After this step, it is clear that in the configuration initialization phase of each subsystem, an initialization request must be initiated to the processing end first, so that the processing end, based on the identification code corresponding to the subsystem (or only the above-mentioned group code), screens all the configuration data corresponding to the identification code (or only the above-mentioned group code) in the configuration library, and returns it to the subsystem through the corresponding TCP connection channel after processing, thereby completing the response to the subsystem's initialization request. Therefore, the configuration update processing and configuration initialization processing are distinguished in both the processing logic dimension and the process timing dimension, thereby improving the accuracy and simplicity of the configuration data sent.
[0055] Step S103: Based on a preset serialization protocol, format conversion processing is performed on the target data to obtain a corresponding first serialization array, and according to a preset encryption processing rule, a first encrypted message is generated based on the first serialization array.
[0056] In an embodiment, after processing in this step, the target data is compressed and encrypted into a corresponding encrypted message, thereby enhancing the comprehensive practicality of the invention for configuration management of multiple systems based on multiple dimensions such as occupied network bandwidth, data exchange security, and convenience of subsystem receiving data.
[0057] In some embodiments, the preset serialization protocol may be a Protocol Buffer protocol. Compared with the commonly used serialization protocols in the prior art, such as the XML protocol or the JSON protocol, the Protocol Buffer protocol is more efficient in compressing the data to be transmitted, so that the network bandwidth occupied can be greatly reduced when the compressed data is used for data exchange, thereby further saving network resources and enhancing the service performance of the data exchange processing in the present invention. In some embodiments, in order to make the first serialized data obtained by processing have a wide range of applications and be convenient for the corresponding update object to run and use, when the target data is format converted, the target data can be encapsulated based on the syntax of the serialization protocol to generate a corresponding serialization protocol file; the serialization protocol file is compiled into a script file; and the serialization function included in the serialization protocol is called to process the script file. In the processing of this step, the purpose of encapsulating the target data using the syntax of the serialization protocol is to protect the content of the target data when calling the serialization function for serialization processing; compiling the serialization protocol file can facilitate the update object to run directly in the corresponding environment, thereby further improving the efficiency of configuring and updating the update object. On the other hand, the Protocol Buffer protocol supports multiple programming languages, so the script file can be a C language script file, a C++ language script file, a Dart language script file, a Go language script file, a Java language script file, a Kotlin language script file or a Python language script file, thereby further improving the practicality of the present invention.
[0058] For example, Figure 4 As shown in the figure, if the key corresponding to the target data is 1, the group code (GroupId) is 2, the target data source information is 3, and the target data itself is 4, when the target data is structured and stored through the Protocol Buffer protocol, the specific syntax can be:
[0059]
[0060] Thus, the corresponding file with the suffix of .proto is obtained, in which the file can be named using the class name involved, that is, the above-mentioned "ConfigureEntry", and the corresponding message type is also defined; then, the ProtocolBuffer compiler can be used to compile the .proto suffix file into the corresponding Java file. The corresponding syntax can be:
[0061] protoc.exe--java_out=. / ConfigureEntry.proto
[0062] Thus, the corresponding java file ConfigureEntry.java is generated in the current directory; finally, the placeholders corresponding to the above-mentioned keys and grouping symbols can be queried, and the corresponding length identifier can be determined according to the above-mentioned message type to complete the encapsulation of the java file, so as to call the connected TCP channel to transmit the encapsulated java file. In some embodiments, in order to conveniently and effectively encrypt the serialized data (i.e., the first serialized array), thereby further improving the data exchange security performance of the present invention, when generating the first encrypted message based on the first serialized array, the type identifier and length identifier matching the first serialized array can be queried based on the encryption processing rules; the preset placeholder can be obtained; based on the encryption processing rules, the corresponding splicing order can be determined to correspond to the splicing of the type identifier, length identifier, placeholder and the first serialized array; and the first encrypted message can be obtained. After this step of processing, it can be ensured to a large extent that the processing end that steals the encrypted message cannot correctly parse it, thereby playing a role in protecting the encapsulated data.
[0063] Step S104: transmitting the first encrypted message to the update object through the TCP connection to perform corresponding configuration update on the update object.
[0064] In the embodiment, the process of transmitting the processed configuration data to the designated receiving port is completed through the processing of this step, so that the receiving port (i.e., the update object) can perform corresponding configuration updates based on the received message, thereby achieving the purpose of the present invention to perform unified configuration management of multiple sub-(business) systems based on the remote calling function of the distributed network structure.
[0065] In some embodiments, in order to ensure that the update object (i.e., the subsystem to be updated) can correctly and smoothly use the received encrypted message to update its own configuration, the corresponding deserialization process can be determined based on the preset serialization protocol; the corresponding decryption process can be determined based on the preset encryption processing rules; the deserialization process and the decryption process are integrated into the TCP connection port of the update object to restore the received first encrypted message or the second encrypted message. In a further embodiment, because the encapsulated protocol file has been compiled when the target data is processed, the update object can use the corresponding script development toolkit to directly run the restored configuration file, instead of the existing technology requiring the update object to read the newly saved configuration file and restart to perform the corresponding update, thereby enhancing the convenience of the configuration management method.
[0066] Figure 5is a schematic diagram of the main flow of a data processing method according to a third embodiment of the present invention, the data processing method comprising:
[0067] Step S501, based on a preset network application framework, using a socket to establish and update a TCP connection of an object.
[0068] Preferably, the preset network application framework may be a Netty framework.
[0069] Step S502: In response to determining that the TCP connection is successfully established, maintaining the TCP connection by periodically sending a heartbeat packet.
[0070] Step S503: responding to receiving an initialization request for updating an object.
[0071] Step S504, parsing the initialization request, obtaining a corresponding identification code, and associating the identification code with the update object.
[0072] Step S505 , selecting configuration data matching the identification code in the configuration library as initialization data.
[0073] Step S506: serialize and encrypt the initialization data in sequence based on the preset serialization protocol and encryption processing rules to obtain an initialization encrypted message.
[0074] Preferably, the preset serialization protocol may be a Protocol Buffer protocol.
[0075] Step S507, based on the preset serialization protocol, determine the corresponding deserialization processing; and based on the preset encryption processing rules, determine the corresponding decryption processing.
[0076] Step S508, integrating the deserialization process and the decryption process into the TCP connection port of the update object.
[0077] Step S509: transmitting the initialization encrypted message to the update object via the TCP connection.
[0078] Step S510: The update object performs corresponding configuration initialization by restoring the received initialization encrypted message.
[0079] Step S511, monitor the configuration library regularly.
[0080] Step S512, in response to monitoring the configuration library update event, capture the updated configuration data as the target data.
[0081] Step S513: extracting the identification code from the target data, and querying the update object associated with the identification code.
[0082] Step S514: Acquire the TCP connection corresponding to the update object.
[0083] Step S515: Based on a preset serialization protocol, the target data is format converted to obtain a corresponding serialization array.
[0084] Step S516, generating an updated encrypted message based on the serialized array according to a preset encryption processing rule.
[0085] Step S517: Transmit the updated encrypted message to the update object through the acquired TCP connection.
[0086] Step S518: The update object performs corresponding configuration updates by restoring the received update encrypted message.
[0087] Figure 6 is a schematic diagram of the main flow of a data processing method according to a fourth embodiment of the present invention, the data processing method comprising:
[0088] Step S601, based on a preset network application framework, using a socket to establish and update a TCP connection of an object.
[0089] Preferably, the preset network application framework may be a Netty framework.
[0090] Step S602: In response to determining that the TCP connection is successfully established, maintaining the TCP connection by periodically sending a heartbeat packet.
[0091] Step S603, based on the preset serialization protocol, determine the corresponding deserialization processing; and based on the preset encryption processing rules, determine the corresponding decryption processing.
[0092] Preferably, the preset serialization protocol may be a Protocol Buffer protocol.
[0093] Step S604: Integrate the deserialization process and the decryption process into the TCP connection port of the update object.
[0094] Step S605: monitor the configuration library regularly.
[0095] Step S606, in response to monitoring the configuration library update event, capture the updated configuration data as the target data.
[0096] Step S607: extract the identification code from the target data, query the update object associated with the identification code, and obtain the TCP connection corresponding to the update object.
[0097] Step S608: encapsulate the target data based on the syntax of the serialization protocol and generate a corresponding serialization protocol file.
[0098] Step S609, compile the serialization protocol file into a script file.
[0099] Step S610, calling the serialization function included in the serialization protocol to process the script file to obtain a corresponding serialization array.
[0100] Step S611, based on the preset encryption processing rules, query the type identifier and length identifier that match the serialized array.
[0101] Step S612, obtaining a preset placeholder.
[0102] Step S613, concatenate the type identifier, length identifier, placeholder and serialization array in a specified order to obtain an encrypted message.
[0103] Preferably, a corresponding splicing order is determined based on the encryption processing rule.
[0104] Step S614: Transmit the encrypted message to the update object through the acquired TCP connection.
[0105] Step S615: The update object performs corresponding configuration update by restoring the received encrypted message.
[0106] Figure 7 is a schematic diagram of main modules of a data processing device according to an embodiment of the present invention, such as Figure 7 As shown, the data processing device 700 includes a capture module 701, a connection module 702, a processing module 703 and an update module S704. Among them, the capture module 701 responds to monitoring the configuration library update event, captures the updated configuration data as the target data; the connection module 702 extracts the identification code from the target data, queries the update object associated with the identification code, and obtains the TCP connection corresponding to the update object; the processing module 703 performs format conversion processing on the target data based on the preset serialization protocol to obtain the corresponding first serialization array, and generates a first encrypted message based on the first serialization array according to the preset encryption processing rules; the update module S704 transmits the first encrypted message to the update object through the TCP connection to perform corresponding configuration updates on the update object.
[0107] In some embodiments, the connection module 702, before acquiring the TCP connection corresponding to the update object, is also used to: based on a preset network application framework, establish a TCP connection with the update object using a socket; in response to determining that the TCP connection is successfully established, periodically send heartbeat packets through the TCP connection to maintain the TCP connection.
[0108] In some embodiments, the connection module 702, based on a preset network application framework, uses a socket to establish a TCP connection with the update object, and is further used to: respond to an initialization request received from the update object; parse the initialization request to obtain a corresponding identification code; associate the identification code with the update object; select configuration data matching the identification code in the configuration library as initialization data; process the initialization data into a corresponding second serialized array according to the preset serialization protocol, and generate a second encrypted message based on the second serialized array according to preset encryption processing rules; transmit the second encrypted message to the update object through the TCP connection to perform corresponding configuration initialization on the update object.
[0109] In some embodiments, the update module 704 is also used to: determine the corresponding deserialization processing based on the preset serialization protocol; determine the corresponding decryption processing based on the preset encryption processing rules; integrate the deserialization processing and the decryption processing into the TCP connection port of the update object to restore the received first encrypted message or the second encrypted message.
[0110] In some embodiments, when the processing module 703 performs format conversion processing on the target data, it is also used to: encapsulate the target data based on the syntax of the serialization protocol to generate a corresponding serialization protocol file; compile the serialization protocol file into a script file; and call the serialization function included in the serialization protocol to process the script file.
[0111] In some embodiments, when the processing module 703 generates a first encrypted message based on the first serialized array, it is also used to: based on the encryption processing rule, query the type identifier and length identifier that match the first serialized array; obtain a preset placeholder; based on the encryption processing rule, determine the corresponding splicing order to correspond to the splicing of the type identifier, length identifier, placeholder and first serialized array; and obtain the first encrypted message.
[0112] In some embodiments, the processing module 703 is further used to: determine that the preset serialization protocol is the ProtocolBuffer protocol.
[0113] It should be noted that the data processing method and the data processing device described in the present invention have a corresponding relationship in terms of specific implementation contents, so the repeated contents will not be described again.
[0114] Figure 8 An exemplary system architecture 800 is shown to which the data processing method or data processing device according to the embodiment of the present invention can be applied.
[0115] like Figure 8 As shown, system architecture 800 may include terminal devices 801, 802, 803, a network 804, and a server 805. Network 804 is used to provide a medium for communication links between terminal devices 801, 802, 803 and server 805. Network 804 may include various connection types, such as wired, wireless communication links, or optical fiber cables, etc.
[0116] The user can use the terminal devices 801, 802, 803 to interact with the server 805 through the network 804 to receive or send messages, etc. Various communication client applications can be installed on the terminal devices 801, 802, 803.
[0117] The terminal devices 801 , 802 , and 803 may be various electronic devices having a page display processing screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.
[0118] The server 805 may be a server that provides various services, such as a background management server (only an example) that provides support for users to use the terminal devices 801, 802, and 803. The background management server may analyze and process the received product information query request and other data, and feed back the processing results (such as target push information, product information - only an example) to the terminal device.
[0119] It should be noted that the data processing method provided in the embodiment of the present invention is generally executed by the server 805 , and accordingly, the computing device is generally arranged in the server 805 .
[0120] It should be understood that Figure 8 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0121] Reference below Fig. 9 , which shows a schematic diagram of the structure of a computer system 900 of a terminal device suitable for implementing an embodiment of the present invention. Fig. 9 The terminal device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0122] like Fig. 9 As shown, the computer system 900 includes a central processing unit (CPU) 901, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 902 or a program loaded from a storage part 908 into a random access memory (RAM) 903. In the RAM 903, various programs and data required for the operation of the computer system 900 are also stored. The CPU 901, the ROM 902, and the RAM 903 are connected to each other via a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.
[0123] The following components are connected to the I / O interface 905: an input section 906 including a keyboard, a mouse, etc.; an output section 907 including a cathode ray tube (CRT), a liquid crystal page display processor (LCD), etc., and a speaker, etc.; a storage section 908 including a hard disk, etc.; and a communication section 909 including a network interface card such as a LAN card, a modem, etc. The communication section 909 performs communication processing via a network such as the Internet. A drive 910 is also connected to the I / O interface 905 as needed. A removable medium 911, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 910 as needed, so that a computer program read therefrom is installed into the storage section 908 as needed.
[0124] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 909, and / or installed from the removable medium 911. When the computer program is executed by the central processing unit (CPU) 901, the above-mentioned functions defined in the system of the present invention are executed.
[0125] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0126] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0127] The modules involved in the embodiments of the present invention may be implemented by software or hardware. The modules described may also be set in a processor. For example, it may be described as follows: a processor includes a capture module, a connection module, a processing module, and an update module. The names of these modules do not, in some cases, constitute limitations on the modules themselves.
[0128] As another aspect, the present invention also provides a computer-readable medium, which may be included in the device described in the above embodiment; or it may exist independently without being assembled into the device. The above computer-readable medium carries one or more programs. When the above one or more programs are executed by a device, the device includes responding to listening to a configuration library update event, grabbing the updated configuration data as the target data; extracting an identification code from the target data, querying the update object associated with the identification code, and obtaining a TCP connection corresponding to the update object; based on a preset serialization protocol, performing format conversion processing on the target data to obtain a corresponding first serialization array, and generating a first encrypted message based on the first serialization array according to a preset encryption processing rule; transmitting the first encrypted message to the update object through the TCP connection to perform a corresponding configuration update on the update object.
[0129] The technical solution according to the embodiment of the present invention can solve the technical problems of low efficiency and unsatisfactory reliability of the existing multi-system configuration management method.
[0130] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A data processing method, characterized in that: include: In response to monitoring the configuration library update event, the updated configuration data is captured as the target data; Extracting an identification code from the target data, querying an update object associated with the identification code, and acquiring a TCP connection corresponding to the update object; Based on a preset serialization protocol, the target data is format-converted to obtain a corresponding first serialization array, and according to a preset encryption processing rule, a first encrypted message is generated based on the first serialization array; The first encrypted message is transmitted to the update object through the TCP connection to perform corresponding configuration update on the update object.
2. The method according to claim 1, characterized in that Before obtaining the TCP connection corresponding to the update object, the method includes: Based on a preset network application framework, a TCP connection with the update object is established using a socket; In response to determining that the TCP connection is successfully established, a heartbeat packet is periodically sent through the TCP connection to maintain the TCP connection.
3. The method according to claim 2, characterized in that Based on the preset network application framework, after establishing a TCP connection with the update object using a socket, the following steps are included: In response to receiving an initialization request to update an object; Parsing the initialization request to obtain a corresponding identification code; Associating an identification code with the update object; Selecting configuration data matching the identification code in the configuration library as initialization data; According to the preset serialization protocol, the initialization data is processed into a corresponding second serialization array, and according to the preset encryption processing rule, a second encrypted message is generated based on the second serialization array; The second encrypted message is transmitted to the update object through the TCP connection to initialize the corresponding configuration of the update object.
4. The method according to claim 3, characterized in that include: Based on the preset serialization protocol, determine the corresponding deserialization processing; Determine the corresponding decryption process based on the preset encryption process rules; The deserialization process and the decryption process are integrated into the TCP connection port of the update object to restore the received first encrypted message or the second encrypted message.
5. The method according to claim 1, characterized in that Perform format conversion on target data, including: Based on the syntax of the serialization protocol, encapsulate the target data and generate a corresponding serialization protocol file; Compile the serialization protocol file into a script file; The serialization function included in the serialization protocol is called to process the script file.
6. The method according to claim 1, characterized in that Generating a first encrypted message based on the first serialized array includes: Based on the encryption processing rule, query the type identifier and length identifier that match the first serialized array; Get the preset placeholder; Based on the encryption processing rule, determine a corresponding splicing order to correspondingly splice the type identifier, the length identifier, the placeholder, and the first serialized array; A first encrypted message is obtained.
7. The method according to any one of claims 1 or 3 to 5, characterized in that: include: The preset serialization protocol is the ProtocolBuffer protocol.
8. A data processing device, characterized in that: include: A capture module, configured to capture updated configuration data as target data in response to monitoring a configuration library update event; A connection module, used to extract an identification code from target data, query an update object associated with the identification code, and obtain a TCP connection corresponding to the update object; A processing module, configured to perform format conversion processing on the target data based on a preset serialization protocol to obtain a corresponding first serialization array, and generate a first encrypted message based on the first serialization array according to a preset encryption processing rule; An update module is used to transmit the first encrypted message to the update object through the TCP connection to perform corresponding configuration updates on the update object.
9. An electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7.
10. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.