Data processing method, device, equipment and storage medium

By receiving data processing requests in the first server in the cluster and sending HTTP requests to the external database, the problem of increasing links during the cluster expansion process is solved, and network and database performance is improved.

CN115514748BActive Publication Date: 2025-08-19CHINA CONSTRUCTION BANK +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211175181.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-26
Publication Date
2025-08-19
Estimated Expiration
2042-09-26

AI Technical Summary

Technical Problem

During the expansion of the system cluster, the number of links between the server and the database increases, affecting the performance of the network and database.

Method used

The first server of the cluster receives the data processing request, determines the identification information of the target database, and when the target database is an external database, an HTTP request carrying data processing instructions is sent to the second server linked to the external database, thereby reducing the number of links between the server and the database.

Benefits of technology

In the process of clustering horizontally scaling servers or databases, reduce the number of links, improve network and database performance, meet cross-border demands, and improve data processing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115514748B_ABST
    Figure CN115514748B_ABST
Patent Text Reader

Abstract

The present application provides a data processing method, apparatus, device and storage medium. It relates to the field of big data processing technology. The method comprises: a first server of a cluster receives a data processing request, wherein the data processing request includes data information of the data to be processed, and according to the data information, determines identification information of a target database related to the data to be processed, and when the identification information indicates that the target database includes an external database, sends an HTTP request carrying a data processing instruction to a second server linked to the external database, wherein both the first server and the second server are linked to one database, which can reduce the number of links between the server and the database during the process of horizontal expansion of the server and database in the cluster, and can also meet cross-database requirements through HTTP requests, thereby improving the performance of the network and the database.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of big data processing technology, and in particular to a data processing method, apparatus, device and storage medium. Background Art

[0002] As the system business volume increases, the machine CPU and storage usage in the system will also increase. When the machine CPU reaches a certain threshold, it is necessary to expand the server and database. Figure 1 The schematic diagram of the structure of the server and database cluster before and after expansion in the prior art is shown as follows: Figure 1 As shown in the figure, before expansion, one server AP established a link with one database DB. After expansion, each server AP established a link with each database DB. In other words, each server or database expansion adds N links (N is the number of servers or databases before expansion). Therefore, when the system cluster scales up, a large number of links need to be created, which affects both network performance and database performance. Summary of the Invention

[0003] The present application provides a data processing method, apparatus, device and storage medium, which aim to solve at least one of the technical problems in the related art to a certain extent.

[0004] In a first aspect, the present application provides a data processing method, which is applied to a first server of a cluster, and each server of the cluster is linked to a database. The method includes: receiving a data processing request, wherein the data processing request includes data information of the data to be processed; determining, based on the data information, identification information of a target database related to the data to be processed; when the identification information indicates that the target database includes an external database, sending an HTTP request carrying a data processing instruction to a second server linked to the external database, wherein the second server belongs to the cluster.

[0005] In the second aspect, the present application provides a data processing device, including: a first server applied to a cluster, each server of the cluster is linked to a database, including: a first receiving module, receiving a data processing request, wherein the data processing request includes data information of the data to be processed; a first determination module, used to determine the identification information of the target database related to the data to be processed based on the data information; a first processing module, used to send an HTTP request carrying data processing instructions to a second server linked to the external database when the identification information indicates that the target database includes an external database, wherein the second server belongs to the cluster.

[0006] In a third aspect, the present application provides an electronic device comprising: a processor; and a memory for storing processor-executable instructions; wherein the processor is configured to execute the instructions to implement a data processing method.

[0007] In a fourth aspect, the present application provides a computer-readable storage medium, which enables the electronic device to perform a data processing method when instructions in the computer-readable storage medium are executed by a processor of an electronic device.

[0008] In a fifth aspect, the present application provides a computer program product, including a computer program, and the computer program is executed by a processor to perform a data processing method.

