CN113127570A - Data operation method, system, equipment and storage medium of distributed server - Google Patents

Data operation method, system, equipment and storage medium of distributed server Download PDF

Info

Publication number
CN113127570A
CN113127570A CN202110540880.1A CN202110540880A CN113127570A CN 113127570 A CN113127570 A CN 113127570A CN 202110540880 A CN202110540880 A CN 202110540880A CN 113127570 A CN113127570 A CN 113127570A
Authority
CN
China
Prior art keywords
data
process module
distributed
user
coordinator
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110540880.1A
Other languages
Chinese (zh)
Other versions
CN113127570B (en
Inventor
张星
陈小丰
戴天诚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Lilith Technology Corp
Original Assignee
Shanghai Lilith Technology Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Lilith Technology Corp filed Critical Shanghai Lilith Technology Corp
Priority to CN202110540880.1A priority Critical patent/CN113127570B/en
Publication of CN113127570A publication Critical patent/CN113127570A/en
Application granted granted Critical
Publication of CN113127570B publication Critical patent/CN113127570B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • G06F16/275Synchronous replication
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • G06F16/24552Database cache management

Abstract

The invention discloses a data operation method, a system, equipment and a storage medium of a distributed server. The data operation method of the distributed server comprises the following steps: receiving a current user request; determining a first service process module, wherein the first service process module at least comprises a first distributed data coordinator and a first memory cache; the gateway sends the current user request to a first service process module; the first distributed data coordinator searches whether the first memory cache has user data or not; if the first distributed data coordinator does not exist, the first distributed data coordinator sets the user data in the data positioning cache database to be positioned as a first service process module, and loads the user data from the user database; and the first distributed data coordinator also searches whether the user data has original positioning, and if so, the first distributed data coordinator informs a second service process module where the original positioning is located to delete the user data.

Description

Data operation method, system, equipment and storage medium of distributed server
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a data operation method for a distributed server, a data operation system, an electronic device, and a storage medium.
Background
The data operation of the distributed server means that when a user sends a request to the server, the server needs to perform operations such as adding, deleting, modifying, checking and the like on user data. At present, the most common way of data operation of a distributed server is to adopt a real-time data interaction method. FIG. 1 shows a schematic diagram of a data operating system of a distributed server in the prior art. As shown in fig. 1, when a user request arrives at the server, operations such as addition, deletion, modification, and search are performed on the user data in the user database in real time. The method is simple, does not need to consider the problem of data consistency, and directly uses the self-contained affairs of the user database to ensure the data consistency. However, the processing time for operating the user request each time is relatively long, and a large amount of time is consumed in the processes of network transmission, data processing of the user database and the like.
In order to solve the problem of long processing time, a memory caching method is also adopted at present. Fig. 2 is a schematic diagram illustrating a data operating system of another distributed server in the prior art. As shown in fig. 2, the data operating system of the distributed server includes a gateway 1 ', a user database 2', and a plurality of business process modules. In the prior art shown in fig. 2, a business process module a and a business process module B are taken as examples for explanation. The service process module A and the service process module B are both provided with memory cache. In the prior art shown in fig. 2, after a user requests to load user data from a user database to a memory cache of a service process module for the first time, the user data only needs to be added, deleted, modified, checked, and the like in the memory cache subsequently, so that the data processing speed can be improved, and the processing consumption of a network and the user database is reduced. However, when the gateway forwards the user request to different service process modules, data operation is performed in the memory caches of the service process modules, and further, a problem of data inconsistency occurs. Therefore, in order to avoid the above situation, in the prior art shown in fig. 2, there is a data positioning cache database 3 ', when the gateway forwards the user request, it will ensure that the user request is sent to the same business process module by querying the data positioning cache database 3'.
Although the data location cache database 3 ' in fig. 2 can solve the problem of data consistency, the gateway 1 ' queries the data location cache database 3 ' each time a user request is forwarded, which still increases processing consumption.
Disclosure of Invention
In view of the defects in the prior art, an object of the present invention is to provide a data operation method, a data operation system, a device, and a storage medium for a distributed server, where the data operation method and the data operation system for the distributed server can improve the efficiency of data operation while ensuring data consistency.
According to an aspect of the present invention, there is provided a data manipulation method of a distributed server, including the steps of: receiving a current user request through a gateway; determining a first service process module for receiving the current user request, wherein the first service process module at least comprises a first distributed data coordinator and a first memory cache; the gateway sends the current user request to the first business process module; the first distributed data coordinator searches whether user data exists in the first memory cache or not; if so, the first service process module processes the current user request; if the user data does not exist in the first memory cache, the first distributed data coordinator sets the user data in a data positioning cache database as the first service process module, loads the user data from the user database into the first memory cache, and processes the current user request through the first service process module; the first distributed data coordinator also searches whether the user data has original positioning, if so, the first distributed data coordinator informs a second service process module where the original positioning is located to delete the user data, and the second service process module comprises a second distributed data coordinator and a second memory cache; and the second distributed data coordinator deletes the user data in the second memory cache after receiving the notification information of the first distributed data coordinator.
Optionally, after determining a first service process module for receiving a current user request, the gateway sends all received user requests to the first service process module.
Optionally, the gateway sends all new user requests to the first business process module using a consistent hashing algorithm.
Optionally, in the step of determining the first business process module for receiving the current user request, the method further includes the following steps: detecting whether the total number of the business process modules changes; and if so, re-determining the first business process module for receiving the current user request.
According to another aspect of the present invention, there is also provided a data operating system of a distributed server, including: a gateway; a user database for storing user data; the data positioning cache database is used for storing user data positioning; the system comprises a plurality of business process modules, a plurality of service module management module and a plurality of business process modules, wherein each business process module comprises a distributed data coordinator and a memory cache; the selection module is used for determining a first business process module used for receiving the current user request from the plurality of business process modules; the first business process module at least comprises a first distributed data coordinator and a first memory cache; the first distributed data coordinator receives the current user request sent by the gateway and searches whether user data exists in the first memory cache or not; if so, the first service process module processes the current user request; if the user data does not exist in the data positioning cache database, the first distributed data coordinator sets the user data positioning in the data positioning cache database as the first service process module, loads the user data from the user database into the first memory cache, and processes the current user request through the first service process module; the first distributed data coordinator also searches whether the user data has original positioning, if so, the first distributed data coordinator informs a second service process module in the plurality of service process modules where the original positioning is located to delete the user data, the second service process module comprises a second distributed data coordinator and a second memory cache, and the second distributed data coordinator deletes the user data in the second memory cache after receiving notification information of the first distributed data coordinator.
Optionally, after the selection module determines a first service process module for receiving the current user request, the gateway sends all the received user requests to the first service process module.
Optionally, the gateway sends all new user requests to the first business process module using a consistent hashing algorithm.
Optionally, the selecting module further includes a detecting unit, where the detecting unit detects whether the total number of the service process modules changes; and if so, re-determining the first business process module for receiving the current user request.
According to still another aspect of the present invention, there is also provided a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the data manipulation method of the distributed server described above.
According to still another aspect of the present invention, there is also provided an electronic apparatus including: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to perform the steps of the above-described data manipulation method of the distributed server via execution of the executable instructions.
Compared with the prior art, in the data operation method of the distributed server and the system, the electronic device, and the storage medium thereof provided by the embodiments of the present invention, the distributed data coordinator is set in the service process module, and when no user data exists in the memory cache of the service process module, the user data in the data positioning cache database is positioned and set as the service process module, and the user data is loaded into the memory cache thereof. In addition, when the user data has the original location, the distributed data coordinator also informs the distributed data coordinator of the service process module where the original location is located to delete the user data, so that the consistency of the data can be ensured. In addition, after the service process module for receiving the current user request is determined, the gateway sends all the received user requests to the service process module, so that the efficiency of user data operation is improved. In addition, data is migrated through the distributed data coordinator of the business process module, so that normal operation can still be guaranteed under the condition that the business process expands and contracts the capacity.
Drawings
Other features, objects and advantages of the invention will become more apparent upon reading of the detailed description of non-limiting embodiments with reference to the following drawings:
FIG. 1 is a diagram of a data operating system of a distributed server in the prior art;
FIG. 2 is a block diagram of a data operating system of another distributed server in the prior art;
FIG. 3 is a flow chart of a method of data manipulation by a distributed server according to an embodiment of the present invention;
FIG. 4 is a flowchart of substeps of determining a first business process module in a method of data manipulation according to another embodiment of the present invention;
FIG. 5 is a schematic diagram of a data operating system of a distributed server according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of a computer-readable storage medium in an exemplary disclosed embodiment of the invention; and
fig. 7 is a schematic diagram of an electronic device in an exemplary embodiment of the disclosure.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art. The same reference numerals in the drawings denote the same or similar structures, and thus their repetitive description will be omitted.
The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to provide a thorough understanding of embodiments of the invention. One skilled in the relevant art will recognize, however, that the invention may be practiced without one or more of the specific details, or with other methods, components, materials, and so forth. In some instances, well-known structures, materials, or operations are not shown or described in detail to avoid obscuring the invention.
Furthermore, the drawings are merely schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus their repetitive description will be omitted. Some of the block diagrams shown in the figures are functional entities and do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor devices and/or microcontroller devices.
According to the main idea of the invention, the data operation method of the distributed server comprises the following steps: receiving a current user request through a gateway; determining a first service process module for receiving the current user request, wherein the first service process module at least comprises a first distributed data coordinator and a first memory cache; the gateway sends the current user request to the first business process module; the first distributed data coordinator searches whether user data exists in the first memory cache or not; if so, the first service process module processes the current user request; if the user data does not exist in the first memory cache, the first distributed data coordinator sets the user data in a data positioning cache database as the first service process module, loads the user data from the user database into the first memory cache, and processes the current user request through the first service process module; the first distributed data coordinator also searches whether the user data has original positioning, if so, the first distributed data coordinator informs a second service process module where the original positioning is located to delete the user data, and the second service process module comprises a second distributed data coordinator and a second memory cache; and the second distributed data coordinator deletes the user data in the second memory cache after receiving the notification information of the first distributed data coordinator.
The technical contents of the present invention will be further described with reference to the accompanying drawings and examples.
Referring to fig. 3, a flowchart of a data operation method of a distributed server according to an embodiment of the present invention is shown. As shown in fig. 3, in an embodiment of the present invention, the data operation method of the distributed server includes the following steps:
step S10: a current user request is received through a gateway.
Step S20: a first business process module for receiving a current user request is determined. It should be noted that the data operating system of the distributed server may include a plurality of business process modules, and in this step, the business process module that is determined to receive the current user request is taken as the first business process module. The first business process module at least comprises a first distributed data coordinator and a first memory cache.
Step S30: and the gateway sends the current user request to the first service process module.
Step S40: the first distributed data coordinator searches whether the first memory cache has user data.
If yes, go to step S50: and the first business process module processes the current user request.
If not, go to step S60: the first distributed data coordinator sets the user data location in the data location cache database as the first business process module, and loads the user data from the user database into the first memory cache, and then performs step S50.
In the embodiment of the invention, because the user data is directly obtained from the first memory cache when the user request is subsequently processed, the interaction with the data positioning cache database and the user database is not needed, and the data operation efficiency is improved.
Further, the data operation method of the distributed server of the present invention further includes step S70: the first distributed data coordinator looks up the user data for the presence of the original location.
If yes, go to step S80: and the first distributed data coordinator informs the second service process module where the original location is positioned to delete the user data. The second service process module comprises a second distributed data coordinator and a second memory cache. The notification information of the first distributed data coordinator is received by the second distributed data coordinator.
Further, after the second distributed data coordinator receives the notification information of the first distributed data coordinator, the step S90 is executed: and the second distributed data coordinator deletes the user data in the second memory cache.
It should be noted that, although step S70, step S80, and step S90 are executed after step S60 is completed in the embodiment shown in fig. 3, this is not limited to this, and step S70, step S80, and step S90 may also be synchronously completed while step S60 is executed in other embodiments of the present invention, which is not described herein again.
As described above, in the embodiment of the present invention, a data positioning cache database originally accessed by a gateway in the prior art (for example, as shown in fig. 2) is handed over to a business process module to be accessed, and a distributed data coordinator is added to the business process module to coordinate operations such as search and migration of user data, so as to avoid a problem of data inconsistency caused by forwarding a user request to a different business process module by the gateway. For example, if the user request is forwarded to the service process module a by the gateway for the first time (at this time, the service process module a serves as the first service process module), the service process module a loads the user data into its own memory cache; if the user request is forwarded to the service process module B by the gateway for the second time (at this time, the service process module B is used as the first service process module), after the method described in the above embodiment is adopted, the service process module B will notify the service process a (at this time, the service process module a is used as the second service process module) to unload data, and load the user data into its own memory cache. Therefore, no matter how the gateway forwards the user request, the user data can be operated or processed in only one service process module, and the problem of data inconsistency can not occur.
The method of the present invention will be described in more detail below with reference to an actual game operation scenario as an example. Specifically, a plurality of lobby server process modules (business process modules) exist in a game program, and when no corresponding player data exists in the lobby server process modules, a request of a player cannot be processed, so that when the request of the player is received, firstly, the player data needs to be known on which lobby server process module, and then data positioning needs to be carried out. After the method of the invention is adopted, when a user request is forwarded to a server process module of a new hall different from a server process module (old positioning) of a hall where original player data is located, a distributed data coordinator of the server process module of the new hall sets the user data positioning in a data positioning cache database as the server process module of the new hall, namely, the number of the server process module of the new hall is used as new data positioning (new positioning).
Further, although the above-mentioned distributed data coordinator can solve the problem of data consistency, if the gateway sends the request to different business process modules each time, user data is loaded and unloaded back and forth among a plurality of different business process modules, which also results in an increase of time consumption for processing the user request. To avoid this, in a preferred embodiment of the present invention, after determining the first service process module for receiving the current user request, the gateway sends all the received user requests to the first service process module, that is, the gateway forwards the request to the same service process module each time. Optionally, the gateway sends all new user requests to the first business process module using a consistent Hash (Hash) algorithm.
Further, please refer to fig. 4, which shows a flowchart of sub-steps of determining a first business process module in a data operation method according to another embodiment of the present invention. Specifically, in the embodiment of the present invention, in the step of determining the first service process module for receiving the current user request (i.e. in step S20 in fig. 3), the following steps may also be included:
step S201: and detecting whether the total number of the business process modules changes.
If yes, go to step S202: and re-determining the first business process module for receiving the current user request. Then, step S30 is executed.
If not, step S30 is still executed.
It should be noted that the step is mainly for the case that the business process module is increased or decreased. Specifically, when the gateway finds that the number of the business process modules increases, the gateway recalculates which business process module the user request is forwarded to according to a consistent Hash (Hash) algorithm, that is, the first business process module is determined again. In addition, although the service process module forwarded by the gateway changes when the service process module needs to be scaled, the user data can still be transferred by using the distributed data coordinator through the data operation method.
Therefore, in the data operation method of the distributed server, the data is migrated through the distributed data coordinator of the service process module, so that the normal operation can be still ensured under the condition of service process expansion and contraction.
Further, the present invention also provides a data operation system of a distributed server, which is used for implementing the data operation method of the distributed server shown in fig. 3 and fig. 4. Referring to fig. 5, a schematic structural diagram of a data operating system of a distributed server according to an embodiment of the present invention is shown. Specifically, in the embodiment shown in fig. 5, the data operating system of the distributed server includes: the system comprises a gateway 1, a user database 2, a data positioning cache database 3, a plurality of service process modules (fig. 5 only shows a first service process module 51 and a second service process module 52 to explain the embodiment of the present invention), and a selection module 4. Wherein the user database 2 is used for storing user data. The data positioning cache database 3 is used for storing user data positioning.
The selecting module 4 is configured to determine, among the plurality of business process modules, a first business process module for receiving a current user request. More specifically, in the embodiment of the present invention, each of the plurality of business process modules includes a distributed data coordinator and a memory cache. As shown in fig. 5, the first business process module 51 includes at least a first distributed data coordinator 511 and a first memory cache 512.
The first distributed data coordinator 51 receives the current user request sent by the gateway 1, and searches whether the user data exists in the first memory cache 512. If yes, the first service process module 51 processes the current user request; if the user data does not exist, the first distributed data coordinator 511 sets the user data location in the data location cache database 3 as the first service process module 51, loads the user data from the user database 2 into the first memory cache 512, and processes the current user request by the first service process module 51.
Further, the first distributed data coordinator 511 is also used to find out whether the original location exists for the user data. If the user data exists, the first distributed data coordinator 511 notifies the second business process module 52 in the multiple business process modules where the original location is located to delete the user data, so as to avoid the problem of data inconsistency. As shown in fig. 5, the second business process module 52 includes a second distributed data coordinator 521 and a second memory cache 522. The second distributed data coordinator 521 deletes the user data in the second memory cache 522 after receiving the notification information of the first distributed data coordinator 511.
Further, in the preferred embodiment of the present invention, after the selecting module 4 determines the first service process module for receiving the current user request, the gateway 1 sends all the received user requests to the first service process module 51. Optionally, the gateway 1 sends all new user requests to the first business process module 51 using a consistent hashing algorithm.
Furthermore, the selecting module 4 further includes a detecting unit (not shown in the figure), which can be used to detect whether the total number of the service process modules changes; if yes, the first business process module for receiving the current user request is determined again (i.e. the steps shown in fig. 4 are executed).
In an exemplary embodiment of the present disclosure, there is also provided a computer-readable storage medium on which a computer program is stored, which when executed by, for example, a processor, may implement the steps of the data manipulation method of the distributed server described in any one of the above embodiments. In some possible embodiments, the various aspects of the invention may also be implemented in the form of a program product comprising program code means for causing a terminal device to carry out the steps according to various exemplary embodiments of the invention described in the data manipulation method section of the distributed server illustrated in fig. 3 and 4 and described above in this specification, when said program product is run on the terminal device.
Referring to fig. 6, a program product 300 for implementing the above method according to an embodiment of the present invention is described, which may employ a portable compact disc read only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited in this regard and, in the present document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The computer readable storage medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable storage medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
In an exemplary embodiment of the present disclosure, there is also provided an electronic device, which may include a processor, and a memory for storing executable instructions of the processor. Wherein the processor is configured to perform the steps of the data manipulation method of the distributed server in any of the above embodiments via execution of the executable instructions.
As will be appreciated by one skilled in the art, aspects of the present invention may be embodied as a system, method or program product. Thus, various aspects of the invention may be embodied in the form of: an entirely hardware embodiment, an entirely software embodiment (including firmware, microcode, etc.) or an embodiment combining hardware and software aspects that may all generally be referred to herein as a "circuit," module "or" system.
An electronic device 600 according to this embodiment of the invention is described below with reference to fig. 7. The electronic device 600 shown in fig. 7 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 7, the electronic device 600 is embodied in the form of a general purpose computing device. The components of the electronic device 600 may include, but are not limited to: at least one processing unit 610, at least one storage unit 620, a bus 630 that connects the various system components (including the storage unit 620 and the processing unit 610), a display unit 640, and the like.
Wherein the storage unit stores program code executable by the processing unit 610 to cause the processing unit 610 to perform steps according to various exemplary embodiments of the present invention described in the data manipulation method section of the distributed server described above in this specification. For example, the processing unit 610 may perform the steps as shown in fig. 3 and 4.
The storage unit 620 may include readable media in the form of volatile memory units, such as a random access memory unit (RAM)6201 and/or a cache memory unit 6202, and may further include a read-only memory unit (ROM) 6203.
The memory unit 620 may also include a program/utility 6204 having a set (at least one) of program modules 6205, such program modules 6205 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
Bus 630 may be one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
The electronic device 600 may also communicate with one or more external devices 700 (e.g., keyboard, pointing device, bluetooth device, etc.), with one or more devices that enable a user to interact with the electronic device 600, and/or with any devices (e.g., router, modem, etc.) that enable the electronic device 600 to communicate with one or more other computing devices. Such communication may occur via an input/output (I/O) interface 650. Also, the electronic device 600 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network such as the Internet) via the network adapter 660. The network adapter 660 may communicate with other modules of the electronic device 600 via the bus 630. It should be appreciated that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the electronic device 600, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which may be a personal computer, a server, or a network device, etc.) to execute the data operation method of the above-mentioned distributed server according to the embodiments of the present disclosure.
In summary, in the data operation method of the distributed server and the system, the electronic device, and the storage medium thereof provided in the embodiments of the present invention, the distributed data coordinator is set in the service process module, and when there is no user data in the memory cache of the service process module, the user data in the data positioning cache database is set as the service process module in a positioning manner, and the user data is loaded into the memory cache of the service process module. In addition, when the user data has the original location, the distributed data coordinator also informs the distributed data coordinator of the service process module where the original location is located to delete the user data, so that the consistency of the data can be ensured. In addition, after the service process module for receiving the current user request is determined, the gateway sends all the received user requests to the service process module, so that the efficiency of user data operation is improved. In addition, data is migrated through the distributed data coordinator of the business process module, so that normal operation can still be guaranteed under the condition that the business process expands and contracts the capacity.
Although the invention has been described with respect to alternative embodiments, it is not intended to be limited thereto. Various changes and modifications may be made by those skilled in the art without departing from the spirit and scope of the invention. Therefore, the protection scope of the present invention is subject to the scope defined by the claims.

