Data processing method and apparatus, and electronic device

By encrypting the data and using a weighted model to select the target server, the contradiction between data transmission security and speed improvement is resolved, achieving a balance between security and speed and optimizing the data processing flow.

CN121396641BActive Publication Date: 2026-05-19BEIJING TIANJIU SHARED AVIATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING TIANJIU SHARED AVIATION TECH CO LTD
Filing Date
2025-11-19
Publication Date
2026-05-19

AI Technical Summary

Technical Problem

How can we further improve data processing speed while ensuring data transmission security?

Method used

After encrypting the data to be processed, the service quality parameters of multiple servers are obtained, the weight values ​​are calculated using a trained weight model, the target server is selected for data processing, the data is transmitted through an encrypted channel, and the weight model is optimized using an ant colony algorithm to dynamically adjust resource allocation.

Benefits of technology

While ensuring data transmission security, the speed and efficiency of data processing have been improved, the stability and robustness of the system have been enhanced, and resource utilization has been optimized.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121396641B_ABST
    Figure CN121396641B_ABST
Patent Text Reader

Abstract

The present disclosure provides a data processing method and device and electronic equipment, and relates to the technical field of data processing. The method comprises: receiving a data transmission request, and performing encryption processing on the data to be processed to obtain encrypted data; obtaining service quality parameters of a plurality of second servers, the service quality parameters comprising interface response time, channel encryption strength and server load rate; obtaining weight values of the plurality of second servers based on a trained weight model according to the service quality parameters; selecting a target server according to the weight values of the plurality of second servers; and sending the encrypted data to the target server to enable the target server to process the encrypted data. The first server of the present disclosure increases the security of data transmission by encrypting the data to be processed, and determines the second server capable of improving the data processing speed through the service quality parameters and the weight model, thereby improving the data processing speed under the premise of ensuring the security of data transmission.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of data processing technology, and in particular to a data processing method, apparatus and electronic device. Background Technology

[0002] With the rapid development of the information society, data has become an indispensable key resource for all industries. Against this backdrop, data security has gradually become a crucial issue requiring attention across various fields. This is especially true in specific application scenarios, such as vehicle-to-everything (V2X) systems in intelligent transportation systems, where data security is paramount. Typically, a server is needed to collect data from different devices or sensors and securely transmit the collected information to another server for further processing and analysis.

[0003] However, how to further improve data processing speed while ensuring data transmission security has become a pressing technical challenge. Summary of the Invention

[0004] This disclosure provides a data processing method, apparatus, and electronic device that improves data processing speed, at least while ensuring data transmission security.

[0005] Other features and advantages of this disclosure will become apparent from the following detailed description, or may be learned in part from practice of this disclosure.

[0006] According to one aspect of this disclosure, a data processing method is provided, applied to a first server, comprising: receiving a data transmission request, the data transmission request carrying data to be processed; encrypting the data to be processed to obtain encrypted data; acquiring service quality parameters of a plurality of second servers, the service quality parameters including interface response time, channel encryption strength, and server load rate; obtaining weight values ​​of the plurality of second servers based on a trained weight model and according to the service quality parameters; selecting a target server according to the weight values ​​of the plurality of second servers; and sending the encrypted data to the target server so that the target server processes the encrypted data.

[0007] According to another aspect of this disclosure, a data processing method is provided, applied to a second server, comprising: receiving encrypted data sent by a first server, wherein the encrypted data is obtained by the first server encrypting data to be processed after receiving a data transmission request, wherein the data transmission request carries the data to be processed; processing the encrypted data to obtain a processing result; and sending the processing result to the first server; wherein the second server is a target server determined by a weight value of the second server, the weight value of the second server being obtained based on a trained weight model and service quality parameters, wherein the service quality parameters include interface response time, channel encryption strength, and server load rate.

[0008] According to another aspect of this disclosure, a data processing apparatus is provided, applied to a first server, comprising: a first receiving module for receiving a data transmission request, the data transmission request carrying data to be processed; an encryption module for encrypting the data to be processed to obtain encrypted data; an acquisition module for acquiring service quality parameters of a plurality of second servers, the service quality parameters including interface response time, channel encryption strength, and server load rate; a calculation module for obtaining weight values ​​of the plurality of second servers based on a trained weight model and according to the service quality parameters; a selection module for selecting a target server based on the weight values ​​of the plurality of second servers; and a first sending module for sending the encrypted data to the target server so that the target server processes the encrypted data.

[0009] According to another aspect of this disclosure, a data processing apparatus is provided, applied to a second server, comprising: a second receiving module for receiving encrypted data sent by a first server, wherein the encrypted data is obtained by the first server encrypting data to be processed after receiving a data transmission request, wherein the data transmission request carries the data to be processed; a processing module for processing the encrypted data to obtain a processing result; and a second sending module for sending the processing result to the first server; wherein the second server is a target server determined by a weight value of the second server, the weight value of the second server being obtained based on a trained weight model and service quality parameters, the service quality parameters including interface response time, channel encryption strength, and server load rate.

[0010] According to another aspect of this disclosure, an electronic device is provided, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to perform the data processing method described in any of the preceding claims by executing the executable instructions.

[0011] According to another aspect of this disclosure, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the data processing method described in any of the preceding claims.

[0012] According to another aspect of this disclosure, a computer program product is provided, the computer program product comprising a computer program or computer instructions, the computer program or computer instructions being loaded and executed by a processor to enable a computer to implement the data processing method described in any of the preceding claims.

[0013] In this embodiment, a first server receives a data transmission request and encrypts the data to be processed to obtain encrypted data. It then acquires service quality parameters from multiple second servers, including interface response time, channel encryption strength, and server load rate. Based on a trained weight model, it obtains weight values ​​for the multiple second servers according to the service quality parameters. Based on the weight values ​​of the multiple second servers, it selects a target server and sends the encrypted data to the target server so that the target server can process the encrypted data. This first server increases the security of data transmission by encrypting the data to be processed, and determines the second server that can improve data processing speed through service quality parameters and a weight model, thereby improving data processing speed while ensuring data transmission security.

[0014] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description

[0015] Figure 1 A schematic diagram of an exemplary system architecture to which the data encryption method or data processing method of the present disclosure embodiments can be applied is shown.

[0016] Figure 2 A flowchart of a data processing method according to an embodiment of the present disclosure is shown.

[0017] Figure 3 An integral lifecycle flowchart of an embodiment of this disclosure is shown.

[0018] Figure 4 A flowchart of a data processing method according to another embodiment of this disclosure is shown.

[0019] Figure 5 A schematic diagram of a data processing apparatus according to an embodiment of the present disclosure is shown.

[0020] Figure 6 A schematic diagram of a data processing apparatus according to an embodiment of the present disclosure is shown.

[0021] Figure 7A structural block diagram of an electronic device according to an embodiment of the present disclosure is shown. Detailed Implementation

[0022] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, they are provided so that this disclosure will be more comprehensive and complete, and will fully convey the concept of the exemplary embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.

[0023] Furthermore, some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.

[0024] It should be understood that the steps described in the method embodiments of this disclosure may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of this disclosure is not limited in this respect.

[0025] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are used only to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.

[0026] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".

[0027] Figure 1 A schematic diagram of an exemplary system architecture to which the data processing method of the present disclosure can be applied is shown.

[0028] like Figure 1 As shown, the system architecture may include a terminal device 101, a first server 102, and a second server 103. The terminal device 101, the first server 102, and the second server 103 communicate with each other through a network, which may be a wired network or a wireless network.

[0029] Optionally, the aforementioned wireless or wired networks use standard communication technologies and / or protocols. The network is typically the Internet, but can also be any network, including but not limited to Local Area Networks (LANs), Metropolitan Area Networks (MANs), Wide Area Networks (WANs), mobile, wired or wireless networks, private networks, or any combination of virtual private networks. In some embodiments, technologies and / or formats including Hyper Text Markup Language (HTML), Extensible Markup Language (XML), etc., are used to represent data exchanged over the network. Furthermore, conventional encryption technologies such as Secure Socket Layer (SSL), Transport Layer Security (TLS), Virtual Private Networks (VPNs), and Internet Protocol Security (IPsec) can be used to encrypt all or some links. In other embodiments, customized and / or dedicated data communication technologies can be used to replace or supplement the aforementioned data communication technologies.

[0030] The terminal device 101 that transmits data with the first server 102 may include, but is not limited to, mobile devices such as smartphones, tablets, and laptops, as well as terminal devices with specific functions or forms such as smart speakers, digital assistants, AR (Augmented Reality) devices, VR (Virtual Reality) devices, smart wearable devices, drones, and cameras. Alternatively, the terminal device 101 may also be a personal computer, such as a laptop computer or a desktop computer.

[0031] The first server 102 can be a device or system in a computer network that acts as an intermediary for data exchange and protocol conversion between different networks. For example, the first server can be a gateway. The first server 102 can also be a server with computing capabilities. For example, the first server 102 can be an edge server.