[0009] The data processing method, apparatus, device and storage medium provided in the present application receive a data processing request through a first server of a cluster, wherein the data processing request includes data information of the data to be processed, and determines identification information of a target database related to the data to be processed based on the data information, and when the identification information indicates that the target database includes an external database, sends an HTTP request carrying a data processing instruction to a second server linked to the external database, wherein both the first server and the second server are linked to a database, which can reduce the number of links between the server and the database during the process of horizontal expansion of the server or database in the cluster, and can also meet cross-database requirements through HTTP requests, thereby improving the performance of the network and the database. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0011] Figure 1 The diagram shows the structure of the server and database cluster before and after expansion in the prior art;

[0012] Figure 2 is a schematic diagram of a server and database cluster structure according to an embodiment of the present application;

[0013] Figure 3 is a flowchart of a data processing method according to the first embodiment of the present application;

[0014] Figure 4 is a flowchart of a data processing method according to the second embodiment of the present application;

[0015] Figure 5 is a flowchart of a data processing method according to the third embodiment of the present application;

[0016] Figure 6 is a block diagram of a data processing device according to the present application;

[0017] Figure 7 A block diagram of an exemplary electronic device suitable for implementing the embodiments of the present application is shown.

[0018] The above drawings illustrate specific embodiments of the present application, which will be described in more detail below. These drawings and the textual description are not intended to limit the scope of the present application in any way, but rather to illustrate the concepts of the present application to those skilled in the art by reference to specific embodiments. DETAILED DESCRIPTION

[0019] The embodiments of the present application are described in detail below. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended only to explain the present application and are not to be construed as limiting the present application. On the contrary, the embodiments of the present application include all variations, modifications, and equivalents that fall within the spirit and scope of the appended claims.

[0020] It should be noted that the executor of the data processing method of this embodiment may be a data processing device, which may be implemented by software and / or hardware, and which may be configured in an electronic device, which may include but is not limited to a terminal, a server, etc.

[0021] In order to implement the data processing method of the present application, the present application also provides a server and database cluster architecture, Figure 2 is a schematic diagram of the server and database cluster structure according to an embodiment of the present application, as shown in FIG. Figure 2 As shown, the cluster of this embodiment can include a web server, multiple servers, and multiple databases. The multiple servers, such as server AP1, server AP2, and server AP3, can connect to the web server to receive and process requests sent by the front end. The cluster also includes multiple databases, such as database DB1, database DB2, and database DB3, each of which is linked to a server. For example, server AP1 is linked to database DB1, server AP2 is linked to database DB2, and server AP3 is linked to database DB3. Each server can operate on the database to which it is linked. Furthermore, each server is configured with an HTTP interface, through which it can receive HTTP requests sent by other servers. Each server and database can be a single machine or comprised of multiple machines, without limitation.

[0022] It should be noted that the cluster in this embodiment can be a cluster that processes any business, such as a cluster that processes order business or a cluster that processes banking business, without limitation. Furthermore, the cluster size can be set based on the actual business scenario. During the process of expanding servers and databases, links are established between the expanded databases and servers.

[0023] Figure 3 is a flow chart of a data processing method according to the first embodiment of the present application, as shown in FIG. Figure 3 As shown, the method includes:

[0024] S301: Receive a data processing request, where the data processing request includes data information of data to be processed.

[0025] The data processing method provided in the embodiment of the present application can be executed by the first server in the cluster. The first server can be any one of the servers AP1, AP2, and AP3 in the cluster, without limitation. This embodiment will use server AP1 as the first server to explain the data processing method.

[0026] Specifically, the server AP1 may first receive a data processing request from the web server, wherein the data processing request may be, for example, a data addition request, a data deletion request, a data modification request, a data query request, or the like, which involves operating a database and is not limited thereto.

[0027] In some embodiments, the data processing request includes, for example, data information of the data to be processed.

[0028] The data targeted by the data processing request may be referred to as data to be processed, and the data to be processed may have corresponding data information, such as a data name, a data identifier, etc., which is not limited.

[0029] For example, in a specific application scenario, a user needs to query historical order data related to them. The client can generate a query request (i.e., a data processing request) and send it to the web server. The web server can then dispatch the request to server AP1. In this case, server AP1 can receive the data processing request from the web server. The data to be processed is historical order data, and the data information can include, for example, the start and end times of historical orders entered by the user, user account information, and so on, without limitation.

[0030] S302: Determine identification information of a target database related to the data to be processed based on the data information.

[0031] The database associated with the data to be processed (historical order data) can be referred to as the target database. For example, the database in the cluster used to store the data to be processed can be referred to as the target database. The target database can be one or more databases in the cluster, without limitation. Furthermore, each database can have corresponding identification information, such as a database name, IP address, or any other possible identifier, without limitation.

[0032] After receiving the data processing request as mentioned above, the server AP1 (first server) of this embodiment can further respond to the data processing request and determine the identification information of the target database related to the data to be processed based on the data information. For example: based on the start and end time of the historical order, user account and other data information, determine the identification information of the target database that stores the historical order data.

[0033] In some embodiments, each server AP may have a corresponding configuration file that records the data information stored in each database in the cluster. Specifically, the configuration file may record, for example, a mapping between database identification information and stored information. When determining the identification information of a target database associated with the data to be processed, server AP1 in this embodiment may determine the identification information of the target database based on the configuration file.

[0034] S303: When the identification information indicates that the target database includes an external database, an HTTP request carrying a data processing instruction is sent to a second server connected to the external database, where the second server belongs to a cluster.

[0035] Among them, in this embodiment, the database locally linked to the first server AP1 can be called a local database, and the local database corresponds to database DB1; relative to the local database, other databases in the cluster other than database DB1 can be called external databases, such as one or more databases DB3, DB2, etc., and there is no restriction on this, and the server linked to the external database can be called the second server.

[0036] In some embodiments, if the target database indicated by the identification information is database DB3, that is, database DB3 stores historical order data queried by users, then database DB3 is the external database of this embodiment, and correspondingly, server AP3 linked to database DB3 is the second server of this embodiment.

[0037] Furthermore, in the case where it is determined that the target database includes an external database, this embodiment needs to cross over to the external database (database DB3) to perform operations.

[0038] Specifically, in this embodiment, the first server AP1 can send an HTTP request to the second server AP3. This HTTP request can, for example, carry a data processing instruction related to the data processing request, such as a database query command for historical order data. The data processing instruction can be embedded in the HTTP request in the form of a URL, for example, without limitation. After receiving the HTTP request, the second server AP3 can perform operations on the linked database DB3 according to the data processing instruction.

[0039] In some other embodiments, if the identification information indicates that the target database includes a local database linked to the first server, that is, the historical order data queried by the user in this embodiment is stored in the local database DB1 linked to the first server AP1, then the first server AP1 can process the data to be processed in the local database DB1, that is, query the historical order data.

[0040] In other embodiments, if the identification information indicates that the target database includes both a local database linked to the first server and an external database (e.g., database DB3), that is, in this embodiment, the historical order data queried by the user is stored in both databases DB1 and DB3, then the first server AP1 can query the historical order data in local database DB1 and send an HTTP request to a second server AP3 linked to database DB3. The second server AP3 then performs a query operation on the linked database DB3 according to the data processing instruction. It will be appreciated that after processing the data processing request, the server can feed back the result of the data processing request to the user client.

[0041] In this embodiment, a data processing request is received by a first server of a cluster, wherein the data processing request includes data information of the data to be processed, and based on the data information, identification information of a target database related to the data to be processed is determined, and when the identification information indicates that the target database includes an external database, an HTTP request carrying a data processing instruction is sent to a second server linked to the external database, wherein both the first server and the second server are linked to one database, which can reduce the number of links between servers and databases during the process of horizontal expansion of servers or databases in the cluster, and can also meet cross-database requirements through HTTP requests, thereby improving network and database performance.

[0042] It should be noted that the acquisition, storage, and application of user accounts, order information, and other data involved in the technical solution of this application comply with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0043] Figure 4is a flow chart of a data processing method according to the second embodiment of the present application, as shown in FIG. Figure 4 As shown, the method includes:

[0044] S401: Determine correlation coefficients between multiple types of business data, wherein the data to be processed belongs to business data.

[0045] In an embodiment of the present application, the data of the business processed by the cluster can be referred to as business data, and business data, for example, the order data mentioned above, that is to say, the data to be processed belongs to business data. Among them, the order data corresponding to each user can be regarded as a kind of business data. When there are multiple users, there can be multiple types of business data. In a specific application scenario, there may be a correlation between users. For example, two users are in a parent-child relationship, and their corresponding accounts are parent-child accounts. Then, the order data under the two accounts are highly correlated. In this case, this embodiment can determine the correlation coefficient between multiple business data, and the correlation coefficient can characterize the strength of the correlation between the business data.

[0046] In some embodiments, in the operation of determining the correlation coefficient, this embodiment may perform a modulo operation on the service numbers corresponding to the various service data.

[0047] Each type of business data (each user's order data) may have a corresponding business number. The business number may be, for example, a user account number (also referred to as a customer number). The user accounts of two associated users (e.g., a parent-child relationship) may be similar, for example, the parent-child accounts may be 10000 and 10001. In this case, this embodiment may perform a modulo operation on the business numbers (customer numbers) corresponding to the various types of business data. Furthermore, a correlation coefficient may be determined based on the result of the modulo operation. Different modulo results may correspond to different correlation coefficients, and a smaller modulo result may indicate a stronger correlation.

[0048] It is understandable that the above example is only an illustrative example of determining the similarity coefficient by taking the modulus of the customer number. In actual applications, any other possible method can be used to determine the similarity coefficient, and there is no limitation to this.

[0049] S402: storing various business data in different databases according to correlation coefficients.

[0050] After determining the correlation coefficients between the various business data, this embodiment can further store the various business data in different databases based on the correlation coefficients. Specifically, highly correlated business data can be stored in the same database. For example, order data for two users in a parent-child relationship can be stored in database DB1. Consequently, when a user requests to process related data, since the related data is stored in the same database, cross-database operations are not required, thereby improving data processing efficiency.

[0051] S403: Receive a data processing request, where the data processing request includes data information of the data to be processed.

[0052] S404: Determine identification information of a target database related to the data to be processed based on the data information.

[0053] S405: When the identification information indicates that the target database includes an external database, an HTTP request carrying a data processing instruction is sent to a second server linked to the external database.

[0054] The specific description of S403-405 can be found in the above embodiment and will not be repeated here.

[0055] S406: Receive data to be processed from the second server.

[0056] In this embodiment, if the data processing request is a query request, after the second server performs the relevant operation, such as querying historical order data (data to be processed), it can send the data to be processed to the first server, which then provides feedback to the user's client. If the data processing request is other requests (such as add, delete, or modify requests), after the second server performs the relevant operation, it can send the processing results to the first server, which then provides feedback to the user's client. Thus, the user can view the request results.

[0057] In this embodiment, a data processing request is received by the first server of the cluster, wherein the data processing request includes data information of the data to be processed, and based on the data information, identification information of the target database related to the data to be processed is determined, and when the identification information indicates that the target database includes an external database, an HTTP request carrying a data processing instruction is sent to the second server linked to the external database, wherein the first server and the second server are both linked to a database, which can reduce the number of links between the server and the database during the process of horizontal expansion of the server or database in the cluster, and can also meet cross-database requirements through HTTP requests, thereby improving the performance of the network and database. In addition, this embodiment can store related data in the same database, so there is no need to perform cross-database operations on the database, thereby improving the efficiency of data processing and achieving the technical effect of quickly operating the database.

[0058] Figure 5 is a flow chart of a data processing method according to the third embodiment of the present application, as shown in FIG. Figure 5 As shown, the method includes:

[0059] S501: When the access form of the data processing request is visitor access, determine an arbitrary server as a first server.

[0060] In an embodiment of the present application, a user's data processing request may have different access forms, such as visitor access and login access, wherein visitor access does not require the user to perform login authentication, while login access requires the user to perform login authentication. In this embodiment, the first server that receives the data processing request may be determined based on the access form of the data processing request.

[0061] In some embodiments, when the access form of the data processing request is visitor access, this embodiment can determine any server AP in the cluster (including server AP1, server AP2, server AP3, etc.) as the first server, that is, any server can process the visitor's data processing request.

[0062] S502: When the access form of the data processing request is login access, determine a server related to the login information as a first server.

[0063] In some other embodiments, when the access form of the data processing request is login access, this embodiment may determine a server related to the login information as the first server.

[0064] For example, let's say the user logging in is User 1. User 1's login information may include a user account. This embodiment can determine the database storing the business data (e.g., database DB1) and the server AP1 connected to database DB1 based on the user account. In this embodiment, the first server is server AP1, meaning that User 1's data processing request is handled by first server AP1. Therefore, when processing the request, first server AP1 only needs to operate within the locally connected database, without having to perform cross-database operations. This achieves the technical effect of rapidly operating the database.

[0065] S503: Receive a data processing request, where the data processing request includes data information of the data to be processed.

[0066] That is, after selecting the first server according to the access form of the data processing request, the data processing request is received by using the first server.

[0067] S504: Determine identification information of a target database related to the data to be processed based on the data information.

[0068] S505: When the identification information indicates that the target database includes an external database, an HTTP request carrying a data processing instruction is sent to a second server linked to the external database.

[0069] The specific description of S503-S505 can be found in the above embodiment and will not be repeated here.

[0070] In this embodiment, a data processing request is received by the first server of the cluster, wherein the data processing request includes data information of the data to be processed, and based on the data information, identification information of the target database related to the data to be processed is determined, and when the identification information indicates that the target database includes an external database, an HTTP request carrying a data processing instruction is sent to the second server linked to the external database, wherein the first server and the second server are both linked to a database, which can reduce the number of links between the server and the database during the process of horizontal expansion of the server or database in the cluster, and can also meet cross-database requirements through HTTP requests, thereby improving the performance of the network and database. In addition, this embodiment determines the first server according to the access form, so that the first server only needs to operate on the database linked to the local machine during the request processing, without the need for cross-database operations, thereby achieving the technical effect of quickly operating the database.

[0071] Figure 6 This is a block diagram of a data processing device according to the present application, which is applied to the first server of the cluster. Each server of the cluster is connected to a database, such as Figure 6 As shown, the data processing device 60 includes:

[0072] A first receiving module 601 receives a data processing request, wherein the data processing request includes data information of data to be processed;

[0073] A first determining module 602 is configured to determine identification information of a target database related to the data to be processed based on the data information;

[0074] The first processing module 603 is configured to send an HTTP request carrying a data processing instruction to a second server connected to the external database when the identification information indicates that the target database includes an external database, wherein the second server belongs to a cluster.

[0075] In some embodiments, the apparatus 60 further includes: a second processing module configured to process the data to be processed in the local database when the identification information indicates that the target database includes the local database linked to the first server.

[0076] In some embodiments, the apparatus 60 further comprises:

[0077] A second determining module is configured to determine correlation coefficients between a plurality of business data, wherein the data to be processed belongs to the business data; and

[0078] The grouping module is used to store various business data into different databases based on correlation coefficients.

[0079] In some embodiments, the second determining module is specifically configured to:

[0080] Performing a modulo operation on the business numbers corresponding to the various business data; and

[0081] The correlation coefficient is determined based on the result of the modulo operation.

[0082] In some embodiments, the apparatus 60 further includes: a second receiving module configured to receive data to be processed from a second server.

[0083] In some embodiments, the apparatus further includes a third determining module, specifically configured to:

[0084] In the case where the access form of the data processing request is visitor access, determining any server as the first server; or

[0085] When the access form of the data processing request is login access, a server associated with the login information is determined as the first server.

[0086] In this embodiment, a data processing request is received by a first server of a cluster, wherein the data processing request includes data information of the data to be processed, and based on the data information, identification information of a target database related to the data to be processed is determined, and when the identification information indicates that the target database includes an external database, an HTTP request carrying a data processing instruction is sent to a second server linked to the external database, wherein both the first server and the second server are linked to one database, which can reduce the number of links between servers and databases during the process of horizontal expansion of servers or databases in the cluster, and can also meet cross-database requirements through HTTP requests, thereby improving network and database performance.

[0087] According to an embodiment of the present application, the present application also provides an electronic device, a readable storage medium and a computer program product.

[0088] Figure 7 7 is a block diagram of an electronic device according to the present application. For example, the electronic device 700 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.

[0089] Reference Figure 7 , electronic device 700 may include one or more of the following components: a processing component 702 , a memory 704 , a power component 706 , a multimedia component 708 , an audio component 710 , an input / output (I / O) interface 712 , a sensor component 714 , and a communication component 716 .

[0090] The processing component 702 generally controls the overall operation of the electronic device 700, such as operations associated with display, phone calls, data communications, camera operation, and recording operations. The processing component 702 may include one or more processors 620 to execute instructions to perform all or part of the steps of the above-described method. In addition, the processing component 702 may include one or more modules to facilitate interaction between the processing component 702 and other components. For example, the processing component 702 may include a multimedia module to facilitate interaction between the multimedia component 708 and the processing component 702.

[0091] The memory 704 is configured to store various types of data to support operations on the electronic device 700. Examples of such data include instructions for any application or method operating on the electronic device 700, contact data, phone book data, messages, pictures, videos, etc. The memory 704 can be implemented by any type of volatile or non-volatile storage device, or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk, or optical disk.

[0092] The power supply component 706 provides power to the various components of the electronic device 700. The power supply component 706 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device 700.

[0093] The multimedia component 708 includes a touch screen that provides an output interface between the electronic device 700 and the user. In some embodiments, the touch screen may include a liquid crystal display (LCD) and a touch panel (TP). The touch panel includes one or more touch sensors to sense touches, slides, and gestures on the touch panel. The touch sensor can not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 708 includes a front camera and / or a rear camera. When the electronic device 700 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera can receive external multimedia data. Each front camera and rear camera can be a fixed optical lens system or have focal length and optical zoom capabilities.

[0094] The audio component 710 is configured to output and / or input audio signals. For example, the audio component 710 includes a microphone (MIC) that is configured to receive external audio signals when the electronic device 700 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals can be further stored in the memory 704 or transmitted via the communication component 716.

[0095] In some embodiments, the audio component 710 further includes a speaker for outputting audio signals.

[0096] I / O interface 712 provides an interface between processing component 702 and peripheral interface modules, such as a keyboard, click wheel, buttons, etc. These buttons may include but are not limited to: a home button, volume buttons, a start button, and a lock button.

[0097] The sensor assembly 714 includes one or more sensors for providing various aspects of status assessment for the electronic device 700. For example, the sensor assembly 714 can detect the open / closed state of the electronic device 700, the relative positioning of components, such as the display and keypad of the electronic device 700. The sensor assembly 714 can also detect changes in the position of the electronic device 700 or a component of the electronic device 700, the presence or absence of user contact with the electronic device 700, the orientation or acceleration / deceleration of the electronic device 700, and temperature changes of the electronic device 700. The sensor assembly 714 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 714 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 714 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0098] The communication component 716 is configured to facilitate wired or wireless communication between the electronic device 700 and other devices. The electronic device 700 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 716 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 716 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0099] In an exemplary embodiment, the electronic device 700 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above-mentioned data processing method.

[0100] In an exemplary embodiment, a computer-readable storage medium including instructions is also provided, such as a memory 704 including instructions, and the instructions can be executed by the processor 920 of the electronic device 700 to perform the above method. Alternatively, the computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0101] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered as exemplary only, and the true scope and spirit of the present application are indicated by the following claims.

[0102] It should be understood that the present application is not limited to the exact structures described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.

Claims

1. A data processing method, characterized in that: A method is applied to a first server in a cluster, wherein the cluster includes a web server, multiple servers, and multiple databases. The multiple servers are connected to the web server to receive and process requests sent by a front-end. Each server is connected to a database and operates the database to which it is connected. Each server is configured with an HTTP interface and receives HTTP requests sent by other servers through the interface. The method includes: receiving a data processing request, wherein the data processing request includes data information of data to be processed; Determining identification information of a target database related to the data to be processed based on the data information; and When the identification information indicates that the target database includes an external database, sending an HTTP request carrying a data processing instruction to a second server connected to the external database, so that the second server performs a query operation on the database connected thereto according to the data processing instruction, wherein the second server belongs to the cluster; In a case where the identification information indicates that the target database includes a local database linked to the first server, the to-be-processed data is processed in the local database.

2. The method according to claim 1, characterized in that Before receiving the data processing request, the method further includes: determining a correlation coefficient between a plurality of business data, wherein the data to be processed belongs to the business data; and According to the correlation coefficients, the multiple business data are stored in different databases.

3. The method according to claim 2, characterized in that Determining the correlation coefficients between the multiple business data includes: performing a modulo operation on the service numbers corresponding to the multiple service data; and The correlation coefficient is determined according to the result of the modulo operation.

4. The method according to claim 1, wherein After sending the HTTP request to the second server linked to the external database, the method further includes: The data to be processed is received from the second server.

5. The method according to claim 1, wherein Before receiving the data processing request, the method further includes: In a case where the access form of the data processing request is visitor access, determining any server as the first server; or In a case where the access form of the data processing request is login access, a server associated with the login information is determined as the first server.

6. A data processing device, characterized in that: A first server applied to a cluster, the cluster including a web server, multiple servers, and multiple databases, the multiple servers connected to the web server to receive and process requests sent by the front end, each server connected to a database, each server operating the database to which it is connected, each server configured with an HTTP interface, and receiving HTTP requests sent by other servers through the interface, including: A first receiving module receives a data processing request, wherein the data processing request includes data information of data to be processed; A first determining module is configured to determine identification information of a target database related to the data to be processed based on the data information; and a first processing module, configured to, when the identification information indicates that the target database includes an external database, send an HTTP request carrying a data processing instruction to a second server connected to the external database, so that the second server performs a query operation on the database connected thereto according to the data processing instruction, wherein the second server belongs to the cluster; The second processing module is configured to process the to-be-processed data in the local database when the identification information indicates that the target database includes the local database linked to the first server.

7. The device according to claim 6, characterized in that The device further comprises: A second determining module is configured to determine correlation coefficients between a plurality of types of business data, wherein the data to be processed belongs to the business data; and The grouping module is used to store the multiple business data into different databases according to the correlation coefficient.

8. The device according to claim 7, characterized in that The second determining module is specifically configured to: performing a modulo operation on the service numbers corresponding to the multiple service data; and The correlation coefficient is determined according to the result of the modulo operation.

9. The device according to claim 7, characterized in that The device further comprises: The second receiving module is configured to receive the data to be processed from the second server.

10. The device according to claim 7, characterized in that The apparatus further includes a third determining module, specifically configured to: In a case where the access form of the data processing request is visitor access, determining any server as the first server; or In a case where the access form of the data processing request is login access, a server associated with the login information is determined as the first server.

11. An electronic device, characterized in that: include: a processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 5.

12. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 5 when executed by a processor.

13. A computer program product, characterized in that The invention comprises a computer program, which implements the method according to any one of claims 1 to 5 when executed by a processor.

Citation Information

Patent Citations

  • Data query method and device based on database cluster, server and medium

    CN113438304A

  • Data reading method and device and computer readable storage medium

    CN114748871A