Claims (10)

1. A data operation method of a distributed server is characterized by comprising the following steps:
receiving a current user request through a gateway;
determining a first service process module for receiving the current user request, wherein the first service process module at least comprises a first distributed data coordinator and a first memory cache;
the gateway sends the current user request to the first business process module;
the first distributed data coordinator searches whether user data exists in the first memory cache or not;
if so, the first service process module processes the current user request;
if the user data does not exist in the first memory cache, the first distributed data coordinator sets the user data in a data positioning cache database as the first service process module, loads the user data from the user database into the first memory cache, and processes the current user request through the first service process module;
the first distributed data coordinator also searches whether the user data has original positioning, if so, the first distributed data coordinator informs a second service process module where the original positioning is located to delete the user data, and the second service process module comprises a second distributed data coordinator and a second memory cache;
and the second distributed data coordinator deletes the user data in the second memory cache after receiving the notification information of the first distributed data coordinator.
2. The method of claim 1, wherein after determining a first business process module for receiving a current user request, the gateway sends all received user requests to the first business process module.
3. The method of distributed server data manipulation according to claim 2 wherein the gateway sends all new user requests to the first business process module using a consistent hashing algorithm.
4. The data manipulation method of the distributed server according to claim 2, wherein in the step of determining the first business process module for receiving the current user request, further comprising the steps of:
detecting whether the total number of the business process modules changes;
and if so, re-determining the first business process module for receiving the current user request.
5. A data operating system of a distributed server, the data operating system of the distributed server comprising:
a gateway;
a user database for storing user data;
the data positioning cache database is used for storing user data positioning;
the system comprises a plurality of business process modules, a plurality of service module management module and a plurality of business process modules, wherein each business process module comprises a distributed data coordinator and a memory cache; and
a selecting module, configured to determine, among the plurality of service process modules, a first service process module for receiving a current user request;
the first business process module at least comprises a first distributed data coordinator and a first memory cache;
the first distributed data coordinator receives the current user request sent by the gateway and searches whether user data exists in the first memory cache or not;
if so, the first service process module processes the current user request;
if the user data does not exist in the data positioning cache database, the first distributed data coordinator sets the user data positioning in the data positioning cache database as the first service process module, loads the user data from the user database into the first memory cache, and processes the current user request through the first service process module;
the first distributed data coordinator also searches whether the user data has original positioning, if so, the first distributed data coordinator informs a second service process module in the plurality of service process modules where the original positioning is located to delete the user data, the second service process module comprises a second distributed data coordinator and a second memory cache, and the second distributed data coordinator deletes the user data in the second memory cache after receiving notification information of the first distributed data coordinator.
6. The data operating system of a distributed server of claim 5, wherein after the selection module determines a first business process module for receiving a current user request, the gateway sends all received user requests to the first business process module.
7. The data operating system of a distributed server of claim 6 wherein the gateway sends all new user requests to the first business process module using a consistent hashing algorithm.
8. The data operating system of the distributed server according to claim 6, wherein the selecting module further comprises a detecting unit, and the detecting unit detects whether the total number of the business process modules changes; and if so, re-determining the first business process module for receiving the current user request.
9. An electronic device, characterized in that the electronic device comprises:
a processor;
storage medium having stored thereon a computer program which, when executed by the processor, performs a data manipulation method according to any one of claims 1 to 4.
10. A storage medium, having stored thereon a computer program which, when executed by a processor, performs a data manipulation method according to any one of claims 1 to 4.
CN202110540880.1A 2021-05-18 2021-05-18 Data operation method, system, equipment and storage medium of distributed server Active CN113127570B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110540880.1A CN113127570B (en) 2021-05-18 2021-05-18 Data operation method, system, equipment and storage medium of distributed server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110540880.1A CN113127570B (en) 2021-05-18 2021-05-18 Data operation method, system, equipment and storage medium of distributed server