[0032] The second server 103 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. In some practical applications, the second server 103 can also be a server for a network platform, such as a trading platform, live streaming platform, social platform, or audio platform, etc., which is not limited in this embodiment. The second server 103 can be a single server or a cluster of multiple servers; the specific architecture of the server is not limited in this disclosure.

[0033] In some embodiments of this disclosure, a first server 102 is used to receive a data transmission request sent by a terminal device 101, the data transmission request carrying data to be processed; encrypt the data to be processed to obtain encrypted data; acquire service quality parameters of multiple second servers 103, the service quality parameters including interface response time, channel encryption strength, and server load rate; obtain weight values ​​of multiple second servers 103 based on a trained weight model and according to the service quality parameters; select a target server according to the weight values ​​of multiple second servers 103; and send the encrypted data to the target server so that the target server processes the encrypted data.

[0034] In some embodiments of this disclosure, the second server 103 is used to receive encrypted data sent by the first server. The encrypted data is obtained by the first server encrypting the data to be processed after receiving the data transmission request. The data transmission request carries the data to be processed. The encrypted data is processed to obtain a processing result. The processing result is then sent to the first server.

[0035] In addition, it should be noted that, Figure 1 The example shown is merely one application environment of the data processing method provided in this disclosure. Figure 1 The number of terminal devices 101, first server 102 and second server 103 in the diagram is merely illustrative. Depending on actual needs, there can be any number of terminal devices, first servers and second servers.

[0036] Figure 2 A flowchart of a data processing method according to an embodiment of the present disclosure is shown. Figure 2 The execution subject of the method provided in the embodiments can be any electronic device, such as... Figure 1 The first server 102 in this embodiment is not limited thereto. See references. Figure 2The data processing method provided in this embodiment includes S201 to S206.

[0037] S201, Receive data transmission request, which carries data to be processed.

[0038] In this embodiment of the disclosure, the data transmission request is a request sent by the terminal device to the first server, requesting the first server to select a second server with fast processing speed and / or high success rate to process the data to be processed. The data to be processed can be data collected by the terminal device or data stored on the terminal device.

[0039] For example, the terminal device is a drone that collects sensitive information, and the data to be processed may include the data collected by the drone.

[0040] For example, the terminal device is a mobile phone, and the data to be processed may include data stored on the mobile phone. For instance, member points stored in a membership points management system or funds stored on a funds management platform.

[0041] S202, encrypt the data to be processed to obtain encrypted data.

[0042] In this embodiment of the disclosure, in order to improve the security of the data to be processed, the data to be processed is encrypted. This embodiment of the disclosure does not specifically limit which encryption algorithm is used to encrypt the data to be processed.

[0043] For example, the data to be processed can be encrypted using the Advanced Encryption Standard (AES) symmetric key encryption algorithm to obtain encrypted data.

[0044] For example, to further enhance security and confidentiality, the data to be processed is first encrypted, then the encrypted data is blinded, and finally, the blinded data is signed to obtain the encrypted data.

[0045] S203, obtain service quality parameters of multiple second servers, including interface response time, channel encryption strength and server load rate.

[0046] In this embodiment of the disclosure, the quality of service parameter is a parameter used to reflect the service quality of the second server.

[0047] It should be noted that, from a latency perspective alone, the smaller the interface response time, the better; the smaller the server load rate, the better; and the weaker the channel encryption strength, the better.

[0048] S204, based on the trained weight model, obtains the weight values ​​of multiple second servers according to the service quality parameters.

[0049] Regarding the specific type of weighting model, this disclosure does not impose any particular limitation. Any model that can obtain the weight values ​​of multiple second servers based on service quality parameters and select the second server with fast processing speed and high reliability based on the weight values ​​of the second servers is acceptable.

[0050] S205: Select the target server based on the weight values ​​of multiple second servers.

[0051] In this embodiment of the disclosure, the weight value represents the service quality of the second server; the higher the weight value, the better the service quality.

[0052] For example, there are 5 second servers, and the weight values ​​of the 5 second servers are 1, 0.9, 0.8, 0.65 and 0.7 respectively. The second server with a weight value of 1 is selected as the target server.

[0053] For example, there are 5 second servers, with weight values ​​of 1, 0.9, 0.8, 0.65 and 0.9 respectively. The first and last second servers have the largest and the same weight values. The second server that is used more often is selected as the target server from the first and last second servers. In other words, when the weight values ​​are the same, the more frequently used second server is selected as the target server.

[0054] S206, Send encrypted data to the target server so that the target server can process the encrypted data.

[0055] In this embodiment of the disclosure, in order to further enhance the confidentiality of data transmission, a TLS 1.3 (Transport Layer Security 1.3, a protocol for protecting the security of communications on the Internet) encrypted channel can be selected to transmit encrypted data.

[0056] In this embodiment, the first server increases the security of data transmission by encrypting the data to be processed, and determines a second server that can improve the data processing speed by using service quality parameters and a weight model, thereby improving the data processing speed while ensuring data transmission security.

[0057] The present disclosure will now be described through several exemplary embodiments.

[0058] In an exemplary embodiment, the data processing method provided in this disclosure may further include: training the initial weights of the weight model based on the ant colony algorithm to obtain a trained weight model.

[0059] In this embodiment of the disclosure, historical data can be obtained and used as a training set. The initial weights of the weight model are trained using the ant colony algorithm to obtain the target weights of the weight model. The weight model with the target weights is then configured as the trained weight model.

[0060] In this embodiment of the disclosure, no specific limitation is made regarding the type of weight model. For example, the weight model can be a deep learning model or a machine learning model.

[0061] This disclosure discloses an embodiment that trains an initial weight model based on an ant colony algorithm, which optimizes weight allocation, improves the model's convergence speed and accuracy, and enhances its generalization ability and robustness. By avoiding local optima through global search, it exhibits strong adaptability, particularly excelling in handling complex and high-dimensional problems, thus improving the model's stability and efficiency in various application scenarios.

[0062] To quickly and accurately determine the target weight, this disclosure provides the following pheromone update algorithm using ant colony optimization.

[0063] In one embodiment, the pheromone update method in the ant colony algorithm is as follows: The target pheromone increment is obtained based on the pheromone increments of the optimal and suboptimal paths under the current path; the pheromone weight coefficient is calculated, which is 1 minus the pheromone evaporation coefficient; the pheromone weight coefficient is multiplied by the pheromone intensity of the current path to obtain the pheromone intensity retention; the updated pheromone intensity is calculated, which is the sum of the pheromone intensity retention and the target pheromone increment.

[0064] In this embodiment of the disclosure, the pheromone update formula in the ant colony algorithm is shown in Formula 1 below.

[0065]

[0066] in, Let be the pheromone intensity of the path from node i to node j at time t+1. The pheromone volatility coefficient ( ), Let be the pheromone intensity of the path from node i to node j at time t. For the optimal path pheromone increment, For the pheromone increment of the suboptimal path, This is the adjustment coefficient for the pheromone increment in the suboptimal path. It is a value less than 1.

[0067] For example, It can be any value among 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, and 0.9.

[0068] In this embodiment of the disclosure, increasing the pheromone increment of the suboptimal path helps to increase the diversity of solutions, discover potential effective paths, avoid the algorithm getting trapped in local optima in the early stages, and improve the global search capability and robustness of the system.

[0069] In this embodiment, the adjustment coefficient of the suboptimal path pheromone increment provides a more flexible adaptive capability, which can find the best balance between exploration and utilization according to the actual situation, and further optimize the efficiency and stability of the search process.

[0070] This embodiment of the disclosure combines the pheromone increments of the current optimal and second-best paths, enabling the system to dynamically adjust path priorities and thus optimize route selection. During the update process, the pheromone evaporation coefficient ensures the system is not excessively influenced by outdated path information, while the pheromone weighting coefficient controls the amount of pheromone retained, ensuring effective utilization of historically high-quality paths. Ultimately, by adding the retained path pheromone intensity to the new increment, the system achieves continuous optimization of path quality, adaptively selecting the optimal path in complex and changing environments, thereby improving the overall performance, stability, and robustness of the system.

[0071] In another embodiment, the weight model includes a first weight, a second weight, and a third weight, which correspond to the interface response time, the channel encryption strength, and the server load rate, respectively.

[0072] The expression for the weighted model is shown in Formula 2 below.

[0073]

[0074] in, For the first l The weight value of the second server, 、 and These represent the first weight, the second weight, and the third weight, respectively. The standardized value for the interface response time. The normalized value for the channel encryption strength. The standardized value for server load rate.

[0075] In this embodiment of the disclosure, in order to make the weight value as large as possible, the interface response time, channel encryption strength and server load rate are standardized, so as to accurately reflect the relationship between the weight value of the second server and the interface response time, channel encryption strength and server load rate.

[0076] It should be noted that the higher the value of the interface response time, the better. The smaller the value, the stronger the channel encryption. The smaller the value, the larger the server load rate value. The smaller the value, the better.

[0077] In this embodiment of the disclosure, the values ​​of the first weight, the second weight, and the third weight can be obtained by training with the ant colony algorithm, and can also be adjusted according to a preset strategy. Furthermore, they can be adjusted according to the preset strategy after the ant colony algorithm has been trained.

[0078] For example, in order to ensure the smooth operation of terminal device users, Increase the value. To further enhance security, Increasing the value ensures that sensitive data is always transmitted through the most secure channel.

[0079] This embodiment of the disclosure achieves fine-grained control of system performance by mapping the first, second, and third weights to interface response time, channel encryption strength, and server load rate. The weight model ensures that different performance indicators receive targeted attention during the decision-making process, guaranteeing that the system comprehensively considers response speed, security, and load conditions when selecting a path, thereby improving overall performance optimization capabilities. Specifically, the system can dynamically adjust the weights of various indicators based on the real-time network environment and task requirements, optimizing resource allocation.

[0080] In another embodiment, the service quality parameters also include data processing failure rate and evaluation value; wherein, the weight model includes a first weight, a second weight, a third weight, a fourth weight and a fifth weight, the first weight, the second weight, the third weight, the fourth weight and the fifth weight corresponding to the interface response time, the channel encryption strength, the server load rate, the data processing failure rate and the evaluation value, respectively.

[0081] In this embodiment, the interface response time is an actual measured value, which can refer to the time interval from when the user initiates a data transmission request to when the second server begins processing and returns a response. The channel encryption strength is related to the encryption algorithm used by the channel. The server load rate refers to the server's workload within a specific time period and can be obtained from the second server. The data processing failure rate is the probability that the second server will fail to process data within a certain period. The evaluation value can be a rating of the terminal device user's satisfaction with the second server's data processing.

[0082] The expression for the weighted model is shown in Formula 3 below.

[0083]

[0084] in, For the first l The weight value of the second server, 、 、 、 and These represent the first weight, second weight, third weight, fourth weight, and fifth weight, respectively. The standardized value for the interface response time. The normalized value for the channel encryption strength. The standardized value for server load rate. The standardized value for the data processing failure rate. The standardized value for the evaluation value, where, l Indicates the first l A second processor.

[0085] It should be noted that the higher the value of the interface response time, the better. The smaller the value, the stronger the channel encryption. The smaller the value, the larger the server load rate value. The smaller the value, the higher the data processing failure rate. The smaller the value, the higher the evaluation value. The larger the value, the better.

[0086] For example, we will use the scenario of redeeming points as an example to illustrate this.

[0087] Users redeem gift cards using points on their terminal devices. The user sends a data transmission request (e.g., "Redeem Now") to a first server via their terminal device. The first server can be a routing gateway. The first server checks all second servers (suppliers) that can provide gift cards. For example, if there are two supplier channels, channel A and channel B, the first server pulls or reads the data from its cache for each channel in real time. and get the latest and .

[0088] Assume the current data is as follows:

[0089] Channel A: The interface response time is 80ms. Channel A uses SM4 (a national cryptographic algorithm) encryption. The channel encryption strength is 1. The server load rate is 30%. The data processing failure rate is 2%. The evaluation value is 0.9.

[0090] Channel B: The interface response time is 200ms. Channel B uses AES-256 (an advanced encryption standard) encryption. The channel encryption strength is 1. The server load rate is 80%. The data processing failure rate is 1%. The evaluation value is 1.0.

[0091] The above data is standardized, with 1 representing the best and 0 the worst.

[0092] The standardized values ​​for channel A are as follows:

[0093] =0.9, =1.0, =0.7, =0.98, =0.9。

[0094] The standardized values ​​for channel B are as follows:

[0095] =0.4, =1.0, =0.2, =0.99, =1.0。

[0096] 、 、 、 and The values ​​are 0.4, 0.3, 0.2, 0.1 and 0.1 respectively.

[0097] =0.4 0.9+0.3 1.0+0.2 0.7+0.1 0.98+0.1 0.9=0.36+0.3+0.14+0.098+ 0.09=0.988 .

[0098] =0.4 0.4+0.3 1.0+0.2 0.2+0.1 0.99+0.1 1.0=0.16+0.3+0.04+0.099+0.1 =0.699 .

[0099] It should be noted that this disclosure does not specifically limit how the standardization process is performed. For example, the interface response time can be standardized using the following formula 4.

[0100]

[0101] in, This refers to the interface response time. The standardized value for the interface response time.

[0102] Routing decision: Channel A has a weight of 0.988, and Channel B has a weight of 0.699. Since the weight of Channel A is much higher than that of Channel B, the first server will route this exchange request to the second server, which has Channel A.

[0103] Feedback Learning: After the call is completed, the first server records the actual interface response time and data processing success or failure of this call channel A (used to calculate the data processing failure rate), and then updates the data processing information. and Historical data influences future decisions.

[0104] This disclosure can also adjust the first weight, second weight, third weight, fourth weight, and fifth weight according to a preset strategy.

[0105] For example, to improve user experience, a high weight is configured as the first weight corresponding to the interface response time, ensuring the ultimate smoothness of user operations.

[0106] For example, to ensure system stability, the third and fourth weights corresponding to server load rate and data processing failure rate are dynamically adjusted to automatically avoid faulty and high-load nodes, thereby achieving system self-healing and high availability.

[0107] For example, to enhance security, a high weight is configured as the second weight corresponding to the channel encryption strength, ensuring that sensitive data is always transmitted through the most secure channel.

[0108] For example, in order to optimize resource costs, intelligent traffic allocation (such as determining the first, second, third, fourth, and fifth weights through ant colony algorithms) can indirectly encourage partners to improve their service quality, thereby gaining more traffic and forming a virtuous cycle.

[0109] This disclosure, by introducing data-driven decision-making based on a weighted model, enables flexible optimization of various system performance indicators, significantly improving user experience and system efficiency. Through data-driven dynamic adjustments, this disclosure significantly enhances system operational efficiency and the level of intelligent decision-making.

[0110] For example, during peak data processing periods (such as peak points redemption periods), the weights of the weight model can be adjusted using the ant colony algorithm. The adjustment process is as follows:

[0111] Initial stage: All channels have similar pheromone concentrations, based on five-dimensional weights. 、 、 、 and The probability is distributed, and the exploration begins.

[0112] Positive feedback loop: A certain channel (such as channel A) has a high request success rate and fast response time due to its high server performance and low load. Therefore, requests choosing this channel release more pheromones, leading to... Rising rapidly The pheromone intensity of channel A.

[0113] It should be noted that the state transition formula of the ant colony algorithm is shown in Formula 5 below.

[0114]

[0115] in, Let be the probability that ant k moves from the current node i to the next allowed node j; Let be the pheromone concentration on edge (i, j), which is the pheromone intensity of the path from node i to node j, reflecting the historical attractiveness of the path; As a heuristic factor; The pheromone importance factor controls the weight of pheromones in path selection; the larger the value, the more the ants rely on historical experience. This is the heuristic importance factor, which controls the weight of heuristic information on path selection. The larger the value, the more inclined the ants are to choose the shortest path. Let k be the set of nodes that ant k has not yet visited, ensuring that the path is unique.

[0116] Intelligent convergence: As iterations proceed, It keeps getting higher and higher, even in its instantaneous state. Even with occasional fluctuations (such as a slightly slower response time), according to the state transition formula, its probability of being selected remains high (because...). (The item is quite large). This forms a kind of "reputation accumulation," where the system trusts high-quality channels with a stable historical performance.

[0117] Dynamic adaptation: Response time of the second server load interface corresponding to channel A Soaring ( A sudden drop in pheromones caused several requests to fail in succession. These failed requests do not release pheromones, and since pheromones continue to evaporate, It begins to descend. Simultaneously, another channel, B... As the request increases, it begins to be exploratoryly assigned to channel B. If channel B performs well, its pheromones... The flow will gradually increase until the system completes the traffic switch from channel A to channel B.

[0118] Global optimization: Ant colony optimization finds a balance between "utilizing" known high-quality paths and "exploring" potentially better paths, thereby achieving optimal global performance for the entire system over long-term operation.

[0119] This disclosure goes beyond simply mechanically responding to real-time metrics. Instead, it acts like an experienced dispatcher, trusting both the "reputation" (pheromones) built through long-term cooperation and closely monitoring the "real-time situation" (five-dimensional weights) on-site, thereby making more intelligent and robust routing decisions. This method can significantly improve the overall robustness, throughput, and resource utilization of the system in high-concurrency, unstable network environments. It should be noted that using this disclosure for points redemption can improve the success rate to 99.99%, and also achieve millisecond-level points distribution and redemption processing. The following effects can be achieved using this disclosure, with specific data shown in Table 1.

[0120] Table 1 Indicator Data

[0121]

[0122] As can be seen from Table 1 above, the latency, accuracy, and convergence speed of the embodiments disclosed herein are better than those of the prior art.

[0123] For example, let's take an image acquisition scenario as an example.

[0124] The terminal device is a drone, which collects images of the power supply line. Users send data transmission requests (e.g., "line fault diagnosis") to a first server via the terminal device. This first server can be an edge server. The first server checks all second servers (central servers) that can provide fault diagnosis capabilities. For example, there are two central servers: a first central server and a second central server. The channel between the first central server and the first server is channel A, and the channel between the second central server and the first server is channel B. The first server pulls data from each channel in real time or reads it from a cache. and get the latest and .

[0125] Assume the current data is as follows:

[0126] Channel A: Interface response time is 80ms, Channel A uses SM4 encryption, channel encryption strength is 1, server load is 30%, data processing failure rate is 2%, and the evaluation value is... 1.0 .

[0127] Channel B: Interface response time is 200ms, Channel B uses AES-256 encryption, channel encryption strength is 1, server load is 80%, data processing failure rate is 1%, and evaluation value is 1.0.

[0128] The above data is standardized, with 1 representing the best and 0 the worst.

[0129] The standardized values ​​for channel A are as follows:

[0130] =0.9, =1.0, =0.7, =0.98, =1.0。

[0131] The standardized values ​​for channel B are as follows:

[0132] =0.4, =1.0, =0.2, =0.99, =1.0。

[0133] 、 、 、 and The values ​​are 0.4, 0.3, 0.2, 0.1 and 0.1 respectively.

[0134] =0.4 0.9+0.3 1.0+0.2 0.7+0.1 0.98+0.1 0.9=0.36+0.3+0.14+0.098+0.1 =0.998 .

[0135] =0.4 0.4+0.3 1.0+0.2 0.2+0.1 0.99+0.1 1.0=0.16+0.3+0.04+0.099+0.1 =0.699 .

[0136] Routing decision: Channel A has a weight of 0.998, and Channel B has a weight of 0.699. Since the weight of Channel A is much higher than that of Channel B, the first server routes the image processing request to the second server, which has Channel A.

[0137] Feedback Learning: After the call is completed, the first server records the actual interface response time and data processing success or failure of this call channel A (used to calculate the data processing failure rate), and then updates the data processing information. and Historical data influences future decisions.

[0138] This disclosure introduces a comprehensive weighting model to optimize multi-dimensional service quality parameters, thereby improving overall system performance and user experience. Specifically, the weighting model includes five key indicators: interface response time, channel encryption strength, server load rate, data processing failure rate, and evaluation value. By dynamically adjusting the proportions of each weight using an ant colony algorithm, key parameters such as interface response time and channel encryption strength are prioritized, ensuring that the system can adaptively optimize load distribution and fault handling while maintaining high efficiency and security. This improves overall service quality and enhances system stability and reliability.

[0139] In another exemplary embodiment, sending encrypted data to a target server in the data processing method provided in this disclosure may include the following steps A1 to A4.

[0140] Step A1: Before encrypting data transmission, use the elliptic curve algorithm to exchange public keys between the first server and the target server to ensure forward confidentiality of the session.

[0141] For example, during a TLS 1.3 handshake, the first server and the target server exchange public keys using an elliptic curve (Diffie-Hellman, ECDHE) algorithm. In this way, the generated session key is only valid within the current session. Even if the private key is leaked in the future, past communications cannot be decrypted, thus ensuring forward confidentiality.

[0142] It should be noted that forward secrecy is achieved through temporary key exchange, which ensures the security of session data.

[0143] Step A2: Based on the elliptic curve algorithm, obtain the shared key according to the public key of the target server.

[0144] For example, the first server and the target server randomly generate a first private key and a second private key, respectively. The first server calculates a first public key based on the elliptic curve algorithm and the first private key. The target server calculates a second public key based on the elliptic curve algorithm and the second private key. The first server sends the first public key to the target server, and the target server sends the second public key to the first server. The first public key and the second public key are the public keys exchanged in step A1.

[0145] The first server uses the first private key and the second public key to calculate the shared key using the elliptic curve algorithm. Similarly, the target server uses the second private key and the first public key to calculate the shared key using the elliptic curve algorithm.

[0146] Step A3: Generate a verification tag based on the shared key and encrypted data.

[0147] Step A4: Send the verification tag and encrypted data to the target server.

[0148] In this embodiment of the disclosure, the target server recalculates the MAC value of the encrypted data using the same key (shared key) and algorithm, and compares it with the received MAC value (verification tag). If they match, it indicates that the encrypted message has not been tampered with during transmission.

[0149] For example, the first server generates a MAC value using the algorithm MAC(M, K), where M is the encrypted data and K is the shared key. Upon receiving the encrypted data (M) and the verification tag (MAC) value, the target server calculates a new MAC value using the same algorithm. If the calculated MAC value matches the received MAC value, the message is considered complete and tamper-proof.

[0150] This embodiment of the disclosure ensures forward confidentiality of the session by employing an elliptic curve algorithm to exchange public keys between the first server and the target server before encrypted data transmission. Based on this public key exchange, a shared key is generated using the target server's public key. Furthermore, a verification tag is generated using this shared key and encrypted data to ensure data integrity and authentication. Finally, the verification tag and encrypted data are sent to the target server, thereby achieving efficient and reliable data transmission while ensuring data security and confidentiality.

[0151] It should be noted that the above method of verifying data using MAC values ​​can be applied between two apps on a terminal device, between a terminal device and a first server, and between a first server and a second server. The following example illustrates this using the scenario of redeeming gift cards with points.

[0152] For example, the terminal device is a mobile phone, and the above verification method is applied between the client of the terminal device and the points system. This is used in scenarios where users check their points, redeem gifts, or participate in activities through an app, mini-program, or website. The data to be processed may include sensitive information such as user login credentials, personal identification information, points balance, and transaction records. The above verification method ensures that this information is not stolen or tampered with during transmission.

[0153] For example, the first server is a smart routing gateway, and the above verification method is applied between the points system and the smart routing gateway. For instance, it's used when a terminal device sends a data transmission request to the gateway for decision-making. The data to be processed includes sensitive information; if this data is eavesdropped on, business details will be leaked.

[0154] For example, the first server is a smart routing gateway, and the second server is the supplier's server. For instance, after selecting the optimal channel based on an algorithm, the gateway initiates an actual request to the gift supplier, etc. The data to be processed includes highly sensitive data such as account information, points balance, and user identifiers. Security here is directly related to the security of the user's points assets.

[0155] For example, this applies to communication between various applications. For instance, it could involve internal API calls between user services, points services, order services, and risk control services. It's important to note that internal networks are not absolutely secure. Following the zero-trust principle, all internal communications should be encrypted to prevent risks associated with lateral movement.

[0156] In another exemplary embodiment, the data to be processed may include a request timestamp, a user identifier, and a processing instruction; the request timestamp may be the timestamp when the data transmission request is established, or it may be the timestamp of a period of time before the data transmission request is established, and this embodiment of the disclosure does not specifically limit it.

[0157] The data processing method provided in this disclosure may further include: storing the request timestamp, processing instruction, and evaluation value on a blockchain; or, performing a hash operation on the processing instruction to obtain the calculation result, and storing the calculation result, request timestamp, and evaluation value on a blockchain. It should be noted that performing a hash operation on the processing instruction and storing the calculation result on a blockchain can prevent the operation instruction from being exposed.

[0158] In this embodiment of the disclosure, the processing instruction is used to indicate what kind of processing is performed on the data (as described below). For example, in a points redemption scenario, the processing instruction can be an instruction related to points, such as adding points or deducting points.

[0159] For example, the blockchain evidence storage system uses the Hyperledger Fabric architecture (an open-source enterprise-grade blockchain framework). Whenever data changes, it generates a new Merkle tree hash by recalculating the hash value of the data and updating the Merkle tree.

[0160] In this embodiment of the disclosure, the requested timestamp can be a Unix timestamp, or a Unix timestamp plus a GPS week number. The data to be processed may also include a transaction serial number. The hash value of the transaction serial number can be stored on the blockchain to protect user privacy and avoid exposing the serial number in plaintext.

[0161] It should be noted that the rating values ​​need to be updated at regular intervals, for example, every 5 minutes.

[0162] This disclosure ensures data immutability and transparency by storing the request timestamp, processing instruction, and evaluation value in a blockchain, or by performing a hash operation on the processing instruction and storing the result, request timestamp, and evaluation value in a blockchain. This not only improves data security and reliability but also enables traceability and auditing of each request, thereby enhancing the system's credibility and tamper-proof capabilities.

[0163] In yet another exemplary embodiment, the data processing method provided in this disclosure may further include: sending an early warning to a target server in response to the current time being equal to or greater than a first failure threshold and less than a second failure threshold; sending a first instruction to the target server in response to the current time being equal to or greater than the second failure threshold and less than a third failure threshold, the first instruction being used to instruct the target server to stop processing the encrypted data; and sending a second instruction to a first server in response to the current time being equal to or greater than the third failure threshold, the second instruction being used to instruct the first server to delete the data to be processed; wherein the third failure threshold is greater than the second failure threshold, and the second failure threshold is greater than the first failure threshold.

[0164] In this embodiment of the disclosure, the warning is used to instruct the target server not to process the encrypted data. The first instruction is used to instruct the target server to stop processing the encrypted data. The second instruction is used to instruct the first server to delete the data to be processed.

[0165] It should be noted that the data processing time in this embodiment is time-sensitive to ensure the efficiency and timeliness of the processing.

[0166] For example, smart contracts are deployed on blockchain nodes, which can be collaboratively managed by a first server and a second server. The first timeliness threshold is the sum of the request timestamp and 364 days; the second timeliness threshold is the sum of the request timestamp and 365 days, minus 1 hour; and the third timeliness threshold is the sum of the request timestamp and 365 days, plus 2 days.

[0167] For example, the first time limit is the sum of the points generation time and 364 days; the second time limit is the sum of the points generation time and 365 days, minus 1 hour; and the third time limit is the sum of the points generation time and 365 days, plus 2 days, as shown below. Figure 3 As shown, in the points redemption scenario, the points lifecycle includes the following steps S301 to S305.

[0168] S301, Points Generation. For example, users earn points by making purchases or by topping up their accounts.

[0169] S302, Validity period setting. For example, the validity period is set to the sum of the points generation time and 365 days, plus 2 days. Points will be cleared after the expiration date.

[0170] S303, Warning Alert. If the current time is equal to or greater than the first failure threshold and less than the second failure threshold, a warning is sent to the target server.

[0171] S304, Automatic Freeze. If the current time is equal to or greater than the second failure threshold and less than the third failure threshold, a first instruction is sent to the target server, which instructs the target server to freeze the points.

[0172] S305, Reset points to zero. If the current time is equal to or greater than the third expiration threshold (validity period), send a second instruction to the first server. The second instruction is used to instruct the first server to reset the points to zero.

[0173] For example, in the points redemption scenario, the three-level failure thresholds are set as shown in Table 2 below.

[0174] Table 2. Level 3 Failure Threshold Table

[0175]

[0176] As can be seen from Table 2, by setting different failure thresholds, smart contracts can be automatically invalidated, thereby ensuring that the data to be processed is processed in a timely manner.

[0177] This disclosure embodiment, by setting multiple failure thresholds and triggering corresponding warnings and instructions based on the current time, can effectively control the data processing flow, ensure that appropriate measures are taken at different failure stages, thereby improving data security and processing efficiency.

[0178] In yet another exemplary embodiment, the first server acts as the master clock, and the target server synchronizes its time with the first server through a PTP clock synchronization system.

[0179] In this embodiment, the PTP (Precision Time Protocol) clock synchronization system adopts the IEEE 1588v2 protocol, which can achieve time synchronization at the ±10μs level.

[0180] For example, in image processing applications, the validity period of image processing is 1 year ± 2 days, with an accuracy of ± 200ms. Here, ± 200ms represents the time synchronization accuracy (excluding checksum).

[0181] For example, in a points redemption scenario, the formula for points validity period is as follows:

[0182] Tvalid=Tcreate+(365±2)×3600× ms±200 ms

[0183] Tvalid represents the validity period of the points, Tcreate is the request timestamp, Tvalid is 1 year ± 2 days, with an accuracy of ± 200ms.

[0184] The embodiments disclosed herein can trigger an integral failure operation within a precise time window.

[0185] This disclosure achieves high-precision time consistency among servers by using a first server as the master clock and synchronizing the target server with it via a PTP clock synchronization system. This disclosure effectively reduces data processing delays or timing errors caused by clock deviations, ensuring that operations such as encrypted data processing, instruction triggering, and failure threshold judgment are executed under a unified time base, thereby improving system reliability, real-time performance, and data processing accuracy.

[0186] In yet another exemplary embodiment, the data processing method provided in this disclosure, which encrypts the data to be processed to obtain encrypted data, may include: encrypting the data to be processed to obtain intermediate data; and blinding the intermediate data to obtain encrypted data.

[0187] In this embodiment of the disclosure, no specific limitation is made regarding the type of encryption processing applied to the data to be processed.

[0188] For example, in order to reduce the amount of data transmitted, the data to be processed can be hashed to obtain intermediate data, and then the intermediate data can be blinded to obtain encrypted data.

[0189] For example, in order to reduce the amount of data stored on the target server, a symmetric encryption algorithm is used to encrypt the data to be processed to obtain intermediate data, and then the intermediate data is blinded to obtain encrypted data.

[0190] This disclosure embodiment encrypts the data to be processed to obtain intermediate data, and further performs blinding processing on the intermediate data to generate encrypted data, which can effectively enhance data security and privacy protection. Blinding processing can hide the original content of the data, ensuring that even if intercepted during processing, sensitive information cannot be leaked or used, thereby improving the system's protection capabilities and ensuring data security during transmission and storage.

[0191] Based on the same inventive concept, this disclosure also provides a data processing method, as described in the following embodiments. Since the principle by which this method solves the problem is similar to that of the above-described method embodiments, the implementation of this method embodiment can refer to the implementation of the above-described method embodiments, and repeated details will not be elaborated further.

[0192] Figure 4 A flowchart of a data processing method according to another embodiment of this disclosure is shown. Figure 4 The execution subject of the method provided in the embodiments can be any electronic device, such as... Figure 1 The second server 103 in this embodiment is not limited thereto. See references. Figure 4 The data processing method provided in this embodiment includes S401 to S403.

[0193] S401, Receive encrypted data sent by the first server. The encrypted data is obtained by the first server encrypting the data to be processed after receiving the data transmission request. The data transmission request carries the data to be processed.

[0194] S402 processes the encrypted data to obtain the processing result.

[0195] In this embodiment of the disclosure, the processing result can be the result of processing encrypted data, such as processing success or processing failure.

[0196] S403, send the processing result to the first server. The second server is the target server determined by its weight value. The weight value of the second server is obtained based on a trained weight model and service quality parameters, including interface response time, channel encryption strength, and server load rate.

[0197] In this embodiment, the second server receives encrypted data sent by the first server, processes the encrypted data, and sends the processing result back to the first server. This embodiment increases data transmission security by encrypting the data to be processed, and determines a second server capable of improving data processing speed through service quality parameters and a weight model, thereby improving data processing speed while ensuring data transmission security.

[0198] The present disclosure will now be described through several exemplary embodiments.

[0199] In one exemplary embodiment, the data to be processed includes a request timestamp, a user identifier, data information, and processing instructions. The data processing method provided in this disclosure, which processes encrypted data to obtain a processing result, may include the following steps B1 to B5.

[0200] Step B1 involves deblinding the encrypted data to obtain intermediate data.

[0201] In this embodiment of the disclosure, encrypted data is deblinded using a deblinding algorithm to obtain intermediate data. This embodiment of the disclosure does not specifically limit the deblinding algorithm. For example, a deblinding algorithm is the inverse operation of blinding, aiming to recover the original data (intermediate data) by removing the random factor or encryption layer introduced during the blinding process.

[0202] Step B2 involves decrypting the intermediate data to obtain the request timestamp, user identifier, data information, and processing instructions.

[0203] In this embodiment of the disclosure, the data information can be information collected by the terminal device (e.g., image information) or information stored on the terminal device (e.g., points). The processing instructions are used to indicate what kind of processing to be performed on the data information. For example, performing target extraction and rejection on the image information. Another example is adding points or using points to redeem gift cards.

[0204] Step B3: Obtain the request timestamp stored on the blockchain and the user identifier stored on the second server.

[0205] In this embodiment of the disclosure, the user identifier is used for identity verification. The specific type of user identifier is not limited in this embodiment. For example, the user identifier can be a user's biometric characteristics, such as facial features or voiceprint features. As another example, the user identifier can also be an identifier that can prove identity, such as an ID card number.

[0206] Step B4: Verify the decrypted request timestamp and user identifier using the request timestamp stored on the blockchain and the user identifier stored on the second server, respectively.

[0207] In this embodiment of the disclosure, if the request timestamp stored on the blockchain is the same as the decrypted request timestamp, and the user identifier stored on the second server is the same as the decrypted user identifier, then the verification is successful; otherwise, the verification fails.

[0208] Step B5: If the verification is successful, process the data information according to the processing instructions to obtain the processing result.

[0209] This embodiment of the disclosure verifies the decrypted data by using data stored on the blockchain and data stored on a second server. The verification of the decrypted data by both parties ensures the accuracy of the decrypted data.

[0210] In another exemplary embodiment, the data to be processed includes a request timestamp, a user identifier, data information, and processing instructions. The data processing method provided in this disclosure, by processing encrypted data to obtain a processing result, may include the following steps C1 to C6.

[0211] Step C1 involves deblinding the encrypted data to obtain intermediate data.

[0212] Step C2 involves decrypting the intermediate data to obtain the request timestamp, user identifier, data information, and processing instructions.

[0213] Step C3: Obtain the request timestamp stored on the blockchain, the calculation result, and the user identifier stored on the second server. The calculation result is the hash value of the processing instruction.

[0214] Step C4: Perform a hash operation on the processing instruction to obtain the hash value to be verified.

[0215] Step C5 involves verifying the hash value to be verified, the decrypted request timestamp, and the user identifier using the calculation result, the request timestamp stored on the blockchain, and the user identifier stored on the second server, respectively.

[0216] In this embodiment of the disclosure, verification is successful if the calculation result is the same as the hash value to be verified, the request timestamp stored on the blockchain is the same as the decrypted request timestamp, and the user identifier stored on the second server is the same as the decrypted user identifier. Otherwise, verification fails.

[0217] Step C6: If the verification is successful, process the data information according to the processing instructions to obtain the processing result.

[0218] This disclosure ensures the security and accuracy of data processing through deblinding, decryption, hashing, and multiple verifications of encrypted data. By verifying request timestamps, user identifiers, and processing instructions, combined with information stored on the blockchain and a second server, data tampering and identity forgery can be effectively prevented. This ensures that only legitimate requests and instructions can pass verification and ultimately complete data processing, thereby improving the system's security and reliability.

[0219] In yet another exemplary embodiment, the data to be processed includes a request timestamp, a user identifier, data information, and a processing instruction; the data processing method provided in this disclosure processes encrypted data to obtain a processing result, which may include the following steps D1 to D6.

[0220] Step D1 involves deblinding the encrypted data to obtain intermediate data, which includes the hash value of the request timestamp, the hash value of the user identifier, the hash value of the data information, and the hash value of the processing instructions.

[0221] It should be noted that the first server performs a hash operation on the data to be processed to obtain intermediate data, then performs blinding processing on the intermediate data to obtain encrypted data. The target server then performs deblinding processing on the encrypted data to obtain the intermediate data.

[0222] For example, the formula for generating intermediate data is shown in Formula 5 below.

[0223]

[0224] in, For intermediate data, Used to represent the blinding processing algorithm. Used to represent hash encryption algorithms.

[0225] For example, in the scenario of redeeming gifts with points, For blind signature integration codes, The data is transmitted to the redemption platform (target server) for deblinding. The four key elements (request timestamp, user identifier, data information, and processing instructions) are compared. If the comparison is successful, points are redeemed, and a successful redemption result is sent. If the comparison fails, a failed redemption result is sent. It should be noted that this embodiment obtains the hash value through deblinding and then independently verifies the four key elements, without needing to know the original request timestamp.

[0226] It should be noted that the first server performs hash operations on the request timestamp, user identifier, data information, and processing instructions respectively to obtain the hash value of the request timestamp, the hash value of the user identifier, the hash value of the data information, and the hash value of the processing instructions.

[0227] Step D2: Obtain the request timestamp stored on the blockchain.

[0228] Step D3: Perform a hash operation on the request timestamp stored on the blockchain to obtain the time verification hash value.

[0229] Step D4: Obtain the verification hash value stored on the second server. The verification hash value includes the verification user identifier hash value, the verification data information hash value, and the verification processing instruction hash value.

[0230] Step D5: Verify the hash values ​​of the request timestamp, user identifier, and data information using the time verification hash value, user identifier hash value, and data information hash value, respectively.

[0231] Step D6: If the verification is successful, obtain the processing instruction based on the hash value of the processing instruction, and process the data information according to the processing instruction to obtain the processing result.

[0232] It should be noted that the second server stores the hash values ​​corresponding to the processing instructions. The hash value corresponding to the processing instructions stored on the second server is used to query the hash value that matches the hash value of the processing instructions. The processing instruction corresponding to the hash value is the data information processing instruction. The data information is processed by the processing instruction to obtain the processing result.

[0233] This disclosure embodiment obtains the hash value through deblinding processing and independently verifies four elements: request timestamp, user identifier, data information, and processing instructions. This eliminates the need for direct access to the original request timestamp, thereby improving the system's privacy and security. In this way, data processing can effectively verify the authenticity and integrity of data without exposing sensitive information, reducing reliance on the original data, enhancing tamper resistance and privacy protection, and improving the system's credibility and security.

[0234] In yet another exemplary embodiment, the data to be processed includes a request timestamp, a user identifier, data information, and a processing instruction; wherein processing the encrypted data to obtain a processing result includes: receiving a verification tag; generating a verification tag to be verified based on a shared key and the encrypted data; verifying the verification tag based on the verification tag to be verified; and, if the verification passes, processing the encrypted data to obtain a processing result.

[0235] In this embodiment of the disclosure, if the verification fails, the encrypted data is not processed, and the verification failure information is returned to the first server.

[0236] This disclosure embodiment generates a verification tag using a shared key and encrypted data, and verifies it to ensure that the encrypted data has not been tampered with or forged during processing. In this way, the system can process encrypted data only after successful verification, effectively preventing data leakage and tampering, while enhancing the security and integrity of data processing. This method improves the accuracy and trustworthiness of data verification, ensuring the security of encrypted data throughout the entire processing flow.

[0237] In yet another exemplary embodiment, when applied to a first server or a second server, the data processing method provided in this disclosure may further include:

[0238] In response to an abnormal state, an abnormal warning is sent to the terminal device.

[0239] In this embodiment of the disclosure, anomaly detection is achieved through an anomaly detection model. This embodiment of the disclosure does not specifically limit the type of anomaly detection model. For example, the anomaly detection model can be a decision tree model (such as using the CART algorithm).

[0240] For example, the input features of the decision tree model are shown in Table 3 below.

[0241] Table 3 Input Features

[0242]

[0243] The decision tree model outputs an anomaly probability score (0-1). A threshold greater than 0.925224 is defined as an anomaly, and an anomaly warning is issued when an anomaly occurs.

[0244] It should be noted that the CART (Classification and Regression Trees) algorithm is a decision tree algorithm used for classification and regression problems.

[0245] The points redemption method disclosed herein can achieve the following technical effects: the points issuance delay can be reduced from 5s to 120ms, the redemption success rate can be increased from 95% to 99.99%, the anomaly identification accuracy rate is 99.3%, and the points validity period management accuracy is ±200ms.

[0246] The following table 4 shows a comparison between the effects of the embodiments disclosed herein and traditional technologies in the points redemption scenario.

[0247] Table 4 Comparison of Technical Effects

[0248]

[0249] It should be noted that before redeeming points, it may be necessary to verify whether the user has sufficient points balance, whether the request timestamp is within the validity period, and whether the processing instruction exceeds the instruction range. If all verifications pass, the points redemption for gifts can proceed.

[0250] Based on the same inventive concept, this disclosure also provides a data processing apparatus, as described in the following embodiments. Since the principle by which this apparatus solves the problem is similar to that of the method embodiments described above, the implementation of this apparatus embodiment can refer to the implementation of the method embodiments described above, and repeated details will not be repeated.

[0251] Figure 5 This diagram illustrates a data processing apparatus according to an embodiment of the present disclosure, such as... Figure 5 As shown, the system, applied to a first server, includes: a first receiving module 51, an encryption module 52, an acquisition module 53, a calculation module 54, a selection module 55, and a first sending module 56. The first receiving module 51 can receive data transmission requests, which carry data to be processed. The encryption module 52 can encrypt the data to be processed to obtain encrypted data. The acquisition module 53 can acquire service quality parameters of multiple second servers, including interface response time, channel encryption strength, and server load rate. The calculation module 54 can obtain weight values ​​of multiple second servers based on a trained weight model and the service quality parameters. The selection module 55 can select a target server based on the weight values ​​of the multiple second servers. The first sending module 56 can send encrypted data to the target server so that the target server can process the encrypted data.

[0252] In one embodiment, the data processing device further includes a training module, which is used to train the initial weights of the weight model based on the ant colony algorithm to obtain a trained weight model.

[0253] In one embodiment, the pheromone update method in the ant colony algorithm is as follows: The target pheromone increment is obtained based on the pheromone increments of the optimal and suboptimal paths under the current path; the pheromone weight coefficient is calculated, which is 1 minus the pheromone evaporation coefficient; the pheromone weight coefficient is multiplied by the pheromone intensity of the current path to obtain the pheromone intensity retention; the updated pheromone intensity is calculated, which is the sum of the pheromone intensity retention and the target pheromone increment.

[0254] In one embodiment, the first sending module 56 is further configured to perform public key exchange between the first server and the target server using an elliptic curve algorithm before encrypted data transmission to ensure forward confidentiality of the session; obtain a shared key based on the elliptic curve algorithm and the public key of the target server; generate a verification tag based on the shared key and encrypted data; and send the verification tag and encrypted data to the target server.

[0255] In one embodiment, the data to be processed includes a request timestamp, a user identifier, and a processing instruction; the data processing device further includes a storage module, which is used to store the request timestamp, the processing instruction, and the evaluation value in a blockchain; or, the processing instruction is hashed to obtain a result, and the result, the request timestamp, and the evaluation value are stored in a blockchain.

[0256] In one embodiment, the first sending module 56 is further configured to send an early warning to the target server in response to the current time being equal to or greater than a first failure threshold and less than a second failure threshold; send a first instruction to the target server in response to the current time being equal to or greater than the second failure threshold and less than a third failure threshold, the first instruction being configured to instruct the target server to stop processing the encrypted data; and send a second instruction to the first server in response to the current time being equal to or greater than the third failure threshold, the second instruction being configured to instruct the first server to delete the data to be processed; wherein the third failure threshold is greater than the second failure threshold, and the second failure threshold is greater than the first failure threshold.

[0257] In one embodiment, the first server acts as the master clock, and the target server synchronizes its time with the first server through a PTP clock synchronization system.

[0258] In one embodiment, the encryption module 52 is used to encrypt the data to be processed to obtain intermediate data; and to perform blinding processing on the intermediate data to obtain encrypted data.

[0259] The data processing apparatus disclosed in this embodiment increases the security of data transmission by encrypting the data to be processed, and determines a second server that can improve the data processing speed by using quality of service parameters and a weight model, thereby improving the data processing speed while ensuring data transmission security.

[0260] Based on the same inventive concept, this disclosure also provides a data processing apparatus, as described in the following embodiments. Since the principle by which this apparatus solves the problem is similar to that of the method embodiments described above, the implementation of this apparatus embodiment can refer to the implementation of the method embodiments described above, and repeated details will not be repeated.

[0261] Figure 6 This diagram illustrates a data processing apparatus according to an embodiment of the present disclosure, such as... Figure 6As shown, the device, applied to a second server, may include: a second receiving module 61, a processing module 62, and a second sending module 63. The second receiving module 61 can receive encrypted data sent by the first server. The encrypted data is obtained by encrypting data to be processed after the first server receives a data transmission request, wherein the data transmission request carries the data to be processed. The processing module 62 can process the encrypted data to obtain a processing result. The second sending module 63 can send the processing result to the first server. The second server is a target server determined by its weight value, which is obtained based on a trained weight model and service quality parameters, including interface response time, channel encryption strength, and server load rate.

[0262] In one embodiment, the data to be processed includes a request timestamp, a user identifier, data information, and processing instructions. The processing module 62 can also be used to deblind the encrypted data to obtain intermediate data; decrypt the intermediate data to obtain the request timestamp, user identifier, data information, and processing instructions; obtain the request timestamp stored on the blockchain and the user identifier stored on the second server; verify the decrypted request timestamp and user identifier using the request timestamp stored on the blockchain and the user identifier stored on the second server, respectively; if the verification is successful, process the data information according to the processing instructions to obtain the processing result.

[0263] In one embodiment, the data to be processed includes a request timestamp, a user identifier, data information, and a processing instruction. The processing module 62 can also be used to deblind the encrypted data to obtain intermediate data; decrypt the intermediate data to obtain the request timestamp, user identifier, data information, and processing instruction; obtain the request timestamp stored on the blockchain, the calculation result, and the user identifier stored on the second server, with the calculation result being the hash value of the processing instruction; perform a hash operation on the processing instruction to obtain a hash value to be verified; verify the hash value to be verified, the decrypted request timestamp, and the user identifier using the calculation result, the request timestamp stored on the blockchain, and the user identifier stored on the second server, respectively; if the verification passes, process the data information according to the processing instruction to obtain the processing result.

[0264] In one embodiment, the data to be processed includes a request timestamp, a user identifier, data information, and a processing instruction. The processing module 62 can also be used to deblind the encrypted data to obtain intermediate data, which includes the hash value of the request timestamp, the hash value of the user identifier, the hash value of the data information, and the hash value of the processing instruction. It then retrieves the request timestamp stored on the blockchain; performs a hash operation on the request timestamp stored on the blockchain to obtain a time verification hash value; retrieves the verification hash value stored on the second server, which includes the verification hash value of the user identifier, the verification hash value of the data information, and the verification hash value of the processing instruction; verifies the hash values ​​of the request timestamp, the user identifier, and the data information using the time verification hash value, the verification hash value of the user identifier, and the verification hash value of the data information, respectively; if the verification is successful, it obtains the processing instruction based on the hash value of the processing instruction, and processes the data information according to the processing instruction to obtain the processing result.

[0265] In one embodiment, the data to be processed includes a request timestamp, a user identifier, data information, and a processing instruction; the processing module 62 can also be used to receive a verification tag; generate a verification tag to be verified based on the shared key and encrypted data; verify the verification tag based on the verification tag to be verified; and if the verification is successful, process the encrypted data to obtain a processing result.

[0266] The data processing apparatus disclosed in this embodiment increases the security of data transmission by encrypting the data to be processed, and determines a second server that can improve the data processing speed by using quality of service parameters and a weight model, thereby improving the data processing speed while ensuring data transmission security.

[0267] The following reference Figure 7 To describe an electronic device 700 according to such an embodiment of the present disclosure. Figure 7 The electronic device 700 shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments disclosed herein.

[0268] like Figure 7 As shown, the electronic device 700 is manifested in the form of a general-purpose computing device. The components of the electronic device 700 may include, but are not limited to: at least one processing unit 710, at least one storage unit 720, and a bus 730 connecting different system components (including storage unit 720 and processing unit 710).

[0269] The storage unit stores program code that can be executed by the processing unit 710, causing the processing unit 710 to perform the steps described in the "Exemplary Methods" section above according to various exemplary embodiments of this disclosure.

[0270] Storage unit 720 may include readable media in the form of volatile storage units, such as random access memory (RAM) 7201 and / or cache memory 7202, and may further include read-only memory (ROM) 7203.

[0271] The storage unit 720 may also include a program / utility 7204 having a set (at least one) program module 7205, such program module 7205 including but not limited to: an operating system, one or more application programs, other program modules and program data, each or some combination of these examples may include an implementation of a network environment.

[0272] Bus 730 can represent one or more of several types of bus structures, including a memory cell bus or memory cell controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local bus using any of the various bus structures.

[0273] Electronic device 700 can also communicate with one or more external devices 740 (e.g., keyboard, pointing device, Bluetooth device, etc.), and with one or more devices that enable a user to interact with electronic device 700, and / or with any device that enables electronic device 700 to communicate with one or more other computing devices (e.g., router, modem, etc.). This communication can be performed via input / output (I / O) interface 750. Furthermore, electronic device 700 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 760. As shown, network adapter 760 communicates with other modules of electronic device 700 via bus 730. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with electronic device 700, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0274] From the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, terminal device, or network device, etc.) to execute the methods according to the embodiments of this disclosure.

[0275] Based on the same inventive concept, this disclosure also provides a computer-readable storage medium, which may be a readable signal medium or a readable storage medium. This computer-readable storage medium stores a program product capable of implementing the methods described above.

[0276] More specific examples of computer-readable storage media in this disclosure may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0277] Based on the same inventive concept, this disclosure also provides a computer program product, including a computer program or instructions, which, when executed by a processor, implement the method described above. Since the principle by which this computer program product embodiment solves the problem is similar to that of the above method embodiment, the implementation of this computer program product embodiment can refer to the implementation of the above method embodiment, and repeated details will not be elaborated further.

[0278] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the appended claims.

Claims

1. A data processing method, characterized in that, Applied to the first server, including: Receive a data transmission request, which carries data to be processed; The data to be processed is encrypted to obtain encrypted data; Obtain service quality parameters from multiple second servers, including interface response time, channel encryption strength, and server load rate. Based on the trained weight model, multiple weight values ​​for the second server are obtained according to the service quality parameters; Select the target server based on the weight values ​​of multiple second servers; The encrypted data is sent to the target server so that the target server can process the encrypted data; The initial weights of the weight model are trained using an ant colony algorithm to obtain the trained weight model. The pheromone update method in the ant colony algorithm is as follows: the target pheromone increment is obtained based on the optimal path pheromone increment and the second-best path pheromone increment under the current path; the pheromone weight coefficient is calculated, which is 1 minus the pheromone evaporation coefficient; the product of the pheromone weight coefficient and the pheromone intensity of the current path is calculated to obtain the pheromone intensity retention; the updated pheromone intensity is calculated, which is the sum of the pheromone intensity retention and the target pheromone increment. The service quality parameters include an evaluation value, and the data to be processed includes a request timestamp, a user identifier, and a processing instruction. The method further includes storing the request timestamp, the processing instruction, and the evaluation value on a blockchain.

2. The method according to claim 1, characterized in that, The weighting model includes a first weight, a second weight, and a third weight, which correspond to the interface response time, the channel encryption strength, and the server load rate, respectively.

3. The method according to claim 1, characterized in that, The service quality parameters also include the data processing failure rate; The weight model includes a first weight, a second weight, a third weight, a fourth weight, and a fifth weight, which correspond to the interface response time, the channel encryption strength, the server load rate, the data processing failure rate, and the evaluation value, respectively.

4. The method according to claim 1, characterized in that, Sending the encrypted data to the target server includes: Before the encrypted data transmission, an elliptic curve algorithm is used to exchange public keys between the first server and the target server to ensure the forward confidentiality of the session. Based on the elliptic curve algorithm, a shared key is obtained according to the public key of the target server; A verification tag is generated based on the shared key and the encrypted data; The verification tag and the encrypted data are sent to the target server.

5. The method according to claim 4, characterized in that, The method further includes: performing a hash operation on the processing instruction to obtain a calculation result, and storing the calculation result, the request timestamp, and the evaluation value in a blockchain.

6. The method according to claim 5, characterized in that, The method further includes: In response to the current time being equal to or greater than a first failure threshold and less than a second failure threshold, an early warning is sent to the target server; In response to the current time being equal to or greater than the second failure threshold and less than the third failure threshold, a first indication is sent to the target server, the first indication being used to instruct the target server to stop processing the encrypted data; In response to the current time being equal to or greater than the third failure threshold, a second instruction is sent to the first server, the second instruction being used to instruct the first server to delete the data to be processed; Wherein, the third failure threshold is greater than the second failure threshold, and the second failure threshold is greater than the first failure threshold.

7. The method according to claim 1, characterized in that, The first server acts as the master clock, and the target server synchronizes its time with the first server through the PTP clock synchronization system.

8. The method according to claim 1, characterized in that, The step of encrypting the data to be processed to obtain encrypted data includes: The data to be processed is encrypted to obtain intermediate data; The intermediate data is blinded to obtain the encrypted data.

9. A data processing method, characterized in that, Applied to the second server, including: The system receives encrypted data sent by a first server. The encrypted data is obtained by the first server encrypting the data to be processed after receiving the data transmission request. The data transmission request carries the data to be processed. The encrypted data is processed to obtain the processing result; Send the processing result to the first server; The second server is the target server determined by its weight value. This weight value is obtained based on a trained weight model and service quality parameters, including interface response time, channel encryption strength, and server load rate. The initial weights of the weight model are trained using an ant colony algorithm to obtain the trained weight model. The pheromone update method in the ant colony algorithm is as follows: The target pheromone increment is obtained based on the optimal and suboptimal pheromone increments under the current path; a pheromone weight coefficient is calculated, which is 1 minus the pheromone evaporation coefficient; the pheromone weight coefficient is multiplied by the current path pheromone intensity to obtain the pheromone intensity retention; and the updated pheromone intensity is calculated, which is the sum of the pheromone intensity retention and the target pheromone increment. The data to be processed includes a request timestamp, a user identifier, data information, and a processing instruction. The process of processing the encrypted data to obtain a processing result includes: deblinding the encrypted data to obtain intermediate data; decrypting the intermediate data to obtain the request timestamp, the user identifier, the data information, and the processing instruction; obtaining the request timestamp stored on the blockchain and the user identifier stored on the second server; verifying the decrypted request timestamp and user identifier using the request timestamp stored on the blockchain and the user identifier stored on the second server, respectively; and, if the verification is successful, processing the data information according to the processing instruction to obtain a processing result.

10. The method according to claim 9, characterized in that, The data to be processed includes a request timestamp, user identifier, data information, and processing instructions; The process of processing the encrypted data to obtain the processing result includes: The encrypted data is deblinded to obtain intermediate data; The intermediate data is decrypted to obtain the request timestamp, the user identifier, the data information, and the processing instructions; Obtain the request timestamp, the calculation result, and the user identifier stored on the second server, where the calculation result is the hash value of the processing instruction; Perform a hash operation on the processing instruction to obtain the hash value to be verified; The hash value to be verified, the decrypted request timestamp, and the user identifier are verified using the calculation result, the request timestamp stored on the blockchain, and the user identifier stored on the second server, respectively. If the verification is successful, the data information is processed according to the processing instructions to obtain the processing result.

11. The method according to claim 9, characterized in that, The data to be processed includes a request timestamp, user identifier, data information, and processing instructions; The process of processing the encrypted data to obtain the processing result includes: The encrypted data is deblinded to obtain intermediate data, which includes the hash value of the request timestamp, the hash value of the user identifier, the hash value of the data information, and the hash value of the processing instruction. Retrieve the request timestamp stored on the blockchain; Perform a hash operation on the request timestamp stored on the blockchain to obtain a time verification hash value; Obtain the verification hash value stored on the second server, the verification hash value including the verification user identifier hash value, the verification data information hash value, and the verification processing instruction hash value; The hash values ​​of the request timestamp, the user identifier, and the data information are verified using the time verification hash value, the user identifier hash value, and the data information hash value, respectively. If the verification is successful, the processing instruction is obtained based on the hash value of the processing instruction, and the data information is processed according to the processing instruction to obtain the processing result.

12. The method according to claim 9, 10 or 11, characterized in that, The data to be processed includes a request timestamp, user identifier, data information, and processing instructions; The process of processing the encrypted data to obtain the processing result includes: Receive verification tag; A verification tag to be verified is generated based on the shared key and the encrypted data; The verification tag is verified based on the verification tag to be verified; If the verification is successful, the encrypted data is processed to obtain the processing result.

13. A data processing apparatus, characterized in that, Applied to the first server, including: The first receiving module is used to receive a data transmission request, wherein the data transmission request carries data to be processed; An encryption module is used to encrypt the data to be processed to obtain encrypted data; The acquisition module is used to acquire service quality parameters of multiple second servers, including interface response time, channel encryption strength, and server load rate. The calculation module is used to obtain the weight values ​​of multiple second servers based on the trained weight model and the service quality parameters. The selection module is used to select a target server based on the weight values ​​of multiple second servers; The first sending module is used to send the encrypted data to the target server so that the target server can process the encrypted data; The data processing device further includes a training module, which is used to train the initial weights of the weight model based on the ant colony algorithm to obtain a trained weight model; obtain the target pheromone increment based on the optimal path pheromone increment and the second-best path pheromone increment under the current path; calculate the pheromone weight coefficient, which is 1 minus the pheromone evaporation coefficient; calculate the product of the pheromone weight coefficient and the current path pheromone intensity to obtain the pheromone intensity retention; and calculate the updated pheromone intensity, which is the sum of the pheromone intensity retention and the target pheromone increment. The service quality parameters include an evaluation value, and the data to be processed includes a request timestamp, a user identifier, and a processing instruction. The data processing device also includes a storage module, which stores the request timestamp, the processing instruction, and the evaluation value on a blockchain.

14. A data processing apparatus, characterized in that, Applied to the second server, including: The second receiving module is used to receive encrypted data sent by the first server. The encrypted data is obtained by the first server encrypting the data to be processed after receiving the data transmission request. The data transmission request carries the data to be processed. The processing module is used to process the encrypted data and obtain the processing result; The second sending module is used to send the processing result to the first server; The second server is the target server determined by its weight value. This weight value is obtained based on a trained weight model and service quality parameters, including interface response time, channel encryption strength, and server load rate. The initial weights of the weight model are trained using an ant colony algorithm to obtain the trained weight model. The pheromone update method in the ant colony algorithm is as follows: The target pheromone increment is obtained based on the optimal and suboptimal pheromone increments under the current path; a pheromone weight coefficient is calculated, which is 1 minus the pheromone evaporation coefficient; the pheromone weight coefficient is multiplied by the current path pheromone intensity to obtain the pheromone intensity retention; and the updated pheromone intensity is calculated, which is the sum of the pheromone intensity retention and the target pheromone increment. The data to be processed includes a request timestamp, a user identifier, data information, and processing instructions. The processing module is further configured to deblind the encrypted data to obtain intermediate data; decrypt the intermediate data to obtain the request timestamp, the user identifier, the data information, and the processing instructions; obtain the request timestamp stored on the blockchain and the user identifier stored on the second server; verify the decrypted request timestamp and user identifier using the request timestamp stored on the blockchain and the user identifier stored on the second server, respectively; and if the verification is successful, process the data information according to the processing instructions to obtain the processing result.

15. An electronic device comprising: processor; as well as Memory for storing the executable instructions of the processor; The processor is configured to execute the data processing method of any one of claims 1 to 12 by executing the executable instructions.