Publications (2)

Publication Number Publication Date
CN113127570A true CN113127570A (en) 2021-07-16
CN113127570B CN113127570B (en) 2022-11-04

Family

ID=76782706

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110540880.1A Active CN113127570B (en) 2021-05-18 2021-05-18 Data operation method, system, equipment and storage medium of distributed server

Country Status (1)

Country Link
CN (1) CN113127570B (en)

Citations (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101764824A (en) * 2010-01-28 2010-06-30 深圳市同洲电子股份有限公司 Distributed cache control method, device and system
CN105208096A (en) * 2015-08-24 2015-12-30 用友网络科技股份有限公司 Distributed cache system and method
CN105701219A (en) * 2016-01-14 2016-06-22 北京邮电大学 Distributed cache implementation method
CN105704152A (en) * 2016-03-30 2016-06-22 网易(杭州)网络有限公司 Method and device for logging on game server
US20160283479A1 (en) * 2013-11-13 2016-09-29 Beijing Jingdong Shangke Information Tecnology Co., Ltd. Method and system for manipulating data
US20170017527A1 (en) * 2015-01-30 2017-01-19 Amazon Technologies, Inc. Contention and selection of controlling work coordinator in a distributed computing environment
US20180300474A1 (en) * 2016-10-31 2018-10-18 Soliton Systems K.K. Program behavior monitoring control apparatus, distributed object creation management apparatus, recording medium, and program behavior monitoring system
CN108777718A (en) * 2018-06-22 2018-11-09 阿里巴巴集团控股有限公司 A kind of operation system passes through client and accesses reads the method and apparatus for writing few system more
CN108874552A (en) * 2018-06-28 2018-11-23 杭州云英网络科技有限公司 Distributed lock executes method, apparatus and system, application server and storage medium
CN110597739A (en) * 2019-06-03 2019-12-20 上海云盾信息技术有限公司 Configuration management method, system and equipment
CN110633320A (en) * 2018-05-30 2019-12-31 北京京东尚科信息技术有限公司 Processing method, system, equipment and storage medium of distributed data service
CN110855708A (en) * 2019-11-26 2020-02-28 上海莉莉丝科技股份有限公司 Game server architecture
CN111400381A (en) * 2020-02-28 2020-07-10 北京致医健康信息技术有限公司 Data storage method and device, computer equipment and storage medium
CN111694865A (en) * 2020-06-02 2020-09-22 中国工商银行股份有限公司 Four-layer structure data acquisition method and device based on distributed system
CN111723113A (en) * 2020-06-19 2020-09-29 深圳前海微众银行股份有限公司 Distributed caching method and device for business data, terminal equipment and storage medium
CN111857979A (en) * 2020-06-28 2020-10-30 厦门极致互动网络技术股份有限公司 Information management method, system, storage medium and equipment of distributed system
CN112148394A (en) * 2020-09-08 2020-12-29 上加下信息技术成都有限公司 Distributed transaction coordination method and device and electronic equipment
CN112245904A (en) * 2020-11-06 2021-01-22 网易(杭州)网络有限公司 Method, system, storage medium and computer device for supporting cross-server game
CN112702446A (en) * 2020-12-16 2021-04-23 互联网域名系统北京市工程研究中心有限公司 Distributed storage system with DNS (domain name system) cached in edge network

Patent Citations (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101764824A (en) * 2010-01-28 2010-06-30 深圳市同洲电子股份有限公司 Distributed cache control method, device and system
US20160283479A1 (en) * 2013-11-13 2016-09-29 Beijing Jingdong Shangke Information Tecnology Co., Ltd. Method and system for manipulating data
US20170017527A1 (en) * 2015-01-30 2017-01-19 Amazon Technologies, Inc. Contention and selection of controlling work coordinator in a distributed computing environment
CN105208096A (en) * 2015-08-24 2015-12-30 用友网络科技股份有限公司 Distributed cache system and method
CN105701219A (en) * 2016-01-14 2016-06-22 北京邮电大学 Distributed cache implementation method
CN105704152A (en) * 2016-03-30 2016-06-22 网易(杭州)网络有限公司 Method and device for logging on game server
US20180300474A1 (en) * 2016-10-31 2018-10-18 Soliton Systems K.K. Program behavior monitoring control apparatus, distributed object creation management apparatus, recording medium, and program behavior monitoring system
CN110633320A (en) * 2018-05-30 2019-12-31 北京京东尚科信息技术有限公司 Processing method, system, equipment and storage medium of distributed data service
CN108777718A (en) * 2018-06-22 2018-11-09 阿里巴巴集团控股有限公司 A kind of operation system passes through client and accesses reads the method and apparatus for writing few system more
CN108874552A (en) * 2018-06-28 2018-11-23 杭州云英网络科技有限公司 Distributed lock executes method, apparatus and system, application server and storage medium
CN110597739A (en) * 2019-06-03 2019-12-20 上海云盾信息技术有限公司 Configuration management method, system and equipment
CN110855708A (en) * 2019-11-26 2020-02-28 上海莉莉丝科技股份有限公司 Game server architecture
CN111400381A (en) * 2020-02-28 2020-07-10 北京致医健康信息技术有限公司 Data storage method and device, computer equipment and storage medium
CN111694865A (en) * 2020-06-02 2020-09-22 中国工商银行股份有限公司 Four-layer structure data acquisition method and device based on distributed system
CN111723113A (en) * 2020-06-19 2020-09-29 深圳前海微众银行股份有限公司 Distributed caching method and device for business data, terminal equipment and storage medium
CN111857979A (en) * 2020-06-28 2020-10-30 厦门极致互动网络技术股份有限公司 Information management method, system, storage medium and equipment of distributed system
CN112148394A (en) * 2020-09-08 2020-12-29 上加下信息技术成都有限公司 Distributed transaction coordination method and device and electronic equipment
CN112245904A (en) * 2020-11-06 2021-01-22 网易(杭州)网络有限公司 Method, system, storage medium and computer device for supporting cross-server game
CN112702446A (en) * 2020-12-16 2021-04-23 互联网域名系统北京市工程研究中心有限公司 Distributed storage system with DNS (domain name system) cached in edge network

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
周智: "Redis分布式缓存实现与解析", 《信息通信》 *
王康等: "分布式存储系统中改进的一致性哈希算法", 《计算机技术与发展》 *

Also Published As

Publication number Publication date
CN113127570B (en) 2022-11-04

Similar Documents

Publication Publication Date Title
US10754835B2 (en) High-efficiency deduplication module of a database-management system
CN107870728B (en) Method and apparatus for moving data
US8793227B2 (en) Storage system for eliminating duplicated data
CN111309732B (en) Data processing method, device, medium and computing equipment
US8863117B2 (en) Optimizing a file system interface in a virtualized computing environment
US20130055371A1 (en) Storage control method and information processing apparatus
US20090204694A1 (en) Grid computing system, management server, processing server, control method, control program and recording medium
US20130054727A1 (en) Storage control method and information processing apparatus
US11392545B1 (en) Tracking access pattern of inodes and pre-fetching inodes
US10394819B2 (en) Controlling mirroring of tables based on access prediction
US11550913B2 (en) System and method for performing an antivirus scan using file level deduplication
CN110119386B (en) Data processing method, data processing apparatus, medium, and computing device
WO2018064319A9 (en) Tracking access pattern of inodes and pre-fetching inodes
US10025607B2 (en) Optimizing a file system interface in a virtualized computing environment
US11481140B1 (en) Dynamic base disk mirroring for linked clones
CN113127570B (en) Data operation method, system, equipment and storage medium of distributed server
CN114449040B (en) Configuration issuing method and device based on cloud platform
US10235293B2 (en) Tracking access pattern of inodes and pre-fetching inodes
CN115981559A (en) Distributed data storage method and device, electronic equipment and readable medium
US20220067065A1 (en) Providing instant and distributed access to a source blob via copy-on-read blobs and link blobs
CN111625500B (en) File snapshot method and device, electronic equipment and storage medium
CN112711572B (en) Online capacity expansion method and device suitable for database and table division
CN113986833A (en) File merging method, system, computer system and storage medium
CN113076175A (en) Memory sharing method and device for virtual machine
CN113127416A (en) Data query method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant